0

I am using raspberry pi to get frames from ASUS Xtion openni device.

Python-opencv, OpenNI, and OpenCV are installed on raspberry pi correctly.

I am using the following code:

import cv2
import cv2.cv as cv

capture = cv2.VideoCapture(cv.CV_CAP_OPENNI)
capture.set(cv.CV_CAP_OPENNI_IMAGE_GENERATOR_OUTPUT_MODE. cv.CV_CAP_OPENNI_VGA_30HZ)

okay, color_image = capture.retrieve(0, cv.CV_CAP_OPENNI_BGR_IMAGE)

This code was working without any problems before. But now, I always get "okay" value as "false". How can I fix this problem?

Thanks,

yusuf
  • 3,591
  • 8
  • 45
  • 86

1 Answers1

1

Do you have the v4l drivers?

If not

sudo modprobe bcm2835-v4l2
XOR
  • 407
  • 6
  • 16