How to achieve real-time human silhouette and movement detection?
3 views (last 30 days)
I started with background subtraction between a static background and another image with a foreground object(hand) that were captured from webcam. I couldn't get good results. I have attached the code i used and images below.
Image Analyst on 23 Jan 2016
You can avoid the loop by saying
binaryImage = Out > 3; % Or some number that works.
Then use bwareaopen() or bwareafilt() to get rid of small blobs.
Image Analyst on 24 Jan 2016
See my attached code.
If you want a smoother background, like to not have the movement of the drapes shadow be connected to the arm, you can use activecontour(). I've also attached a demo for that so you should be off to a good start.
Note: This may not be the best approach - the foreground detector in the Computer Vision System Toolbox may work better.