【问题标题】:Pepper human detectionPepper 人体检测
【发布时间】:2018-02-13 17:12:30
【问题描述】:

我想在不依赖人脸检测的情况下检测人。在照明条件较差或 Pepper 面朝外的情况下,无法检测到人员。 记忆事件“PeoplePerception/JustArrived”和“EngagementZones/PersonApproached”似乎依赖于相机可检测到的面部。 是否存在由激光/红外/声纳距离变化触发的记忆事件?

我想知道是否有比以下更好的解决方案:

while True:
    floatDist = self.memory.getData('Device/SubDeviceList/Platform/Front/Sonar/Sensor/Value')
    if floatDist < 1.0:
        doSomething() 
    sleep(0.5)

【问题讨论】:

  • 这是正确的方法!你也可以试试“faceDetected”事件,它的触发速度比人们感知的要快。

标签: pepper


【解决方案1】:

您可以使用前置声纳和事件“FaceDetected”进行人体检测。

但是您可以使用 PeriodicTask 而不是 while 循环。您每 0.5 秒检查一次事件,您将被允许停止它。

我会那样做的:

class HumanDetector:
    def __init__(self, ALMemory):
        self.ALMemory = ALMemory

        # subscribe to FaceDetected
        self.subscriber = self.ALMemory.subscriber("FaceDetected")
        self.subscriber.signal.connect(self.on_human_tracked)

        self.task = qi.PeriodicTask()
        self.task.setCallback(self._task)
        self.task.setUsPeriod(50000)
        self.task.start(True)

    def on_human_tracked(self, value):
        print "do something with the face"

    def _stop(self):
        print "_stop..."
        self.task.stop()
        self.face_detection.unsubscribe("FaceDetected")
        print "_stop done"

    def _task(self):
        print "_task..."
        floatDist = self.memory.getData('Device/SubDeviceList/Platform/Front/Sonar/Sensor/Value')
        if floatDist < 1.0:
            print "do something with the object in front of the robot"

        print "_task done"

所以这是一个需要模块 ALMemory 的 python 类的示例。 使用 ALMemory 模块,您将检查声纳以及是否检测到人脸。

【讨论】:

  • 非常好。有时间我会试试的。这也向我表明,没有其他“肯定会成功”的方法来检测人。 (我想象 3D blob 检测和处理)
  • 对于人体检测,2D 相机是最好的。您可以结合使用声纳和激光来寻找检测人脸的良好方向。就我个人而言,我仅将 3D 用于检测那是真实的人脸,而不是人脸的图像。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-03-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-11
相关资源
最近更新 更多