blackfly驱动
quatm.drivers.blackfly package
Submodules
quatm.drivers.blackfly.bfly module
Class:
quatm.drivers.blackfly.bfly.Blackfly(serial)
class quatm.drivers.blackfly.bfly.Blackfly(object): def __init__(self, serial): pass def getProps(self): pass def get_image(self): pass def setProps(self, props): pass def start(self, callback=None): pass def stop(self): pass
getProps()
: Get all current properties (entries that can be configured) from the camera.- Returns:
dict
- Properties of the camera.
- Returns:
get_image()
: Read image from camera.- Returns: Blackfly image.
None
in case of error.
- Returns: Blackfly image.
setProps(props)
: Configure camera.- Args:
props (dict)
- Dictionary containing the properties. Keys correspond to functions called, the entries correspond to arguments. - Returns:
props (dict)
- The properties that have been set. May differ from the input in case of properties incompatible with the camera.
- Args:
start(callback=None)
: Start capturing images.stop()
: Stop capturing images.
quatm.drivers.blackfly.bfly.Camserver(name, serial)
class quatm.drivers.blackfly.bfly.Camserver(object): def __init__(self, name, serial): pass def generateImageIndex(self): pass def run(self): pass def sendimage(self, im): pass def updateBusInfo(self): pass
generateImageIndex()
: In the current measurement, count the images. If the next run has started (either task, repetition or run changes), reset the counter (imgindex).run()
: Run loop running forever. Sends images from the camera to the imagestream and initiates reconfiguration of the camera in case properties have changed.sendimage(im)
: Send Blackfly camera image via the imagestream. The image is converted to numpy array, additional information like binning, timestamp, etc., is added to a dictionary and both are sent to the imagestream.- Args:
im
- Blackfly image object. - Returns:
None
- Args:
updateBusInfo()
: Detect cameras on the bus and update info in properties if new camera has been found.
quatm.drivers.blackfly.bfly.pc2
class quatm.drivers.blackfly.bfly.pc2(object): pass
- Dummy class in case driver is not installed.
Function:
quatm.drivers.blackfly.bfly.run(name)
def quatm.drivers.blackfly.bfly.run(name): pass
- Initialize a
Camserver
and run it.
- Initialize a