I came across thisquestion and answer which said how to get a numpy array from raspicam, using the PiYUVAnalysis class.

I can output the array itself, But i do not know how to view the array as an image using openCV? I would like to view the images frame by frame in real time using openCV.

If anyone could help me out with this, I would highly appreciate it!

I essentially tried append this :

img = cv2.imread('ArrayY',0)

cv2.imshow('image',img) cv2.waitKey(0) cv2.destroyAllWindows()

To the end of the code, but it did not work :/ Thank you in advance for your help! Cheers, David


I suppose this could be your answer. They do not simply pass the array, but either write it to file and read, or split to channels and pass them as arguments.

  • Hi, Thank you for your response.Unfortunately, I am kind of a beginner and I do not really know exactly what is going on in the linked code. IS there any way you could explain it to me? Aug 4 '15 at 20:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.