Open dogod621 opened 5 years ago
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?
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 )
https://github.com/dogod621/E57Converter
Hi, I write a new E57 converter. I fix the issue, and further:
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
@madduci I found the correct way to read scaled integer....
https://github.com/asmaloney/libE57Format/issues/16
jean-noelp:
when you build your SourceDestBuffer, ensure to activate the auto-scaling on cartesian values!
vector
Hi @dogod621 thank you very much for the hint. I'm doing (slowly) a refactoring of code supporting newer PCL and newer C++ standard
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();