enhanceRadiograph

xripl.clean.enhanceRadiograph(img, medianDisk=5, morphDisk=5, flattenMedian=100, flattenGauss=100, plots=False)[source]

Median filter, morphological filter, and pseudo-flatfield the radiographs to prepare it for feature identification.

Parameters
  • img (numpy.ndarray) – Foreground radiographic image as a 2D numpy array, which is to be cleaned/enhanced.

  • medianDisk (int) – Radial size of disk in pixels to be used for median filtering the image. Default is radius of 5 pixels.

  • morphDisk (int) – Radial size of disk in pixels to be used for morphologically filtering the image to clean up artifacts.

  • flattenMedian (int) – Radial size of disk in pixels to be used for median filtering image as part of over-smoothing process to obtain the pseudo-flatfield. Default is radius of 100 pixels.

  • flattenGauss (int) – Standard deviation in pixels to be used for Gaussian blurring the image as part of over-smoothing process to obtain the pseudo-flatfield. Default is sigma of 100 pixels.

  • plots (bool) – Flag for plotting cleaned and flattened images. Default is False.