HIST_STRETCH_CVIP

hist_stretch_cvip() - This function stretches a histogram.

Contents

SYNTAX

outputImage = hist_stretch_cvip(inputImage, low, high, lowClip, highClip);

Input Parameters Include :

Output Parameter Include :

DESCRIPTION

This function stretches a histogram of an input image. This histogram stretch technique can be used to improve the contrast of an image. By clipping a small percentage at the ends, you can avoid the possibility of a few high or low pixel values compromising the stretch effect.

REFERENCE

1. Scott E Umbaugh. DIGITAL IMAGE PROCESSING AND ANALYSIS: Applications with MATLAB and CVIPtools, 3rd Edition.

EXAMPLE

% Read image

 X1 = imread('Cam.bmp');

 X2 = imread('Car.bmp');

% Lower limit of stretch

 low = 0;

% Higher limit of stretch

 high = 1;

% Lower clip

 lowClip = 0;

% Higher clip

 highClip = 0;

% Calling function ,Stretches the histogram of the input  image

 S1 = hist_stretch_cvip(X1,low,high,lowClip,highClip);

 S2 = hist_stretch_cvip(X2,low,high,lowClip,highClip);

% Display input image

 figure;imshow(X1);title('Input Image1');

 figure;imshow(X2);title('Input Image2');

% Display Output image

 figure;imshow(S1);title('Output Hist stretch Image1');

 figure;imshow(S2);title('Output Hist stretch Image2');

CREDITS

Author: Deependra Mishra, March 2017
Copyright © 2017-2018 Scott E Umbaugh
For updates visit CVIP Toolbox Website