Convert cv2 image to mxnet image

When trying to operated on an image from opencv (cv2), in mxne, I got errors in _cvimresize that say “Argument src must have NDArray type, but got …”.

The key is it convert the object using mx.nd.array, like so:

newImage = mx.nd.array(src)

Leave a Reply

Your email address will not be published. Required fields are marked *