I have several images that captured the same object and I want to find the average contour. The object position slightly changed across the images, so the contours of the images does not completely overlap, as shown in the picture below as blue dots (while what I want to get is the red line). I used cv2.findContours to find the outlines of the object, and each contour has different different number of points.enter image description here
I've tried to make the points into heatmap-like image (like below) and try to find the contour of the image after applying gaussian filter, but it was not a continuous line but rather multiple blobs that the function detected.enter image description here
Does anyone have a good idea how to find a single line of the object?