MIL_ID ContextOrResultId,  //in 
MIL_INT64 ControlType,  //in 
MIL_DOUBLE ControlValue  //in 
This function sets the specified control for either an Edge Finder context or an Edge Finder result buffer. For Edge Finder contexts, these settings control the execution of MedgeCalculate() operations and select which edge features MedgeCalculate() should calculate. For Edge Finder result buffers, these settings control the post manipulation of results. For example, to draw a zoomed region of the source image that was used to calculate results, the drawing control values must be appropriately set. Similarly, to select edges based on the proximity of an edge or edges to a specified point, M_NEAREST_NEIGHBOR_RADIUS must be appropriately set. For more information, see MedgeDraw() or MedgeSelect().
All control settings can typically be inquired with MedgeInquire().
For new context settings to take effect, you must calculate the settings, using MedgeCalculate().
Note that some control settings have postcalculation restrictions. For more information, see the Postcalculation subsection of the Calculating and retrieving results section of Chapter 9: Edge Finder.
Specifies either the Edge Finder context or the Edge Finder result buffer whose settings you want to modify. The Edge Finder context or the Edge Finder result buffer must have been previously allocated on the required system using MedgeAlloc() or MedgeAllocResult(), respectively.
Specifies the setting to change.
See the Parameter associations section for possible values that can be specified.
Specifies the setting's new value.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
The following ControlType and corresponding ControlValue parameter settings are used to control the Edge Finder context operation settings and can be specified for both M_CONTOUR and M_CREST Edge Finder contexts, unless otherwise specified.
For operation settings for object contours and line
crests



Description  
ControlValue  
M_ACCURACY 
Sets the edgel accuracy of the edge extraction. INQ 

M_DEFAULT 
Same as M_HIGH. 

M_DISABLE 
Specifies that edgel accuracy will be disabled. 

M_HIGH 
Specifies high accuracy. 

M_VERY_HIGH 
Specifies very high accuracy. 

M_ANGLE_ACCURACY 
Sets the precision with which to estimate edgel angles when extracting edges. INQ 

M_DEFAULT 
Same as M_HIGH. 

M_HIGH 
Specifies high precision. 

M_LOW 
Specifies low precision. 

M_CHAIN_ALL_NEIGHBORS 
Sets how edge chains are built. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that edge chains are built with the least amount of edgel information possible. 

M_ENABLE 
Specifies that edge chains are built with as much edgel information as possible. 

M_DETAIL_LEVEL 
Sets the level of details to extract from the image. 

M_DEFAULT 
Same as M_MEDIUM. 

M_HIGH 
Sets the detail level to high. 

M_MEDIUM 
Sets the detail level to medium. 

M_VERY_HIGH 
Sets the detail level to very high. 

M_EXTRACTION_SCALE 
Sets the scale of the image at which to do the edge extraction. INQ 

M_DEFAULT 
Specifies the default value; the default value is 1.0. 

Value > 0 
Specifies the extraction scale. 

M_FILTER_SMOOTHNESS 
Sets the degree of smoothness (strength of denoising) applied by the filter during the neighborhood operation. INQ 

M_DEFAULT 
Specifies the default value; the default value is 50.0. 

0.0 <= Value <= 100.0 
Specifies the smoothness value. 

M_FILTER_TYPE 
Sets the type of filter used when performing the neighborhood operation used to extract edges. INQ 

M_DEFAULT 
Same as M_SHEN. 

M_DERICHE 
Specifies a Deriche infinite support filter. 

M_FREI_CHEN 
Specifies a Frei Chen filter. 

M_PREWITT 
Specifies a Prewitt filter. 

M_SHEN 
Specifies a ShenCastan infinite support exponential filter. 

M_SOBEL 
Specifies a Sobel filter. 

M_FLOAT_MODE 
Sets whether to force all the processing of edge extraction operations to be performed using floatingpoint precision calculations. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that all edge extractions are not forced to be performed using floatingpoint precision calculations. 

M_ENABLE 
Specifies that all edge extractions are forced to be performed using floatingpoint precision calculations. 

M_MAGNITUDE_TYPE 
Sets how to calculate the magnitude of the edge at each edgel position. INQ 

M_DEFAULT 
Specifies the default value. 

