![]() |
Xavia SDK c++ API 2.1.0
API description of the xavia library
|
The interface of the image object. More...
Public Member Functions | |
| virtual void | Deserialize (const std::uint8_t *pBuffer, const std::size_t size)=0 |
| Fill this image object from binary data. | |
| virtual void | Deserialize (const std::vector< std::uint8_t > &data)=0 |
| Fill this image object from binary data. | |
| virtual std::uint32_t | GetHeight () const =0 |
| Get the height of the image. | |
| virtual const ImageMetaData & | GetMetaData () const =0 |
| Get the metadata of the current image. | |
| virtual const std::vector< std::uint8_t > & | GetPixelData () const =0 |
| Get the raw pixel data. | |
| virtual xavia::sdk::PixelFormat | GetPixelFormat () const =0 |
| Get the pixel format. | |
| virtual std::uint32_t | GetWidth () const =0 |
| Get the width of the image. | |
| virtual void | SaveAsJpeg (const std::wstring &filePath, const int quality=90, const bool chromaticSubsampling=false) const =0 |
| Save the image as an 8 bit jpeg file. | |
| virtual std::vector< std::uint8_t > | Serialize ()=0 |
| Convert this image object into binary data. | |
The interface of the image object.
Returned by the image callback, each image object represents a single frame from the camera.
The image object contains the pixel data, metadata such as timestamps and frame numbers, and dimensions.
|
pure virtual |
Fill this image object from binary data.
| [in] | pBuffer | pointer to the start of the binary data. |
| [in] | size | number of bytes to read from the buffer. |
Use this to efficiently load the image from the XenomatiX proprietary format. The opposite of the Serialize() function.
|
pure virtual |
Fill this image object from binary data.
| [in] | data | vector of bytes that hold the image information. |
Use this to efficiently load the image from the XenomatiX proprietary format. The opposite of the Serialize() function.
|
pure virtual |
Get the height of the image.
|
pure virtual |
Get the metadata of the current image.
|
pure virtual |
Get the raw pixel data.
|
pure virtual |
Get the pixel format.
|
pure virtual |
Get the width of the image.
|
pure virtual |
Save the image as an 8 bit jpeg file.
| [in] | filePath | path to the output jpeg file. |
| [in] | quality | JPEG quality (0-100) (default 90). |
| [in] | chromaticSubsampling | Enable or disable chromatic subsampling (default false). |
JPEG saving is only supported for RGB8 format. If the image is in Bayer format, it will be demosaiced before saving. If the image was converted to RGB12, it will be scaled down to 8 bits per channel.
|
pure virtual |
Convert this image object into binary data.
Use this to efficiently store the image in the XenomatiX proprietary format. When dumping to disk, it is customary to use the .ximg extension.