1

What I mean by binary string, is the raw content of image file (That's what wand.image.make_blob() returns)

Is there a way to load it in OpenCV ?

Edit:

cv2.imdecode() doesn't work

img = cv2.imdecode( buf=wand_img.make_blob(), flags=cv2.IMREAD_UNCHANGED)

TypeError: buf is not a numpy array, neither a scalar

Ghilas BELHADJ
  • 13,412
  • 10
  • 59
  • 99
  • Possible duplicate of [How to convert wand image object to open cv image (numpy array)](http://stackoverflow.com/questions/37015966/how-to-convert-wand-image-object-to-open-cv-image-numpy-array) – emcconville May 13 '16 at 17:33

1 Answers1

1

Have you tried cv2.imdecode which takes an image buffer and turns it into a CvMat object? Though I am not sure about this one.

See : http://docs.opencv.org/3.0-beta/modules/imgcodecs/doc/reading_and_writing_images.html

Cedric
  • 889
  • 1
  • 8
  • 18