Extract hands from a video
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a video in which hands perform some gesture and are not always in motion; I have to extract them. Because the first frames are the background I tried with:
readerObj = VideoReader('VideoWithHands.mp4');
nFrames = readerObj.NumberOfFrames;
fr = get(readerObj, 'FrameRate');
writerObj = VideoWriter('Hands.mp4', 'MPEG-4');
set(writerObj, 'FrameRate', fr);
open(writerObj);
bg = read(readerObj, 1); %background
for k = 1 : nFrames
frame = read(readerObj, k);
hands = imabsdiff(frame,bg);
writeVideo(writerObj,hands);
end
close(writerObj);
but in this way, colors are not "real" and opacity level is low (you can see something through the hands). I wonder whether it would be possible to extract the hands keeping real colors and opacity exploiting the background. Thanks
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!