def init(self): """ Descript. : """ current_path = os.path.dirname(os.path.abspath(__file__)).split(os.sep) current_path = os.path.join(*current_path[1:-1]) default_image_path = "/" + current_path + "/tests/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) GenericVideoDevice.init(self)
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" GenericVideoDevice.set_cam_encoding(self, cam_encoding)
def __init__(self, name): GenericVideoDevice.__init__(self,name) self.camera = None self.camera_id = str self.qimage = None self.qpixmap = None
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) GenericVideoDevice.set_cam_encoding(self,cam_encoding)
def __init__(self, name): """ Descript. : """ GenericVideoDevice.__init__(self, name) self.force_update = None self.image_type = None self.image = None
def init(self): """ Descript. : """ tangoname = self.getProperty("tangoname") self.device = PyTango.DeviceProxy(tangoname) self.device.ping() GenericVideoDevice.init(self)
def init(self): """ Descript. : """ # tangoname = self.getProperty("tangoname") self.log.info("PX2Video init") self.device = self.prosilica GenericVideoDevice.init(self)
def __init__(self, name): """ Descript. : """ GenericVideoDevice.__init__(self, name) camera.__init__(self) self.log = logging.getLogger("user_level_log") self.device = name self.camera = camera() self.width = 1360 self.height = 1024
def init(self): """ Descript. : """ current_path = os.path.dirname(os.path.abspath(__file__)).split(os.sep) current_path = os.path.join(*current_path[1:-1]) image_path = "/" + current_path + "/tests/fakeimg.jpg" self.image = QPixmap(image_path) self.image_dimensions = (self.image.width(), self.image.height()) self.setIsReady(True) GenericVideoDevice.init(self)
def __init__(self, name): """ Descript. : """ GenericVideoDevice.__init__(self, name) self.cam_address = None # LIMA access self.camera = None self.interface = None self.control = None self.video = None
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.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() GenericVideoDevice.init(self)
def init(self): """ Descript. : """ tangoname = self.getProperty("tangoname") endian = self.getProperty("endian") if endian in ["small", "Small", "Little", "little"]: self.header_fmt = "<IHHqiiHHHH" else: self.header_fmt = ">IHHqiiHHHH" self.header_size = struct.calcsize(self.header_fmt) self.device = PyTango.DeviceProxy(tangoname) self.device.ping() GenericVideoDevice.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() GenericVideoDevice.init(self)
def init(self): # start Vimba self.camera_id = u"%s" % self.getProperty("camera_id") atexit.register(self.close_camera) GenericVideoDevice.init(self) self.image_dimensions = [1360, 1024]
def __init__(self, name): """ Descript. : """ GenericVideoDevice.__init__(self, name) self.device = None