Home Why LOG filter is returning the black background image?

# Why LOG filter is returning the black background image?

M.Zaman
1#
M.Zaman Published in 2014-10-20 16:20:17Z
 I had taken co-relation of image with LOG filter via imfilter command. z=imfilter(I,fspecial('log',11,1.5)); figure imshow(z);  Image:
M.Zaman
2#
 The problem you have is that you are not showing the result properly. Your result is in range 0-31, but you need to convert it to 0-255 to plot it! do imshow(mat2gray(z)) 
 The best way to solve this problem is not to change your image, but to change the way imshow displays it. Try this: >> imshow(z, [0, 31]);  Or, better yet, try this: >> imshow(z, []);  which will re-scale the image automatically, mapping the minimum value to 0 and the maximum to 255.