python - BytesIO stream to Numpy arrays? (Picamera) -


I am using Piccamera with Raspberry P to take pictures and then analyze the differences between them. . I am using the following code to capture a Bitciano stream and then read it in a Numpy array (taken from):

  stream = io.bytesIO () Camera with: picamera.PiCamera () Camera: Camera. Resolution = (100, 60) camera.framerate = 30 While not done: camera.capture (stream, format = 'jpeg', use_video_port = true) If previous data == None: previousData = cv2.imdecode (np. Fromstring (stream.getvalue (), dtype = np.uint8), 1) previous data = previous data [: ,,,, :: - 1] Other: timestar T. pneumatic = time.time () currentData = cv2.imdecode (np.fromstring (stream .getvalue (), dtype = np.uint8), 1) current data = past data [, ,,, :: - 1] ... (Excluded Analysis Code) .... Previous Data = Current Data   

The Analysis Code works, except that it will continue to use the same frame repeatedly. I am assuming that the way I am studying with the stream should be a problem, but I do not have enough experience in Python to know how to change it. Any suggestions or help will be appreciated.

You are in the else branch, the current code is named currentDate < / Code> to change it to the next line with previousData . The frame captured from the first line is lost as any name or other reference points. Just remove this second assignment.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -