Re: Image Processing Question

Posted by Colin Rickman on
URL: http://imagej.273.s1.nabble.com/Image-Processing-Question-tp3696307p3696310.html

Hi,

Make sure you are using the correct bit depth for your images in these
calculations. I would recommend using 32bit to allow negative numbers
and prevent the maths failing due to the values hitting the top of the
available range (ie 180 + 100 = 255 in 8bit data).

Hope that helps


Dr Colin Rickman
Centre for Integrative Physiology
School of Biomedical Sciences
University of Edinburgh
Hugh Robson Building
George Square
Edinburgh
EH8 9XD

Tel: +44 (0)131 6511512
Fax: +44 (0)131 6503128

Sebastian Rhode wrote:

> Hi,
>
> here is what I do for a little plugin in Java:
>
> pic1 - pic2 = result1 --> measure --> min1 = 0
>
> (pic1 +100) - pic2  = result2 --> measure --> min2 = 53
>
> Built-in Plugins give the same results. Is ImageJ setting negative Pixel
> values to Zero, since I expected min2=100?
>
> And of course if you do image statistics stdDev (result1) and stdDev
> (result2), the results will be different. In my opinion the addition of an
> offset is required for the correct calculation of stdDev, but maybe I am
> wrong.
> Any suggestions on this issue?
>
> Thanks for your help!
>
> Sebi
>

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.