| MIL 10 Reference
| Customize Help
| Save Settings

MedgeGetNeighbors



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
None.
Synopsis
Get edgels from an Edge Finder result buffer that are the closest neighbors to a list of user-specified point coordinates.
Syntax
void MedgeGetNeighbors(
MIL_ID EdgeResultId, //in
MIL_INT SizeOfArray, //in
const MIL_DOUBLE *SrcArrayXPtr, //in
const MIL_DOUBLE *SrcArrayYPtr, //in
const MIL_DOUBLE *SrcArrayAnglePtr, //in
MIL_DOUBLE *DstArrayXPtr, //out
MIL_DOUBLE *DstArrayYPtr, //out
MIL_INT *DstArrayIndexPtr, //out
MIL_INT *DstArrayLabelPtr, //out
MIL_INT64 ControlFlag //in
)
Description

This function retrieves the coordinates of edgels, from an Edge Finder result buffer, that correspond to the closest neighbors from a list of user-specified source point coordinates. You can also set a series of constraints that potential results must adhere to before being returned. To do so, use the appropriate settings in MedgeControl().

If your target image was associated with a calibration context but you want to retrieve positional and dimensional results in pixel units, use MedgeControl() with the M_RESULT_OUTPUT_UNITS control type set to M_PIXEL. Note that if you set M_RESULT_OUTPUT_UNITS to M_WORLD and the results were not obtained from a calibrated image, MedgeGetNeighbors() will generate an error. Additionally, if results were obtained from a calibrated source image, and you specify to retrieve results in world units, user-specified coordinates and constraints must be specified in the same world units as the coordinate system used to calculate the results.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
EdgeResultId

Specifies the identifier of the Edge Finder result buffer from which to search for edgel candidates.

SizeOfArray

Specifies the number of points provided. This value represents how many user-specified point coordinates will be searched for in the Edge Finder result buffer.

SrcArrayXPtr

Specifies the address of the array containing the X-coordinate(s) of the source point(s).

SrcArrayYPtr

Specifies the address of the array containing the Y-coordinate(s) of the source point(s).

SrcArrayAnglePtr

Specifies the address of the array containing the constraint angle(s) used to refine the search for edgel candidates. Note that angle values (0° to 360°) are measured counter-clockwise and must be mapped between either 0 to 255 (for contour contexts) or 0 to 127 (for crest contexts).

If no value is required, set this parameter to M_NULL.

DstArrayXPtr

Specifies the address of the variable in which the X-coordinate(s) of the edgel(s) found in the Edge Finder result buffer is to be written. If no edgels were found, ignore the information written. Note that if no edgels were found, the index (DstArrayIndexPtr) and label (DstArrayLabelPtr) of the edgels is M_NULL.

If no value is required, set this parameter to M_NULL.

DstArrayYPtr

Specifies the address of the variable in which the Y-coordinate(s) of the edgel(s) found in the Edge Finder result buffer is to be written. If no edgels were found, ignore the information written. Note that if no edgels were found, the index (DstArrayIndexPtr) and label (DstArrayLabelPtr) of the edgels is M_NULL.

If no value is required, set this parameter to M_NULL.

DstArrayIndexPtr

Specifies the address of the variable in which the index of the edgel(s) found in the Edge Finder result buffer is to be written. If no edgels were found, M_NULL is written.

If no value is required, set this parameter to M_NULL.

DstArrayLabelPtr

Specifies the address of the variable in which the label of the edgel's edge found in the Edge Finder result buffer is to be written. If no edgels were found, M_NULL is written.

If no value is required, set this parameter to M_NULL.

ControlFlag

Specifies the accuracy with which to return edgels.

function map For specifying the accuracy
CollapseValue Description
Collapse M_DEFAULT

Same as M_GET_EDGELS.

Collapse M_GET_EDGELS

Specifies that edgels are returned with normal accuracy. In this case, only edgels explicitly located in the Edge Finder result buffer can be returned.

(summarize)
Collapse M_GET_SUBEDGELS

Specifies that edgels are returned with high accuracy. In this case, a point between two edgels can be returned.

When using M_GET_SUBEDGELS, the M_NEIGHBOR_MAXIMUM_NUMBER constraint in MedgeControl() must be set to 1.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; miledge.lib.
DLL Requires mil.dll; miledge.dll.
DEFAULT GET EDGELS GET SUBEDGELS