ProjSEED / lodToolkit

level-of-details toolkit(LTK). Convert osgb lod tree to 3mx tree. Convert pointcloud in ply/las/laz/xyz to 3mx/osgb tree.
MIT License
111 stars 36 forks source link

点云转换rgb模式问题 #3

Closed Vigoss2333 closed 3 years ago

Vigoss2333 commented 3 years ago

您好,我在使用点云转osgb lod的时候,发现了颜色模式的问题。 目前只有默认模式即iHeightBlend的时候转换出来的osgb有东西显示,而rgb模式会直接触发断言。 我看了一下代码,在CreateColorBar()这个函数里面并没有判断rgb模式,所以肯定会触发这个断言assert(steps.size() >= 2); 我按照您上面的代码,写了一个rgb模式的if,安装顺序来填充steps,也不行。 我现在转换的点云文件,我之前在网上查询资料后,根据Las文件的格式,我试过用非常笨的方法把它的RGB值读出来,是要用它的原值除以256再除以255,就成了OSG常用的rgb值。 现在能有什么方法得到正确的颜色值吗,感谢您的帮助。

GitGaoXing commented 3 years ago

哦,这个肯定是我写的bug,最初是支持rgb的,因为我的业务需求是用iHeightBlend,就没有再用过rgb模式,我有空看看

Vigoss2333 commented 3 years ago

好的 十分感谢

GitGaoXing commented 3 years ago

已修复,你拉最新代码试下

Vigoss2333 commented 3 years ago

感谢您的更新。 好消息是现在选择rgb模式不会触发中断了,但是我转换出来的osgb还是没有任何图像。 我不知道问题出在哪 也没有看到报错。我用的命令是:-c rgb -m osgb -i D:\data\f1-1st_dsm.las -o D:\data\Lod 我能把我的源文件贴在某个地方吗?

GitGaoXing commented 3 years ago

gaoxing_mes@163.com

Vigoss2333 commented 3 years ago

十分感谢,问题已经解决了,转换没有问题。

GitGaoXing commented 3 years ago

你的数据点密度比较低,可以加上一个参数 -r 0.1 这样视觉效果会好一些

Vigoss2333 commented 3 years ago

好的

GitGaoXing commented 3 years ago

https://blog.csdn.net/qq_25826371/article/details/106816760

GitGaoXing commented 3 years ago

加你QQ了,我搞了个群,感觉你是比较懂这一块的