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:


1 comment:

  1. The sensual problem can have an impact on both men and women. These problems don't let the couple enjoy sensual contact fully. Several sensual problems disturb the sensual life of a couple. Impotence and PE (Early ejaculation) are the most common sensual troubles in men. Buy Double X Power

    ReplyDelete