久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何使用 OpenCV 檢測和跟蹤人員?

How can I detect and track people using OpenCV?(如何使用 OpenCV 檢測和跟蹤人員?)
本文介紹了如何使用 OpenCV 檢測和跟蹤人員?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有一個固定的相機,指向室內區域.人們會在距離它約 5 米的范圍內經過攝像頭.使用 OpenCV,我想檢測走過的人 - 我的理想返回是檢測到的個人數組,帶有邊界矩形.

I have a camera that will be stationary, pointed at an indoors area. People will walk past the camera, within about 5 meters of it. Using OpenCV, I want to detect individuals walking past - my ideal return is an array of detected individuals, with bounding rectangles.

我查看了幾個內置示例:

I've looked at several of the built-in samples:

  • 沒有一個 Python 示例真正適用
  • C blob 跟蹤示例看起來很有希望,但不接受實時視頻,這使得測試變得困難.它也是樣本中最復雜的,使得提取相關知識并將其轉換為 Python API 存在問題.
  • C 'motempl' 示例看起來也很有前景,因為它會根據后續視頻幀計算輪廓.大概我可以使用它來找到強連接的組件并提取單個 blob 及其邊界框 - 但我仍然試圖找出一種方法來將在后續幀中發現的 blob 識別為同一個 blob.
  • None of the Python samples really apply
  • The C blob tracking sample looks promising, but doesn't accept live video, which makes testing difficult. It's also the most complicated of the samples, making extracting the relevant knowledge and converting it to the Python API problematic.
  • The C 'motempl' sample also looks promising, in that it calculates a silhouette from subsequent video frames. Presumably I could then use that to find strongly connected components and extract individual blobs and their bounding boxes - but I'm still left trying to figure out a way to identify blobs found in subsequent frames as the same blob.

有沒有人可以提供指導或示例 - 最好是在 Python 中?

Is anyone able to provide guidance or samples for doing this - preferably in Python?

推薦答案

最新的 SVN 版本的 OpenCV 包含一個(未記錄的)基于 HOG 的行人檢測的實現.它甚至帶有一個預訓練的檢測器和一個 python 包裝器.基本用法如下:

The latest SVN version of OpenCV contains an (undocumented) implementation of HOG-based pedestrian detection. It even comes with a pre-trained detector and a python wrapper. The basic usage is as follows:

from cv import *

storage = CreateMemStorage(0)
img = LoadImage(file)  # or read from camera

found = list(HOGDetectMultiScale(img, storage, win_stride=(8,8),
                padding=(32,32), scale=1.05, group_threshold=2))

因此,您可以在每一幀中運行檢測器并直接使用其輸出,而不是跟蹤.

So instead of tracking, you might just run the detector in each frame and use its output directly.

請參閱 src/cvaux/cvhog.cpp 了解實現,參閱 samples/python/peopledetect.py 了解更完整的 Python 示例(均在 OpenCV 源代碼中).

See src/cvaux/cvhog.cpp for the implementation and samples/python/peopledetect.py for a more complete python example (both in the OpenCV sources).

這篇關于如何使用 OpenCV 檢測和跟蹤人員?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to draw a rectangle around a region of interest in python(如何在python中的感興趣區域周圍繪制一個矩形)
How to apply threshold within multiple rectangular bounding boxes in an image?(如何在圖像的多個矩形邊界框中應用閾值?)
How can I download a specific part of Coco Dataset?(如何下載 Coco Dataset 的特定部分?)
Detect image orientation angle based on text direction(根據文本方向檢測圖像方向角度)
Detect centre and angle of rectangles in an image using Opencv(使用 Opencv 檢測圖像中矩形的中心和角度)
Calculating percentage of Bounding box overlap, for image detector evaluation(計算邊界框重疊的百分比,用于圖像檢測器評估)
主站蜘蛛池模板: 日韩一区二区三区在线观看 | 午夜婷婷激情 | 欧美三级视频在线观看 | 国产亚洲精品久久久久动 | 在线视频亚洲 | 亚洲一区中文 | 免费观看一级特黄欧美大片 | 人妖一区| 久久久久亚洲 | 日韩在线一区二区三区 | 久久999 | 久久精品亚洲国产 | 亚洲国产精久久久久久久 | 国产真实精品久久二三区 | 日韩成人在线观看 | 国产精品毛片一区二区在线看 | 超碰人人人| 日韩欧美一区二区三区免费观看 | 亚洲天堂男人的天堂 | 日韩在线观看 | 91精品国产综合久久婷婷香蕉 | 精品日韩欧美一区二区 | 亚洲一区二区三区视频免费观看 | 人人看人人爽 | 日韩成人免费视频 | 天天爱天天操 | 欧美lesbianxxxxhd视频社区 | 欧美精品一区三区 | 911网站大全在线观看 | 国产精品黄视频 | 在线观看国产三级 | 欧美啪啪| 国产成人99久久亚洲综合精品 | 成人不卡 | 99热欧美 | 国产精品大片在线观看 | 精品一区av | 国内精品久久久久久 | 欧美国产精品 | 欧美视频精品 | 日日想夜夜操 |