M_NORM 
Specifies that the magnitude will be used. 

M_SQR_NORM 
Specifies that the square of the magnitude will be used. 

M_OVERSCAN 
Sets the type of overscan used to handle the source image's bordering pixels. INQ 

M_DEFAULT 
Same as M_MIRROR. 

M_DISABLE 
Specifies that no overscan will be used, unless processing the border pixels is faster than ignoring them; in the latter case, MIL automatically selects the overscan to optimize speed according to the specified operation and the target system. 

M_MIRROR 
Specifies that the border pixels of a source image are processed using overscan pixel values that mirror the source buffer pixel values. 

M_REPLACE 
Specifies that the border pixels of a source image are processed using overscan pixel values set to the overscan replacement value (MedgeControl() with M_OVERSCAN_REPLACE_VALUE). 

M_TRANSPARENT 
Specifies that the border pixels of a source image are processed using transparent overscan pixel values. 

M_OVERSCAN_REPLACE_VALUE 
Sets a replacement value for the overscan pixel values. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0. 

M_REPLACE_MAX 
Specifies that the overscan neighborhood pixel values will be set to the maximum value of the source image buffer. 

M_REPLACE_MIN 
Specifies that the overscan neighborhood pixel values will be set to the minimum value of the source image buffer. 

Value 
Specifies the value of the overscan neighborhood pixels. 

M_THRESHOLD_HIGH 
Sets the upper bound of the hysteresis threshold value. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0. 

Value >= 0.0 
Specifies the upper bound of the hysteresis threshold. 

M_THRESHOLD_LOW 
Sets the lower bound of the hysteresis threshold value. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0. 

Value >= 0.0 
Specifies the lower bound of the hysteresis threshold. 

M_THRESHOLD_MODE 
Sets the threshold of the edge extraction. INQ 

M_DEFAULT 
Same as M_HIGH. 

M_DISABLE 
Specifies no threshold. 

M_HIGH 
Specifies a high threshold. 

M_LOW 
Specifies a low threshold. 

M_MEDIUM 
Specifies a medium threshold. 

M_USER_DEFINED 
Specifies that the threshold values will be userdefined. 

M_VERY_HIGH 
Specifies a very high threshold. 

M_THRESHOLD_TYPE 
Sets the type of hysteresis threshold used when performing the edge extraction. INQ 

M_DEFAULT 
Same as M_HYSTERESIS. 

M_FULL_HYSTERESIS 
Specifies that the lower bound threshold value is 0. 

M_HYSTERESIS 
Specifies that both the lower bound threshold value and the upper bound threshold value will be used. 

M_NO_HYSTERESIS 
Specifies that the lower bound threshold value is equal to the upper bound threshold value. 

M_TIMEOUT 
Sets the maximum edge extraction and calculation time for MedgeCalculate(), in msec. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies an infinite amount of edge extraction and calculation time. 

Value > 0 
Specifies the maximum edge extraction and calculation time, in msec. 
The following ControlType and corresponding ControlValue settings are used to control the Edge Finder context operation settings and can only be specified for M_CREST Edge Finder contexts.
For operation settings for line crests



Description  
ControlValue  
M_FOREGROUND_VALUE 
Sets the color of the line crests to extract from the image. INQ 

M_DEFAULT 
Same as M_FOREGROUND_BLACK. 

M_ANY 
Specifies that the line crests are both lighter and darker than the image's background color. 

M_FOREGROUND_BLACK 
Specifies that the line crests are darker than the image's background color. 

M_FOREGROUND_WHITE 
Specifies that the line crests are lighter than the image's background color. 
The following ControlType and corresponding ControlValue parameter settings are used to save internal buffers in the Edge Finder result buffer and can be specified for both M_CONTOUR and M_CREST Edge Finder contexts.
For saving internal buffers in the Edge Finder result
buffer



Description  
ControlValue  
M_SAVE_ANGLE 
Sets whether the internal angle buffer, used when extracting edges, is saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the angle buffer will not be saved. 

M_ENABLE 
Specifies that the angle buffer will be saved. 

M_SAVE_CHAIN_ANGLE 
Sets whether the angle value of the edge at each edgel position is saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the angle values will not be saved. 

M_ENABLE 
Specifies that the angle values will be saved. 

M_SAVE_CHAIN_MAGNITUDE 
Sets whether the magnitude value of the edge at each edgel position is saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the magnitude values will not be saved. 

M_ENABLE 
Specifies that the magnitude values will be saved. 

M_SAVE_DERIVATIVES 
Sets whether the internal derivative buffers used when extracting edges are saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the derivative buffers will not be saved. 

M_ENABLE 
Specifies that the derivative buffers will be saved. 

M_SAVE_IMAGE 
Sets whether the source image is saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the image will not be saved. 

M_ENABLE 
Specifies that the image will be saved. 

M_SAVE_MAGNITUDE 
Sets whether the internal magnitude buffer, used when extracting edges, is saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the magnitude buffer will not be saved. 

M_ENABLE 
Specifies that the magnitude buffer will be saved. 

M_SAVE_MASK 
Sets whether the mask buffer is saved in the Edge Finder result buffer. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the mask will not be saved. 

M_ENABLE 
Specifies that the mask will be saved. 
The following ControlType and corresponding ControlValue parameter settings are used to control the edge features calculated for each edge and can be specified for both M_CONTOUR and M_CREST Edge Finder contexts.
For calculating edge features



Description  
ControlValue  
M_AVERAGE_STRENGTH + 
Sets whether to calculate the average strength of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the average strength will not be calculated. 

M_ENABLE 
Specifies that the average strength will be calculated. 

M_BOX_X_MAX + 
Sets whether to calculate the extreme right edgel coordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the extreme right edgel coordinate will not be calculated. 

M_ENABLE 
Specifies that the extreme right edgel coordinate will be calculated. 

M_BOX_X_MIN + 
Sets whether to calculate the extreme left edgel coordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the extreme left edgel coordinate will not be calculated. 

M_ENABLE 
Specifies that the extreme left edgel coordinate will be calculated. 

M_BOX_Y_MAX + 
Sets whether to calculate the extreme bottom edgel coordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the extreme bottom edgel coordinate will not be calculated. 

M_ENABLE 
Specifies that the extreme bottom edgel coordinate will be calculated. 

M_BOX_Y_MIN + 
Sets whether to calculate the extreme top edgel coordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the extreme top edgel coordinate will not be calculated. 

M_ENABLE 
Specifies that the extreme top edgel coordinate will be calculated. 

M_CENTER_OF_GRAVITY_X + 
Sets whether to calculate the Xposition of each edge's center of gravity. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Xposition of the center of gravity will not be calculated. 

M_ENABLE 
Specifies that the Xposition of the center of gravity will be calculated. 

M_CENTER_OF_GRAVITY_Y + 
Sets whether to calculate the Yposition of each edge's center of gravity. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Yposition of the center of gravity will not be calculated. 

M_ENABLE 
Specifies that the Yposition of the center of gravity will be calculated. 

M_CIRCLE_FIT_CENTER_X + 
Sets whether to calculate the Xcoordinate of the center of the circle that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Xcoordinate will not be calculated. 

M_ENABLE 
Specifies that the Xcoordinate will be calculated. 

M_CIRCLE_FIT_CENTER_Y + 
Sets whether to calculate the Ycoordinate of the center of the circle that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Ycoordinate will not be calculated. 

M_ENABLE 
Specifies that the Ycoordinate will be calculated. 

M_CIRCLE_FIT_COVERAGE + 
Sets whether to calculate the coverage of the circle that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the coverage of the circle will not be calculated. 

M_ENABLE 
Specifies that the coverage of the circle will be calculated. 

M_CIRCLE_FIT_ERROR + 
Sets whether to calculate the fit error of the circle that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the fit error of the circle will not be calculated. 

M_ENABLE 
Specifies that the fit error of the circle will be calculated. 

M_CIRCLE_FIT_RADIUS + 
Sets whether to calculate the radius of the circle that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the radius will not be calculated. 

M_ENABLE 
Specifies that the radius will be calculated. 

M_CLOSURE + 
Sets whether to calculate the closure state of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the edge's closure state will not be calculated. 

M_ENABLE 
Specifies that the edge's closure state will be calculated. 

M_CONVEX_PERIMETER + 
Sets whether to calculate the convex elongation of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the convex elongation will not be calculated. 

