People TrackingThis demo detects and tracks people in a video sequence. ContentsDemo modelThe following figure shows the People Tracking demo model:
People tracking resultsIn the Background Estimator subsystem, the demo uses the first few frames of the video to estimate the background image. In the People Tracker subsystem, the demo subtracts the background from each video frame to produce foreground images. By thresholding and performing morphological closing on each foreground image, the demo produces binary feature images, which are shown in the Foreground window. The demo defines a bounding box around each person in each binary feature image using the Blob Analysis block and Merge block. The Check Merge Sort and Kalman Tracking Filter subsystems use this bounding box information to ensure that the same people are tracked from one frame to the next. Note that the Check Merge Sort subsystem contains an Embedded MATLAB Function block that sorts the current bounding box positions with respect to their previous positions. Lastly, the demo uses the Draw Shapes block, in the Display Results/Mark Image subsystem, to draw cyan rectangles around the people in the video stream. About this videoThe above video was created using the Write AVI File block. When running this Simulink model, you can see the resulting video using a Video Viewer or To Video Display block. You can connect these viewers to any signal in the model, adjust model parameters, and view the results in real time. Additional informationFor more information about the Video and Image Processing Blockset, see the Video and Image Processing Blockset product information page. From here you can download a free 30-day trial, read the documentation and user stories, request more information, and get pricing information. Also, see the other product demos that illustrate key features of the Video and Image Processing Blockset. |