0

I want to use mxnet Image API to load grayscale png file. But Image API became 3channel RGB data. How to convert from 3channel data to 1channel data?

user2850652
  • 179
  • 1
  • 7
  • 13

1 Answers1

1

You can use imdecode function and set flag with 0. https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/image/image.py#L85

This will require you install opencv and compile mxnet with USE_OPENCV=1