MIL_ID EdgeResultId, | //in |
MIL_INT NbEdgels, | //in |
const MIL_INT *ArrayIndexPtr, | //in |
const MIL_DOUBLE *ArrayXPtr, | //in |
const MIL_DOUBLE *ArrayYPtr, | //in |
const MIL_DOUBLE *ArrayAnglePtr, | //in |
const MIL_DOUBLE *ArrayMagnitudePtr, | //in |
MIL_INT64 ControlFlag | //in |
This function copies edge chains from user-supplied arrays to a specified Edge Finder result buffer. This can be useful if you want to construct an Edge Finder result buffer that cannot be obtained from one image. You can therefore combine results from multiple Edge Finder result buffers to, for example, build a complete model to add to a Model Finder context.
You must only add edge chains that respect the following constraints, whereby pixels are considered connected based on an 8-connected lattice:
Consecutive edgels must occupy separate connected pixels.
No branches are allowed (they start or end a separate chain).
There must not be an edge in the edge map that is more than 1 pixel wide. This means that the first and fourth edgel in the edge chain must not be in neighboring pixels.
All edge chains must be at the same scale and this scale must be the scale at which they were originally extracted. If edges were extracted at a different scale (MedgeControl() with M_EXTRACTION_SCALE), you must convert them to their original extraction scale.
If edgels are calculated with pixel accuracy, you must provide edgels with coordinates that are integer values; in this case, the distance between consecutive edgels should be one pixel. If edgels are calculated with subpixel accuracy, you can provide edgels with coordinates that are double values; in this case, the distance between consecutive edgels is such that, each pixel touched by the edge corresponds to one edgel. To change the accuracy edgels are calculated with, use MedgeControl() with M_ACCURACY.
To use an Edge Finder result buffer that contains edges set using MedgePut() with the Model Finder module, you must respect the following limitation. First, edges in the source image buffer must have been previously extracted and saved in the Edge Finder result buffer, using MedgeCalculate(). Second, the coordinates of the edge chains in the user-supplied arrays must not exceed the boundaries of the source image buffer. You can inquire the width and height of the source image buffer using MedgeGetResult() with M_SIZE_X and M_SIZE_Y.
The X- and Y-coordinates of the edgels you are adding to the Edge Finder result buffer must be provided in pixel units (as opposed to real-world values). If your current results have been calibrated, the coordinates added to those results will be automatically transformed to their appropriate real-world values. For more information, see the Working with real-world units section of Chapter 25: Calibrating your camera setup.
Specifies the identifier of the Edge Finder result buffer in which to put user-supplied data.
Specifies the address of the array containing the indices of the edgels' edges to add to the Edge Finder result buffer. If you do not want to provide this information, set this parameter to M_NULL. In this case, only one edge will be added.
Specifies the address of the array containing the X-coordinate(s) of the edgel(s) to add to the Edge Finder result buffer.
Specifies the address of the array containing the Y-coordinate(s) of the edgel(s) to add to the Edge Finder result buffer.
Specifies the address of the array containing the orientation of the edgel(s) to add to the Edge Finder result buffer. If you do not want to provide this information, set this parameter to M_NULL.
Angle values must be mapped in the range of 0 to 255. That is, 0° corresponds to 0, and 360° corresponds to 256.
Header | Include mil.h. |
Library | Use mil.lib; miledge.lib. |
DLL | Requires mil.dll; miledge.dll. |