Buteo Integration¶
The SDK provides integration with the Buteo which makes it possible to directly control parts of the buteo while streaming images. The buteo integration aims to make the process of acquiring data cubes seamles but also to assist applications for a more streamlined process.
Warning
The buteo functionality is in its early stages of development and may change significantly.
Creating a buteo object¶
The base type is hsi.StageController. This base type handles everything mentioned prior. It does this by utilizing hsi.HSCamera and an API client for the Buteo.
The idea of this class is to abstract away the complexities of controlling the Buteo and streaming, and instead provide a simple interface for controlling both devices in a synchronized manner.
Let us look at a few examples of how to create a new Buteo object and perform some basic operations on it:
from hsi import StageController
buteo = StageController("<camera_ip>")
# Set conveyor belt velocity in mm/s
buteo.velocity = 20.0
# Set conveyor move distance in mm.
buteo.distance = 100.0
# Set oversampling (lines)
bute.oversampling = 4.0
# Convert to HSImage object
image = buteo.to_hs_image()
# Start streaming and buteo
hsi.write(image, <"output-path">)
Note
Framerate and velocity cannot be set simultaneously. Setting one automatically calculates the other, and the last value set will take precedence.
from hsi import StageController
# Create buteo with custom framerate and distance
buteo = StageController("<camera_ip>", fps=30.0, distance=150.0)
# Convert to HSImage object
image = buteo.to_hs_image()
# Start streaming and buteo
hsi.write(image, <"output-path">)
As hsi.write() gets executed the whole process starts. Light switches on, the conveyor belt starts moving and images are captured and written to file.
Once the streaming process is complete, the lights switch off and the conveyor returns to its initial position.
The buteo interface supports setting framerate, velocity, distance and oversampling either during initialization or later on.
Caution
Using the hsi.StageController.to_hs_image() method, it is important to state that it is a snapshot of the current state of the buteo object, meaning that if a change is made to
any of the parameters after calling this method, it will not affect the image object created prior.