The function xf::cv::imwrite saves the image to the specified file from the given xf::cv::Mat. The image format is chosen based on the file name extension. This function internally uses cv::imwrite for the processing. Therefore, all the limitations of cv::imwrite are also applicable to xf::cv::imwrite.
API Syntax
template <int PTYPE, int ROWS, int COLS, int NPC>
void imwrite(const char *img_name, xf::cv::Mat<PTYPE, ROWS, COLS, NPC> &img)
Parameter Descriptions
The following table describes the template and the function parameters.
Parameter | Description |
---|---|
PTYPE | Input pixel type. Supported types are: XF_8UC1, XF_16UC1, XF_8UC4, and XF_16UC4 |
ROWS | Maximum height of the image to be read |
COLS | Maximum width of the image to be read |
NPC | Number of pixels to be processed per cycle; possible options are XF_NPPC1 and XF_NPPC8 for 1 pixel and 8 pixel operations respectively. |
img_name | Name of the file with the extension |
img | xf::cv::Mat array to be saved |