Skip to content Skip to sidebar Skip to footer

Odd Image Using Cv2 And Numpy

I am running the following code: import cv2 import numpy f = open('raw_image','rb') raw_image = f.read(720 * 1280 * 3) image = numpy.fromstring(raw_image, dtype='uint8') image = im

Solution 1:

If you generate a Red-Blue gradient like this with ImageMagick in the Terminal, you will see that your code works fine:

convert-size 1280x720 gradient:red-blue -depth 8 rgb:raw_image

enter image description here


I deduce your gst stuff is "unhappy".


The image you have shared contains this:

enter image description here

I converted it to a JPEG using ImageMagick like the in the Terminal:

convert-size 1280x720 -depth 8 rgb:raw_image.dms result.jpg

I deduce again that your gst stuff is "unhappy".

Post a Comment for "Odd Image Using Cv2 And Numpy"