## "Fossies" - the Fresh Open Source Software Archive

### Source code changes of the file "skimage/feature/_canny.py" betweenscikit-image-0.19.2.tar.gz and scikit-image-0.19.3.tar.gz

About: scikit-image is a collection of algorithms for image processing in Python.

_canny.py  (scikit-image-0.19.2):_canny.py  (scikit-image-0.19.3)
skipping to change at line 68 skipping to change at line 68
the pixel data that's due to significant points). We then mask the image the pixel data that's due to significant points). We then mask the image
and apply the function. The resulting values will be lower by the and apply the function. The resulting values will be lower by the
bleed-over fraction, so you can recalibrate by dividing by the function bleed-over fraction, so you can recalibrate by dividing by the function
on the mask to recover the effect of smoothing from just the significant on the mask to recover the effect of smoothing from just the significant
pixels. pixels.
""" """
gaussian_kwargs = dict(sigma=sigma, mode=mode, cval=cval, gaussian_kwargs = dict(sigma=sigma, mode=mode, cval=cval,
preserve_range=False) preserve_range=False)
# Make the eroded mask. Setting the border value to zero will wipe
# out the image edges for us.
s = ndi.generate_binary_structure(2, 2)
# Compute the fractional contribution of masked pixels by applying # Compute the fractional contribution of masked pixels by applying
# the function to the mask (which gets you the fraction of the # the function to the mask (which gets you the fraction of the
# pixel data that's due to significant points) # pixel data that's due to significant points)
bleed_over = bleed_over = gaussian(mask.astype(float, copy=False),
**gaussian_kwargs) + np.finfo(float).eps **gaussian_kwargs) + np.finfo(float).eps
# Lower the result by the bleed-over fraction, so you can # Lower the result by the bleed-over fraction, so you can
# recalibrate by dividing by the function on the mask to recover # recalibrate by dividing by the function on the mask to recover
# the effect of smoothing from just the significant pixels. # the effect of smoothing from just the significant pixels.
smoothed_image /= bleed_over smoothed_image /= bleed_over