简体   繁体   中英

How to count number of objects in a video using MATLAB

I have an infrared video which I have recorded during nights and my camera was facing the sky so I was basically trying to track the bird movements in the video.I took few video frames and plotted the trajectory of moving objects but now I would like to extend this same concept to the entire video.But there are few things that are troubling me.

  1. I have selected a static threshold of 0.6 to convert the gray scale frame into BW frame.But since I am interested in applying this algorithm to the entire video I should try to use a dynamic or adaptive threshold.

  2. I would also like to count the number of objects present in the video so that after running the entire video I should be able to display the number of moving objects in the video.

So any help regarding adaptive threshold and counting number of objects in video will be sincerely appreciated.

You can use a way similar to histogram equalization and morphological operations stuff as in this post . And for the number of the birds, you can count the number of the connected components with bwlabeln .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM