Function mindspore::dataset::InitFromPixel

Function Documentation

bool mindspore::dataset::InitFromPixel(const unsigned char *data, LPixelType pixel_type, LDataType data_type, int w, int h, LiteMat &m)

Init Lite Mat from pixel, the conversion of currently supports is rbgaTorgb and rgbaTobgr.

Note

The length of the pointer must be the same as that of the multiplication of w and h.

Parameters
  • data[in] Input image data.

  • pixel_type[in] The type of pixel_type.

  • data_type[in] The type of data_type.

  • w[in] The width of the output image.

  • h[in] The length of the output image.

  • m[in] Used to store image data.