Ask Your Question

Revision history [back]

Accessing Y information from Raspicam (Python)

Hi, I am having trouble loading a YUV array in OpenCV. I am trying it on a raspberry pi and I used the code that I saw in the answer to this question : [http://raspberrypi.stackexchange.com/questions/32926/convert-the-frame-data-from-recording-into-a-numpy-array]

Essentially, I have gotten raw YUV info from the Raspberry pi camera and I have it converted to a numpy array, frame by frame. My question now is: how can i see this numpy array in OpenCV? I would like to load the frames as images, and ultimately, I would like to isolate the Y channel for analysis. SO far, I just got the array and did this:

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

cv2.imshow('image',img)

cv2.waitKey(0)

cv2.destroyAllWindows()

Which is probably wrong. Thanks for your help in advance,

Cheers,

David

click to hide/show revision 2
No.2 Revision

Accessing Y information from Raspicam (Python)

Hi, I am having trouble loading a YUV array in OpenCV. I am trying it on a raspberry pi and I used the code that I saw in the answer to this question : [http://raspberrypi.stackexchange.com/questions/32926/convert-the-frame-data-from-recording-into-a-numpy-array]question

Essentially, I have gotten raw YUV info from the Raspberry pi camera and I have it converted to a numpy array, frame by frame. My question now is: how can i see this numpy array in OpenCV? I would like to load the frames as images, and ultimately, I would like to isolate the Y channel for analysis. SO far, I just got the array and did this:

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

cv2.imshow('image',img)

cv2.waitKey(0)

cv2.destroyAllWindows()

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

Which is probably wrong. Thanks for your help in advance,

Cheers,

David