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

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

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

問題描述

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

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.

我查看了幾個內(nèi)置示例:

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

  • 沒有一個 Python 示例真正適用
  • C blob 跟蹤示例看起來很有希望,但不接受實時視頻,這使得測試變得困難.它也是樣本中最復雜的,使得提取相關知識并將其轉(zhuǎn)換為 Python API 存在問題.
  • C 'motempl' 示例看起來也很有前景,因為它會根據(jù)后續(xù)視頻幀計算輪廓.大概我可以使用它來找到強連接的組件并提取單個 blob 及其邊界框 - 但我仍然試圖找出一種方法來將在后續(xù)幀中發(fā)現(xiàn)的 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 的行人檢測的實現(xiàn).它甚至帶有一個預訓練的檢測器和一個 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 了解實現(xiàn),參閱 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模板網(wǎng)!

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

相關文檔推薦

How to draw a rectangle around a region of interest in python(如何在python中的感興趣區(qū)域周圍繪制一個矩形)
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(根據(jù)文本方向檢測圖像方向角度)
Detect centre and angle of rectangles in an image using Opencv(使用 Opencv 檢測圖像中矩形的中心和角度)
Calculating percentage of Bounding box overlap, for image detector evaluation(計算邊界框重疊的百分比,用于圖像檢測器評估)
主站蜘蛛池模板: 这里精品 | 亚洲精品视频免费观看 | a免费视频 | 99久久婷婷国产综合精品首页 | 特一级毛片 | 精品一区二区三区在线观看 | 狠狠综合久久av一区二区小说 | 欧美激情一区二区三级高清视频 | 视频一区二区中文字幕 | 中文一级片 | 中文字幕免费 | 亚洲在线一区二区三区 | www.伊人.com | 午夜精品网站 | 一区二区三区国产好 | 九九热精品视频 | 成人性生交大免费 | 亚洲成人网在线播放 | 九九久久国产精品 | 国产欧美一级二级三级在线视频 | 国产玖玖 | 在线日韩 | 播放一级毛片 | 国产精品免费在线 | 久久男人 | 午夜欧美一区二区三区在线播放 | 久久久久亚洲 | 欧美在线观看一区 | 视频在线日韩 | 91在线视频在线观看 | 成人午夜激情 | 精品欧美一区二区三区久久久 | 视频在线一区二区 | 不卡av电影在线播放 | 精品成人 | 性高湖久久久久久久久3小时 | 仙人掌旅馆在线观看 | 国产精品久久久久婷婷二区次 | 国产成人福利视频 | 免费观看成人av | 亚洲一区二区在线播放 |