Overview
If you inspect multiple images the inspected object is moving. Therefore it's required to set a coordinate system. This example is using edge detection from two directions to calculate the intersection and set the coordination system.
Description
This example set's a coordination system based on the location of the object. Functions that are placed afterwards should reference to the coordination sytsem. To make sure the functions are moving relative to the coordination system.
Requirements
NI Vision Builder for Automated Inspection (VBAI) 2010 "or compatible"
Steps to Implement or Execute Code
In order to set XY Coordinate system in VBAI, you would need to do the following
1. Find Edge for Y axis
2. Find Edge for X axis
3. Find the intersection for those edges
4. Set XY Coordinate
Additional Information or References
Note: You might have to increase the region of interest for the edge detection to make sure it covers the left bottom of the object.
**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit thisdiscussion thread**