Hi guys! I am a new learner of cloudcompare, recently I am using the cloudcompare to convert the pts format
point Cloud to a pcd Format point cloud. Then I used notepod++ to open the pcd file and had a Brief check, I found there was always a underline Parameter between scalar_field and X, I repeated many times for the export, but still dont konw why ist happened. Have someone know what is the meaning of the underline, and how can I remove such a parameter in my exported pcd file?
How can I remove the underline dimension when exporting pcd Format file?
How can I remove the underline dimension when exporting pcd Format file?
- Attachments
-
- IMG_20220208_225857.jpg (406.81 KiB) Viewed 802 times
Re: How can I remove the underline dimension when exporting pcd Format file?
That's strange indeed.
I looked at the code and used the debugger to understand what happens: It shows that the various scalar fields and coordinates are almost properly defined in the PCL cloud... but the offsets are huge. While each field is 4 bytes long, the 'offset' between each is almost always a multiple of 16! (apart for x, y and z which come as a group). After digging a little bit, I found that it's because the PCL plugin was aligning all the field on 16 bytes by default... Probably to speed up things when doing computations? But this padding is huge and takes a lot of memory... I'm not a PCL expert so I don't know exactly why it was done like that. But the memory consumption is huge due to that.
Anyway, when the cloud is passed to the PCL library to be saved to a PCD file, the library adds 'fake fields' to maintain these huge offset values... instead of compacting the data! Even the files were much bigger than they should.
I'll test what the consequences of removing this 16bytes alignment are. And if everything works, I'll update the beta release ASAP.
I looked at the code and used the debugger to understand what happens: It shows that the various scalar fields and coordinates are almost properly defined in the PCL cloud... but the offsets are huge. While each field is 4 bytes long, the 'offset' between each is almost always a multiple of 16! (apart for x, y and z which come as a group). After digging a little bit, I found that it's because the PCL plugin was aligning all the field on 16 bytes by default... Probably to speed up things when doing computations? But this padding is huge and takes a lot of memory... I'm not a PCL expert so I don't know exactly why it was done like that. But the memory consumption is huge due to that.
Anyway, when the cloud is passed to the PCL library to be saved to a PCD file, the library adds 'fake fields' to maintain these huge offset values... instead of compacting the data! Even the files were much bigger than they should.
I'll test what the consequences of removing this 16bytes alignment are. And if everything works, I'll update the beta release ASAP.
Daniel, CloudCompare admin
Re: How can I remove the underline dimension when exporting pcd Format file?
P.S.: it seems that internally, this is how PCL defines standard fields (with 16bytes alignments?!). Still, I find it huge and inefficient...
Daniel, CloudCompare admin
Re: How can I remove the underline dimension when exporting pcd Format file?
Ok, I updated the online 2.12.beta version. You can test it.
Daniel, CloudCompare admin