2D convolution in in Matlab.
1 回表示 (過去 30 日間)
古いコメントを表示
Ba Ba Black Sheep!
2018 年 7 月 10 日
コメント済み: Ba Ba Black Sheep!
2018 年 7 月 10 日
I = imread ("lena.jpg");
%imshow(I);
K = I;
C = conv2(I, K);
imshow(C);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191769/image.png)
But, my output is blank:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191770/image.png)
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!