How does 'Bleach correction' work?

Hello, everyone.
Now, I’m using ‘Bleach correction’ plugin( Image/Adjust/Bleach correction) of Image J. I’d like to know how ‘Bleach correction’ works in ImageJ. After I get a new image from the function using exponential curve, it seems the intensity of pixels is corrected. But it’s supposed to correct like this way “corrected_intensity=initial_intensity*EXP(Time * b)”, where b is from the exponential curve.

But I checked it’s not working like that.
I’d like to know mathematically how it works.

Does anyone know how this changes the intensity of pixels?

Thank you!

@Jae

The best place to start is by checking the source code:

Too - if you can provide a few more details regarding

How did you check? What exactly is not correct?

I also invited the author of this tool - @Kota - to this thread… so let’s see.

I have a raw image sequence(time:1 to 1000) in 2D.

I got the exponential curve(1) from a region of interest of (2)_yellow square (the raw image). And I ran the plugin again with the same ROI from the corrected image(3). Judging from the appearance of (3), I’d say the intensity is corrected. It doesn’t decay anymore at least. Bleaching_correction
To check how it’s corrected, I compared each intensity values of one pixel(same position) from the raw and the corrected image. But I couldn’t get corrected intensity values from raw intensity values.
image

The photobleaching correction equation doesn’t work to get corrected intensity values(3rd column) from the raw intensity values(2nd column). I used the ‘b’ and ‘c’ value from the exponential curve as a bleaching rate and offset relatively.

My question is how is performed the correction for photobleaching for the new 2d image sequence mathematically?

Hi Jae,

In one of the files that etarena linked to (BleachCorrection_ExpoFit.java) you will find on line 151:
return (a * Math.exp(-b*x) + c);

With following info provided:

 * @param a  magnitude (difference between max and min of curve)
 * @param b  exponent, defines degree of decay
 * @param c  offset.
 * @param x  timepoints (or time frame number)
 * @return estimate of intensity at x

Is this what you are looking for?

1 Like

Thank you for your answer. I understand the equation, how it fits the exponential.
At the example data, the corrected intensity value(3288) at first frame is supposed to be calculated like this way.

=(3285-2160.46993)*EXP(0.0050768 * 1)+2160.46993
=(2970-2160.46993)*EXP(0.0050768 * 2)+2160.46993

but it doesn’t give me the exact number “3288”, “2976” and so on.
I wonder how the corrected intensity values are calculated from the initial values using the exponential fitting values.