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!