AstroGraph uses the ImageCaptureCore
api to directly control plugged-in cameras. Upon connection, the app will open a session and
PTP commands to the
The PTP code in AstroGraph is a fork of Indigo, with changes specific for
Bahtinov Focus Analyzer
Bahtinov diffraction lines are analyzed using OpenCV's Probabilistic
hough line detector. These lines are examined to determine the center and side lines. Focus
then calculated based off the intersection of the side lines and how for that intersection is
the center line. Anything less than 1 pixel is considered "in focus" as far as the UI will tell
though this was arbitrarily chosen.
AstroGraph implements a parallelized version of FOCUS for
automatically aligning images. Stars in each image are detected using OpenCV's
class. Afterwards, stars are matched up to a target image. An affine transform for each image is
calculated using the rigid algorithm. Finally,
are stacked together on the GPU using metal to average each image.