Shadow Removal Using Intensity Surfaces and Texture Anchor Points

I am working on removal of shadows from a single image.The shadows from the image must be detected first and then it has to removed. Currently i am using region growing technique for detecting the shadow. Is there any other method for this? plz help me out..

 채택된 답변

Image Analyst
Image Analyst 2011년 10월 2일

0 개 추천

This seems more like an image processing question than a MATLAB question. Maybe you should try the sci.image.processing newsgroup, because there's nothing "built into" MATLAB to do shadow removal. If you have some question about code, for example you coded up this algorithm: http://www.cs.huji.ac.il/~danix/ShadowRemoval/index.html then this forum might help you with coding questions.

댓글 수: 6

Dear Sir
I am in need of a code that works with Shadow detection for a prohect that I am working on.
Can you help me with that
See attached paper. I don't have it translated into MATLAB code.
Or else search Vision Bib for it:
I did read about that but what i am asking is what is the chance that you can help me in writing a code for detection. not removing but only detection
I will send my a try for a code
can you correct the error that I maade in that code
Pleas need the help as soon as you get this message
Thank you in advance
Z.
clc
clear
mov = VideoReader('car_s.avi');
path1='ziad\VideoFrame\';
path2='ziad\cfhue\';
path3='ziad\cfsatur\';
path4='ziad\cfValue\';
path5='ziad\imagesinRGB\';
mkdir(path1);
mkdir(path2);
mkdir(path3);
mkdir(path4);
mkdir(path5);
alphaV=-0.2;
betaV=-0.8;
[m,n]=size(mov);
single=zeros(m,n);
%%
n=0;
while hasFrame(mov)
frame = readFrame(mov);
pf5=strcat(path5,num2str(n),'.jpg');
imwrite(frame,pf5)
bac=imread('C:\Users\Dr.Zee\Desktop\Shadow detection\ziad\imagesinRGB\23.jpg');
backhsv=rgb2hsv(bac);
backhue =backhsv(:,:,1);
backsat =backhsv(:,:,2);
backVal =backhsv(:,:,3);
im=rgb2hsv(frame);
pf1=strcat(path1,num2str(n),'.jpg');
% figure(1)
% imshow(im);
n=n+1;
imwrite(im,pf1)
cfhue=im(:,:,1);
pf2=strcat(path2,num2str(n),'.jpg');imwrite(cfhue,pf2)
cfsat=im(:,:,2);
pf3=strcat(path3,num2str(n),'.jpg');imwrite(cfsat,pf3)
cfval=im(:,:,3);
pf4=strcat(path4,num2str(n),'.jpg'); imwrite(cfval,pf4)
w= cfval / backVal;
sat=cfsat - backsat;
hue=cfhue - backhue;
if( w>=alphaV : w<=betaV : sat<=-0.3 : hue <=0.2)
single=1;
else
single=0;
end
end
imshow(single);
Running your code, we get this:
Error using VideoReader/initReader (line 734)
The filename specified was not found in the MATLAB path.
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
Error in test3 (line 4)
mov = VideoReader('car_s.avi');
So the problem is the car_s.avi file does not exist. You need to make sure it exists. And there may be more errors after that, but that's as far as I got.
the video is located at the file directory and evrything is working properlay fine, but the (if ) statement is not finding the shadows requaiered. I can't send the video in here but you can findout any other videi with shawdos from the internet
thank you for you quick respoon
I don't have the shadow removal code. Did you get it from the paper authors? I think you should ask them, not me.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2011년 10월 2일

댓글:

2020년 10월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by