Cannot capture video from ASUS Xtion using OpenCV on Jetson TK1

436 views Asked by At

I'm having trouble capturing video from an ASUS Xtion on an Nvidia Jetson TK1 using OpenCV (also on a laptop -- see update below). When I run the following code, I always get "Error."

#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

#include <iostream>

int main()
{
  cv::VideoCapture input;
  input.open(CV_CAP_OPENNI_ASUS);

  if(!input.isOpened())
    {
      std::cout << "Error.\n";
      return -1;
    }
}

I'm using OpenCV2, installed with the JetPack. I installed OpenNI2 following instructions here (built from source). I can run SimpleViewer and other programs just fine, so the Asus is communicating. Following Tutorial 2 here, I am able to load a video image in an OpenCV program from a file, but not read the Asus. Running lsusb shows that the device is active:

Bus 002 Device 002: ID 1d27:0601 ASUS 

I have successfully read from the Asus from within ROS.

I have seen this thread, but it does not help (I did incorporate the _ASUS for the open macro).

[UPDATE] I have since loaded openNI2 and OpenCV3 on an ubuntu laptop (14.04). Again, SimpleViewer works fine. The built in camera works fine (with input.open(0) to access the default camera). The only thing that doesn't work is reading the Asus from within an OpenCV program.

:grumble:

Does anyone have suggestions for what to try next? I'm sure I'm missing something obvious -- any debugging help appreciated.

0

There are 0 answers