samedi 23 juillet 2016

Python and opencv

I am getting an error that says : Camera component couldnt be enabled: Out of resources (other than memory) or Incorrect buffer length for resolution when I run the following code:

from picamera.array import PiRGBArray
from picamera import PiCamera
import io
import picamera
import cv2
import numpy as mp
import math

camera=PiCamera()
camera.resolution=(640,480)
camera.framerate=1
cap=PiRGBArray(camera,size=(640,480))
for frame in camera.capture_continuous(cap,format="bgr",use_video_port=True):
    img=frame.array
    cv2.imshow('input',img)

Aucun commentaire:

Enregistrer un commentaire