除了库中找到的跟踪器之外,没有其他的跟踪器。
最好的方法是过滤图像并使用findcontours。光流和背景减法将有助于此。您可以将光流与汽车检测器结合使用,以排除误报。
https://docs.opencv.org/3.4/d4/dee/tutorial_optical_flow.html
https://docs.opencv.org/3.4/d1/dc5/tutorial_background_subtraction.html
你应该使用PCA方法,它可以计算检测到的物体的方向以及面对的方向。你可以改变检测的阈值来选择更像汽车的物体(基于形状和颜色 - 一种HSV转换,在你的情况下是红色)在你的图片中。
- Detect bounding boxes and subtract the background to get blobs rotated rectangles.
- implement your own version of detector with rotated boxes.
- Use segmentation instead ... Unet for example.