Automatic defect recognition in x-ray testing using computer vision