[英]Object Tracking using OpenCV
I have a video clip with fish swimming in a flume and small particles floating on the surface. 我有一个视频剪辑,鱼在水槽里游泳,小颗粒浮在水面上。 So, the moving objects are the swimming fish and hundreds of particles.
因此,运动的对象是游泳的鱼和数百个粒子。 Here is the link of the video sample .
这是视频示例的链接。
My interest is to locate the fish correctly in each single frame. 我的兴趣是在每个单个帧中正确定位鱼。
Currently, my procedures are as below: 目前,我的程序如下:
cv2.BackgroundSubtractorMOG
. cv2.BackgroundSubtractorMOG
。 My questions are: 我的问题是:
cv2.BackgroundSubtractorMOG
, I adjusted history
, nmixture
in the function, it does not seems to work well in the first 10 frames. cv2.BackgroundSubtractorMOG
,我调整history
, nmixture
在功能上,它似乎并不在第10帧很好地工作。 How to pick up the moving objects in the first few frames? cv2.BackgroundSubtractorMOG
can pick up a vague outline of fish, as shown in the red circle in the pic below: cv2.BackgroundSubtractorMOG
可以拾取模糊的鱼的轮廓,如下图的红色圆圈所示: Here is the link of my code . 这是我的代码的链接。
Thank you! 谢谢!
Assuming that the fish swim along only this direction (or the opposite), you can try to use custom morphological operations that help to grow elongated objects. 假设鱼只沿这个方向(或相反方向)游泳,则可以尝试使用自定义的形态学操作来帮助生长细长的物体。 It should at least increase the size of the blob, thereby giving more data to the MoG model for tracking.
它至少应增加Blob的大小,从而为MoG模型提供更多数据以进行跟踪。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.