DLIB库example中3d_point_cloud_ex.cpp(3D点云)学习与实现

!免责!以下全是个人理解,新人菜鸟难免出错,希望指正。

一、函数学习

1、perspective_window::overlay_dot

(类,继承自drawable_window, noncopyable)perspective_window:
This is a simple window that is just a container for a perspective_display. It exists to make it easy to throw perspective_displays onto the screen without having to put together your own drawable_window objects.(这是一个简单的窗口,它只是一个perspective_display的容器。它的存在使得很容易perspective_displays放到屏幕上,而不必将自己的drawable_window对象放在一起。)

 (类perspective_display的一个结构体在perspective_window中重新引用)overlay_dot:

This object represents a dot that is drawn on the screen.Each dot is represented by one point and a color.(此对象表示在屏幕上绘制的点。 每个点由一个点和一个颜色表示。)

2、 dlib::rand rnd;

     该对象表示伪随机数生成器。

3、 dlib::vector<double> val(sin(i),cos(i),i/4);

       三维矢量容器

4、rgb_pixel color = colormap_jet(i,0,20);

      rgb_pixel:这是一个表示RGB彩色图形像素的简单结构。

     colormap_jet(i,0,20):将值映射为颜色。 特别地,我们使用喷射颜色方案,其中值<= min_value是深蓝色,较大的值变为浅蓝色,然后是黄色,然后当它们接近max_val时最终变为红色。

5、 win.add_overlay(points);

  win 是 perspective_window对象 。add_overlay是perspective_window的方法

将给定的叠加点添加到此对象中,以便显示它。

二、效果

 

猜你喜欢

转载自blog.csdn.net/weixin_40500230/article/details/83581404