Showing posts with label remote image transformation. Show all posts
Showing posts with label remote image transformation. Show all posts

Wednesday, March 23, 2016

How to apply Power Law Transformation in MATLAB ?

Read remote.jpg image which is an aerial image which has washed out appearance. Compression of gray level is required. Apply power law transformation with γ =3,4,5. Display and comment on the results.


CODE:

clc; clear all;

c=1;
Gamma=input('Enter the Gamma values = ');       % Must be vector, Ex:[3 4 5]
x=imread('remote.jpg');
x1=double(x);      
y=c*(x1.^Gamma(1));                             % s=c*(r^ γ)
y1=c*(x1.^Gamma(2));
y2=c*(x1.^Gamma(3));

subplot(141),imshow(x), title('Aerial image')
subplot(142),imshow((y),[]), title('Corrected image(Gamma=3)')
subplot(143),imshow((y1),[]), title('Corrected image(Gamma=4)')
subplot(144),imshow((y2),[]), title('Corrected image(Gamma=5)')

OUTPUT RESULT: