Gaussian Smoothing FilterFilter

13 ビュー (過去 30 日間)
Mahendranath
Mahendranath 2012 年 5 月 31 日
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 件のコメント
Oleg Komarov
Oleg Komarov 2012 年 5 月 31 日
Please format your question: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2012 年 5 月 31 日
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 件のコメント
Mahendranath
Mahendranath 2012 年 6 月 1 日
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 2012 年 6 月 1 日
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.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by