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): passgetProps(): 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.
Nonein 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): passgenerateImageIndex(): 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.pc2class 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
Camserverand run it.
- Initialize a