Splitting a 3D numpy Array and plotting one of them. - Raspberry Pi Forums


hi,
operate on numpy array. using code :

code: select all

import picamera import picamera.array import cv2 pil import image import numpy import pil  arrayy = none  # inherit piyuvanalysis class myanalysisclass(picamera.array.pirgbanalysis):     def analyse(self, array):         #print ('here')    #if set print array, array updated values printed.         global arrayy   #the global command makes variable available in namespace of whole program (i think)         arrayy = array  picamera.picamera() camera:     picamera.array.pirgbanalysis(camera) output:         camera.resolution = (256, 256)         camera.framerate = 30         output = myanalysisclass(camera)  # output not file, myanalysisclass class, written above.         camera.start_recording(output, format='rgb')         camera.wait_recording(5)         camera.stop_recording()
can yuv numpy array, has dimensions 256 256 3. assume number 3 individual y, u , v channels.
question is, how 1 of these channels, left 256 256 1 array, corresponding y, u or v channel?
thank help,
cheers,
david

code: select all

y = yuv[0:256,0:256,0] u = yuv[0:256,0:256,1] v = yuv[0:256,0:256,2] 


raspberrypi



Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support