Auto contrast function in image j; histogram

For 8 bit image, when image j does auto contrast, does it choose the medium pixel value as fixed value, set the minimum to 0 and maximum to 255 and expand the other pixel with the respect to the medium pixel value?

say the old minimum is n and maximum is m. New Arbitrary x’ (corresponds to old x) would be
x’= ((m+n)/2)-[((m+n)/2)-x]/(n-m)]*255 if x<m+n/2
x’= ((m+n)/2)+[(x-(m+n)/2)]/(n-m)]*255 if x>m+n/2
x’= (m+n)/2 if x=(m+n)/2

Hi @Sylvia_Ke -

There was an old post on the imagej mail list regarding this… they linked to this page as well - which might provide you the answer to your question.

Hope you find this helpful!