porespy.beta.local_diff#
- porespy.beta.local_diff(vals, im, strel=None)#
Computes the difference pixel and the average of it’s neighbors.
- Parameters:
vals (ndarray) – The array containing the values of interest
im (ndarray) – A boolean image of the domain
strel (ndarray, optional) – The struturing element to use when doing the convolution to find the neighbor values. This defines the size and shape of the area searched. If not provided then a 3**ndim cube is used.
- Returns:
diff – An array containing the difference between each pixel and the average of it’s neighbors. The result is not normalized or squared so may contain negative values which might be of interest if the direction of the difference is relevant.
- Return type:
ndarray