Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E57 did not use MM as unit #6

Open
dogod621 opened this issue May 14, 2019 · 6 comments
Open

E57 did not use MM as unit #6

dogod621 opened this issue May 14, 2019 · 6 comments

Comments

@dogod621
Copy link

E57 use meters as unit (You can check the translation value of pose data.).
But cartesianX, cartesianY, cartesianZ are "ScaledIntegerNode",
so you should scale the values.

for example , I got my E57 data from BLK360 scanner.
scaleX, scaleY, scaleZ of following Example code is 1e-5.
after multiply the scale, the final XYZ is in meters. ( And then it can match the pose translation )

Example:
e57::CompressedVectorNode scanPoints(scan.get("points"));
e57::StructureNode proto(scanPoints.prototype());
e57::ScaledIntegerNode protoX(proto.get("cartesianX"));
e57::ScaledIntegerNode protoY(proto.get("cartesianY"));
e57::ScaledIntegerNode protoZ(proto.get("cartesianZ"));

double scaleX = protoX.scale();
double scaleY = protoY.scale();
double scaleZ = protoZ.scale();

@madduci
Copy link
Owner

madduci commented May 14, 2019

Hi,

thanks for the issue. Actually I don't deal anymore with E57 data, so I don't have any dataset to test with, to verify if also my data is in meters or not.
Would you mind to submit the correction as pull request?

@dogod621
Copy link
Author

dogod621 commented May 14, 2019

here is the free dataset: https://lasers.leica-geosystems.com/blk360-data-set-downloads
your code didnot scale xyz correctly, so it will failed when combine multiple scan to a single point cloud (the pose translation did not match).

by the way, why not read rgb data from e57 ( to pcl::PointXYZRGBA )

@dogod621
Copy link
Author

dogod621 commented May 17, 2019

https://github.com/dogod621/E57Converter

DEMO

Hi, I write a new E57 converter. I fix the issue, and further:

  1. support out-of-core (for large e57 scan data)
  2. support scaled integer XYZ
  3. support spherical coordinate
  4. support perpoint RGB, intensity, scan index

@madduci
Copy link
Owner

madduci commented May 17, 2019

Hi @dogod621
thanks for the inputs!

As I developed it on my own time ago, I haven't used OutOfCore because I had only the possibility to test with smaller point clouds and I was using Intensity instead of RGB because my original dataset wasn't with RGB information, therefore I used the XYZI format.

Anyway thanks for the inputs, I will try to fix my code as soon as I can but I will accept happily merge requests

@dogod621
Copy link
Author

dogod621 commented May 28, 2019

@madduci I found the correct way to read scaled integer....

asmaloney/libE57Format#16

jean-noelp:
when you build your SourceDestBuffer, ensure to activate the auto-scaling on cartesian values!
vector destBuffers;
double x[N]; destBuffers.push_back(SourceDestBuffer(imf, "cartesianX", x, N, true, true));
double y[N]; destBuffers.push_back(SourceDestBuffer(imf, "cartesianY", y, N, true, true));
double z[N]; destBuffers.push_back(SourceDestBuffer(imf, "cartesianZ", z, N, true, true));

@madduci
Copy link
Owner

madduci commented May 28, 2019

Hi @dogod621 thank you very much for the hint. I'm doing (slowly) a refactoring of code supporting newer PCL and newer C++ standard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants