计算点云的法线,显示~
// comnormal.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <sstream>
#include <pcl/point_types.h>
#include <pcl/features/normal_3d.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/console/parse.h>
#include <pcl/io/obj_io.h>
#include <pcl/io/ply_io.h>
using namespace std;
using namespace pcl;
// This function displays the help
void
showHelp(char * program_name)
{
std::cout << std::endl;
std::cout << "Usage: " << program_name << " cloud_filename.[pcd|ply]" << std::endl;
std::cout << "-h: Show this help." << std::endl;
}
int main(int argc, char** argv)
{
string inputFile = "bunny.ply",outputFile;
PointCloud<PointXYZ>::Ptr source_cloud(new PointCloud<PointXYZ>());
if (pcl::io::loadPLYFile(inputFile, *source_cloud) &l