This is a straight-forward script to ingest a directory of JPG photos of a partial solar eclipse and output a set of cutouts centered on the sun's center. These are the following key steps:
- ingest image file
- identify minimum and maximum illuminated pixels in the image
- use any three points to calculate the sun's central position
- export an image centered on that point
Because I then went on to use ffmpeg to generate an mp4 file, I did not have a file export preference, nor did I have compunctions about discarding the few images where the sun was off-center enough that the cutout region went beyond the image boundaries