1

I am working on a college project where I have to use image processing using opencv to detect manufacturing defects in cookies. The program must be able to detect oversized, undersized, distorted cookies, cookies with cracks, etc.

I am new to opencv. I tried using Houghcircles to check for some of the above defects, but it does not work since the perfect cookie itself is elliptical.

Or, if I take the pics of a perfect cookie and any other cookie, how do I compare them?

Can you please mention a few functions / codes which might be helpful for my project.

Thank You.

2
  • I am new to image processing. Please help. Commented May 17, 2013 at 7:07
  • If you have a database of perfect/imperfect cookies, you can train a classifier. Commented May 17, 2013 at 8:04

1 Answer 1

1

You can look into ellipse detection. It does involve more coding compared to hough circles, but I've tried it in the past and it works quite well. Take a look at these papers:

Also read through this article on matrix representations of conic sections. This will help you find the lengths of the major and minor axes of the ellipses, which in turn will aid with quality control.

Sign up to request clarification or add additional context in comments.

6 Comments

thank you very much. I'll try using the above ideas. However when I tried an ellipse detection code which i found online, the problem is, even a distorted object can be fit into an ellipse... So, objects with defects still remain.
Yes objects with defects will definitely be detected. You will need to post-process, check the lengths of the major and minor axes, and then filter out noise or bad samples.
thanks for the help. It worked. Now I am done with all dimensional defects. For checking cracks on the cookie, I am thinking of Sobel operator. But what do I use to detect imperfections like the surface of the cookie is bent / contorted. Since the image will be 2d, I am clueless about how to detect thickness / surface related defects.
Great, glad it worked. Can you attach some examples so that we get a better idea about defects?
The top one is bent and has cracks. The middle one is fine. The bottom one is almost fine, but has a small projection in one place. That also should be considered as a defect.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.