local variation of image

I want to calculate the local standard variation in a sliding window for an image. How it should be done using matlab ??

 採用された回答

nayomi ranamuka
nayomi ranamuka 2011 年 5 月 8 日

0 投票

Thank you. Regarding to your comments I've a solution also. J = colfilt(I,[5 5],'sliding',@std); I hope your suggestions for my solution.

2 件のコメント

Wolfgang Schwanghart
Wolfgang Schwanghart 2011 年 5 月 8 日
Hi, your solution is good, too! The function stdfilt is probably much faster, but if this is not a problem right now, colfilt is a good alternative.
nayomi ranamuka
nayomi ranamuka 2011 年 5 月 8 日
Thank you

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

その他の回答 (1 件)

Wolfgang Schwanghart
Wolfgang Schwanghart 2011 年 5 月 7 日

1 投票

Hi,
or
doc stdfilt
Hope this helps, Wolfgang

6 件のコメント

nayomi ranamuka
nayomi ranamuka 2011 年 5 月 7 日
Thank you. But I want to calculate the local standard variation for each pixel x within a window W(x).
nayomi ranamuka
nayomi ranamuka 2011 年 5 月 7 日
W(x) is a sub Window of image.
Walter Roberson
Walter Roberson 2011 年 5 月 7 日
Yes?
J = stdfilt(I, NHOOD) calculates the local standard deviation of the input image I, where you specify the neighborhood in NHOOD. NHOOD is a multidimensional array of zeros and ones where the nonzero elements specify the neighbors. NHOOD's size must be odd in each dimension.
nayomi ranamuka
nayomi ranamuka 2011 年 5 月 7 日
Ok. Thank you. I'm new for matlab & image processing .I would like to know how can I apply J = stdfilt(I, NHOOD) for sliding window in an image.
Wolfgang Schwanghart
Wolfgang Schwanghart 2011 年 5 月 7 日
What exactly is the problem? Did you try to run the example in the documentation?
Walter Roberson
Walter Roberson 2011 年 5 月 7 日
J = stdfilt(I, ones(5,5));

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

Community Treasure Hunt

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

Start Hunting!

Translated by