Ejemplo n.º 1
0
class VisionViewer(object):
    def __init__(self):
        self.com = Communicator(module_name="util/vision_viewer",
                                subscriber_buffer_length=81920,
                                subscriber_high_water_mark=81920,
                                settings_path="../../settings.json")
        last_timestamp = 0.0
        self.com.connect_video_stream(50000)
        print 'connected'
        result = []
        while True:
            try:
                im = self.com.recv_image()
            except ValueError:
                im = None
            if im is not None:
                print 'got an image'
                cv2.imshow('test window', im)
                key = cv2.waitKey(1)
Ejemplo n.º 2
0
class VisionViewer(object):
    def __init__(self):
        self.com = Communicator(
                module_name="util/vision_viewer",
                subscriber_buffer_length=81920,
                subscriber_high_water_mark=81920,
                settings_path="../../settings.json")
        last_timestamp = 0.0
        self.com.connect_video_stream(50000)
        print 'connected'
        result = []
        while True:
            try:
                im = self.com.recv_image()
            except ValueError:
                im = None
            if im is not None:
                print 'got an image'
                cv2.imshow('test window', im)
                key = cv2.waitKey(1)
Ejemplo n.º 3
0
class VisionViewer(object):
    def __init__(self):
        self.com = Communicator(module_name="util/vision_viewer")
        # subscriber_buffer_length=81920,
        # subscriber_high_water_mark=81920)
        last_timestamp = 0.0
        self.com.connect_video_stream(50001, "192.168.1.3")
        # self.com.connect_video_stream(50001)
        print "connected"
        while True:
            print "hmm"
            try:
                im = self.com.recv_image()
            except ValueError:
                sleep(0.1)
                im = None
            if im is not None:
                print "got an image"
                b, g, r = cv2.split(im)
                cv2.imshow("test window", cv2.subtract(r, b))
                key = cv2.waitKey(1)
Ejemplo n.º 4
0
class VisionViewer(object):
    def __init__(self):
        self.com = Communicator(
                module_name="util/vision_viewer")
               # subscriber_buffer_length=81920,
               # subscriber_high_water_mark=81920)
        last_timestamp = 0.0
        self.com.connect_video_stream(50001, '192.168.1.3')
        #self.com.connect_video_stream(50001)
        print 'connected'
        while True:
            print 'hmm'
            try:
                im = self.com.recv_image()
            except ValueError:
                sleep(.1)
                im = None
            if im is not None:
                print 'got an image'
                b, g, r = cv2.split(im)
                cv2.imshow('test window', cv2.subtract(r, b))
                key = cv2.waitKey(1)