Exemple #1
0
def camera_ids():
    uidIndexDict = {}
    numCameras = csl.init_bus1394()
    for i in range(numCameras):
        uidIndexDict[csl.getCameraUID(i)] = i
    csl.endCameraSetup()
    return uidIndexDict
    def _set_registers(self):
        csl.init_bus1394()
        # Mode
        csl.setRegister(self.device, 0x604, 0xA0000000)
        # Format
        csl.setRegister(self.device, 0x608, 0x20000000)
        #sets raw bayer image format for mono image format modes
        csl.setRegister(self.device, 0x1048, 0x80000081)

        mode = csl.getRegister(self.device, 0x604)
        format = csl.getRegister(self.device, 0x608)
        rate = csl.getRegister(self.device, 0x600)
        #software_trigger
        print "dragonfly2: mode", hex(mode)
        print "dragonfly2: format", hex(format)
        print "dragonfly2: rate", hex(rate)
    def _set_registers(self):
        csl.init_bus1394()
        # Mode
        csl.setRegister(self.device,0x604,0xA0000000)
        # Format
        csl.setRegister(self.device,0x608,0x20000000)
        #sets raw bayer image format for mono image format modes 
        csl.setRegister(self.device, 0x1048, 0x80000081)

        mode  = csl.getRegister(self.device, 0x604)
        format= csl.getRegister(self.device, 0x608)
        rate  = csl.getRegister(self.device, 0x600)
        #software_trigger
        print "dragonfly2: mode", hex(mode)
        print "dragonfly2: format", hex(format)
        print "dragonfly2: rate", hex(rate)
def camera_ids():
	uidIndexDict = {}
	numCameras = csl.init_bus1394()
	for i in range(numCameras):
		uidIndexDict[csl.getCameraUID(i)] = i
	csl.endCameraSetup()
	return uidIndexDict