Ask Your Question

enkor's profile - activity

2014-10-29 14:57:01 -0600 commented answer Detect if contour is simple curve without complex pattern or detect starting and ending points of contour

HoughLinesP do the job. Thank you.

2014-10-29 14:56:50 -0600 received badge  Scholar (source)
2014-10-26 10:05:50 -0600 asked a question Detect if contour is simple curve without complex pattern or detect starting and ending points of contour

I have a problem with detecting if contour is a simple curve or line. I need to filter as many object as I can and leave only interesting objects for me. But it's not a goal to filter all unwanted objects. I have more logic to detecting required objects later but it cost a lot of time. So I'm looking for some low cost solution for filtering unwanted object before main algorithm take the part.

I have two examples from my application.

image description

image description

So I want to remove the yellow marked objects. And leave the green marked object. I don't circle everything, because they are so many :]. My idea was that if I can detect if the line is starting and ending in the corners of bounding box, but I dont'k know how can I detect where the line starts and ends. Or If I'm able to detect starting and ending points of contour I can decide it by their distance.

I use canny edge detection and find contours. And I have some basic filtering of object depending on their size.

I'm out of ideas and stuck at this part. I will be glad for your help or ideas.