Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 3.34 KB

TECHNICAL.md

File metadata and controls

55 lines (39 loc) · 3.34 KB

This document explains some of how PyVoyager works.

Centering Images

Images where the target fits completely in the frame are centered using blob detection, Hough circle detection, and ECC Maximization. The expected target radius is calculated through SPICE data, from which the spacecraft and target position can be determined - this is used to help limit the Hough circle search, and then to draw a disc with the expected target size to which the image is aligned using ECC Maximization. The Hough circle detection is only accurate to a few pixels, so the ECC Maximization is needed for the final stabilization.

Here are a couple of images showing the result of the centering/stabilization - the yellow circle is the expected target size:

Centering is turned off at closest approach by determining when the target size is over a threshold (e.g. when the diameter is over 80% of the image width).

Aligning Composites

Composite channels for closeup images are aligned using feature detection and matching, with RANSAC to eliminate outliers from a least-squares fit model for the translation (which amounts to the translation tx, ty between images being an average of the feature movements).

In more detail, 'interesting' features are detected using ORB in one image, and matched with their corresponding point in another image. This is done for dozens-hundreds of interest points - they are each described with a feature vector, also obtained by ORB, then matched up with their corresponding point by a brute-force search. The RANSAC algorithm is used to throw out outliers, which would otherwise throw off the determined average translation.

If this approach fails to find a good translation (due to lack of enough corresponding points, for instance), it will fall back on ECC Maximization to try to align the images.

Here is an image showing what the feature-matching process looks like, and the resulting combined image (with enhanced contrast).