예제 #1
0
    def zoom_control(self, val):
        if not isinstance(val, int):
            val = int(interp(val, [0.0, 1.0], [0, 10]))

        val = 0 if val <= 0 else val
        val = 10 if val >= 10 else val
        if val != self.az:
            print "ZOOMING TO: ", val
            cam_control('-d', '1', '-c', 'zoom_absolute={0}'.format(val))
            self.az = val
예제 #2
0
    def focus_control(self, val):
        if self.get_auto_focus_enabled():
            return

        if not isinstance(val, int):
            val = int(interp(val, [0.0, 1.0], [0, 40]))

        if val != self.af:
            print "FOCUS TO: ", val
            cam_control('-d', '1', '-c', 'focus_absolute={0}'.format(val))
            self.af = val
예제 #3
0
 def disable_auto_exposure(self):
     if not self.get_auto_exposure_enabled():
         return
     print "Disabling AE"
     self.auto_exposure_enabled = False
     cam_control('-d', '1', '-c', 'exposure_auto=1')
예제 #4
0
 def enable_auto_exposure(self):
     if self.get_auto_exposure_enabled():
         return
     self.auto_exposure_enabled = True
     print "Enabling AE"
     cam_control('-d', '1', '-c', 'exposure_auto=3')
예제 #5
0
 def disable_auto_focus(self):
     if not self.get_auto_focus_enabled():
         return
     print 'Disabling AF" '
     self.auto_focus_enabled = False
     cam_control('-d', '1', '-c', 'focus_auto=0')
예제 #6
0
 def enable_auto_focus(self):
     if self.get_auto_focus_enabled():
         return
     print "Enabling AF"
     self.auto_focus_enabled = True
     cam_control('-d', '1', '-c', 'focus_auto=1')
예제 #7
0
    def exposure_control(self, val):
        if self.get_auto_exposure_enabled():
            return
        print "EXPOSE TO: ", val

        cam_control('-d', '1', '-c', 'exposure_absolute={0}'.format(val))