M_ENABLE 
Specifies that the convex elongation will be calculated. 

M_ELLIPSE_FIT_ANGLE + 
Sets whether to calculate the angle of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the angle will not be calculated. 

M_ENABLE 
Specifies that the angle will be calculated. 

M_ELLIPSE_FIT_CENTER_X + 
Sets whether to calculate the Xcoordinate of the center of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Xcoordinate will not be calculated. 

M_ENABLE 
Specifies that the Xcoordinate will be calculated. 

M_ELLIPSE_FIT_CENTER_Y + 
Sets whether to calculate the Ycoordinate of the center of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Ycoordinate will not be calculated. 

M_ENABLE 
Specifies that the Ycoordinate will be calculated. 

M_ELLIPSE_FIT_COVERAGE + 
Sets whether to calculate the coverage of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the coverage of the ellipse will not be calculated. 

M_ENABLE 
Specifies that the coverage of the ellipse will be calculated. 

M_ELLIPSE_FIT_ERROR + 
Sets whether to calculate the fit error of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the fit error of the ellipse will not be calculated. 

M_ENABLE 
Specifies that the fit error of the ellipse will be calculated. 

M_ELLIPSE_FIT_MAJOR_AXIS + 
Sets whether to calculate the major axis of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the major axis will not be calculated. 

M_ENABLE 
Specifies that the major axis will be calculated. 

M_ELLIPSE_FIT_MINOR_AXIS + 
Sets whether to calculate the minor axis of the ellipse that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the minor axis will not be calculated. 

M_ENABLE 
Specifies that the minor axis will be calculated. 

M_FAST_LENGTH + 
Sets whether to calculate a coarse approximation for the length of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that a fast length will not be calculated. 

M_ENABLE 
Specifies that a fast length will be calculated. 

M_FERET_ELONGATION + 
Sets whether to calculate the Feret elongation of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Feret elongation will not be calculated. 

M_ENABLE 
Specifies that the Feret elongation will be calculated. 

M_FERET_GENERAL + 
Sets whether to calculate the general Feret of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the general Feret will not be calculated. 

M_ENABLE 
Specifies that the general Feret will be calculated. 

M_FERET_MAX_ANGLE + 
Sets whether to calculate the maximum Feret angle of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the maximum Feret angle will not be calculated. 

M_ENABLE 
Specifies that the maximum Feret angle will be calculated. 

M_FERET_MAX_DIAMETER + 
Sets whether to calculate the maximum Feret diameter of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the maximum Feret diameter will not be calculated. 

M_ENABLE 
Specifies that the maximum Feret diameter will be calculated. 

M_FERET_MEAN_DIAMETER + 
Sets whether to calculate the average Feret diameter at all the angles checked. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the average Feret diameter will not be calculated. 

M_ENABLE 
Specifies that the average Feret diameter will be calculated. 

M_FERET_MIN_ANGLE + 
Sets whether to calculate the minimum Feret angle of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the minimum Feret angle will not be calculated. 

M_ENABLE 
Specifies that the minimum Feret angle will be calculated. 

M_FERET_MIN_DIAMETER + 
Sets whether to calculate the minimum Feret diameter of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the minimum Feret diameter will not be calculated. 

M_ENABLE 
Specifies that the minimum Feret diameter will be calculated. 

M_FERET_X + 
Sets whether to calculate the XFeret value of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the XFeret value will not be calculated. 

M_ENABLE 
Specifies that the XFeret value will be calculated. 

M_FERET_Y + 
Sets whether to calculate the YFeret value of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the YFeret value will not be calculated. 

M_ENABLE 
Specifies that the YFeret value will be calculated. 

M_FIRST_POINT_X + 
Sets whether to calculate the Xcoordinate of each edge's first point (starting point). INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the first point's Xcoordinate will not be calculated. 

M_ENABLE 
Specifies that the first point's Xcoordinate will be calculated. 

M_FIRST_POINT_Y + 
Sets whether to calculate the Ycoordinate of each edge's first point (starting point). INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the first point's Ycoordinate will not be calculated. 

M_ENABLE 
Specifies that the first point's Ycoordinate will be calculated. 

M_LABEL_VALUE + 
Sets whether to calculate the label value of each edge in an image. INQ 

