How to use Gaussian filter on images?
16 次查看(过去 30 天)
显示 更早的评论
Hi, I've been trying to do some research into the implementation of this aglorithm below and I am confused about the Gaussian filter part of this equation.
I have been able to implement most of the algorithm but I am stuck at one point of the implementation, in this paper i don't understand the Eq 10 about the Guassian filter, I have only one value for each direction from Eq 8 and 9, but it asks me to apply a 2D gaussian filter to the image. I am assuming that I am to create two matrices of zeros same size as the block, fill the two block with the two values i have individually, and do a gaussian filter on both matrices using imgaussfilt, and then pick only one value from each of the filtered matrices. the problem here is that i don't understand that EQ10. Please am I correct in my understanding so far? Thank you
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288981/image.png)
0 个评论
回答(1 个)
Image Analyst
2020-4-30
The equation simply does a convolution of the image phi with Gaussian filter window W. This is done internally by imgaussfilt(). You do NOT need to "create two matrices of zeros same size as the block, fill the two block with the two values i have individually, and do a gaussian filter on both matrices using imgaussfilt, and then pick only one value from each of the filtered matrices" That is all done for you internally by imgaussfilt(). Simply pass it your image and the width of the Gaussian.
3 个评论
Image Analyst
2020-5-1
Not sure I follow you. For example, the contradictory "the algorithm is not using an image for the filtering, it is getting the orientation of the image" <== so is it (or you) using an image or not?
There is an imgradientxy() function to get gradients in each direction if you want that. It gives you the magnitude (equations 10 and 11) and the direction (equation 12).
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!