Пример #1
0
class HOG:
    def __init__(self, topic):
        print topic
        self.hog = HOGDetector()
        self.bridge = CvBridge()
        self.image_sub = rospy.Subscriber(topic, Image, self.callback)

    def callback(self, data):
        try:
            cv_image = self.bridge.imgmsg_to_cv2(data, "bgr8")
            img = self.hog.detect(cv_image)
            cv2.imshow("window", img)
            cv2.waitKey(20)
        except CvBridgeError, e:
            print e
Пример #2
0
Файл: HOG.py Проект: DSsoto/Sub8
class HOG:

    def __init__(self, topic):
        print topic
        self.hog = HOGDetector()
        self.bridge = CvBridge()
        self.image_sub = rospy.Subscriber(topic, Image, self.callback)

    def callback(self, data):
        try:
            cv_image = self.bridge.imgmsg_to_cv2(data, "bgr8")
            img = self.hog.detect(cv_image)
            cv2.imshow("window", img)
            cv2.waitKey(20)
        except CvBridgeError as e:
            print e
Пример #3
0
 def __init__(self, topic):
     print topic
     self.hog = HOGDetector()
     self.bridge = CvBridge()
     self.image_sub = rospy.Subscriber(topic, Image, self.callback)