PCL点云库学习笔记(可视化2)

PCL点云库学习笔记(可视化)

可视化

四、PCLPlotter

4.1 绘制多项式
PCLPlotter提供了一个非常简单明了的图形绘制界面,可以在库中可视化各种重要的图,从多项式函数到直方图。

#include<vector>
#include<iostream>
#include<utility>
#include<pcl/visualization/pcl_plotter.h>

using namespace std;

int main()
{
	//声明绘图对象
	pcl::visualization::PCLPlotter * plotter = new pcl::visualization::PCLPlotter();

	//多项式函数, y = x^2. Index of x^2 is 1, rest is 0
	vector<double> func1(3, 0);//三项的多项式,分别为1,x,x^2
	func1[2] = 1;//下标为2,第三项系数为1 

	//adding the polynomial func1 to the plotter with [-10, 10] as the range in X axis and "y = x^2" as title
	plotter->addPlotData(func1, -10, 10, "y = x^2");

	//display the plot, DONE!
	plotter->plot();

	return 0;
}

4.2 绘图的基本步骤

//1.定义一个绘图对象
pcl::visualization::PCLPlotter *plot
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值