Hello Sir,
I'm new to raspberry pi and recently brought Raspberry Pi B+ and Pi-Camera from www.crazypi.com
I'm working with opencv [2.4.x] to stream video using python but video is very slow, unable to reduce fps and resolution of video
1) Code:
#!/usr/local/bin/python
import cv2
import cv2.cv as cv
import numpy as np
cam = cv2.VideoCapture(0)
cam.set(3,720)
cam.set(4,480)
cam.set(5,60)
print cam.get(3)
#size = (320,240)
#cv.SetCaptureProperty(cam, cv.CV_CAP_PROP_FPS, 30)
#cv.SetCaptureProperty(cam, cv.CV_CAP_PROP_FRAME_WIDTH, size[0])
#cv.SetCaptureProperty(cam, cv.CV_CAP_PROP_FRAME_HEIGHT, size[1])
while True:
img = cam.read()[1]
cv2.imshow("window", img)
#print cam.get(3)
if cv2.waitKey(5) == 32:
break
cam.release()
2) And also i'm getting runtime error:
HIGHGUI ERROR: V4L/V4L2: VIDIOC_CROPCAP
Please can you tell me whats going wrong or any alternative way for it.
Links to my product:
https://www.crazypi.com/…/Raspber…/Raspberry-pi-complete-kit
https://www.crazypi.com/…/Wireless-Usb-security-camera-rasp…
Thanks in advance.