M_DEFAULT 
Same as M_ENABLE. 

M_DISABLE 
Specifies that the label value will not be calculated. 

M_ENABLE 
Specifies that the label value will be calculated. 

M_LENGTH + 
Sets whether to calculate the length of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the length of each edge will not be calculated. 

M_ENABLE 
Specifies that the length of each edge will be calculated. 

M_LINE_FIT_A + 
Sets whether to calculate the coefficient A of the line that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the coefficient A will not be calculated. 

M_ENABLE 
Specifies that the coefficient A will be calculated. 

M_LINE_FIT_B + 
Sets whether to calculate the coefficient B of the line that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the coefficient B will not be calculated. 

M_ENABLE 
Specifies that the coefficient B will be calculated. 

M_LINE_FIT_C + 
Sets whether to calculate the coefficient C of the line that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the coefficient C will not be calculated. 

M_ENABLE 
Specifies that the coefficient C will be calculated. 

M_LINE_FIT_ERROR + 
Sets whether to calculate the fit error of the line that is the best fit for each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the fit error will not be calculated. 

M_ENABLE 
Specifies that the fit error will be calculated. 

M_MOMENT_ELONGATION + 
Sets whether to calculate the moment elongation of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the moment elongation will not be calculated. 

M_ENABLE 
Specifies that the moment elongation will be calculated. 

M_MOMENT_ELONGATION_ANGLE + 
Sets whether to calculate the angle of the principal axis along each edge's moment elongation (M_MOMENT_ELONGATION). INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the angle of the moment elongation will not be calculated. 

M_ENABLE 
Specifies that the angle of the moment elongation will be calculated. 

M_POSITION_X + 
Sets whether to calculate the Xposition of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Xposition will not be calculated. 

M_ENABLE 
Specifies that the Xposition will be calculated. 

M_POSITION_Y + 
Sets whether to calculate the Yposition of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Yposition will not be calculated. 

M_ENABLE 
Specifies that the Yposition will be calculated. 

M_SIZE + 
Sets whether to calculate the number of edgels of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the number of edgels will not be calculated. 

M_ENABLE 
Specifies that the number of edgels will be calculated. 

M_STRENGTH + 
Sets whether to calculate the strength of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the strength will not be calculated. 

M_ENABLE 
Specifies that the strength will be calculated. 

M_TORTUOSITY + 
Sets whether to calculate the tortuosity measure of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the tortuosity measure will not be calculated. 

M_ENABLE 
Specifies that the tortuosity measure will be calculated. 

M_X_MAX_AT_Y_MAX + 
Sets whether to calculate the maximum Xcoordinate at the maximum Ycoordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Xmaximum at Ymaximum will not be calculated. 

M_ENABLE 
Specifies that the Xmaximum at Ymaximum will be calculated. 

M_X_MIN_AT_Y_MIN + 
Sets whether to calculate the minimum Xcoordinate at the minimum Ycoordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Xminimum at Yminimum will not be calculated. 

M_ENABLE 
Specifies that the Xminimum at Yminimum will be calculated. 

M_Y_MAX_AT_X_MIN + 
Sets whether to calculate the maximum Ycoordinate at the minimum Xcoordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Ymaximum at Xminimum will not be calculated. 

M_ENABLE 
Specifies that the Ymaximum at Xminimum will be calculated. 

M_Y_MIN_AT_X_MAX + 
Sets whether to calculate the minimum Ycoordinate at the maximum Xcoordinate of each edge. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Yminimum at Xmaximum will not be calculated. 

M_ENABLE 
Specifies that the Yminimum at Xmaximum will be calculated. 
You can add one of the following values to the abovementioned values to specify a sorting key for result retrieval.
Note that only one edge feature can be selected as the first, second, or third sorting key.
For specifying a sorting key



Description  
M_NO_SORT 
Removes the specified sorting key. 

M_SORTn_DOWN 
Specifies the feature as the n ^{th} sorting key (in descending order), where n stands for an integer between 1 and 3. 

M_SORTn_UP 
Specifies the feature as the n ^{th} sorting key (in ascending order), where n stands for an integer between 1 and 3. 
The following ControlType and corresponding ControlValue parameter settings are used to calculate Feret values and can be specified for both M_CONTOUR and M_CREST Edge Finder contexts.
For calculating Feret values



