Login  Register

Re: set null values

Posted by Stephan Saalfeld on Apr 12, 2013; 12:59pm
URL: http://imagej.273.s1.nabble.com/set-null-values-tp5002550p5002628.html

Augustin,

in Fiji, you can find an Outlier removal plugin under

Plugins > Integral Image Filters

The plugin detects outliers by calculating mean and SD for each pixel in
a block of some given radius as those beyond mean +- x*SD, just as you
suggested.  Outlier pixels are replaced by smearing in their non-outlier
neighbors.

As the plugins use integral images to calculate block mean and SD, they
are extraordinarily fast, independent of the block-radius.

In case you are not using Fiji, find the plugins jar here:

http://fly.mpi-cbg.de/saalfeld/download/integral_image.jar

Best,
Stephan




On Fri, 2013-04-12 at 12:56 +0200, Agustin Lobo wrote:

> Thanks, but I need a better way to define outliers. I think that I can create
> a macro to calculate mean and sd (or mad) and define outliers a
> outside mean+/- x*sd
> with a variable value of x (i.e. 2, 2.5, 3 etc). Then calculate the
> actual value in DN
> and use the Remove outliers function.
> Does anyone know if this has already been implemented?
>
> Agus
>
> On Fri, Apr 5, 2013 at 1:44 PM, Michael Schmid <[hidden email]> wrote:
> > Hi Agus,
> >
> > FFT does not ignore NaN pixels (it does not work at all with images containing NaNs).
> >
> > Two possiblities:
> > Process>Noise>Remove Outliers (replaces everything that deviates from the median of the surrounding by the median)
> >
> > Threshold the image to select the outliers, creating a selection (Edit>Selection>Create Selection) with the outliers and running a median thereafter - it will affect the selected pixels only.
> >
> > If you want to have NaNs for other purposes (e.g., 'Measure' ignores NaN pixels), threshold the image, create a selection and use Process>Math>Set to NaN.
> >
> > Michael
> > ________________________________________________________________
> > On Apr 5, 2013, at 09:45, Agustin Lobo wrote:
> >
> >> I have images with outliers that should be set to null and not taken into
> >> account for further processing. How do I set these values to null?
> >> For example, I want to set as null values lower than 0
> >> and higher than 2000.
> >> Also, once I have them defined as null, would any processing ignore
> >> these values?
> >> In particular, if I use an FFT band filter, I do not want these values
> >> to expand from
> >> isolated pixels to little patches (as occurs now).
> >> An alternative would be to guess the values for the pixels
> >> that have been set as null as the median from the 3x3 surrounding window
> >> and the filter out using FFT.
> >>
> >> Thanks!
> >>
> >> Agus
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html