Skip to content

imAdjustDynamic

David Legland edited this page Aug 28, 2019 · 1 revision

Rescale gray levels of image to get better dynamic. The result is a 255 grayscale image.

Syntax

RES = imAdjustDynamic(IMG, [GMIN GMAX]);

all values below GMIN will be set to 0, all values greater than GMAX will be set to 255, all values in between will be equally spaced between 0 and 255.

RES = imAdjustDynamic(IMG, ALPHA);

Adjust dynamic by saturating a proportion of ALPHA image element. ALPHA should be comprised between 0 and 1. ALPHA=0 will use min and max value in image.

RES = imAdjustDynamic(IMG);

Adjust image dynamic by saturating 1% of the image element.

RES = imAdjustDynamic(..., TYPE);

Specifies another type for output image. TYPE can be 'double', 'int16', 'uint16'...

Example

% read "pout" image and adjust its contrast
img = imread('pout.tif');
img2 = imAdjustDynamic(img, .01);
figure;
subplot(121); imshow(img);
subplot(122); imshow(img2);

img3 = imAdjustDynamic(img, .01, 'double') / 255;
figure; imshow(img3, []);

See Also:

imLUT, imGrayscaleExtent, imadjust, mat2gray

Clone this wiki locally