Login  Register

Re: Filters: Variance

Posted by jmutterer on Nov 16, 2006; 10:06am
URL: http://imagej.273.s1.nabble.com/Filters-Variance-tp3700988p3700989.html

You can check how the variance filter is implemented by looking at the
following pluginfilter code (RankFilters.java) available at :

http://rsb.info.nih.gov/ij/developer/source/ij/plugin/filter/RankFilters.java.html

Jerome


On 11/16/06, ZQ@Bend <[hidden email]> wrote:

> Hello,
>
> Here one question about Process/Filter/Variance. I am trying to
> understand what is behind the Variance filter. I make a text image with
> the following matrix:
>
> 1       1       1
> 1       2       1
> 1       1       1
>
> Then I run Variance filter on the image, with radiue = 2. The I got an
> image with all 9 pixel value = 0.95238.
>
> My understanding is that it would take a 3x3 matrix, calculate variance
> of the 9 elements (which is 0.1111), then put it back to the center
> position of the 3x3 matrix, without changing value of the elements at
> the edge, i.e.
> 1       1       1
> 1       0.11    1
> 1       1       1
>
> Is my understanding correct? Could anybody tell me how ImageJ calculate
> this Variance filter?
>
> Any comments will be appreciated.
>
> ZQ
>