Kinect depth image duplication problem
I have built opencv with OpenNI support to grab (rgb and depth) images directly from the kinect. I am using the Kinect for windows version with the near mode feature.
I use the PrimeSense driver for the kinect.
Unfortunately, the depth images shows some errors: Some objects are duplicated in the depth image. The rgb image is fine.
I suspect that it may have to do with the near mode feature not being enabled. Is there a way to do this using opencv?
I use the following code to grab and display both the rgb and the depth image:
while(1)
{
Mat depthImage;
Mat bgrImage;
capture.grab();
capture.retrieve(depthImage, CV_CAP_OPENNI_DEPTH_MAP );
capture.retrieve(bgrImage, CV_CAP_OPENNI_BGR_IMAGE );
namedWindow("depth", 1);
namedWindow("bgr", 1);
imshow("depth", depthImage);
imshow("bgr", bgrImage);
if (waitKey(30) >= 0) break;
}
Any hints are greatly appreciated :)
Can you post an example of the depth you have ? Because this code seems to be really good and me I don't have any trouble with near mode.
I have uploaded a sample image here: http://imageshack.us/f/547/5xyf.png/
As you can see, the cable is recorded multiple times in the depth image. What is maybe not so obvious is the fact that the duplication occurs only horizontally, not vertically.
Really strange... Try to update the firmware/hardware, sometime they release patch. The camera just look to have a problem.