I am trying to use the ASUS xtion Live pro with openCV 2.4.9. I start the ASUS drivers that is openni2 using roslaunch openni2_launch openn2.launch. But I am not able to get the outputs

asked 2015-07-06 23:27:22 -0600

I am using the following python script to get the results. But I always get the output as Unable to grab images. 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)

print capture.get(cv.CV_CAP_PROP_OPENNI_REGISTRATION)

while True: if not capture.grab(): print "Unable to Grab Frames from camera" break okay1, depth_map = capture.retrieve(0 ,cv.CV_CAP_OPENNI_DEPTH_MAP) if not okay1: print "Unable to Retrieve Disparity Map from camera" break okay2, gray_image = capture.retrieve(0 ,cv.CV_CAP_OPENNI_GRAY_IMAGE) if not okay2: print "Unable to retrieve Gray Image from device" break cv2.imshow("depth camera", depth_map) cv2.mshow("rgb camera", gray_image) if cv3.waitKey(10) == 27: break cv2.destroyAllWindows() capture.release()

Any sort of guidance will be very much helpful for me in this matter. Thanks in advance.

edit retag flag offensive close merge delete