Tomasz Edwin
Tomasz Edwin

Reputation: 147

openCV shape defects recognition

I want to do recognition: is this shape damaged or not. in OpenCV.

To enclosure the problem I'm uploading pictures of 3 good images and 4 damaged.

Problem is that: damaged shapes have a lot common properties with the good ones. I was trying to use: cv::contourArea - but area every time is very similar

cv::matchShapes - but comparing for example 'OK1' with 'OK3' Was giving very similar value as compare 'OK1' with 'NOK1' .

cv::convexityDefects - i created convexHull for OK1 and compare the sum of all defectContours depth with other images but the value was always very similar.

Slowly I'm running out of ideas what else Can work. I'm sure that task is possible to done. I'm looking for hints now.

Many thanks for your consideration!

https://i.sstatic.net/RTScy.jpg <- images

Also sorry for my English. It's not my first language.

Upvotes: 3

Views: 1610

Answers (1)

Tomasz Edwin
Tomasz Edwin

Reputation: 147

Description and solution for these who may have similar problem.

Solution for this problem was usage of the SurfFeatureDetector -> OpenCV::Doc

Tricky thing in this solution is that circular shapes are hard to describe for this detector. So, small number of the key points mean that nothing wrong is happening with this shape.

Thanks Vorac for a hint!

Circular shapes and cv::SurfFeatureDetector

Upvotes: 1

Related Questions