Version:

Last Modified: October 26, 2017

Computes 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.

Function that is performed by this node.

You can choose from the following values:

Name | Value | Description |
---|---|---|

Find Reference | 0 | Specifies that the location and orientation of the found edges set the reference system of |

Update CoordSys | 1 | Specifies that the location and orientation of the found edges set the measurement system of |

Cluster defining the parameters of the edge detection algorithm and the information that is overlaid on the result image.

Order and direction in which the edges are searched.

The arrow in the **direction** symbol specifies the search direction for the **main axis**, while the perpendicular sign determines the position of the perpendicular axis.

Value | Main Axis | Secondary Axis |
---|---|---|

0 | Horizontal - Left to Right | Bottom to Top |

1 | Horizontal - Left to Right | Top to Bottom |

2 | Vertical - Top to Bottom | Left to Right |

3 | Vertical - Top to Bottom | Right to Left |

4 | Horizontal - Right to Left | Top to Bottom |

5 | Horizontal - Right to Left | Bottom to Top |

6 | Vertical - Bottom to Top | Right to Left |

7 | Vertical - Bottom to Top | Left to Right |

Parameters that are used to compute the edge gradient information and detect the edges along the **primary ROI descriptor**.

Polarity of the edges to be found.

Name | Value | Description |
---|---|---|

all edges | 0 | (Default) Searches for all edges |

rising edges | 1 | Searches for rising edges |

falling edges | 2 | Searches for falling edges |

Size of the edge detection kernel.

**Default: **3

Number of pixels averaged perpendicular to the search direction to compute the edge profile strength at each point along the search ROI.

**Default: **3

Minimum edge strength, or gradient magnitude, required for a detected edge.

**Default: **10

Interpolation method used to locate the edge position.

Name | Description |
---|---|

zero order | Rounds to the nearest integral edge location |

bilinear | Uses bilinear interpolation to compute the edge location |

bilinear fixed | (Default) Uses the fixed-point computation of bilinear interpolation to determine the edge location |

Method used to process the data extracted for edge detection.

Name | Description |
---|---|

average | (Default) Averages the data extracted for edge detection |

median | Takes the median of the data extracted for edge detection |

Parameters that are used to compute the edge gradient information and detect the edges along the **secondary ROI descriptor**.

Polarity of the edges to be found.

Name | Value | Description |
---|---|---|

all edges | 0 | (Default) Searches for all edges |

rising edges | 1 | Searches for rising edges |

falling edges | 2 | Searches for falling edges |

Size of the edge detection kernel.

**Default: **3

Number of pixels averaged perpendicular to the search direction to compute the edge profile strength at each point along the search ROI.

**Default: **3

Minimum edge strength, or gradient magnitude, required for a detected edge.

**Default: **10

Interpolation method used to locate the edge position.

Name | Description |
---|---|

zero order | Rounds to the nearest integral edge location |

bilinear | Uses bilinear interpolation to compute the edge location |

bilinear fixed | (Default) Uses the fixed-point computation of bilinear interpolation to determine the edge location |

Method used to process the data extracted for edge detection.

Name | Description |
---|---|

average | Averages the data extracted for edge detection |

median | Takes the median of the data extracted for edge detection |

**Default: **Average

Boolean that specifies if the ROI is overlaid on the image.

Boolean that specifies if the search lines used to locate the edges are overlaid on the image.

Boolean that specifies if the locations of the edges found are overlaid on the resulting image.

Boolean that determines whether the coordinate system found is overlaid on the result image.

Color used to overlay the search area.

Color used to overlay the search lines.

Color used to overlay the edge locations.

Color used to overlay the result.

Group name for the step overlays.

Reference to the source image.

Descriptor that defines the region of interest (ROI) within which the edge detection is performed.

Coordinates of the bounding rectangle.

Individual shapes that define an ROI.

Control specifying whether the contour is the external or internal edge of an ROI.

Shape type of the contour.

Relative position of the contour.

Descriptor that defines the region of interest (ROI) within which the edge detection is performed.

Coordinates of the bounding rectangle.

Individual shapes that define an ROI.

Control specifying whether the contour is the external or internal edge of an ROI.

Shape type of the contour.

Relative position of the contour.

Coordinate system to update.

This input is required only when **mode** is set to **update CoordSys**. When **mode** is set to **find reference**, the node ignores this parameter.

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

Options that are used to detect the straight edges.

Number of straight edges to find.

**Default: **1

Method used to find the straight edge.

Choose from the following options:

Name | Description |
---|---|

first edge rake | Fits a straight edge on the first points detected using a rake |

best edge rake | Fits a straight edge on the best points detected using a rake |

Hough edge rake | Finds the strongest straight edge using all points detected on a rake |

first edge projection | Uses the location of the first projected edge as the straight edge |

best edge projection | (Default) Finds the strongest projected edge location to determine the straight edge |

Minimum score of a detected straight edge.

**Default: **10

Maximum score of a detected straight edge.

**Default: **1000

Angle at which the straight edge is expected to be found.

**Default: **0

Positive and negative range around the **orientation** within which the straight edge is found.

**Default: **10

Expected angular accuracy of the straight edge.

**Default: **1

Gap in pixels between the search lines used with the rake-based methods.

**Default: **7

Minimum signal to noise ratio (SNR) of the edge points used to fit the straight edge.

**Default: **0

Minimum number for points as a percentage of the number of search lines to include in the detected straight edge.

**Default: **25%

Number of iterations used in the Hough-based method.

**Default: **5

Options that are used to detect the straight edges.

Number of straight edges to find.

**Default: **1

Method used to find the straight edge.

Choose from the following options:

Name | Description |
---|---|

first edge rake | Fits a straight edge on the first points detected using a rake |

best edge rake | Fits a straight edge on the best points detected using a rake |

Hough edge rake | Finds the strongest straight edge using all points detected on a rake |

first edge projection | Uses the location of the first projected edge as the straight edge |

best edge projection | (Default) Finds the strongest projected edge location to determine the straight edge |

Minimum score of a detected straight edge.

**Default: **10

Maximum score of a detected straight edge.

**Default: **1000

Angle at which the straight edge is expected to be found.

**Default: **0

Positive and negative range around the **orientation** within which the straight edge is found.

**Default: **10

Expected angular accuracy of the straight edge.

**Default: **1

Gap in pixels between the search lines used with the rake-based methods.

**Default: **7

Minimum signal to noise ratio (SNR) of the edge points used to fit the straight edge.

**Default: **0

Minimum number for points as a percentage of the number of search lines to include in the detected straight edge.

**Default: **25%

Number of iterations used in the Hough-based method.

**Default: **5

Reference to the destination image.

The search area and/or the result of the measurement can be overlaid on the image according to the settings.

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**.

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**.

Cluster returning the position of the coordinate system.

Cluster containing the following elements.

Point cluster that specifies the origin of the base-reference coordinate system.

X-coordinate of the point.

Y-coordinate of the point.

Angle that the base-reference coordinate system makes with the image coordinate system.

Direction of the y-axis of the base-reference coordinate system.

Cluster containing the following elements.

Point cluster that specifies the origin of the base-reference coordinate system.

X-coordinate of the point.

Y-coordinate of the point.

Angle that the base-reference coordinate system makes with the image coordinate system.

Direction of the y-axis of the base-reference coordinate system.

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

The node uses the following algorithm. First, the node 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 node 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 node sets the reference position and orientation of the coordinate system or updates its position depending on the **mode** chosen.

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application