| Customize Help

Steps to extract and analyze edges



The following steps provide a basic methodology for using the MIL Edge Finder module:

  1. Allocate an Edge Finder context, using MedgeAlloc().

  2. If necessary, adjust general processing controls to fit your application, using successive calls to MedgeControl().

  3. If necessary, select the required features to calculate, using successive calls to MedgeControl().

  4. Allocate an Edge Finder result buffer to hold the results of the edge extraction, using MedgeAllocResult().

  5. Calculate edges and edge features, using MedgeCalculate().

  6. 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.

  7. If necessary, select new features and perform a post-calculation, using MedgeCalculate().

  8. 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.

  9. 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().

  10. If necessary, copy data from user-supplied arrays to a specified Edge Finder result buffer, using MedgePut().

  11. If necessary, draw edges and edge features, using MedgeDraw().

  12. If necessary, save your Edge Finder context, using MedgeSave() or MedgeStream().

  13. 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.