필터 지우기
필터 지우기

conv2() for gray images

조회 수: 2 (최근 30일)
Evolution
Evolution 2015년 2월 20일
답변: David Young 2015년 2월 20일
Hello I am trying to perform 2D convolution of 2 images.After performing the convolution i am trying to show the resultant image but no luck .Can you provide some pointers where i am making mistake ?i tried imagesc as well but it didn't show any images but only colors. i=im2double(imread('E.png')); i2=im2double(imread('BOX.png')); i=rgb2gray(i); i2=rgb2gray(i2); i3=conv2(i,i2); imshow(uint8(i3)
  댓글 수: 1
David Young
David Young 2015년 2월 20일
Your question would be easier to read if you format the code using the "{} Code" button.

댓글을 달려면 로그인하십시오.

답변 (1개)

David Young
David Young 2015년 2월 20일
I'm not sure why you are converting i3 to uint8 before passing it to imshow. Try
imshow(i3, []);
which automatically scales the grey levels.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by