Description  
ControlValue  
M_FERET_ANGLE_SEARCH_END 
Sets the end of the angular range at which to search for Feret diameters. INQ 

M_DEFAULT 
Specifies the default value; the default value is 360.0°. 

0.0 <= Value <= 360.0 
Specifies the end of the angular region. 

M_FERET_ANGLE_SEARCH_START 
Sets the start of the angular range at which to search for Feret diameters. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0°. 

0.0 <= Value <= 360.0 
Specifies the start of the angular region. 

M_FERET_GENERAL_ANGLE 
Sets the angle at which to calculate the M_FERET_GENERAL value. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0°. 

M_MOMENT_ELONGATION_ANGLE + n 
Specifies to use the moment elongation angle plus the offset n. 

0.0 <= Value <= 360.0 
Specifies the angle, in degrees. 

M_NUMBER_OF_FERETS 
Sets the number of Feret angles to use to calculate M_FERET_MAX_DIAMETER, M_FERET_MIN_DIAMETER, M_FERET_MAX_ANGLE, M_FERET_MIN_ANGLE, M_FERET_MEAN_DIAMETER, M_FERET_ELONGATION, and M_CONVEX_PERIMETER. INQ 

M_DEFAULT 
Specifies the default value; the default value is 8. 

Value 
Specifies the number of Ferets. 
The following values allow you to select groups of edge features for calculation in a single call.
For selecting groups of edge features



Description  
ControlValue  
M_ALL_FEATURES 
Sets whether to calculate all edge features. 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that all edge features will not be calculated. 

M_ENABLE 
Specifies that all edge features will be calculated. 

M_BOX 
Sets whether to calculate the four extreme edgel coordinates of each edge (M_BOX_X_MIN, M_BOX_X_MAX, M_BOX_Y_MIN, and M_BOX_Y_MAX). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that all the extreme edgel coordinates will not be calculated. 

M_ENABLE 
Specifies that all the extreme edgel coordinates will be calculated. 

M_CENTER_OF_GRAVITY 
Sets whether to calculate the X and Ycoordinates of the center of gravity of each edge (M_CENTER_OF_GRAVITY_X and M_CENTER_OF_GRAVITY_Y). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that both the X and Ycoordinates of the center of gravity will not be calculated. 

M_ENABLE 
Specifies that both the X and Ycoordinates of the center of gravity will be calculated. 

M_CIRCLE_FIT 
Sets whether to calculate the circle fit values of each edge (M_CIRCLE_FIT_CENTER_X, M_CIRCLE_FIT_CENTER_Y, M_CIRCLE_FIT_RADIUS, M_CIRCLE_FIT_ERROR, and M_CIRCLE_FIT_COVERAGE). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that all the circle fit values will not be calculated. 

M_ENABLE 
Specifies that all the circle fit values will be calculated. 

M_CONTACT_POINTS 
Sets whether to calculate the minimum/maximum Xcoordinate at the minimum/maximum Ycoordinate of each edge (M_X_MIN_AT_Y_MIN, M_X_MAX_AT_Y_MAX, M_Y_MAX_AT_X_MIN, and M_Y_MIN_AT_X_MAX). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the four contact points will not be calculated. 

M_ENABLE 
Specifies that the four contact points will be calculated. 

M_ELLIPSE_FIT 
Sets whether to calculate the ellipse fit values of each edge (M_ELLIPSE_FIT_ANGLE, M_ELLIPSE_FIT_CENTER_X, M_ELLIPSE_FIT_CENTER_Y, M_ELLIPSE_FIT_COVERAGE, M_ELLIPSE_FIT_ERROR, M_ELLIPSE_FIT_MINOR_AXIS, and M_ELLIPSE_FIT_MAJOR_AXIS). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that all the ellipse fit values will not be calculated. 

M_ENABLE 
Specifies that all the ellipse fit values will be calculated. 

M_FERET_BOX  
M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the X and YFeret values will not be calculated. 

M_ENABLE 
Specifies that the X and YFeret values will be calculated. 

M_FIRST_POINT 
Sets whether to calculate the X and Ycoordinate of each edge's first point (M_FIRST_POINT_X, and M_FIRST_POINT_Y). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the X and Ycoordinate of each edge's first point will not be calculated. 

