imaqFindEdge
Usage
StraightEdgeReport* imaqFindEdge(Image* image, RotatedRect searchRect, RakeDirection direction, const FindEdgeOptions* options, const CoordinateTransform2* transform);
Purpose
Locates a straight edge in a rectangular search area. This function locates the intersection points between a set of parallel search lines and the edge of an object. The function determines the intersection points based on their contrast and slope and calculates a best-fit line based on these points. Use this function if you expect the angle between the calculated line and the search area to be less than 45 degrees.
Image Types Supported
IMAQ_IMAGE_U8
Parameters
Name
|
Type
|
Description
|
image
|
Image*
|
The image which the function uses to compute the location of the edge.
|
searchRect
|
RotatedRect
|
The coordinate location of the rectangular search area the function looks in for the edge.
|
direction
|
RakeDirection
|
The direction the function search for edges along the search lines.
|
options
|
const FindEdgeOptions*
|
Describes how to search for the edge and the information the function overlays to the image.
|
transform
|
const CoordinateTransform2*
|
An optional specification of the coordinate transform for searchRect. This parameter specifies how to transform the location of the edge detection based on the difference between the reference coordinate system and the measurement coordinate system. Set this parameter to NULL if you do not need to transform searchRect.
|
Return Value
Parameter Discussion
options—Set the options parameter to NULL to use the default options, as follows:
threshold |
40 |
width |
4 |
steepness |
2 |
subsamplingRatio |
5 |
showSearchArea |
FALSE |
showSearchLines |
FALSE |
showEdgesFound |
FALSE |
showResult |
TRUE |
|
Note imaqFindEdge() only overlays the edges used in the best-fit line calculation. |