Check defects are align or not using opencv python

Hello everyone,

Currently, I’m working on one project that is based on ndt X-ray defect detection.

For that, there are many acceptance criteria. One of the criteria is whether defects are aligned or not.

I predict all defects using a deep-learning model and return starting and ending points of the defects.

So based on these points how can I find whether defects are aligned or not if yes then I draw one reference line in the image.

I attached one image for reference.

116

The yellow line is the reference line, it is passing throw defects (This line is drawn with the help of paint).

Thank you.

RANSAC on the point set, with the model being a line.

1 Like