ReadImage
Function Usage
Dumps the image file to the MxstBufferInput object. The size range of the image file to be read is [1 B, 4 GB] and the default value is 1 GB. You can set the maximum value using malloc_max_data_size in the Vision SDK configuration file sdk.conf. malloc_max_data_size indicates the maximum size of the memory that can be allocated by Vision SDK. Set the value as required. After the file size is read successfully, manually destroy the obtained data by using the free method.
Prototype
1 | static MxstBufferInput DataHelper::ReadImage(const std::string& imagePath); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
imagePath |
Input |
File path of images |
Response Parameters
Data Structure |
Description |
|---|---|
MxstBufferInput |
Input data structure of the Stream object |
Parent topic: DataHelper