点云技术相关产学研社区

 找回密码
 立即注册加入PCL中国点云技术相关产学研社区

扫一扫,访问微社区

查看: 5455|回复: 4

pcl::visualization::CloudViewer显示点云出现问题

[复制链接]
发表于 2016-4-15 20:48:45 | 显示全部楼层 |阅读模式
本帖最后由 好难啊 于 2016-4-15 20:59 编辑

源码:
#include <pcl/visualization/cloud_viewer.h>
#include <iostream>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>

int main()
{
        pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>);
        if (pcl::io::loadPCDFile<pcl::PointXYZRGB>("test_pcdc.pcd", *cloud) == -1)//*打开点云文件
        {
                PCL_ERROR("Couldn't read file test_pcd.pcd\n");
                return(-1);
        }
        std::cout << "Loaded " << cloud->width*cloud->height << " data points from test_pcd.pcd with the following fields: " << std::endl;

        pcl::visualization::CloudViewer viewer("Viewer");

        viewer.showCloud(cloud);
        //while (!viewer.wasStopped())
        //{

        //}

}
运行后会出现这个


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册加入PCL中国点云技术相关产学研社区

x
回复

使用道具 举报

 楼主| 发表于 2016-4-15 20:57:57 | 显示全部楼层
续:
就只是想把点云显示出来。
我是用一个外国人发的PCL 1.8.0 RC2 All-in-one Installer安装的。


这是调试信息

ERROR: In C:\Build\3rdParty\x86\VTK-7.0.0\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 545
vtkWin32OpenGLRenderWindow (01876678): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2.

ERROR: In C:\Build\3rdParty\x86\VTK-7.0.0\Rendering\OpenGL2\vtkOpenGLRenderWindow.cxx, line 545
vtkWin32OpenGLRenderWindow (01876678): GL version 2.1 with the gpu_shader4 extension is not supported by your graphics driver but is required for the new OpenGL rendering backend. Please update your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5 or later and make sure your driver in Mesa supports OpenGL 3.2.

ERROR: In C:\Build\3rdParty\x86\VTK-7.0.0\Rendering\OpenGL2\vtkShaderProgram.cxx, line 369
vtkShaderProgram (0746A600): 1: #version 120

ERROR: In C:\Build\3rdParty\x86\VTK-7.0.0\Rendering\OpenGL2\vtkShaderProgram.cxx, line 370
vtkShaderProgram (0746A600): ERROR: 0:2: '' :  extension 'GL_EXT_gpu_shader4' is not supported

0x03A83247 (pcl_visualization_debug.dll)处(位于 pcl003.exe 中)引发的异常: 0xC0000005: 读取位置 0x00000054 时发生访问冲突。

如有适用于此异常的处理程序,该程序便可安全地继续运行。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-4-15 20:58:35 | 显示全部楼层
希望大神指点一下
回复 支持 反对

使用道具 举报

发表于 2016-4-15 21:42:44 | 显示全部楼层
觉得 很有可能是第三方库的原因。他编译的似乎是 vS2012
回复 支持 反对

使用道具 举报

 楼主| 发表于 2016-4-20 00:55:35 | 显示全部楼层
VTK7.0要求OPENGL3.2以上,很多笔记本集成显卡都达不到要求,换成独显就可以了。
PS:我把错误信息贴出来才看到第一个错误,然后搞了几天才想到全局设置改显卡。
回复 支持 反对

使用道具 举报

本版积分规则

QQ|小黑屋|点云技术相关产学研社区 ( 陕ICP备13001629号 )

GMT+8, 2024-5-13 13:48 , Processed in 1.466086 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表