久久久久久久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(計算邊界框重疊的百分比,用于圖像檢測器評估)
主站蜘蛛池模板: 欧美三级成人理伦 | 成人在线小视频 | 福利片一区二区 | 综合久久av | 久久精品99 | 中文字幕1区2区3区 亚洲国产成人精品女人久久久 | 一区二区三区福利视频 | 玖玖视频免费 | 中文字幕一区二区三区在线乱码 | 国产午夜精品视频 | 午夜精品一区二区三区在线观看 | h视频在线观看免费 | 日本高清在线一区 | 福利社午夜影院 | 午夜国产羞羞视频免费网站 | 国产91 在线播放 | 蜜月va乱码一区二区三区 | 国产精品久久国产精品 | 欧美一区二区三区在线观看 | 国产精品久久久久久久久久久免费看 | 亚洲欧洲日本国产 | 国产成人高清视频 | 欧美精品一区二区在线观看 | 日韩成人精品视频 | 91大神在线资源观看无广告 | 给我免费的视频在线观看 | 99在线视频观看 | 成人在线国产 | 国产精品美女 | 美女毛片免费看 | 亚洲国产精品一区二区三区 | 中文字幕日韩欧美 | 波多野结衣精品在线 | 欧美1区| 在线亚洲人成电影网站色www | 一区二区三区精品视频 | 日韩免费一区二区 | 欧美性精品 | 亚洲高清在线观看 | 盗摄精品av一区二区三区 | 久久久精品视频免费 |