EdgeFinder¶
- class sonic.EdgeFinder¶
- Method Summary
- static getActiveBorder(u_illum_obj)¶
Determines which image borders are active, meaning which image borders have light coming in
- Inputs:
u_illum_obj (1x1 sonic.Points2): Sonic Points2 object containing the uv direction of illumination from the sun to the body in the image
- Outputs:
active_mask (1x4 logical): Logical array containing true for and active edge and false for an inactive edge in the clockwise order of [top, right, bottom, left]
- static getSubPixel(im_obj, pixelEdge, BlurWidth, kernel_type, M)¶
The getSubPixel function computes the subpixel edge location and orientation from an image, pixel-level edge map, and information about the image blur. This function is intended for use on ISOLATED EDGES (that is, edges that are not within about 5 pixels of another edge). The algorithm is based on the method published in:
Christian, J.A., “Accurate Planetary Limb Localization for Image-Based Spacecraft Navigation,” Journal of Spacecraft and Rockets, Vol. 54, No. 3, 2017, pp 708-730. doi: 10.2514/1.A33692. Online: https://arc.aiaa.org/doi/abs/10.2514/1.A33692
- Inputs:
im_obj (1x1 sonic.Image): grayscale image containing the body on which to find limb points
pixelEdge (1,1 sonic.Points2): pixel level points in the image where edges are found. Must be rounded to nearest pixel.
BlurWidth (1x1 double) width of Gaussian blur in image
kernel_type (1x1 double) flag for type of Zernike moment kernels. Input 5 for 5x5 moment or 7 for 7x7 moment.
M (nxn logical): optional forground mask to only include a masked part of the image in the search
- Outputs:
subPixelEdge (1x1 sonic.Points2): edge points
subPixelNormals (1x1 sonic.Points2): normal of edge points, corresponding to edge points by index
The edge normals are defined positive going from background (darker region) to foreground (brighter region).
Last revised: 3/28/2024 Author: Dr. John A. Christian Edited: Ava Thrasher
- static runScan(im_obj, scan_lines, min_consec, run_start_thresh)¶
Performs a scan across the provided image in the direction of sun illumination to find candidate edge points.
- Inputs:
im_obj (1x1 sonic.Image): SONIC Image object containing the limb to find points on.
scans_lines (1x1 sonic.ScanLines): Lines in the image to perform scan along.
min_consec (1x1 double): Minimum number of consecutive bright pixels found on a scan for the first bright pixel to be considered a limb point. Used to keep hot pixels, stars, or debries from being falsely identified as an edge
run_start_thresh (1x1 double): Minimum digital number to flag as a limb point
- Outputs:
limb_pts (1x1 sonic.Points2): SONIC Points2 object containing the determined u v coordinate limb points. U in first row V in second row.
Last revised: 3/28/24 Last author: Ava Thrasher
- static sobel(im_obj, gradThresh)¶
Computes edge locations based on local extrema in Gu or Gv gradients
- Inputs:
im_obj (1,1 sonic.Image): image object to find edges in
gradThresh (1,1 double): Threshhold above which a gradient i considered as a potential edge
- Outputs:
E (nxm logical): mask which is true where edges were detecte