IMAQ Find CoordSys (2 Rects) 2 VI
Owning Palette: Coordinate SystemInstalled With: NI Vision Development ModuleComputes a coordinate system based on the position of an object in two search areas of an image. The location and orientation of the coordinate system found is used to create the reference position of a Coordinate System or to update the current location and orientation of an existing Coordinate System. The function has the capability to overlay the following on the returned image: the position of the search area, the search lines, the edges found, and the location and orientation of the Coordinate System found.
Mode specifies the function that is performed by this VI. You can choose from the following values:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Options is a cluster defining the parameters of the edge detection algorithm and the information that is overlaid on the result image.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Image is a reference to the image in which the coordinate system is to be located. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Primary ROI Descriptor is a descriptor that defines the Region of Interest (ROI) within which the edge detection is performed.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Secondary ROI Descriptor is a descriptor that defines the Region of Interest (ROI) within which the edge detection is performed.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coordinate System In specifies the coordinate system to update. This input is required only when Mode is set to Update CoordSys. When Mode is set to Find Reference, the VI ignores this parameter. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Primary Line Fit Options specifies the options that are used to detect the straight edges.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Secondary Line Fit Options specifies the options that are used to detect the straight edges.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Image Out is a reference to the destination image. The search area and/or the result of the measurement may be overlaid on the image according to the settings. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Main Axis returns a cluster of two point coordinates specifying the coordinates of the edge that corresponds to the Main Axis. The first point is the intersection of the two axes of the coordinate system. The second point is the result of the computation of the intersection of the Main Axis with the Primary ROI Descriptor. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Secondary Axis returns a cluster of two point coordinates specifying the coordinates of the edge that corresponds to the Secondary Axis. The first point is the intersection of the two axis of the coordinate system. The second point is the result of the computation of the intersection of the Secondary Axis with the Secondary ROI Descriptor. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coordinate System Out is a cluster returning the position of the coordinate system.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.
|
Details
The VI uses the following algorithm. First, the VI determines the position of the Main Axis of the coordinate system. It locates the intersection points between a set of parallel search lines, in the Primary ROI Descriptor, and the edge of an object. The intersection points are determined based on their edge strength. The VI calculates a best-fit line through the points found. This line defines the Main Axis of the coordinate system. The process is repeated perpendicularly in the Secondary ROI Descriptor in order to locate the Secondary Axis. The intersection between the Main Axis and Secondary Axis is the origin of the coordinate system.
The VI sets the reference position and orientation of the coordinate system or updates its position depending on the Mode chosen.
Examples
Refer to the following for an example that uses this VI.
- LabVIEW\examples\Vision\3. Applications\Fuse Inspection Example.llb