Image rectangle query and change operations. More...
Inherits IDeviceInterface.
Inherited by ImageRect.
Public Member Functions | |
void | Update (DeviceUpdateMode mode) |
Reads out the current image format data from the device and adjusts the streaming input buffer accordingly. More... | |
void | ChangeSize (Size2D newSize, DeviceUpdateMode mode) |
Sets a new size to the image rectangle and thus the streamed image. More... | |
Properties | |
Size2D | SensorSize [get] |
Full size of the sensor in pixels. | |
Point2D | Offset [get, set] |
Gets or sets the offset of the image rectangle from the top left corner of the sensor. More... | |
Size2D | Size [get] |
Gets the size of the image rectangle. More... | |
Properties inherited from IDeviceInterface | |
Device | Parent [get] |
The Device this interface works on. | |
Image rectangle query and change operations.
With this interface you can configure the AOI that is streamed from the camera's sensor.
You can also use this interface to adjust CVB's buffers for incoming data according to the current device's settings.
void ChangeSize | ( | Size2D | newSize, |
DeviceUpdateMode | mode | ||
) |
Sets a new size to the image rectangle and thus the streamed image.
Calling this method is only possible if the acquisition not Stream.IsRunning.
The newSize may be adjusted according to the used hardware. To get the actual value you need to read the Size after setting it.
Possible sizes are up to SensorSize.Size2D.Width - Offset.Point2D.X and SensorSize.Size2D.Height - Offset.Point2D.Y
If you are unsure about the mode , simply use DeviceUpdateMode.UpdateDeviceImage.
newSize | New size of the image rect in pixels. |
mode | Defines how to handle device images. |
void Update | ( | DeviceUpdateMode | mode | ) |
Reads out the current image format data from the device and adjusts the streaming input buffer accordingly.
Calling this method is only possible if the acquisition not Stream.IsRunning.
If you changed the image dimension or color format e.g. via the GenApi.NodeMap interface, you can update the image buffer via this call. This is necessary prior starting a new acquisition!
If you are unsure about the mode , simply use DeviceUpdateMode.UpdateDeviceImage.
mode | Defines how to handle device images. |
|
getset |
Gets or sets the offset of the image rectangle from the top left corner of the sensor.
The set value may be adjusted according to the used hardware. To get the actual value you need to reread this offset after setting it.
Many devices support changing the offset while grab is active as the buffer size does not change.
The value range is 0 to SensorSize.Size2D.Width - Size.Size2D.Width and 0 to SensorSize.Size2D.Height - Size.Size2D.Height pixels.
|
get |
Gets the size of the image rectangle.
Setting a new value results in new image buffers. Thus setting is only supported via either Update(DeviceUpdateMode) and ChangeSize(Size2D,DeviceUpdateMode) methods.
Size of the image in pixels.