如何配置概率占位图人员检测器 [英] How to configure Probabilistic Occupancy Map people detector

查看:244
本文介绍了如何配置概率占位图人员检测器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

概率占用图是一个多相机人体检测程序,其 c ++ 实现可自由选择:
http://cvlab.epfl.ch/software/pom



为了利用这个方便的软件,需要: p>


  1. 背景删除程序后,来自多个摄像机的一系列同步视频帧。


POM 附带一组示例视频帧和相关配置文件。



我的问题可以说如下:
给定一个同步视频序列(例如从http://cvlab.epfl.ch/data/pom )如何生成 POM 所需的配置文件?特别是我对配置的 RECTANGLE 标签感兴趣。自述说明:


RECTANGLE [camera number] [location number] notvisible | [xmin] [ymin] [xmax] [ymax] / p>

定义某个矩形的参数,代表从某台相机查看的某个位置的
个人。所有
未指定的矩形默认为不可见。


从我的理解它定义了一个人的边界矩形将看起来像在从某个相机观看的某个位置。这必须为每个摄像机的每个(网格)位置定义(假定位置在摄像机的视场中 - 如果不是,则使用不可见的或矩形可以未定义)。



用手做这不是不可能的,但肯定是不切实际的。所以,总结一下:如果我有一组来自多个摄像机的视频,如何生成 POM 配置文件?

解决方案

在相关的出版物中,作者提到他们使用相机校准为网格中每个位置的人物轮廓生成矩形。似乎完成此操作的代码不包含在源文件中,在这种情况下,您必须自己编写。



在数据集的校准数据中,可以看到它们利用每个摄像机的两个单应性,头平面单应性和地平面单应性。您可以使用它快速获取所需的矩形。



头平面单应性是一个3x3矩阵,描述从一个平面到另一个平面的映射。在这种情况下,它描述了从2D房间坐标(在头级)到2D图像坐标的映射。您可以使用opencv中的函数findHomography为您自己的相机确定此单应性。所有你需要做的是测量房间地面上的四个点的坐标,并在这些标记上竖立杆。极点应该跟你想要跟踪的一般人一样长。你现在可以写一个小程序,让你点击每个摄像机视图中的杆的顶部。现在,您有四个世界点(在房间中测量的坐标)和每个摄像机四个图像点(您点击的点)。使用findHomography可以确定单应性。



您现在可以使用单应性来投影8个角点在房间中的任何位置上的矩形对于每个相机的它们的图像坐标。以所有8个点的边界框为例,你有那个房间位置和那个相机的矩形。



这个方法的作者提到使用人物剪影,这表明他们的方法可能比使用长方体更准确。然而,没有像移动人物的轮廓那样的东西,所以具有长方体的解决方案可能是完全可行的。


Probabilistic Occupancy Map is a multi-camera human detection procedure, with its c++ implementation freely avaible at: http://cvlab.epfl.ch/software/pom

In order to utilize this handy piece of software one needs:

  1. A series of synchronized video frames from multiple cameras after background removal procedure.
  2. A configuration file for a particular scenario.

POM ships with an example set of video frames and related configuration file.

My problem can be stated as follows: Given a sequence of synchronized videos (for example from http://cvlab.epfl.ch/data/pom) how do I generate the configuration file required by POM? In particular I'm interested in the RECTANGLE tag of the configuration. The readme states:

RECTANGLE [camera number] [location number] notvisible|[xmin] [ymin] [xmax] [ymax]

Defines the parameters of a certain rectangle, standing for an individual at a certain location viewed from a certain camera. All non-specified rectangles are "not visible" by default.

From my understanding it defines how a person's bounding rectangle would look like at a certain location viewed from a certain camera. This has to be defined for every (grid) location for every camera (given the location is in the camera's Field of View - if not, notvisible is used or the rectangle may be left undefinied).

Doing this by hand is not impossible, but certainly is impractical. So, to sum up: How do I generate the POM configuration file if I have a set of videos from multiple cameras?

解决方案

In the associated publication, the authors mention they use the camera calibration to generate the rectangles for a human silhouette in every position in the grid. It seems the code that accomplishes this is not included in the source files, in that case you will have to write it yourself.

In the calibration data for their datasets, you can see that they make use of two homographies per camera, the head plane homography and the ground plane homography. You can use this to quickly obtain the required rectangles.

The head plane homography is a 3x3 matrix that describes a mapping from one plane to another. In this case it describes the mapping from 2D room coordinates (at head level) to 2D image coordinates. You can determine this homography for your own camera with the function findHomography in opencv. All you need to do is measure the coordinates of four points on the ground in the room, and stand an upright pole on those markings. The pole should be as long as the average person you want to track. You can now write a small program that allows you to click on the top of the pole in each camera view. You now have four world points (the coordinates measured in the room) and four image points per camera (the points you clicked). With findHomography you can determine the homography. Do the same for the markings on the ground without the pole, and you have the two homographies per camera.

You can now use the homographies to project the 8 corner points of a rectangle standing on any position in the room onto their image coordinates for each camera. Take the bounding box of all 8 points and you have the rectangle for that room location and that camera.

The authors of the method mentioned using a human silhouette, this indicates that their approach may be more accurate than using a cuboid. However, there is no such thing as the silhouette of a moving person, so the solution with the cuboid is likely to be perfectly workable.

这篇关于如何配置概率占位图人员检测器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