def __init__(self, model, camera_id, cascade_filename, run_local, wait=50): self.model = model self.wait = wait self.detector = CascadedDetector(cascade_fn=cascade_filename, minNeighbors=5, scaleFactor=1.1) if run_local: self.cam = create_capture(camera_id)
def __init__(self, model, cascade_filename, run_local, wait, rp): self.rp = rp self.wait = wait self.doRun = True self.model = model self.restart = False self.ros_restart_request = False self.detector = CascadedDetector(cascade_fn=cascade_filename, minNeighbors=5, scaleFactor=1.1) if run_local: print ">> Error: Run local selected in ROS based Recognizer" sys.exit(1) else: self.bridge = CvBridge() def signal_handler(signal, frame): print ">> ROS Exiting" self.doRun = False signal.signal(signal.SIGINT, signal_handler)
def __init__(self, model, camera_id, cascade_filename, run_local, inscope="/rsbopencv/ipl", outscope="/ocvfacerec/rsb/people", wait=50, notification="/ocvfacerec/rsb/restart/", show_gui=False): self.model = model self.wait = wait self.notification_scope = notification self.show_gui = show_gui self.detector = CascadedDetector(cascade_fn=cascade_filename, minNeighbors=5, scaleFactor=1.1) if run_local: print ">> Error Run local selected in RSB based Recognizer" sys.exit(1) self.doRun = True self.restart = False def signal_handler(signal, frame): print "\n>> RSB Exiting" self.doRun = False signal.signal(signal.SIGINT, signal_handler) # RSB try: rsb.converter.registerGlobalConverter(IplimageConverter()) except Exception, e: # If they are already loaded, the lib throws an exception ... # print ">> [Error] While loading RST converter: ", e pass