Removing the shadow from image

I have an image in which i have to remove the shadows from it ,please help how to process.I have uploaded the Image

Antworten (1)

Image Analyst
Image Analyst am 13 Jul. 2012

0 Stimmen

5 Kommentare

kash
kash am 13 Jul. 2012
Bearbeitet: Oleg Komarov am 3 Sep. 2012
I tried using the code
I = imread('imagesh1.bmp');
J = im2double(I);
R = J(:,:,1);
G = J(:,:,2);
B = J(:,:,3);
[len,wid] = size(R);
% Generation of 2-D Log Chromaticity Image.
for i = 1:len
for j = 1:wid
if ((R(i,j)*G(i,j)*B(i,j))~= 0)
c1(i,j) = R(i,j)/((R(i,j)*G(i,j)*B(i,j))^(1/3));
c2(i,j) = G(i,j)/((R(i,j)*G(i,j)*B(i,j))^(1/3));
c3(i,j) = B(i,j)/((R(i,j)*G(i,j)*B(i,j))^(1/3));
else
c1(i,j) = 1;
c2(i,j) = 1;
c3(i,j) = 1;
end
end
end
rho1 = mat2gray(log(c1));
rho2 = mat2gray(log(c2));
rho3 = mat2gray(log(c3));
X1 = mat2gray(rho1*1/(sqrt(2)) - rho2*1/(sqrt(2))); %(1/sqrt(2); -1/sqrt(2); 0)
X2 = mat2gray(rho1*1/(sqrt(2)) + rho2*1/(sqrt(2)) - rho3*2/(sqrt(6))); %(1/sqrt(6); 1/sqrt(6); -2/sqrt(6))
theta = 10;
InvariantImage = cos(theta*pi/180)*X1 + sin(theta*pi/180)*X2;
imshow(InvariantImage)
but could not get the correct answer,i need the output as in the link
can u tell where had made mistake please
Keerthi  D
Keerthi D am 30 Jun. 2020
Bearbeitet: Keerthi D am 30 Jun. 2020
sir l tried this code but it not work.
its output is:
sir how to solve this problem .
Image Analyst
Image Analyst am 30 Jun. 2020
The attached algorithm looks pretty simple. Try it.
Keerthi  D
Keerthi D am 1 Jul. 2020
I didn't get
Image Analyst
Image Analyst am 1 Jul. 2020
Maybe someone else you work with could understand it and explain it to you? Otherwise, pick a different shadow removal algorithm that you can understand.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Images finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 13 Jul. 2012

Kommentiert:

am 1 Jul. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by