cropping x-ray image to remove background

  computer-vision, opencv, python

I have many x-ray scans and need to crop the scanned object from its background noise.

The files are in .png format and I am planning to use OpenCV Python for this task. I have seen some works with FindContours() but unsure that thresholding will work for this case.

Before Image:

Before Image

After/Cropped Image:

After/Cropped Image

Any suggested solution/code is appreciated.

Source: Python Questions

LEAVE A COMMENT