本文整理汇总了C++中pcl::visualization::PCLVisualizer::initCameraParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ PCLVisualizer::initCameraParameters方法的具体用法?C++ PCLVisualizer::initCameraParameters怎么用?C++ PCLVisualizer::initCameraParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pcl::visualization::PCLVisualizer
的用法示例。
在下文中一共展示了PCLVisualizer::initCameraParameters方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: viewerOneOff
void viewerOneOff(pcl::visualization::PCLVisualizer& viewer)
{
viewer.setBackgroundColor (0.3, 0.3, 0.3);
viewer.addCoordinateSystem(1.0, 0);
viewer.initCameraParameters();
viewer.camera_.pos[2] = 30;
viewer.updateCamera();
}
示例2: initViewer
void initViewer(pcl::visualization::PCLVisualizer &viewer) {
viewer.setBackgroundColor(0, 0, 0);
viewer.addCoordinateSystem(1.0, "reference");
viewer.initCameraParameters();
viewer.setRepresentationToPointsForAllActors();
viewer.setCameraPosition(0, 0, -1, 0, 0, 0, 0, -1, 0);
viewer.registerKeyboardCallback(keyboardCallback);
}
示例3: main
int main(int argc, char* argv[]) {
if(argc < 3) {
PCL_ERROR("run as ./project /path/to/cloud1/ /path/to/cloud2/ [pcd format]");
return -1;
}
string fCloud1 = "";
string fCloud2 = "";
string models = "";
string training = "";
int NN;
pcl::console::parse_argument(argc, argv, "-cloud1", fCloud1);
pcl::console::parse_argument(argc, argv, "-cloud2", fCloud2);
pcl::console::parse_argument(argc, argv, "-models", models);
pcl::console::parse_argument(argc, argv, "-training", training);
pcl::console::parse_argument(argc, argv, "-nn", NN);
moi.setVerbose(true);
classificator.setModelsDir(models);
classificator.setTrainingDir(training);
classificator.setNN(NN);
classificator.setup();
viewer.registerKeyboardCallback(&keyboard_cb, NULL);
viewer.setBackgroundColor(0, 0, 0);
viewer.initCameraParameters();
if(fCloud1 != "" && fCloud2 != "") {
if(pcl::io::loadPCDFile<pcl::PointXYZ>(fCloud1, *cloud1) == -1) {
PCL_ERROR("Cloud1 reading failed\n");
return(-1);
}
if(pcl::io::loadPCDFile<pcl::PointXYZ>(fCloud2, *cloud2) == -1) {
PCL_ERROR("Cloud2 reading failed\n");
return(-1);
}
findObjectsAndClassify();
} else {
keyboardCbLock = false;
printInstructions();
}
while(!viewer.wasStopped()) {
viewer.spinOnce(100);
boost::this_thread::sleep (boost::posix_time::milliseconds(100));
}
return 0;
}
示例4: PCDOrganizedMultiPlaneSegmentation
PCDOrganizedMultiPlaneSegmentation (typename pcl::PointCloud<PointT>::ConstPtr cloud_, bool refine)
: viewer ("Viewer")
, cloud (cloud_)
, refine_ (refine)
, threshold_ (0.02f)
, depth_dependent_ (true)
, polygon_refinement_ (false)
{
viewer.setBackgroundColor (0, 0, 0);
//viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 3, "cloud");
//viewer.setPointCloudRenderingProperties (pcl::visualization::PCL_VISUALIZER_OPACITY, 0.15, "cloud");
viewer.addCoordinateSystem (1.0, "global");
viewer.initCameraParameters ();
viewer.registerKeyboardCallback(&PCDOrganizedMultiPlaneSegmentation::keyboard_callback, *this, 0);
}
示例5:
void
initVisualizer (pcl::visualization::PCLVisualizer &viewer)
{
// Setting the initial viewer parameters
viewer.initCameraParameters ();
viewer.setBackgroundColor (0, 0, 0);
viewer.addCoordinateSystem (1000);
viewer.camera_.view[0] = 0;
viewer.camera_.view[1] = 0;
viewer.camera_.view[2] = 1;
viewer.camera_.pos[0] = 8000;
viewer.camera_.pos[1] = 20000;
viewer.camera_.pos[2] = 2500;
viewer.updateCamera ();
viewer.addText ("Shift + click to select noisy objects. \nPress 0 to confirm the removal.", 50, 300, "user");
}