예제 #1
0
파일: tune.py 프로젝트: jinified/visionx
 def cam_cb(self,rosimg):
     cvimg = VUtil.rosimg2cv(rosimg)
     y,x = cvimg.shape[:2]
     cvimg = cv2.resize(cvimg, (x/2,y/2))
     if self.canPublish:
         out = self.detect(cvimg)
         self.pub.publish(VUtil.writeCompressed(out))
예제 #2
0
파일: tune.py 프로젝트: jinified/visionx
 def cam_cb(self,rosimg):
     cvimg = VUtil.rosimg2cv(rosimg)
     y,x = cvimg.shape[:2]
     cvimg = cv2.resize(cvimg, (x/2,y/2))
     if self.canPublish:
         blank = np.zeros_like(cvimg)
         out = self.detect(cvimg,self.info.data,blank)
         self.info.draw(blank)
         self.pub.publish(VUtil.writeCompressed(out))
         self.blank_pub.publish(VUtil.writeCompressed(blank))
예제 #3
0
파일: tune.py 프로젝트: jinified/visionx
 def cam_cb(self,rosimg):
     if 'compressed' in self.parent.analyseTopic:
         cvimg = VUtil.readCompressed(rosimg)
     else:
         cvimg = VUtil.rosimg2cv(rosimg)
     y,x = cvimg.shape[:2]
     cvimg = cv2.resize(cvimg, (x/2,y/2))
     if self.canPublish:
         out = self.detect(cvimg)
         self.pub.publish(VUtil.writeCompressed(out))