how to compare swt and skewness output
2 次查看(过去 30 天)
显示 更早的评论
I want to remove moving shadows. I want to implement the method discussed in attached paper. The method is detailed below:
First convert the video frame to HSV and split value into h,s,v.
(iii) Find the difference in h,s,v value of the reference and current frame
(iv) Apply the stationary wavelet transform (SWT) to the output of step (iii)
(v)perform the skew analysis on the wavelet output
(vi)assign the value 1 or 0 to the pixels based on skew and wavelet output
(vii)Do the threshold operation to detect and remove the shadows
(viii)Apply inverse SWT to reconstruct the image
So, i have to compare swt output with skweness to perform thresholding operation as per attached document. The swt output size is 4x307200 and skew output is 1x307200. How to do this. Thanks in advance.
The following code is for finding skew and swt.
a=VideoReader('cam4v.mp4');
for img = 1:a.NumberOfFrames;
%img=rgb2hsv(img)
filename=strcat('frame',num2str(img),'.jpg');
b = read(a, img);
HSV=rgb2hsv(b); %HSV color transformation
H = HSV(:,:,1); % Split h,s,v value
S = HSV(:,:,2);
V = HSV(:,:,3);
swts=swt(S,3,'db1'); % swt on s value
swtv=swt(V,3,'db1'); % swt on v value
%[m,n]=size(swtv);
skews=skewness(swts); % skewness on swt s value
%n1=size(skewv);
skewv=skewness(swtv); % skewness on swt v value
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Filtering and Enhancement 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!