Converting .LAS files to .pcd format & storing data in .pcd format!

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

Converting .LAS files to .pcd format & storing data in .pcd format!

mrrmaurya
Hello all,

Does pcl have any support for .las file? If not then do we have something to convert .las to .pcd format?

I know pdal has but I wanted to know how can I use .las here or its derivatives.


Also how do I get .pcd data for my setu or scene?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

Filip Rooms
Dear mrrmaurya,

I have written my own elementary las file reader to work with PCL.

If you like, I can share this...

Kind regards,

Filip


On 26-Aug-16 13:46, mrrmaurya wrote:

> Hello all,
>
> Does pcl have any support for .las file? If not then do we have something to
> convert .las to .pcd format?
>
> I know pdal has but I wanted to know how can I use .las here or its
> derivatives.
>
>
> Also how do I get .pcd data for my setu or scene?
>
> Thanks
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Converting-LAS-files-to-pcd-format-storing-data-in-pcd-format-tp4042616.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

mrrmaurya
Dear Filip,

I would be happy to see your work.

You may please share it on mail id mrrmaurya@gmail.com.

Thanks in advance.

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

Filip Rooms
Dear mrmaurya,

First had to deal with permission to share any code, but seems OK now.

However, just a few days ago, I found a bug in my LASeader which I am
solving right now.

I will keep you informed.

Kind regards,

Filip

On 27-Aug-16 08:48, mrrmaurya wrote:

> Dear Filip,
>
> I would be happy to see your work.
>
> You may please share it on mail id [hidden email].
>
> Thanks in advance.
>
> Regards
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Converting-LAS-files-to-pcd-format-storing-data-in-pcd-format-tp4042616p4042620.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

mrrmaurya
Dear Filip,

Thanks for the positive response.

I will wait for the update.

Regards

On Fri, Sep 2, 2016 at 8:46 PM, Filip Rooms [via Point Cloud Library (PCL) Users mailing list] <[hidden email]> wrote:
Dear mrmaurya,

First had to deal with permission to share any code, but seems OK now.

However, just a few days ago, I found a bug in my LASeader which I am
solving right now.

I will keep you informed.

Kind regards,

Filip

On 27-Aug-16 08:48, mrrmaurya wrote:

> Dear Filip,
>
> I would be happy to see your work.
>
> You may please share it on mail id [hidden email].

>
> Thanks in advance.
>
> Regards
>
>
>
> --
> View this message in context: http://www.pcl-users.org/Converting-LAS-files-to-pcd-format-storing-data-in-pcd-format-tp4042616p4042620.html
> Sent from the Point Cloud Library (PCL) Users mailing list mailing list archive at Nabble.com.
> _______________________________________________
> [hidden email] / http://pointclouds.org
> http://pointclouds.org/mailman/listinfo/pcl-users
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users



If you reply to this email, your message will be added to the discussion below:
http://www.pcl-users.org/Converting-LAS-files-to-pcd-format-storing-data-in-pcd-format-tp4042616p4042684.html
To unsubscribe from Converting .LAS files to .pcd format & storing data in .pcd format!, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

niranjan
In reply to this post by mrrmaurya
I am also having the same issue. I need to convert .las file .pcd file. Can
you share the code @[hidden email]. Thanks in advance



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

Stephen McDowell
Filip,

Please consider sharing the code in a way that all users can access it. Even if the code is not perfect, if other users in the future seek this functionality they won't need to ask you to email it ;)

If it's a single (or just one or two) file, gist.github.com is a good choice. If it is more complex, a public repository on your hosting choice (GitHub, bitbucket, etc).

In addition to enabling users access without request from you, this allows potential for improvements via pull requests. Perhaps one day down the road it will become stable enough that you or one of the other interested parties can submit a pull request to PCL itself.

AKA there are at least three interested parties here, likely many more silent observers. Making it open source will help everybody involved.

I hope it goes without saying that you being willing to share any code in any form, fully functional or not, is much appreciated by the community here!!!

-Stephen



_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

icedoggy
This post was updated on .
Hi!
I also wrote my own converter from las2pcd. In any case you need to be aware
of the data type in your las and in pcd.
My point clouds in las were recorded with high precision and stored in
double data types. The coordinates I used were in EPSG 31463 CRS and values
were thus quite large, i.e. x/y: 1792457.591222 / 5655281.906640. So what
happens is I lose a lot of precision as the little demo program illustrates.
I don't know if you have the same problem but you should be aware of this.

#include <iostream>
#include <iomanip>      // std::setprecision

int main() {
   
    double  ad = 0.5;
    float   af = float(ad);

    double bd = 5123456.41231654685435;
    float  bf = float(bd);

    std::cout << std::setprecision(15) << ad << " " << af << " " << bd << " " << bf<< " " << std::endl;

    return 0;
}

Output is: 
0.5 0.5 5123456.41231655 5123456.5 


Anyway. here is my code. It is far from perfect but it should run. Besides
the PCL you need to have the liblas library installed on your system.
https://github.com/libLAS/libLAS

https://github.com/svensMPG/readlas2pcd



--
Sent from: http://www.pcl-users.org/
_______________________________________________
PCL-users@pointclouds.org / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

niranjan
I need the code in python. 
I know its available in c++ but I need in python. Can you share it in python 

On Friday, May 4, 2018, icedoggy <[hidden email]> wrote:
Hi!
I also wrote my own converter from las2pcd. In any case you need to be aware
of the data type in your las and in pcd.
My point clouds in las were recorded with high precision and stored in
double data types. The coordinates I used were in EPSG 31463 CRS and values
were thus quite large, i.e. x/y: 1792457.591222 / 5655281.906640. So what
happens is I lose a lot of precision as the little demo program illustrates.
I don't know if you have the same problem but you should be aware of this.



Anyway. here is my code. It is far from perfect but it should run. Besides
the PCL you need to have the liblas library installed on your system.
https://github.com/libLAS/libLAS

https://github.com/svensMPG/readlas2pcd



--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Converting .LAS files to .pcd format & storing data in .pcd format!

icedoggy
Hi.
Sorry but this is the first time I read python. I am not a python programmer
so I can't help you there. But from that little I have used python I can say
that it is a more high level language than CPP. So I would argue that, if
*you* are a python programmer, than it should be relatively straightforward
to translate this code. Providing you have a python wrapper for pcl.
Having said this, if you only want to read las and write pcd, no centering
or downsampling, you can get away without actually using any pcl code /
includes.
You just need to write the pcd as ASCII not binary and of course write the
header manually in your output file. But that's simple.

Cheers




--
Sent from: http://www.pcl-users.org/
_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users