getting nan with getRGBCameraintrinsics

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

getting nan with getRGBCameraintrinsics

shome
This post was updated on .
I am trying to get the Depth Camera Instrinsics of carmine 1.09. The code
compiles but I get "nan" for fx, fy, px, py. I have tried using the bus@address format for device id(as in how-to-set-a-specific-device-id-on-opennigrabber ). I also tried setting device_id="#1".

But still I am getting nan.

My code:

#include <pcl/io/openni2_grabber.h>
#include <pcl/io/pcd_io.h>

using namespace std;

int
main (int argc, char** argv)
{
  std::string device_id ("");
  pcl::io::OpenNI2Grabber::Mode depth_mode =
pcl::io::OpenNI2Grabber::OpenNI_Default_Mode;
  pcl::io::OpenNI2Grabber::Mode image_mode =
pcl::io::OpenNI2Grabber::OpenNI_Default_Mode;

  pcl::io::OpenNI2Grabber grabber (device_id, depth_mode, image_mode);
  grabber.start();

  double fx,fy,px,py;

  grabber.getDepthCameraIntrinsics(fx,fy,px,py);

  cout << "fx=" << fx << endl;
  cout << "fy=" << fy << endl;
  cout << "px=" << px << endl;
  cout << "py=" << px << endl;


  return (0);
}



--
Sent from: http://www.pcl-users.org/
_______________________________________________
PCL-users@pointclouds.org / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users