Retrieving Channels from Kinect device using python OpenCV -
I put some simple code in Python to capture different channels from OpenNi devices, I have opencv all the primers and open Enabled with NI support was made. OpenNI samples work perfectly for both Kinect sensor and Prison sensor, as well as OpenCV samples for testing OpenNi support (./cpp-example-openni_capture)
Here I have put together the code. So everything runs fine, but the results to be displayed are not the right channels ... For example if I want to access the gray image channel and depth map channel, both images are displayed ed deep_maps Yes, I try to reach other channels and replace OPENNI_IMAGE_GENERATOR_MODE Unfortunately the results are constant. No matter what I try, the channel reaches the same depth I deeper_map-gray_izag creates an all black image. Like I said that C + OpenCV Open Nii examples serve everyone with a complete connection sensor and premises sensor. It seems like a problem with the Python module, or I'm actually doing something stupid. EDIT: Ubuntu running on 12.04 LTS Thanks for helping Drew get similar () looks: Then you need two values to pass to retrieve. I'm not sure which image should be, but sending a holder to a place seems like a trick. Python: cv2.VideoCapture Recover ([ image [, channel]]) a ???? Revolve, Image
okay1, depth_map = capture.retrieve ( 0 , cv.CV_CAP_OPENNI_DEPTH_MAP)
okay2, gray_image = capture.retrieve ( 0 , Cv.CV_CAP_OPENNI_GRAY_IMAGE)
Comments
Post a Comment