M_ENABLE 
Specifies that the X and Ycoordinate of each edge's first point will be calculated. 

M_LINE_FIT 
Sets whether to calculate the line fit values of each edge (M_LINE_FIT_A, M_LINE_FIT_B, M_LINE_FIT_C, and M_LINE_FIT_ERROR). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that all the line fit values will not be calculated. 

M_ENABLE 
Specifies that all the line fit values will be calculated. 

M_POSITION 
Sets whether to calculate both the X and Yposition of each edge (M_POSITION_X and M_POSITION_Y). 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that both the X and Yposition will not be calculated. 

M_ENABLE 
Specifies that both the X and Yposition will be calculated. 
The following ControlType and corresponding ControlValue parameter settings are used when performing postcalculations on extracted edges and can typically be specified for both M_CONTOUR and M_CREST Edge Finder contexts.
For performing postcalculations on extracted
edges



Description  
ControlValue  
M_APPROXIMATION_TOLERANCE 
Sets the resolution of edge approximation. INQ 

M_DEFAULT 
Specifies the default value; the default value is 50.0. 

0.0 <= Value <= 100.0 
Specifies the resolution. 

M_CHAIN_APPROXIMATION 
Sets the simple geometric feature used when performing the edge approximation. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the edge approximation will not be performed. 

M_LINE 
Specifies that the edge approximation will be performed using a polygonal segmentation of each edge, in pixel units. 

M_WORLD_LINE 
Specifies that the edge approximation will be performed using a polygonal segmentation of each edge, in world units. 

M_FILL_GAP_ANGLE 
Sets the aperture angle, starting at the line's tangent at the point of interest, where Edge Finder searches for edge extremity candidates when filling edge gaps. INQ 

M_DEFAULT 
Specifies the default value; the default value is 360.0°. 

0.0 <= Value <= 360.0 
Specifies the aperture angle, in degrees. 

M_FILL_GAP_CANDIDATE 
Sets whether to join an edge extremity with the other extremity of the same edge, or with an extremity of any edge. INQ 

M_DEFAULT 
Same as M_ANY. 

M_ANY 
Specifies that the extremity of an edge can be connected with the extremity of any edge. 

M_SAME 
Specifies that the extremity of an edge can only be connected with the other extremity of the same edge. 

M_FILL_GAP_CONTINUITY 
Sets the continuity constraint used when performing edge gap filling, when more than one edge extremity candidate is present. INQ 

M_DEFAULT 
Specifies the default value; the default value is 50.0. 

0.0 <= Value <= 100.0 
Specifies the continuity constraint. 

M_FILL_GAP_DISTANCE 
Sets the maximum distance radius where Edge Finder searches for edge extremity candidates when filling edge gaps. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0 pixels. 

M_INFINITE 
Specifies an infinite maximum distance radius. 

Value 
Specifies the maximum distance radius, in pixels. 

M_FILL_GAP_POLARITY 
Sets the use of the edge polarity to perform the filling of edge gaps. INQ 

M_DEFAULT 
Same as M_ANY. 

M_ANY 
Specifies that gaps between edges will be filled, regardless of their polarity. 

M_REVERSE 
Specifies that gaps between edges that have reverse polarity will be filled. 

M_SAME 
Specifies that gaps between edges that have the same polarity will be filled. 
The following ControlType and corresponding ControlValue parameter settings can be specified for an Edge Finder result buffer.
For a result buffer



Description  
ControlValue  
M_DRAW_CROSS_SIZE 
Sets the size of the cross used to identify certain features when drawing with MedgeDraw(). INQ 

M_DEFAULT 
Specifies the default value; the default value is 4.0 pixels. 

Value 
Specifies the size of the cross, in pixels. 

M_MODEL_FINDER_COMPATIBLE 
Sets whether the Edge Finder result buffer can be used with a Model Finder context. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies that the Edge Finder result buffer cannot be used with a Model Finder context. 

M_ENABLE 
Specifies that the Edge Finder result buffer can be used with a Model Finder context. 

M_NEAREST_NEIGHBOR_RADIUS 
Sets the radius distance used to select the closest edge or edges from a point. INQ 

M_DEFAULT 
Specifies the default value; the default value is 2.0 pixels. 

Value 
Specifies the radius distance, in pixels. 

M_RESULT_OUTPUT_UNITS 
Sets whether to return results in pixels or world units. INQ 

M_DEFAULT 
Same as M_ACCORDING_TO_CALIBRATION. 

M_ACCORDING_TO_CALIBRATION 
Specifies that results are returned in world units if the result was calculated on an image associated with a camera calibration context; otherwise, specifies that results are returned in pixel units. 

M_PIXEL 
Specifies that results are returned in pixel units, with respect to the pixel coordinate system. 

M_WORLD 
Specifies that results are returned in world units, with respect to the relative coordinate system. 
The following ControlType and corresponding ControlValue parameter settings are used to set closestedgel constraints for MedgeGetNeighbors(). This function retrieves the coordinates of edgels, from an Edge Finder result buffer, that meet the constraints set below, and correspond to the closest neighbors from a list of userspecified source points.
The following values can only be specified for an Edge Finder result buffer.
For setting closestedgel constraints



Description  
ControlValue  
M_NEIGHBOR_ANGLE 
Sets the gradient angle that an edgel must have, before being considered a candidate, when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Same as M_ANY. 

M_ANY 
Specifies that the edgel candidate can have any gradient angle. 

M_REVERSE 
Specifies that the gradient angle of the edgel candidate must have the reverse angle (+ 180°) of the source point. 

M_SAME 
Specifies that the gradient angle of the edgel candidate must have the same angle as the source point. 

M_SAME_OR_REVERSE 
Specifies that the gradient angle of the edgel candidate must either have the same, or the reverse angle of the source point. 

M_NEIGHBOR_ANGLE_TOLERANCE 
Sets the angular tolerance to use for the angle constraint (M_NEIGHBOR_ANGLE), when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Specifies the default value; the default value is 180.0°. 

0.0 <= Value <= 360.0 
Specifies the angular tolerance, in degrees. 

M_NEIGHBOR_MAXIMUM_NUMBER 
Sets the maximum number of edgels that can be returned (for each point), when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Specifies the default value; the default value is 1. 

Value 
Specifies the maximum number of edgels. 

M_NEIGHBOR_MINIMUM_SPACING 
Sets the minimum distance separating closest edgel candidates within the same edge, when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Same as M_INFINITE. 

M_INFINITE 
Specifies no minimum distance separating two edgel candidates. 

Value >= 1 
Specifies the minimum distance, in edgels. 

M_SEARCH_ANGLE 
Sets the search angle constraint (applied the Edge Finder result buffer), when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0°. 

0.0 <= Value <= 360.0 
Specifies the angle, in degrees. 

M_SEARCH_ANGLE_SIGN 
Sets the orientation to use for the search angle constraint, when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Same as M_SAME. 

M_REVERSE 
Specifies that the orientation of the angle must be the reverse (+ 180°) of the source angle. 

M_SAME 
Specifies that the orientation of the angle must be the same as the source angle. 

M_SAME_OR_REVERSE 
Specifies that the orientation of the angle can be the same as, or the reverse of, the source angle. 

M_SEARCH_ANGLE_TOLERANCE 
Sets the angular tolerance to use for the search angle constraint, when finding the closest edgels to a list of points. INQ 

M_DEFAULT 
Specifies the default value; the default value is 360.0°. 

0.0 <= Value <= 360.0 
Specifies the angle, in degrees. 

M_SEARCH_RADIUS_MAX 
Sets the maximum radius distance in the Edge Finder result buffer that will be searched for the closest edgels. INQ 

M_DEFAULT 
Same as M_INFINITE. 

M_INFINITE 
Specifies a maximum distance radius that spans all edgels in the Edge Finder result buffer. 

Value 
Specifies the maximum distance radius, in pixels. 

M_SEARCH_RADIUS_MIN 
Sets the minimum radius distance in the Edge Finder result buffer that will be searched for the closest edgels. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0 pixels. 

Value 
Specifies the minimum distance radius, in pixels. 
Parameters
ContextOrResultId See ContextOrResultId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. 
Parameters
ContextOrResultId See ContextOrResultId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. 
Header  Include mil.h. 
Library  Use mil.lib; miledge.lib. 
DLL  Requires mil.dll; miledge.dll. 