Ask Your Question

Mafe's profile - activity

2017-08-06 02:24:18 -0600 asked a question Extract Curves Contours

Hi everyone !

I'm posting this question because, after months, I'm still getting my ease with the library openCV but couldn't reach an automated solution for this curves extraction problem. (also, it's my birthday and finding a solution would be The gift :p )

Don't bother making lines of code; my request is essentially to be tipped in the correct direction.

Heberger image

So, from this sample picture (that some of you might recognize as power/torque graph)

Heberger image

I start quite classic. I pretreated it with bilinear filtering, detected the edges with Canny and then detected contours and houghlinesP. From the last ones, I filtered the outside contour of the graph and every inside contour that was fully included in the houghLines quad.

Heberger image

Then, I simplified all the contours with approxPolyDP and plotted the fitLine to get the tendency of every contour. Here we can see it follows approximately the 4 curves I'm trying to extract.

Heberger image

So the last step here is to clusterize them by hue and display properly the fitted lines.

At this point, there might be some magic involved to help me figure out the curves tendencies and use that to go back to the second image and segment the actual curves from the contours.

But nothing really pops up in my mind and you cannot filter contours properly because points will have messy links in your contours. Though, I just want the pixels of the 4 curves and nothing else.

Thanks for your attention!

2017-06-19 18:07:01 -0600 received badge  Enthusiast
2017-06-12 06:24:04 -0600 asked a question Key colors from artificial image

Hi everyone!

I got a little issue while trying to separate elements of the image by color to extract the curves. It is non-natural images therefore color thresholding, dbscan or other means of separating them by color could work nicely to create the several masks (background, grid, curve[n],...) but I can't figure out a good way to do it; there's always noise or bad clustering.

Therefore I was wondering what would be your approach on this problem? Maybe I'm missing something trivial. Thank you for reading!

image description image description