I am trying to classify the grains into defective and non-defective using image processing tools like OpenCV in Python. One of the images looks as shown in the figure.
I first segmented out the grains separately by ranging using HSV space and applied some edge detections algorithms like canny, adaptive threshold but I can find a particular way to resolve this because I recently started exploring and I'm still exploring the power of image processing.
Defective:
Non-Defective:
I have two queries:
1) What metrics to use to distinguish the grains, if I use the edge_detected pictures as shown above.
2) Since the edge detection using canny is failed in the third image of Non-Defective ones.Is there any other features that I could rely on.













