Access numpy array in openCV [closed]

asked Aug 4 '15

Using the documentation here, in section 4.4 the code is:

> import time import picamera import
> picamera.array import cv2
> 
> with picamera.PiCamera() as camera:
>     camera.start_preview()
>     time.sleep(2)
>     with picamera.array.PiRGBArray(camera) as
> stream:
>         camera.capture(stream, format='bgr')
>         # At this point the image is available as stream.array
>         image = stream.array

As i understand it, this returns a numpy array to be read in openCV correct? My question is, how do I then open/access it to perform image processing on it in openCV?

Preview: (hide)

Closed for the following reason the question is answered, right answer was accepted by sturkmen
close date 2020-10-11 09:33:45.437432

Comments

AFAIK, OpenCV python wrapper actually works with NumPy arrays. For example: https://github.com/Itseez/opencv/blob... So, probably, no conversion is needed.

mshabunin gravatar imagemshabunin (Aug 6 '15)edit