【目标跟踪】pyimagesearch目标跟踪、中心点匹配示例程序汇总(python-opencv-dlib-dnn)

本文详细介绍了使用OpenCV进行目标跟踪的方法,包括单目标、多目标及人群计数的跟踪技术。提供了丰富的代码资源和调试指南,涵盖目标检测、跟踪算法原理及实战应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Simple object tracking with OpenCV(centroid tracking with OpenCV)

【原文链接】https://www.pyimagesearch.com/2018/07/23/simple-object-tracking-with-opencv/

【代码下载】https://pan.baidu.com/s/1VVVb2BY-NyTWavO4vLT2lg   提取码:0uc7


opencv single object tracking   

https://www.pyimagesearch.com/2018/07/30/opencv-object-tracking/

【代码下载链接】https://pan.baidu.com/s/1GTD2dF_OHlfKU_8j5z65rg  提取码:1c4m 
【代码使用说明】程序运行时,按下's' 键后视频暂停,等待用户选择跟踪区域。


OpenCV muil-Object Tracking

https://www.pyimagesearch.com/2018/08/06/tracking-multiple-objects-with-opencv/

【代码下载链接】https://pan.baidu.com/s/11jXxXDW0w7L-djxCUY9TbQ  提取码  gg44


OpenCV People Counter

https://www.pyimagesearch.com/2018/08/13/opencv-people-counter/

使用深度学习检测到行人,然后利用中心点就行跟踪匹配

【代码下载链接】https://pan.baidu.com/s/1U8F2mwdM24wfpepTysw8Ug   提取码  pqgs


Windows下利用dlib19.2实现多目标追踪

https://blog.youkuaiyun.com/tintinetmilou/article/details/74787994

è¿éåå¾çæè¿°

(不提供代码下载链接)


Multi-object tracking with dlib

https://www.pyimagesearch.com/2018/10/29/multi-object-tracking-with-dlib/

【代码下载链接】https://pan.baidu.com/s/1Mqxu_igniM8h-dhPfQ-a5g  提取码  8sxk

调试代码时遇到问题

Boost.Python.ArgumentError for dlib.rectangle #545

File "E:/code/traking/multiobject-tracking-dlib/multi_object_tracking_slow.py", line 112, in <module>
    rect = dlib.rectangle(startX, startY, endX, endY)
Boost.Python.ArgumentError: Python argument types in
    rectangle.__init__(rectangle, numpy.int32, numpy.int32, numpy.int32, numpy.int32)
did not match C++ signature:
    __init__(struct _object * __ptr64, long left, long top, long right, long bottom)
    __init__(struct _object * __ptr64)

【暂时解决方案】转化数据类型

https://github.com/davisking/dlib/issues/545

rect = dlib.rectangle(int(startX), int(startY), int(endX), int(endY))

AttributeError: module 'cv2.cv2' has no attribute 'Tracker_create'

【解决方案】需要安装opencv-contrib-python 

https://blog.youkuaiyun.com/qq_35759574/article/details/82146721


目标跟踪的过程是怎样的?

  • 获取目标检测的初始化集合(例如边界框坐标的输入集合)
  • 为每一个初始检测对象创建唯一的ID.
  • 当这些检测对象在视频帧间移动时跟踪它们,即保持它们分配的ID不变。

Object tracking is the process of:

  1. Taking an initial set of object detections (such as an input set of bounding box coordinates)
  2. Creating a unique ID for each of the initial detections
  3. And then tracking each of the objects as they move around frames in a video, maintaining the assignment of unique IDs

理想的目标跟踪算法是怎样的?

  • 只需要对象检测阶段一次(即,当最初检测到对象时)
  • 将非常快,比运行实际的对象检测器快得多
  • 当被跟踪的对象“消失”或移动到视频帧的边界之外时能够处理
  • 在遮挡时稳定检测
  • 能够拾取在帧之间“丢失”的对象

An ideal object tracking algorithm will:

  • Only require the object detection phase once (i.e., when the object is initially detected)
  • Will be extremely fast — much faster than running the actual object detector itself
  • Be able to handle when the tracked object “disappears” or moves outside the boundaries of the video frame
  • Be robust to occlusion
  • Be able to pick up objects it has “lost” in between frames

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

曾小蛙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值