The following steps provide a basic methodology for using the MIL Edge Finder module:
Allocate an Edge Finder context, using MedgeAlloc().
If necessary, adjust general processing controls to fit your application, using successive calls to MedgeControl().
If necessary, select the required features to calculate, using successive calls to MedgeControl().
Allocate an Edge Finder result buffer to hold the results of the edge extraction, using MedgeAllocResult().
Calculate edges and edge features, using MedgeCalculate().
If necessary, exclude or delete edges that do not meet a required criterion, using MedgeSelect(). Excluded edges will be ignored in future calculations, while deleted edges will be removed from the Edge Finder result buffer.
If necessary, select new features and perform a post-calculation, using MedgeCalculate().
Get the number of edges currently included and retrieve the required results from the Edge Finder result buffer, using MedgeGetResult(). Results for the excluded or deleted edges will not be returned.
If necessary, get 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, using MedgeGetNeighbors().
If necessary, copy data from user-supplied arrays to a specified Edge Finder result buffer, using MedgePut().
If necessary, draw edges and edge features, using MedgeDraw().
If necessary, save your Edge Finder context, using MedgeSave() or MedgeStream().
Free all your allocated objects, using MedgeFree().
You can repeat steps 6, 7, and 8 until all the required results are obtained. Note that successively excluding or deleting unwanted edges and then calculating more features is the recommended procedure to achieve the required results, especially if you have a large number of unwanted edges.