Here is what i want to do
- I want to apply color scale tointensity scalar field and xml style file
- Then i want to convert that scalar field to RGB
- Then I want to export it (preferable was laz but since its not possible so i opted for LAS
Code: Select all
cc_cmd = r'C:\Program Files\CloudCompare\CloudCompare'
file_name = r'somepath\somefile.laz'
xml_styler = r'somepath\somefile.xml'
subprocess.run([cc_cmd, '-SILENT', '-O', filename,'-AUTO_SAVE', 'OFF','-SET_ACTIVE_SF','1', '-SF_COLOR_SCALE', xml_styler,'-SF_CONVERT_TO_RGB', 'FALSE', '-C_EXPORT_FMT', 'LAS', '-SAVE_CLOUDS'])
1- It reduces the number of points
2- There is a crazy offset between input and output pointclouds
What i have tried so far:
I tried refactoring each part to see where it went wrong. I thought maybe i was giving intensity index wrong so i excluded those parts as well, or setting rgb etc wrong, so i excluded those as well
Finally it boiled down to even simple export giving offset and reduced point clouds
Code: Select all
"C:\Program Files\CloudCompare\CloudCompare" -O "C:\Users\3d-digi\Desktop\cc_cmd\complete test\test1\Buildings.laz" -C_EXPORT_FMT LAS -SAVE_CLOUDS
All ScanAngleRank values were same(0)!We ignored them...
All EdgeOfFlightLine values were same(0)!We ignored them...
All ScanDirectionFlag values were same(0)!We ignored them...
All NumberOfReturnsvalues were same(0)!We ignored them...
All ReturnNumber values were same(1)!We ignored them...
The former LAS_OFFSET doesnt seem to be optimal, using minimum bbox instead
Though when i tried the whole procedure on one file manually it worked fine.
Since I have very little knowledge of working with point clouds or 3d data, i am lost, any help would be highly appreciated.
Thanks