How to programatically determine the center of a circle and crescent?

321 views Asked by At

So I recently took a few hundred photographs of the solar eclipse using a solar filter. All the photos contain a close to pure black background with a very bright near-white solar crescent, usually somewhere near the center of the photograph. All the photos are taken at the same zoom.

What I want to do is programmatically crop the sun out of each of the photos so they can be overlaid programmatically onto a canvas in the correct solar positions they would have appeared in the sky, according to the exif data.

The first step would be to programmatically identify the center of each crescent. The radius is constant, so that is one less step that needs to be done programmatically. I imagine for earlier photos where the sun is nearly complete this will be easier, and accuracy will decrease as the crescent gets smaller.

I wanted to use Python for this, but am open to other suggestions if there is a better tool. Can anyone point me in a good direction to get started on this project?

Thanks

1

There are 1 answers

0
R. Wayne On

OpenCV has a Hough Circle Transform that can detect circles and arcs. There is an old discussion here: