What exactly algorithm does MATLAB use in the function imadjust?

3 views (last 30 days)
First of all, I have an image I, whose intensity is ranging from 0 to 39 over 255 (in the picture the range is 0 to 39).
Then I have I2 = imadjust(I); , whose intensity is ranging from 0 to 255.
I did some research and found out that it actually use Gamma-Correction algorithm, and in my case, it is linear Gamma-Correction, as the gamma factor is 1.
However, the problem is I don't know what exactly MATLAB do. I found out that the intensity value in every pixel in image I is linearly weighted by the factor of 8.24 to become image I2. So the pixels in image I which have the intensity value from 31 are already weighted to the maximum value 255 in the image I2.
So how does MATLAB decide the weight factor? Is there any more algorithms behind this?
Thank you very much in advance.

Answers (1)

Thorsten
Thorsten on 29 Sep 2015
Edited: Thorsten on 29 Sep 2015
You can have a look at the source code of imadjust to see what Matlab is doing.
type imadjust
or
edit imadjust
(make sure not to edit it, though, or not to save your edits.)
  1 Comment
Thanh Nguyen Bui
Thanh Nguyen Bui on 29 Sep 2015
Thanks a lot, I didn't know that. But well, there are really a lot of things in there.
Definitely that I will try to look into it by myself, but I really don't know how much time it will take me. Currently I am trying to race against the deadline of my Bachelor Thesis.
I know that it might have something to do with the Truncation Law of MATLAB when shifting range (in my case, from 0-39/255 to 0-255). So if you may, could you please explain to me in advance if you had already known the answer or got used to the truncation law of MATLAB?
Thank you so much.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!