Re: Bug in Math>Subtract ?

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Bug in Math>Subtract ?

Michael Schmid-3
Hi Wei,

for all image types except floating-point (32-bit) images, there is a
minimum value of zero. E.g. 8-bit images have values between 0 and 255.

E.g., if the original pixel value is 5 and you subtract 10 as a
background, the result won't be -5 but 0.
If you calculate the mean intensity of several pixels and some of them
would have a result less than zero after subtraction, the mean intensity
will be higher than the previous mean intensity minus the value that you
have subtracted.

You can avoid this by converting the image to floating-point data

On 06/06/2018 06:57, wei.jian wrote:

> Hi everyone,
> I recently used the math>subtract function for background subtraction and
> noticed that the net intensity generated by this function doesn't tally with
> the net intensity that I calculated myself. Both methods were compared with
> the same box for my signal of interest and another box for the background.
> The numbers are off by a range of 0.1-2.
> The way I calculated the net intensity is as follow:
> Net mean intensity at signal of interest = Mean intensity at signal of
> interest - Mean intensity at background
> I don't think this is a result of significant numbers. Is there a bug with
> this or is the math done differently with the subtract function?
> Thanks.
> WJ

ImageJ mailing list: