首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

OpenGL处理点云有关问题

2013-11-11 
OpenGL处理点云问题使用激光扫描仪扫描数据点,再使用OpenGL对点云进行处理,我自己写的程序显示效果(上)与

OpenGL处理点云问题
    使用激光扫描仪扫描数据点,再使用OpenGL对点云进行处理,我自己写的程序显示效果(上)与激光扫描仪配套的处理软件的显示效果(下)如下图
    OpenGL处理点云有关问题
    OpenGL处理点云有关问题
    我需要怎么做才能把显示效果跟下图显示一样呢,我是使用扫描仪的SDK获得点云的坐标和光强。获取点的API如下:
    HRESULT getScanPoint([in] int scan, [in] int row, [in] int col, [out] double* x, [out] double* y, [out] double* z, [out] int* color, [out, retval] int* result) 
    Get the point at the given row/column in the given scan. The result is in the local cartesian coordinate system of the scanner. The returned color value depends on the selected reflection mode: 
0.  For grey scan points: Original reflection value of the scanner. In the case of 
an FARO Laser Scanner this isin the range of 0 to 2047. 
For color: the lightness of the color in the range 0 to 255. 
1.  For grey scan points: Mapped reflection value is in the range 0 (black) to 
255 (white). 
For color: the lightness of the color in the range 0 to 255. 
2.  For grey scan points: Mapped reflection value is in the range 0 (black) to 
255 (white) as RGB grey value. 
For color: RGB color, 8 bits per channel (bits 0-7: red, bits 8-15: green, bits 
16-23: blue). 
The default reflection mode is 1. 
The scan number can be in the range 0 to numScans-1. 
我是使用灰度扫描的,所以获取的color是一个灰度值,请问我怎么给一个点设置它的灰度值,我是一个新手,很多都不会,希望各位能帮一下,谢谢 OpenGL 点云
[解决办法]
给一个点设置灰度值?那么在glColor3()中设定红、绿、蓝分量为同一值就行了。

热点排行