def init(self):
     # start Vimba
     self.camera_index = self.getProperty("camera_index", 0)
     self.use_qt = self.getProperty('use_qt', True)
          
     atexit.register(self.close_camera)
     AbstractVideoDevice.init(self)
Example #2
0
    def set_cam_encoding(self, cam_encoding):
        if cam_encoding == "yuv422p":
            self.video.setMode(Core.YUV422)
        elif cam_encoding == "y8":
            self.video.setMode(Core.Y8)

        AbstractVideoDevice.set_cam_encoding(self, cam_encoding)
Example #3
0
    def init(self):
        # start Vimba
        self.camera_index = self.get_property("camera_index", 0)
        self.use_qt = self.get_property("use_qt", True)

        atexit.register(self.close_camera)
        AbstractVideoDevice.init(self)
    def set_cam_encoding(self, cam_encoding):
        if cam_encoding == "yuv422p":
            self.video.setMode(Core.YUV422)
        elif cam_encoding == "y8":
            self.video.setMode(Core.Y8)

        AbstractVideoDevice.set_cam_encoding(self, cam_encoding)
Example #5
0
    def set_cam_encoding(self, cam_encoding):
        if cam_encoding == "yuv422p":
            self.device.video_mode = "YUV422"
        elif cam_encoding == "y8":
            self.device.video_mode = "Y8"

        AbstractVideoDevice.set_cam_encoding(self, cam_encoding)
    def set_cam_encoding(self, cam_encoding):
        if cam_encoding == "yuv422p":
            self.device.video_mode = "YUV422"
        elif cam_encoding == "y8":
            self.device.video_mode = "Y8"

        AbstractVideoDevice.set_cam_encoding(self, cam_encoding)
 def set_cam_encoding(self, cam_encoding):
     if cam_encoding == "yuv422p":
         self.device.video_mode = "YUV422"
     elif cam_encoding == "y8":
         self.device.video_mode = "Y8"
     elif cam_encoding.lower() == "bayer_rg16":
         self.device.video_mode = "BAYER_RG16"
     AbstractVideoDevice.set_cam_encoding(self, cam_encoding)
Example #8
0
    def __init__(self, name):
        AbstractVideoDevice.__init__(self, name)

        self.camera = None
        self.camera_index = 0
        self.qimage = None
        self.qpixmap = None
        self.use_qt = False
        self.raw_image_dimensions = [1360, 1024]
    def __init__(self, name):
        AbstractVideoDevice.__init__(self, name)

        self.camera = None
        self.camera_index = 0
        self.qimage = None
        self.qpixmap = None
        self.use_qt = False
        self.raw_image_dimensions = [1360, 1024]
Example #10
0
    def init(self):
        self.image_dimensions = [352, 288]
        self.request = urllib2.Request(self.get_property("address"))
        base64string = base64.b64encode(
            "%s:%s" % (self.get_property("user"), self.get_property("password"))
        )
        self.request.add_header("Authorization", "Basic %s" % base64string)
        self.qpixmap = QPixmap()
        self.set_is_ready(True)

        AbstractVideoDevice.init(self)

        self.set_video_live(False)
Example #11
0
    def __init__(self, name):
        """
        Descript. :
        """
        AbstractVideoDevice.__init__(self, name)

        self.cam_address = None

        # LIMA access
        self.camera = None
        self.interface = None
        self.control = None
        self.video = None
        self.master_mode = True
    def __init__(self, name):
        """
        Descript. :
        """
        AbstractVideoDevice.__init__(self, name)

        self.cam_address = None

        # LIMA access
        self.camera = None
        self.interface = None
        self.control = None
        self.video = None
        self.master_mode = True
Example #13
0
    def init(self):
        self.cam_address = self.getProperty("address")
        self.cam_type = self.getProperty("type").lower()

        if self.cam_type == "prosilica":
            self.camera = Prosilica.Camera(self.cam_address, self.master_mode,
                                           False)
            self.interface = Prosilica.Interface(self.camera)
        elif self.cam_type == "basler":
            logging.getLogger("HWR").info(
                "Connecting to camera with address %s" % self.cam_address)
            self.camera = Basler.Camera(self.cam_address)
            self.interface = Basler.Interface(self.camera)

        self.control = Core.CtControl(self.interface)
        self.video = self.control.video()

        AbstractVideoDevice.init(self)
    def init(self):
        self.cam_address = self.getProperty("address")
        self.cam_type = self.getProperty("type").lower()

        if self.cam_type == "prosilica":
            self.camera = Prosilica.Camera(self.cam_address, self.master_mode, False)
            self.interface = Prosilica.Interface(self.camera)
        elif self.cam_type == "basler":
            logging.getLogger("HWR").info(
                "Connecting to camera with address %s" % self.cam_address
            )
            self.camera = Basler.Camera(self.cam_address)
            self.interface = Basler.Interface(self.camera)

        self.control = Core.CtControl(self.interface)
        self.video = self.control.video()

        AbstractVideoDevice.init(self)
