Function mindspore::dataset::Transpose
Defined in File image_process.h
Function Documentation
-
bool mindspore::dataset::Transpose(const LiteMat &src, LiteMat &dst)
Matrix transpose.
- Example
/* 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); LiteMat lite_mat_src2; ConvertTo(lite_mat_src, lite_mat_src2); LiteMat lite_mat_dst; /* Transpose image */ Transpose(lite_mat_src2, lite_mat_dst); std::cout << lite_mat_dst.width_ << " " << lite_mat_dst.height_ << " " << lite_mat_dst.channel_ << std::endl;
- Parameters
src – [in] Input matrix.
dst – [in] Output matrix.
- Returns
Return true if transform successfully.