Program for image Brightness enhancement and brightness suppression using Matlab
Brightness of Image is Enhanced by adding constant value to each pixel of image.
Here a image is read and converted into gray scale image. Then, each pixel value is increased
by a constant integer(i.e 80 here ). Similarly for suppression it is decreased by constant value.
Program:
clear all;
close all;
x=imread('D:\sample.jpg');
y=rgb2gray(x);
figure(1);
imshow(uint8(y));
title('original');
a=double(y)+80;
figure(2);
imshow(uint8(a));
title('Enhanced
Image');
b=double(y)-80;
figure(3);
imshow(uint8(b));
title('Supressed
Image');
No comments:
Post a Comment