How to write a custom contour detecting function?

asked 2017-09-11 08:18:37 -0600

Santhosh1 gravatar image

I tried extracting contours out from an inbuilt function in OpenCV python. 😃

It only detected very small contour, almost 80 detected contours out of 100 were noise not exactly the contour I was hoping to detect. 😅

So I would like to build my own contour detection function in python, I have no idea how to do it? 🤔

Any suggestions to point me in the right direction?

edit retag flag offensive close merge delete

Comments

You Can detect all contours and then filter by area or length. ? What did you try ?

Ziri gravatar imageZiri ( 2017-09-11 10:08:25 -0600 )edit

@Ziri As I have already mentioned, I did extract the contours. I did even try to filter the unwanted contours(by arc length and contour area) it is not giving me a desired result I wanted.

Is there any way in which I can create my own custom contour detection function?

or I am just wasting my time trying to create a custom contour detection function?

Santhosh1 gravatar imageSanthosh1 ( 2017-09-13 04:15:45 -0600 )edit

If you need features that are not supported in Opencv you can make your "connected components algorithm" but better if you can post sample image and code you tried so you can get help.

Ziri gravatar imageZiri ( 2017-09-13 07:02:10 -0600 )edit