Getting rid of Canny outliers I have been using the Canny edge detection function in OpenCV to detect the edge of an elliptic annulus (light object, dark background). In theory there should be two edges. However, it sometimes does not all edges on the outer ring. 



So if I radially plot my detected points it looks like this (x: angle, y: radius from center of mass)



There is a wavy line which is the outer border of my object and a few outliers which are the inner border (you can tell because they look like they are systematically offset). I don't know the exact breadth of the annulus.

Q: Is there any way to programmatically get rid of these "obvious" outliers so that the exact outer contour is interpolated?
Please see my answer to this question: Detecting and isolating part of an image

You can use circular shortest path to do this quite elegantly. You are using OpenCV and and not MATLAB so some modification of my code is required.