| 51 | SimpleOpenNIProcessor (openni_wrapper::OpenNIDevice::DepthMode depth_mode = openni_wrapper::OpenNIDevice::OpenNI_12_bit_depth) : mode (depth_mode) {} |
| 52 | |
| 53 | void |
| 54 | cloud_cb_ (const pcl::PointCloud<pcl::PointXYZRGBA>::ConstPtr &cloud) const |
| 55 | { |
| 56 | static unsigned count = 0; |
| 57 | static double last = pcl::getTime (); |
| 58 | if (++count == 30) |
| 59 | { |
| 60 | double now = pcl::getTime (); |
| 61 | std::cout << "distance of center pixel :" << cloud->points [(cloud->width >> 1) * (cloud->height + 1)].z << " mm. Average framerate: " << static_cast<double>(count)/(now - last) << " Hz" << std::endl; |
| 62 | count = 0; |
| 63 | last = now; |
| 64 | } |
| 65 | |
| 66 | if (save) |
| 67 | { |
| 68 | std::stringstream ss; |
| 69 | ss << std::setprecision (12) << pcl::getTime () * 100 << ".pcd"; |
| 70 | pcl::PCDWriter w; |
| 71 | w.writeBinaryCompressed (ss.str (), *cloud); |
| 72 | std::cout << "wrote point clouds to file " << ss.str () << std::endl; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void |
| 77 | imageDepthImageCallback (const openni_wrapper::Image::Ptr&, const openni_wrapper::DepthImage::Ptr& d_img, float constant) |
nothing calls this directly
no test coverage detected