1 | initial version |
I ended up using histogram comparison for thresolded image for my defected pieces. System has to be calibrated earlier for "good" pieces and any defect will result in less histogram values. If it's below a certain thresold, it is declared as a rejected piece.
Angle of camera and piece position are very significant in this use case as certain variation will lead to totally different data.
Hope it helps.