I am working on image processing in Python, on the topic of underwater photogrammetry. My goal is to fit an ellipse to fidicual markers, and retrieve its a) center, b) axis and c) orientation.
My markers are
A ML-model delivers a small image snippets for each marker in each image, containting only the center of the marker.
So far, I've implemented these approaches:
- Using openCV: a) Thresholding, which results in a binary image (cv2.threshold) b) Find Contours (cv2.findContours) c) fit Ellipse (v2.fitEllipse)
- Using Scikit: a) Detect edge (using Canny) b) Apply hough transform
- Star operator (work in progress) a) Estimate ellipse center b) Send 360rays in all directions c) Build an array, comprising coordinates of the largest gradient on each ray d) Calculate best-fit ellipse using least-square method e) Use the new center to repeat process (possibly several iterations required)
I perform these methods for each color-channel seperately. So far, the results between channels differ within several pixels for the ellipse center.
- Do you have any suggestions on what pre-processing methods I should use, prior detecting/fitting the ellipse?
- Any thoughts on which of the above methods will lead to the most accurate results?