Gaussian Smoothing FilterFilter
17 views (last 30 days)
Show older comments
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 Comment
Oleg Komarov
on 31 May 2012
Please format your question: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Answers (1)
Image Analyst
on 31 May 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 Comments
Image Analyst
on 1 Jun 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.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!