Does image>adjust>brightness/contrast change the actual data of image?

I am doing some analysis that is based on threshold of the 8 bit grey scale image. Some of the images that I have are really dark and I need to change minimum and maximum of the image so that threshold can correctly work.
For example the real image is:
image
but after changing the min and max it would be this:
image
I am interested that further analysis (which include thresholding) is done on the last image not darker one.
I think image>adjust>brightness/contrast will just change the demonstration of data not the actual data of image. My question is that how can I have this change in the actual data of image.
I appreciate any help.

Hi Zeynab_Mousavi, after adjusting the B&C, if you click Apply it will “clip” the actual value in your image.
Note that since your actually changing the value of your data, you should; 1st, report it and; 2nd, in theory you should use a reproducible method such as calculating the 1 and 99 percentile values in your image and remove these extreme values.

2 Likes

@cedrice Thanks! and is there anyway to do it in automated way for multiple images not by hand?
and what do you mean by report? Is it enough to mention that images are modified for better contrast?

you can use the Enhance Contrast function and set a saturation percentage (fraction of pixels clipped) in a macro command.

1 Like

@Wilson_Adams what do you mean by "set a saturation percentage’’?

Hi Zeynab_Mousavi, here you can find more info on the ‘Enhance Contrast’ functionality:
https://imagej.nih.gov/ij/docs/guide/146-29.html#sub:Enhance-Contrast
https://imagej.nih.gov/ij/docs/menus/process.html#enhance
You could use this functionality easily in a macro and automate things for yourself.

2 Likes

if you use the Record tool to auto-enhance your image contrast, the command you are given is the following:

run("Enhance Contrast", "saturated=0.35");

the “saturated” variable corresponds to what fraction of the pixel intensity values will be set to values that are clipped by the look up table for viewing.

2 Likes

additionally you can use the getMinandMax() function to get the autoscaled intensity thresholds.

1 Like