Effacer les filtres
Effacer les filtres

2-D Convolution of two images

1 vue (au cours des 30 derniers jours)
Taimoor Zafar
Taimoor Zafar le 19 Fév 2015
Commenté : Image Analyst le 21 Fév 2015
I need to convolve two jpg images by using conv2 command but it's not working . Images are attached.
I am new to this field.
Plz help me
  3 commentaires
Taimoor Zafar
Taimoor Zafar le 20 Fév 2015
Taimoor Zafar
Taimoor Zafar le 20 Fév 2015
This is my required work to convolve letter E with small square, Circle and Large square and by doing this I have to draw their 3D plots. I don't know how to start this. I used conv2 command but its not working directly.

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 19 Fév 2015
Two points you may have overlooked.
  1. You need to do it on monochrome images, not color. So extract the color channels and do it one color channel at a time.
  2. You need to cast the uint8 to double before you pass the array into conv2.
  3 commentaires
Taimoor Zafar
Taimoor Zafar le 20 Fév 2015
I need to do the above task through convolution. It would be helpful to me if you teach me how to start writing this code. It looks very difficult for me. Plz help me
Image Analyst
Image Analyst le 21 Fév 2015
windowSize = 9;
kernel = ones(windowSize)/windowSize^2;
blurredImage = conv2(double(grayImage), kernel, 'same');
surf(blurredImage);
colormap(gray(256));

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by