This interface can be used to change the resolution of the image or to inform the driver for resolution changes made previously in the hardware.
For cameras allowing to read out a reduced size or parts of the image this can be used with the IImageRect Interface.
The settings can be adjusted with the
•ImageOffset and the ImageSize method of the CV Grabber Control or the
•corresponding functions of the IImageRect Interface of the Driver Library.
Both approaches are documented in the Common Vision Blox Manual.
For testing, please use the CVB Image Manager Tutorials.
With GenICam compliant cameras settings as resolution, pixel format and - if supported - binning or partial scan, can be changed in the camera directly.
If one of these settings is changed, the image object has to be updated.
You can restart the application or inform the driver about the changed resolution or pixel size.
This is necessary as the underlying image object holds preinitialised buffers where the image stream from the camera is written to.
When the size of the image changes the underlying image object need to be informed and the buffers need to be reinitialized.
To do that you need to:
•Change the setting in the camera (PixelType, image size, binning etc.) as described in the Camera Manual.
•Call the IRImageSize function of the IImageRect with the IMAGERECT_CMD_RESET parameter.
•This function will return a new image handle.
•Pass this new handle to all components which reference the original image handle.
•The original image handle does not hold a reference to the driver object anymore.
Normally this image is not needed anymore and should be released with the ReleaseObject function.
C# Example Code:
int width = 0;
int height = 0;
int bResult = Cvb.Driver.IImageRect.IRImageSize
if (bResult >= 0 && imgNew != 0)
// Put new Image into Image and Display Control
m_cvImage.Image = imgNew;
m_cvDisplay.Image = m_cvImage.Image;
// imgNew Object is not needed anymore as it is available in the Image OCX
// dispose it here.
// Update NodeMap and GenApiGrid
// Register all Callbacks
For details regarding the IImageRect interface please refer to the description in the Common Vision Blox Manual.