mapped image, being only a view on another image or memory buffer
driver image, viewing the latest acquired buffer (e.g. via Driver Library's G2Wait)
The presence of this interface is mostly signaled via the IMG handle type (see OBJ on how IDisposableType relates to the handles).
Each image has a Width and Height (in pixels), a CoordinateSystem (as TCoordinateMap) and a number of planes (at least one). The number of planes can be read out by calling the ImageDimension function.
A CVB plane is, in short, one component of pixel. E.g. for a monochrome image, there is just one dimension: the intensity or gray value. If you have an RGB image, the dimension is three: red, green, and blue.
Every plane has its own VPAT to locate the pixels in memory and cvbdatatype_t describing the data type of the pixel component.
Note
The plane order is logical and not related to the pixel buffer layout! Thus a BGR memory layout still has its first plane being red, the second green and the third blue.
As described in the class diagram above, any single image has one Width, Height and CoordinateSystem. Each plane, though, can have its own cvbdatatype_t and VPAT. Thus you can combine even different memory buffers into a single image (see CreateConcatenatedImage) to package related information. This can e.g. be 2½D, 16 bits per pixel data and its byte confidence map.
The IImageVPA itself does not define the component's role and most algorithms working on a plane treat it as monochrome intensity data. Thus you could still do OCR on a 2½D image of embossed letters. You can use the ImageColorModel function to determine how CVB interprets the planes.
Gets the PVPAT and its base pointer to access the image data.
For more information on how to handle image pixel data access see the VPAT documentation.
Note
If possible prefer the GetLinearAccess function from the CVCUtilities.dll. See the UtilitiesLibraryReference for additional information.
Attention
The returned PVPAT is the VPAT stored in the Image handle's IImageVPA object. Thus changes to the VPAEntry elements should only be made with the greatest caution as this is the central access point for functions using IMG handles.
Parameters
[in]
Image
Image object handle to get plane of.
[in]
PlaneIndex
Plane index for which to get the pixel access data.
[out]
ppBase
Address of the variable to receive the base pointer for the PVPAT offset table.
Generic implementation using templates to apply inversion for different pixel component types (we use the DatatypeMatches<ConcreteType> function from the example in cvbdatatype_t):
// if Windef.h is included (e.g. via Windows.h) you should define NOMINMAX
// either before the include or in your project settings (except you need the