Page 1 of 1

Rasterize from CLI?

Posted: Tue May 19, 2020 8:17 pm
by yag
Hi. I've been unsuccessful in using the rasterize capability from the CLI. My goal is to create 2D image projections of my pointcloud on each axis.
It seems first that PNG / Image export is not supported in the CLI and only in the GUI?
I'll settle for a TIF if that is the case, though when I run:
"C:\Program Files\CloudCompare\CloudCompare.exe" -SILENT -RASTERIZE -GRID_STEP 0.05 -VERT_DIR 0 -OUTPUT_RASTER_RGB -O model.laz
I get no outputs saved. I do get the following in the console:

[Global Shift] Max abs. coord = 1e+4 / max abs. diag = 1e+6
[ccColorScalesManager] Found 0 custom scale(s) in persistent settings
[Plugin] Searching: C:/Program Files/CloudCompare/plugins
Plugin found: Additional I/O (QADDITIONAL_IO_PLUGIN.dll)
Plugin found: Animation (QANIMATION_PLUGIN.dll)
Plugin found: CEA Virtual Broom (QBROOM_PLUGIN.dll)
Plugin found: CANUPO (QCANUPO_PLUGIN.dll)
Plugin found: Compass (QCOMPASS_PLUGIN.dll)
Plugin found: Core I/O (QCORE_IO_PLUGIN.dll)
Plugin found: Cork (QCORK_PLUGIN.dll)
Plugin found: CSF Filter (QCSF_PLUGIN.dll)
Plugin found: CSV Matrix I/O (QCSV_MATRIX_IO_PLUGIN.dll)
Plugin found: DP file I/O (QDOT_PRODUCT_IO_PLUGIN.dll)
Plugin found: E57 (QE57_IO_PLUGIN.dll)
Plugin found: EDL Shader (QEDL_GL_PLUGIN.dll)
Plugin found: ELlipser (QELLIPSER_PLUGIN.dll)
Plugin found: Facet/fracture detection (QFACETS_PLUGIN.dll)
Plugin found: FBX (QFBX_IO_PLUGIN.dll)
Plugin found: Hough Normals Computation (QHOUGH_NORMALS_PLUGIN.dll)
Plugin found: Hidden Point Removal (QHPR_PLUGIN.dll)
Plugin found: LAS FWF file I/O (QLAS_FWF_IO_PLUGIN.dll)
Plugin found: M3C2 Distance (QM3C2_PLUGIN.dll)
Plugin found: PCD file I/O (QPCL_IO_PLUGIN.dll)
Plugin found: PCL wrapper (QPCL_PLUGIN.dll)
Plugin found: PCV / ShadeVis (QPCV_PLUGIN.dll)
Plugin found: PDAL (QPDAL_IO_PLUGIN.dll)
Plugin found: Photoscan I/O (QPHOTOSCAN_IO_PLUGIN.dll)
Plugin found: PoissonRecon (QPOISSON_RECON_PLUGIN.dll)
Plugin found: RANSAC Shape Detection (QRANSAC_SD_PLUGIN.dll)
Plugin found: RDB2 (I/O Plugin) (QRDB_IO_PLUGIN.dll)
Plugin found: Riegl RDB I/O (QRIEGL_IO_PLUGIN.dll)
Plugin found: Surface of Revolution Analysis (QSRA_PLUGIN.dll)
Plugin found: SSAO Shader (QSSAO_GL_PLUGIN.dll)
[Plugin] Searching: C:/Users/Yariv/AppData/Roaming/CCCorp/CloudCompare/plugins
[Plugin] Searching: C:/ProgramData/CCCorp/CloudCompare/plugins
[Plugin] Searching: C:/Program Files/CloudCompare/data/plugins
[Plugin][Additional I/O] New file extensions registered: ICM OUT PN POLY POV PV SOI SX
[Plugin][Core I/O] New file extensions registered: GEOREF MA OBJ OFF PDMS PTX SBF STL VTK
[Plugin][CSV Matrix I/O] New file extensions registered: CSV
[Plugin][DP file I/O] New file extensions registered: DP
[Plugin][E57] New file extensions registered: E57
[Plugin][FBX] New file extensions registered: FBX
[Plugin][LAS FWF file I/O] New file extensions registered: LAS
[Plugin][PCD file I/O] New file extensions registered: PCD
[Plugin][PDAL] New file extensions registered: LAS
[Plugin][Photoscan I/O] New file extensions registered: PSZ
[Plugin][RDB2 (I/O Plugin)] New file extensions registered: RDB2
[Plugin][Riegl RDB I/O] New file extensions registered: RDS
[RASTERIZE]
[LOADING]
Opening file: 'vhive_group1_densified_point_cloud (1).laz'
[LAS] Point format: 3
[LAS] Spatial reference: PROJCS["WGS 84 / UTM zone 31N",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",3],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","32631"]]
[ccGlobalShiftManager] Entity has very big coordinates: original accuracy may be lost! (you should apply a Global Shift or Scale)
[LAS] Color components are coded on 16 bits
[LAS] All 'PointSourceId' values were the same (0)! We ignored them...
[LAS] All 'UserData' values were the same (0)! We ignored them...
[LAS] All 'ScanAngleRank' values were the same (0)! We ignored them...
[LAS] All 'EdgeOfFlightLine' values were the same (0)! We ignored them...
[LAS] All 'ScanDirectionFlag' values were the same (0)! We ignored them...
[LAS] All 'NumberOfReturns' values were the same (0)! We ignored them...
[LAS] All 'ReturnNumber' values were the same (0)! We ignored them...
[LAS] All 'GpsTime' values were the same (0)! We ignored them...
[LAS] All 'Intensity' values were the same (0)! We ignored them...
[LAS] All 'Classification' values were the same (0)! We ignored them...
[I/O] File 'vhive_group1_densified_point_cloud (1).laz' loaded successfully
Found one cloud with 10899009 points
Processed finished in 13.18 s.

but no information is saved as a result?

Re: Rasterize from CLI?

Posted: Thu May 21, 2020 7:05 am
by daniel
You should load the cloud (-O) before calling rasterize!

I'm even surprised you didn't get an error due to that...

Re: Rasterize from CLI?

Posted: Thu May 21, 2020 4:59 pm
by yag
Thanks Daniel! I did realize that the order of the CLI params matters.
Now I get it to work, but the TIF output seems wrong.
While I get nice smooth TIFs or PNGs in the UI, I get a striped output in the CLI.
Image https://bit.ly/3gcDIar

looks like all of the TIF isn't generated properly? Is it not the same engine as the UI one?

Re: Rasterize from CLI?

Posted: Thu May 21, 2020 7:08 pm
by yag
Got it! needed to add the global_shift option.
All good now :-)