MATLAB Eclipse Photo Processing Script


I took hand-tracked photos of the 2024 solar eclipse and needed a way to efficiently process them for a timelapse. My goal was to automate the edge detection of the eclipsed sun disc and crop the image to focus solely on the sun disc. I wrote a MATLAB script that imported the photos and automatically detected the edges and cropped the photos. The resulting program was able to process 150 photos in seconds, preparing them for timelapse creation.

I didn't have a motorized star tracker for my camera, so I took photos manually on a static tripod. This lead to the photos being completely misaligned and I had no desire to manually crop 150 photos. Instead, I wrote a basic script that would import the photos and detect the edges of the eclipsed sun disc and crop accordingly. I could then import these cropped photos into Premiere Pro to create a timelapse.