Curve detection
Hello, is there any chance of detecting the highlined green curve (or a close one) in an image like this?
I've worked on ellipse fitting in the past and i've had quite good result but the pool of points was A LOT smaller (getting even there wrong results sometimes).
So i'm wondering if this is a possible path before i even start to look for a Hough modification and implementation, because i will need to keep a certain degree of freedom in curve parameters (and this is making things even worse if possible)..
Thank you
does your curve need to be "horizontal"?
Not necessarily, u can rotate the image and get a similar case..one constant is that the curve will be always perpendicular to the other lines in the image, but its shape could be a little different on the right edge (the left part will always be almost a straight line), so there's the degree of freedom in the parameters. Think of a cable that keeps together some other cables as an example: i'm trying to identify the enclosing cable, but can't use information on color or aspect because it looks like the other cables.
can you also supply the original image? It might help, to obtain a better perspective of the scene. The Canny output does not help that much to this.
Attached the original image (had to use jpg format because of the size limits). Don't rely on this illumination, it could be different or i could set up a proper one.
NOTE: in this case is not very visible because of the light conditions, but it would be nice to detect also the last part of the curve on the right edge if properly illuminated (or with a lower threshold for Canny).
First, I think you should try to isolate the points belonging to the curve you want to detect. You can do it with a PCA analysis of the gradient distributions (the interesting area should show a strong horizontal component).
Then, you can try a curve-fitting method, with a least-squares method, for example (try to estimate F(p)=apĀ²+bp+c so that F(p)-p_observed is minimal).
Thanks for your suggestion kbarni, i'll give it a try
@David_86 i wonder did you find a solution?
@sturkmen not yet, but to be honest I did not spend enough time on that because I've been working on other tasks, so this one went in "stand-by". I will let you know if I get any result.