Saturday 31 August 2013

Gamma Correction Code



clc
clear all
A = imread('a.bmp');
[row,col] = size(A);
gemma = zeros(row,col);
n=input('enter the value of bit');
for x=1:row
    for y=1:col
        gemma(x,y)=A(x,y);
        gemma(x,y)=power(gemma(x,y),n);
    end
end

gemma=gemma/255;
imwrite(gemma,'2.0.bmp','bmp');

No comments:

Post a Comment