def cb_pt(self, msg):
self.pt = int(msg.y), int(msg.x)
# print self.pt
if self.image is None:
print "NO IMAGE"
return
img = self.bridge.imgmsg_to_cv2(self.image)
hsv_img = cv2.cvtColor(img, cv2.COLOR_BGR2HSV)
vals = hsv_img[self.pt]
self.pts.append(vals)
pts = np.array(self.pts)
min_thresh = np.min(pts, axis=0).tolist()
max_thresh = np.max(pts, axis=0).tolist()
print "thresholds: %s, %s " %(min_thresh, max_thresh)
# rospy.init_node("huepicker")
评论列表
文章目录