2D convolution in in Matlab.
3 次查看(过去 30 天)
显示 更早的评论
I = imread ("lena.jpg");
%imshow(I);
K = I;
C = conv2(I, K);
imshow(C);
But, my output is blank:
What could be the possible reason?
And, how can I obtain the expected output?
0 个评论
采纳的回答
Guillaume
2018-7-10
What could be the possible reason? And, how can I obtain the expected output?
imshow expects that that intensity of a double image is in the range [0-1]. By default, anything less than 0 is displayed as black, and anything more than 1 is displayed as 1.
You can override that behaviour by passing a different range as the 2nd input to imshow or letting imshow use the intensity range of your image by passing []. So:
imshow(C, [])
should fix your problem.
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!