Login  Register

standardize an image

Posted by Stanislav Aggerwal on Oct 09, 2013; 2:55pm
URL: http://imagej.273.s1.nabble.com/standardize-an-image-tp5005105.html

I would like to do the following, which I give below in pseudocode.

Let's call the image z
znew=standardize(z)

standardize(z)
{
zz = (z[z>0]-mean(z[z>0]))/sd(z[z>0])
#where z[z>0] means the pixels that have greylevels >0
zz[zz>4.5] = 4.5
zz[zz< -4.5] = -4.5
zz=rescale(zz, 0, 255)   #rescale the zz values to be in the range (0,255)
return(zz)
}

Could someone please tell me how to do this with ImageJ/Fiji?

Thanks very much for any help.

Stan

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