LIDAR data visualization

classic Classic list List threaded Threaded
3 messages Options
Nikkitta Nikkitta
Reply | Threaded
Open this post in threaded view
|

LIDAR data visualization

Hi,

I'm trying to visualize LIDAR data in osgearth and I ran into some problems.

- Initially I have a .las file with XYZ point coordinates (1 166 875 total points).
- With PDAL I convert initial file points into latitude-longitude coordinates with the following command:
.\pdal translate georeferenced_model.las out.las reprojection --filters.reprojection.out_srs="EPSG:4326" --writers.las.scale_x=0.0000001 --writers.las.scale_y=0.0000001 --writers.las.offset_x="auto" --writers.las.offset_y="auto"
- In the cpp code I use liblas to read LIDAR data points, then I create osgEarth::GeoPoint and finally convert GeoPoint toWorld to get XYZ point for geometry drawing. Here are some code pieces:
double lon = p.GetX();
double lat = p.GetY();
double alt = p.GetZ() - h.GetMinZ();

osgEarth::GeoPoint geopoint;
geopoint.set(mapNode->getMapSRS()->getGeographicSRS(), lon, lat, alt, osgEarth::ALTMODE_ABSOLUTE);
osg::Vec3d _p;
geopoint.toWorld(_p);

vertices->push_back(osg::Vec3(_p.x(), _p.y(), _p.z()));
- Geometry drawing is done with GL_POINTS:
geometry->setUseDisplayList(true);
geometry->setUseVertexBufferObjects(true);
geometry->setVertexArray(vertices);
geometry->setColorArray(colours, osg::Array::BIND_PER_VERTEX);
geometry->addPrimitiveSet(new osg::DrawArrays(GL_POINTS, 0, vertices->size()));

geometry->getOrCreateStateSet()->setAttribute(new osg::Point(3.0f), osg::StateAttribute::ON);

geode->addDrawable(geometry);
geode->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);


Here is what I get with my approach:



As a reference, I used this video uploaded many years ago:



My visualization looks bad in comparison and I have the following questions, which I hope will help me to improve visual quality:
1. How can I remove the flickering of those points, that are almost on the surface of the earth? Occurs on camera movement.
2. Why does points are shaking up&down while camera is moving?
3. Why do I observe rows of points with large gaps between those rows? Is my initial data not dense enough or I should do something with Z coordinate?
4. It seems to me correct to make the point size increase as the camera approaches. Is this the correct approach? If so, how to achieve this?

Any other suggestions are welcome!
Best regards,
Nikita Petrov
Nikkitta Nikkitta
Reply | Threaded
Open this post in threaded view
|

Re: LIDAR data visualization

No thoughts on the subject?
Best regards,
Nikita Petrov
jasonbeverage jasonbeverage
Reply | Threaded
Open this post in threaded view
|

Re: LIDAR data visualization

Hi Nikita,

That video you referenced is from our commercial point cloud toolkit Juniper that works with osg and osgEarth.  If you're interested in checking out Juniper for use on your project let us know and maybe we can setup a phone call.

Thanks!

Jason