adaptive gaussian filter
5 views (last 30 days)
Show older comments
Hi everybody,
I have been dealing with problem for 3 days without succes so I would like you to apply for an advice.
I want to do an adaptive spatial filter, which is based on convolution (gaussian filter) but for every processing pixel I have to use different scale parameter (sigma) of the gaussian function. It can be done by calculation of convolution "properly" with 4 "for" cycles but I think it is not too effective. Do you have any idea how to solve it? I tried to use fcn nlfilter(A, [m n], fun)with my function fun function but I coudn´t find how to e.g. determine position of current processing pixel. Probably there exists better way how to solve it...
Thank you for all response!
Pavel
0 Comments
Answers (1)
Image Analyst
on 10 Aug 2011
You could use global or persistent variables inside the "fun" function to keep track of where the window is. I believe it goes down rows in the first column, then moves over to the next column and goes down the rows, etc. until all columns have been processed. (If not then it goes in the other direction.) This knowledge of the window location can then be used in your algorithm to decide on the sigma.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!