Gaussian Smoothing FilterFilter

17 vues (au cours des 30 derniers jours)
Mahendranath
Mahendranath le 31 Mai 2012
Gaussian Filter works only on certain Images or all the Images...?
%aadi = imread ('D:\Mahender\MATLAB\aadi.jpg'); aadi = imread ('C:\Users\Mahender\Pictures\Capture.png'); subplot (1,2,1),imshow(aadi),title('ORIGINAL PIC..'); gaussianFilter = fspecial ('gaussian',[10,10],10); aadigaussian = imfilter (aadi, gaussianFilter,'symmetric','conv'); subplot (1,2,2),imshow (aadigaussian), title (' RESPONSE OF GAUSSIAN FILTER');
When I apply this Gaussian Filter_on the Image of Capture.png or any other King of Pic. it works well. But Dont know why it doesn't work on the Image of aadi.jpg. This is the Problem. if anyone is interested I mail the Pic too....
% was removed while running the code....
And one more thing what 'G' specifies in Gaussian Filter? It relates to what of an Image? _
Thanks and Regards
  1 commentaire
Oleg Komarov
Oleg Komarov le 31 Mai 2012
Please format your question: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 31 Mai 2012
What does "doesn't work" mean? Is there an error message? Maybe it only works for a gray scale image and you're passing it a 3D true color image, in which case you might have to do it on individual color channels one at a time. You may get color artifacts if you do this on an RGB image and may want to switch to hsv color space and do it on the v channel only, then transform back to RGB color space.
  2 commentaires
Mahendranath
Mahendranath le 1 Juin 2012
Thanks for UR reply. In my Question Doesn't work mean, even though I applied Gaussian smoothing Filter on the image say aadi.jpg the result would be same one as the Input Image...... As U said I converted the Image to Gray and then applied the Filter......
Image Analyst
Image Analyst le 1 Juin 2012
I ran your code on 'cameraman.tif' - the standard MATLAB demo grayscale image - and it ran just fine. The output was blurred, it was not the same as the input image.

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