pyfibre.model.tools.filters module

pyfibre.model.tools.filters.derivatives(image, rank=1)[source]

Returns derivates of order “rank” for imput image at each pixel

Parameters
  • image (array_like (float); shape(n_y, n_x)) – Image to analyse

  • rank (int (optional)) – Order of derivatives to return (1 = first order, 2 = second order)

Returns

derivative – First or second order derivatives at each image pixel

Return type

array_like (float); shape=(2 or 4, n_y, n_x)

pyfibre.model.tools.filters.form_nematic_tensor(dx_shg, dy_shg)[source]

Create local nematic tensor n for each pixel in dx_shg, dy_shg

Parameters
  • image (array_like (float); shape(n_y, n_x)) – Image to analyse

  • sigma (float, optional) – Gaussian smoothing standard deviation

Returns

n_vector – Flattened 2x2 nematic vector for each pixel in dx_shg, dy_shg (n_xx, n_xy, n_yx, n_yy)

Return type

array_like (float); shape(nframe, n_y, n_x, 2, 2)

pyfibre.model.tools.filters.form_structure_tensor(image)[source]

Create local structure tensor n for each pixel in image

Parameters
  • image (array_like (float); shape(n_y, n_x)) – Image to analyse

  • sigma (float, optional) – Gaussian smoothing standard deviation

Returns

j_tensor – 2x2 structure tensor for each pixel in image stack

Return type

array_like (float); shape(nframe, n_y, n_x, 2, 2)

pyfibre.model.tools.filters.gaussian(image, sigma=None)[source]

Perform gaussian smoothing on image using sigma standard deviation

pyfibre.model.tools.filters.hysteresis(image, alpha=1.0)[source]

Hystersis thresholding with low and high clipped values determined by the mean, li and isodata threshold

pyfibre.model.tools.filters.tubeness(image, sigma_max=3)[source]

Wrapper around the scikit-image sato tubeness filter