Info

This question is closed. Reopen it to edit or answer.

I have written the below code for image enhacement . p is the enhanced image now how to display the enhanced image.

6 views (last 30 days)
a=imread('E:\ite dinner party\IMG_1056.JPG');
imshow(a)
b=rgb2gray(a);
figure,imshow(b);
c=b(:);
lem=225;
minim=min(c(:));
maxim=max(c(:));
[m,n]=size(b);
x=zeros(1,225);
q=zeros(1,225);
w=zeros(1,225);
r=zeros(1,225);
E=zeros(1,225);
u=zeros(1,225);
for i=1:m
for j=1:n
g=b(i,j);
x(i,j)=((g-minim)/(maxim-minim));
q(i,j)=((1+lem)*x(i,j))/(1+lem*x(i,j));
w(i,j)=(1-x(i,j))/(1+(3*lem*x(i,j))+(lem^2*x(i,j))+x(i,j));
r(i,j)=1-q(i,j)-w(i,j);
E(i,j)=(1/x(i,j))*(sum(sum(r(i,j)*exp(1-r(i,j)))));
u(i,j)=maxim*(E(i,j)+lem);
t=q(i,j)^1.25;
y=1-t;
for y=0:0.1:1
if y<=0.5
p=2*(y^2);
else
p=1-2*((1-y)^2);
end
end
end
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!