quality defect detection in real time