Camera¶
Bases: AbstractSystem
Camera class defines the interface for camera devices.
This class extends AbstractSystem to provide image acquisition capabilities, controlling parameters such as exposure, binning, and ROIs, and managing acquisition sequences.
getImageHeight()
¶
Get the image height.
Retrieves the height of the acquired images in pixels.
Returns:
| Type | Description |
|---|---|
int
|
The image height |
getImageWidth()
¶
Get the image width.
Retrieves the width of the acquired images in pixels.
Returns:
| Type | Description |
|---|---|
int
|
The image width |
getImageBitDepth()
¶
Get the image bit depth.
Retrieves the bit depth of the acquired images (e.g., 8, 12, 16 bits).
Returns:
| Type | Description |
|---|---|
int
|
The image bit depth |
getBytesPerPixel()
¶
Get the number of bytes per pixel.
Retrieves the number of bytes used to store a single pixel in the acquired images.
Returns:
| Type | Description |
|---|---|
int
|
The bytes per pixel |
getImageBufferSize()
¶
Get the image buffer size.
Retrieves the total size of the image buffer in bytes.
Returns:
| Type | Description |
|---|---|
int
|
The image buffer size |
getImageNumberPerTrigg()
¶
Get the number of acquired images per trigger.
Retrieves the number of frames acquired for each trigger event.
Returns:
| Type | Description |
|---|---|
int
|
The number of acquired images per trigger |
getMaxNumberOfChannel()
¶
Get the maximum number of channels.
Retrieves the maximum number of channels supported by the camera.
Returns:
| Type | Description |
|---|---|
int
|
The maximum number of channels |
getExposure()
¶
Get the exposure time.
Retrieves the current exposure time setting in micro seconds.
Returns:
| Type | Description |
|---|---|
float
|
The exposure time |
setExposure(d)
¶
Set the exposure time.
Sets the exposure time for image acquisition, in micro seconds.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
d
|
float
|
The exposure time to set |
required |
getBinning()
¶
Get the binning mode.
Retrieves the current binning configuration (e.g., "1x1", "2x2").
Returns:
| Type | Description |
|---|---|
str
|
The binning mode |
setBinning(binning)
¶
Set the binning mode.
Sets the binning configuration for image acquisition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
binning
|
string
|
The binning mode to set |
required |
isHardwareCropAvailable()
¶
Check if hardware ROI cropping is available.
Determines if the camera supports Region Of Interest (ROI) cropping in hardware.
Returns:
| Type | Description |
|---|---|
boolean
|
True if hardware ROI cropping is available, false otherwise |
setHardwareCrop(crops)
¶
Set the hardware ROI crops.
Configures the hardware regions of interest for acquisition.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
crops
|
list[RoiCrop]
|
A list of hardware ROI crops |
required |
getHardwareCrop()
¶
Get the hardware ROI crops.
Retrieves the currently configured hardware regions of interest.
Returns:
| Type | Description |
|---|---|
list[RoiCrop]
|
A list of hardware ROI crops |
isSequenceRunning()
¶
Check if a sequence is running.
Determines if an image acquisition sequence is currently in progress.
Returns:
| Type | Description |
|---|---|
boolean
|
True if a sequence is running, false otherwise |
prepareSequenceAcquisition()
¶
Prepare for sequence acquisition.
Performs necessary setup steps before starting an acquisition sequence.
startSequenceAcquisition(nbImage)
¶
Start a sequence acquisition.
Begins capturing a specified number of images. -1, is an infinite number of images.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nbImage
|
int
|
The number of images to acquire |
required |
startContinuousSequenceAcquisition()
¶
Start a continuous sequence acquisition.
Begins capturing images continuously until stopped.
checkSequenceStarted()
¶
Wait until the sequence starts.
Wait until the acquisition sequence initiates.
softwareTriggerImage()
¶
Trigger an image acquisition bypassing the device controller (software trigger).
Sends a direct software command to capture an image, without the device controller.
isSoftwareTriggerAvailable()
¶
Check if software trigger is available.
Determines if the camera supports direct triggering via software commands.
Returns:
| Type | Description |
|---|---|
boolean
|
True if software trigger is available, false otherwise |
snapImage(chanIdx)
¶
Captures a single frame from the specified channel.
Initiates an image acquisition and retrieves the data from the requested channel index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chanIdx
|
int
|
The index of the acquisition channel (0 for single-channel devices) |
required |
Returns:
| Type | Description |
|---|---|
Image
|
The image |
popNextImage(chanIdx)
¶
Pop the next acquired image.
Acquired images are stored in an internal buffer. Retrieves the next available image from this buffer, for the requested channel index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chanIdx
|
int
|
The index of the acquisition channel (0 for single-channel devices) |
required |
Returns:
| Type | Description |
|---|---|
Image
|
The image |
popNextImageBlocking(chanIdx)
¶
Wait and pop the next acquired image.
Acquired images are stored in an internal buffer. Retrieves the next available image from this buffer, waiting if necessary until one becomes available, for the requested channel index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chanIdx
|
int
|
The index of the acquisition channel (0 for single-channel devices) |
required |
Returns:
| Type | Description |
|---|---|
Image
|
The image |
getLastImage(chanIdx, indexBeforeLastImg=0)
¶
Get the last acquired image.
Acquired images are stored in an internal buffer. Retrieves an image from this buffer based on its chronological order for the requested channel index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chanIdx
|
int
|
The index of the acquisition channel (0 for single-channel devices) |
required |
indexBeforeLastImg
|
int
|
Offset from the last image (0 for the very last) |
0
|
Returns:
| Type | Description |
|---|---|
Image
|
The image |
getRemainingImageCount(chanIdx)
¶
Get the number of images remaining in the buffer.
Retrieves the number of images currently waiting in the buffer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chanIdx
|
int
|
The index of the acquisition channel (0 for single-channel devices) |
required |
Returns:
| Type | Description |
|---|---|
int
|
The number of remaining images in the buffer |
stopSequenceAcquisition()
¶
Stop the sequence acquisition.
Stops the current image acquisition sequence.
clearBuffers()
¶
Clear internal buffers.
Clears all images stored in the internal buffers.