dicspecklequality.py¶
- class DICSpeckleQuality(pattern, subset_size, subset_step, gray_level)[source]¶
Bases:
object
- mean_intensity_gradient()[source]¶
Mean Intensity Gradient. Based on the below: https://www.sciencedirect.com/science/article/abs/pii/S0143816613001103
Returns: mean_intensity_gradient (float): float value for mean_intensity gradient
- shannon_entropy()[source]¶
shannon entropy for speckle patterns. Based on the below: https://www.sciencedirect.com/science/article/abs/pii/S0030402615007950
Returns: shannon_entropy (float): float value for shannon entropy
- gray_level_histogram()[source]¶
Count the number of occurrences of each gray value. plot results as a histogram
- speckle_size()[source]¶
Calculates the Speckle sizes using a binary map calculaed from otsu threshholding (https://learnopencv.com/otsu-thresholding-with-opencv/)
Returns: tuple containing: num_speckles (int): total number of speckles identified in the binary map equivalent_diameters (np.ndarray): Speckle diameter if circle with same area labeled_speckles (np.ndarray): Label of the connected elements within speckle