Thursday, March 12, 2009

Logarithmic Transformation of Image

% Logarithmic Transformation
% Read a gray scale image and apply the c values from 1 to 5 in steps of 0.5
% Apply negative values of c and give your comments
% perform the same for color image
clear all; close all; clc;
f = imread('onion.png');
f = im2double(f);
figure,imshow(f);
for c=-2:5
g = c*log(1+f);

figure,imshow(g),title(['C=',num2str(c)]);
end

No comments: