FUNCTION REFERENCE
imadjust
Adjust image intensity values.
Adjust image intensity values.
Syntax
J = imadjust(I)Syntax
J = imadjust(I, [low_in high_in])Syntax
J = imadjust(I, [low_in high_in], [low_out high_out])Syntax
J = imadjust(I, [low_in high_in], [low_out high_out], gamma)Maps intensities between low_in and high_in to values between low_out and high_out: with x the intensity as a fraction of the class range, J = low_out + (high_out - low_out) * ((min(max(x, low_in), high_in) - low_in) / (high_in - low_in))^gamma. Limits are fractions in [0, 1]; [] means [0 1]; the default input limits are stretchlim(I) (1 % saturated at each end) and gamma defaults to 1. low_out > high_out inverts the image. Integer results are rounded half away from zero and saturated; J has the class of I. For an M-by-N-by-3 RGB image the limits may be 2-by-3 (one column per channel) and gamma 1-by-3.
Example
imadjust(uint8([0 51 100 128 204 255]), [0.2 0.8], [0 1]) % uint8([0 0 82 128 255 255])Example
imadjust([0 0.5 1], [], [0.2 0.4]) % [0.2 0.3 0.4]Example
imadjust(uint8([0 100 255]), [], [1 0]) % uint8([255 155 0])Differences from MATLAB: no colormap (imadjust(cmap, ...)) input; logical images are rejected.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.