adaptive_contrast_cvip() - Performs Adaptive contrast enhancement on an image.
new_image = adaptive_contrast_cvip( imageP,W, k1,k2,min_gain, max_gain)
Input Parameters include :
- imageP - Input image can be gray image or rgb image of MxN size.
- W - Filter block size.
- k1 - Local gain factor constant, between 0 and 1.
- k2 - Local mean constant, between 0 and 1.
- min_gain - Local gain minimum value.
- max_gain - Local gain maximum value.
Output Parameter Include :
- new_image - The output image after adaptive contrast filtering.
Adaptive contrast enhancement method is used to perform a histogram modification, but instead of doing it globally, it applies the modification to the image on a block by block basis. The enhancement is adaptive as it depends on the local histogram of the image. The adaptive contrast enhancement filter is used to adjust the contrast differently in different regions of the image.
1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.
% Read image imageP = imread('Butterfly.tif'); % Filter block size W = 11; % Local gain factor k1 = .8; % Local mean factor k2 = 0.5; % Local gain minimum value min_gain = 5; % Local gain maximum value max_gain = 10; % Calling function new_image = adaptive_contrast_cvip( imageP,W,k1,k2,min_gain, max_gain); % Display input image figure;imshow(imageP);title('Input Image'); % Display output image figure; imshow(hist_stretch_cvip(new_image,0,1,0,0),);title('Output image');