HIST_SLIDE_CVIP
hist_slide_cvip() - This function performs histogram slide operation.
Contents
SYNTAX
output = hist_slide_cvip(im,offset)
Input Parameters include :
- inputImage - input image
- offset - amount of slide
Output parameters include:
- output - Resultant image after Histogram Slide Operation.
DESCRIPTION
This function slides a histogram of an input image. This histogram slide technique can be used to make an image either darker or brighter. However, it retains the relationship between gray-level values. This operation is accomplished by simply adding or subtracting a fixed number from all the gray-level values as follows:
Slide[I(r,c)] = I(r,c) + offset
where the offset value is the amount to slide the histogram.
A positive offset value will increase the overall brightness,while a negative offset will create a darker image.
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'); % Offset offset1 = 50; offset2 = -50; % Call function ,Slides the histogram of the input image S1 = hist_slide_cvip(X1,offset1); S2 = hist_slide_cvip(X2,offset2); % Display input image figure;imshow(X1);title('Input Image1'); figure;imshow(X2);title('Input Image2'); % Display output image figure;imshow(S1,[]);title('Output image1'); figure;imshow(S2,[]);title('Output image2');
CREDITS
Author: Deependra Mishra, March 2017
Copyright © 2017-2018 Scott
E Umbaugh
For updates visit CVIP Toolbox Website