Function mindspore::dataset::ResizeBilinear
Defined in File image_process.h
Function Documentation
-
bool mindspore::dataset::ResizeBilinear(const LiteMat &src, LiteMat &dst, int dst_w, int dst_h)
resizing image by bilinear algorithm, the data type of currently only supports is uint8, the channel of currently supports is 3 and 1.
- 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_dst; /* Resize to (256, 256, 3) */ ResizeBilinear(lite_mat_src, lite_mat_dst, 256, 256); std::cout << lite_mat_dst.width_ << " " << lite_mat_dst.height_ << " " << lite_mat_dst.channel_ << std::endl;
- Parameters
src – [in] Input image data.
dst – [in] Output image data.
dst_w – [in] The width of the output image.
dst_h – [in] The length of the output image.
- Returns
Return true if transform successfully.