Function mindspore::dataset::Split
Defined in File image_process.h
Function Documentation
-
bool mindspore::dataset::Split(const LiteMat &src, std::vector<LiteMat> &mv)
Split image channels.
- Parameters
src – [in] Input image data.
mv – [in] Vector of LiteMat containing all channels.
- Returns
Return true if transform successfully.
样例/* Assume p_rgb is a pointer that points to an image with shape (width, height, channel) */ LiteMat lite_mat_src(width, height, channel, (void *)p_rgb, LDataType::UINT8); std::vector<LiteMat> lite_mat_dst; /* Extract all channels of image */ Split(lite_mat_src, lite_mat_dst);