Example #15
0
    def __init__(self, name):
        """
        Descript. :
        """
        AbstractVideoDevice.__init__(self, name)
        self.force_update = None
        self.sensor_dimensions = None
        self.image_dimensions = None
        self.image_polling = None
        self.image_type = None
        self.image = None
        self.sleep_time = 1
        self.flip = {"h": False, "v": False}
        self.host = None
        self.port = None
        self.path = "/"
        self.plugin = 0
        self.update_controls = None
        self.input_avt = None

        self.changing_pars = False
    def init(self):
        """
        Descript. :
        """

        tangoname = self.get_property("tangoname")

        width = self.get_property("width")
        height = self.get_property("height")

        if None not in [width, height]:
            self.width = width
            self.height = height
        else:
            self.width = None
            self.height = None

        self.device = PyTango.DeviceProxy(tangoname)
        self.device.ping()

        AbstractVideoDevice.init(self)
    def init(self):
        """
        Descript. :
        """

        tangoname = self.getProperty("tangoname")

        width = self.getProperty("width")
        height = self.getProperty("height")

        if None not in [width, height]:
            self.width = width
            self.height = height
        else:
            self.width = None
            self.height = None

        self.device = PyTango.DeviceProxy(tangoname)
        self.device.ping()

        AbstractVideoDevice.init(self)
Example #18
0
    def init(self):
        current_path = os.path.dirname(os.path.abspath(__file__)).split(os.sep)
        current_path = os.path.join(*current_path[1:-2])

        default_image_path = "/" + current_path + "/test/fakeimg.jpg"
        image_path = self.getProperty("file_name", default_image_path)

        self.image = QPixmap(image_path)
        self.image_dimensions = (self.image.width(), self.image.height())
        self.painter = QPainter(self.image)

        custom_pen = QPen(Qt.SolidLine)
        custom_pen.setColor(Qt.black)
        custom_pen.setWidth(1)
        self.painter.setPen(custom_pen)

        custom_brush = QBrush(Qt.SolidPattern)
        custom_brush.setColor(Qt.lightGray)
        self.painter.setBrush(custom_brush)

        self.setIsReady(True)
        AbstractVideoDevice.init(self)
    def init(self):
        current_path = os.path.dirname(os.path.abspath(__file__)).split(os.sep)
        current_path = os.path.join(*current_path[1:-2])

        default_image_path = "/" + current_path + "/test/fakeimg.jpg"
        image_path = self.getProperty("file_name", default_image_path)

        self.image = QPixmap(image_path)
        self.image_dimensions = (self.image.width(), self.image.height())
        self.painter = QPainter(self.image)

        custom_pen = QPen(Qt.SolidLine)
        custom_pen.setColor(Qt.black)
        custom_pen.setWidth(1)
        self.painter.setPen(custom_pen)

        custom_brush = QBrush(Qt.SolidPattern)
        custom_brush.setColor(Qt.lightGray)
        self.painter.setBrush(custom_brush)

        self.setIsReady(True)
        AbstractVideoDevice.init(self)
 def __init__(self, name):
     """
     Descript. :
     """
     AbstractVideoDevice.__init__(self, name)
     self.device = None
 def __init__(self, name):
     AbstractVideoDevice.__init__(self, name)
     self.force_update = None
     self.image_type = None
     self.image = None
Example #22
0
 def __init__(self, name):
     AbstractVideoDevice.__init__(self, name)
 def __init__(self, name):
     """
     Descript. :
     """
     AbstractVideoDevice.__init__(self, name)
     self.device = None
Example #24
0
 def __init__(self, name):
     AbstractVideoDevice.__init__(self, name)
     self.force_update = None
     self.image_type = None
     self.image = None