You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to apply this filter to a test image (https://imgur.com/nbfxWjB). This filter should act symmetricly, but it appears not to. For example, you get this result (https://imgur.com/3mhpXI3) with the code below. If you transpose the input and then transpose the output back you get this results (https://imgur.com/neZPDIM).
Reproducing code example:
from PIL import Image
from scipy.ndimage import gaussian_laplace
image=Image.open('White Spot.tif')
transformed=gaussian_laplace(image,4)
im = Image.fromarray(transformed)
im.save('transformed_python.TIF')
If you were to apply a similar function in matlab you would end up with a symmetrical image
I = imread('White Spot.tif');
H = fspecial('log',[5 5],0.1);
LoG_img = imfilter(I,H,'replicate');
imshow(LoG_img);
imwrite(LoG_img,'transformed_matlab.TIF');
Results: https://imgur.com/uieZhvK.
I had to change sigma as if sigma is too big in the matlab version the image just ends up black.
I am not sure if this is a bug or if I just don't know how to specify the kernel in scipy.ndimage objects.
This issue might be related to a separate issue I saw from 2016 (#5543).
Thank you for your help!
The text was updated successfully, but these errors were encountered:
MikeVeling
changed the title
specifying semetrical kernal for Laplacian of Gaussian filter.
specifying semetrical kernel for Laplacian of Gaussian filter.
Jun 16, 2019
My issue is about the scipy.ndimage.gaussian_laplace function in scipy.
I have a full detail write up on stack overflow here:
https://stackoverflow.com/questions/56463123/unexpected-results-in-scipy-ndimage-gaussian-laplace-inproper-2d-processing
I am attempting to apply this filter to a test image (https://imgur.com/nbfxWjB). This filter should act symmetricly, but it appears not to. For example, you get this result (https://imgur.com/3mhpXI3) with the code below. If you transpose the input and then transpose the output back you get this results (https://imgur.com/neZPDIM).
Reproducing code example:
Scipy/Numpy/Python version information:
If you were to apply a similar function in matlab you would end up with a symmetrical image
Results: https://imgur.com/uieZhvK.
I had to change sigma as if sigma is too big in the matlab version the image just ends up black.
I am not sure if this is a bug or if I just don't know how to specify the kernel in scipy.ndimage objects.
This issue might be related to a separate issue I saw from 2016 (#5543).
Thank you for your help!
The text was updated successfully, but these errors were encountered: