Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
    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)
    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)
Ejemplo n.º 9
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)