How to detect defect bean using python3

Viewed 681

normal bean sample

defect bean sample-1

I want to judge whether the bean is normal or defect. I tried to use Canny method(to find edge) and so on... but I failed. I just solve it using shape.(cracked bean & unshaped bean ...) Please, give me some idea to solve it.

Sorry for my English, it's not my first language.

1 Answers
Related