I am new to OpenCV and I'm trying to count and locate broken or cracked biscuits (those which are not perfect circles as they should be) in the image.
What kind of strategy should I follow?
Any suggestion can help to open my mind. Regards.
I am new to OpenCV and I'm trying to count and locate broken or cracked biscuits (those which are not perfect circles as they should be) in the image.
What kind of strategy should I follow?
Any suggestion can help to open my mind. Regards.
Your question is very abstract (it would be better if you provide some picture), but I can try to answer it.
First of all you have to detect all busquits on your image. To do this you have to find bisquit color (maybe HSV color space would be better for your aim) on your picture and convert input image to single channel image (or matrix), each element of this matrix can be:
[OpenCV function inRange may help you to do such conversion.]
When bisquits are detected you can:
Also look at HoughCircle tutorial to detect just circles if your image doesn't contain other circles (except bisquits).