예제 #1
0
 def __init__(self, name='default', crop=None, **cinfo):
     self.name = name
     self.localtz = cinfo.get('timezone', 'UTC')
     self.crop = crop
     if 'virtual' in cinfo:
         cam = VirtualCamera(cinfo['source'], cinfo['virtual'])
     elif 'scanner' in cinfo:
         cinfo.pop('scanner')
         id = cinfo.pop('id')
         cam = Scanner(id, cinfo)
     elif 'directory' in cinfo:
         cam = DirectoryCamera(cinfo['directory'])
     elif 'avt' in cinfo:
         from SimpleCV import AVTCamera
         cam = AVTCamera(cinfo['id'], cinfo)
     elif 'kinect' in cinfo:
         cam = Kinect()
         cam._usedepth = 0
         cam._usematrix = 0
         if cinfo["kinect"] == "depth":
             cam._usedepth = 1
         elif cinfo["kinect"] == "matrix":
             cam._usematrix = 1
     elif 'jpegstream' in cinfo:
         cam = JpegStreamCamera(cinfo['jpegstream'])
     else:
         cam = ScvCamera(cinfo['id'], prop_set=cinfo)
     self._scv_cam = cam
예제 #2
0
파일: camera.py 프로젝트: ravikg/SimpleSeer
 def __init__(self, name='default', crop=None, **cinfo):
     self.name = name
     self.crop = crop
     if 'virtual' in cinfo:
         cam = VirtualCamera(cinfo['source'], cinfo['virtual'])
     elif 'scanner' in cinfo:
         cinfo.pop('scanner')
         id = cinfo.pop('id')
         cam = Scanner(id, cinfo)
     elif 'directory' in cinfo:
         cam = DirectoryCamera(cinfo['directory'])
     elif 'kinect' in cinfo:
         cam = Kinect()
         cam._usedepth = 0
         cam._usematrix = 0
         if cinfo["kinect"] == "depth":
             cam._usedepth = 1
         elif cinfo["kinect"] == "matrix":
             cam._usematrix = 1
     else:
         cam = ScvCamera(cinfo['id'], prop_set=cinfo)
     self._scv_cam = cam