pyfibre.model.tools.preprocessing module

PyFibre Preprocessing Library

Created by: Frank Longford Created on: 18/02/2019

pyfibre.model.tools.preprocessing.clip_intensities(image, p_intensity=(1, 98))[source]

Pre-process image to remove outliers, reduce noise and rescale

Parameters
  • image (array_like (float); shape=(n_y, n_x)) – Image to pre-process

  • p_intensity (tuple (float); shape=(2,)) – Percentile range for intensity rescaling (used to remove outliers)

Returns

image – Pre-processed image

Return type

array_like (float); shape=(n_y, n_x)

pyfibre.model.tools.preprocessing.nl_means(image, p_denoise=(5, 35))[source]

Non-local means denoise algorithm using estimate of Gaussian noise

Parameters
  • image (array_like (float); shape=(n_y, n_x)) – Image to pre-process

  • p_denoise (tuple (float); shape=(2,)) – Parameters for non-linear means denoise algorithm (used to remove noise)

Returns

image – Pre-processed image

Return type

array_like (float); shape=(n_y, n_x)