Functions for managing ImageWrapper objects. More...
Functions | |
VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION | vlNew_ImageWrapper (vlImageFormat imageFormat) |
Creates a new Image object and returns a pointer to it. More... | |
VL_SDK_API void VL_CALLINGCONVENTION | vlDelete_ImageWrapper (vlImageWrapper_t *imageWrapper) |
Deletes an ImageWrapper object. More... | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlImageWrapper_GetFormat (vlImageWrapper_t *imageWrapper) |
Returns the internal type of the image. More... | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlImageWrapper_GetBytesPerPixel (vlImageWrapper_t *imageWrapper) |
Returns the number of bytes per pixel. More... | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlImageWrapper_GetWidth (vlImageWrapper_t *imageWrapper) |
Returns the width of the image. More... | |
VL_SDK_API unsigned int VL_CALLINGCONVENTION | vlImageWrapper_GetHeight (vlImageWrapper_t *imageWrapper) |
Returns the height of the image. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlImageWrapper_CopyToBuffer (vlImageWrapper_t *imageWrapper, unsigned char buffer[], unsigned int bufferSize) |
Copies the VisionLib image into the given buffer. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlImageWrapper_CopyFromBuffer (vlImageWrapper_t *imageWrapper, const unsigned char buffer[], unsigned int width, unsigned int height) |
Copies the given buffer into the VisionLib image. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlImageWrapper_CopyFromBufferWithFormat (vlImageWrapper_t *imageWrapper, const unsigned char buffer[], unsigned int width, unsigned int height, vlImageFormat imageFormat) |
Copies the given an formated buffer into the VisionLib image. More... | |
Functions for managing ImageWrapper objects.
The ImageWrapper is a wrapper for an Image object.
VL_SDK_API void VL_CALLINGCONVENTION vlDelete_ImageWrapper | ( | vlImageWrapper_t * | imageWrapper | ) |
Deletes an ImageWrapper object.
Call this function if you used the ::vlDataSetWrapper_GetImage function to acquire the object and you are now done using it.
imageWrapper | Pointer to an ImageWrapper object. |
VL_SDK_API bool VL_CALLINGCONVENTION vlImageWrapper_CopyFromBuffer | ( | vlImageWrapper_t * | imageWrapper, |
const unsigned char | buffer[], | ||
unsigned int | width, | ||
unsigned int | height | ||
) |
Copies the given buffer into the VisionLib image.
The VisionLib image will be resized according to the width and height parameter.
Please make sure, that the data stored in the buffer has the same format as the image. The image format can be acquired using the vlImageWrapper_GetFormat function.
imageWrapper | Pointer to an ImageWrapper object. |
buffer | Buffer with the raw image data. |
width | New width of the image. |
height | New height of the image. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlImageWrapper_CopyFromBufferWithFormat | ( | vlImageWrapper_t * | imageWrapper, |
const unsigned char | buffer[], | ||
unsigned int | width, | ||
unsigned int | height, | ||
vlImageFormat | imageFormat | ||
) |
Copies the given an formated buffer into the VisionLib image.
The VisionLib image will be resized according to the width and height and format parameter.
The image will be converted into internally into a RGBA format.
imageWrapper | Pointer to an ImageWrapper object. |
buffer | Buffer with the raw image data. |
width | New width of the image. |
height | New height of the image. |
imageFormat | The format of the image. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlImageWrapper_CopyToBuffer | ( | vlImageWrapper_t * | imageWrapper, |
unsigned char | buffer[], | ||
unsigned int | bufferSize | ||
) |
Copies the VisionLib image into the given buffer.
Please make sure, that the buffer is large enough for storing the whole image date (width * height * bytesPerPixel). The number of bytes per pixel an be acquired using the vlImageWrapper_GetBytesPerPixel function.
imageWrapper | Pointer to an ImageWrapper object. |
buffer | Buffer with width * height * bytesPerPixel bytes of memory. |
bufferSize | Size of the buffer. |
true
, on success; false
otherwise. VL_SDK_API unsigned int VL_CALLINGCONVENTION vlImageWrapper_GetBytesPerPixel | ( | vlImageWrapper_t * | imageWrapper | ) |
Returns the number of bytes per pixel.
imageWrapper | Pointer to an ImageWrapper object. |
VL_SDK_API unsigned int VL_CALLINGCONVENTION vlImageWrapper_GetFormat | ( | vlImageWrapper_t * | imageWrapper | ) |
Returns the internal type of the image.
imageWrapper | Pointer to an ImageWrapper object. |
VL_SDK_API unsigned int VL_CALLINGCONVENTION vlImageWrapper_GetHeight | ( | vlImageWrapper_t * | imageWrapper | ) |
Returns the height of the image.
imageWrapper | Pointer to an ImageWrapper object. |
VL_SDK_API unsigned int VL_CALLINGCONVENTION vlImageWrapper_GetWidth | ( | vlImageWrapper_t * | imageWrapper | ) |
Returns the width of the image.
imageWrapper | Pointer to an ImageWrapper object. |
VL_SDK_API vlImageWrapper_t* VL_CALLINGCONVENTION vlNew_ImageWrapper | ( | vlImageFormat | imageFormat | ) |
Creates a new Image object and returns a pointer to it.
This pointer must be released using vlDelete_ImageWrapper.
imageFormat | The format of the image to create. |