Command Line and Research Sandbox Functions in ICP
Posted: Sat Jan 27, 2018 9:45 am
I'm using ICP to match small pieces of mobile lidar-based scanned point clouds to a model the object that was scanned. The code below works well to create a command line call.
When working out the process, I found that the Research tab in the UI provided options to constrain the ICP (Z-rotation, XY-translation only).
Have these been implemented in the command line interface in some way? My results would be far better if I could constrain the alignment by just Z-rotation, and XY-translation.
Here is a little section of code (Mac OSX Python) that works for general, unconstrained ICP for a large group of files (3800 small files).
for i in range (0,loops):
callStr.extend(['/usr/bin/open', \
'-W', \
'-n', \
'-g', \
'-a', \
'/Applications/CloudCompare.app', \
'--args', \
'-SILENT', \
'-C_EXPORT_FMT', 'PLY', \
'-PLY_EXPORT_FMT', 'ASCII', \
'-NO_TIMESTAMP' \
])
fileStr = ('/<pathname>/<model_name>.txt')
callStr.extend (['-o', fileStr])
fileNum = (i * groups) + 1
print fileNum
fileStr = ('/<pathname>/pointcloud_%d_MERGED.ply' % fileNum)
callStr.extend (['-o', fileStr])
callStr.extend (['-ICP', \
'-REFERENCE_IS_FIRST', \
'-OVERLAP', '20' \
])
callStr.extend (['-POP_CLOUDS'])
call(callStr)
callStr = []
When working out the process, I found that the Research tab in the UI provided options to constrain the ICP (Z-rotation, XY-translation only).
Have these been implemented in the command line interface in some way? My results would be far better if I could constrain the alignment by just Z-rotation, and XY-translation.
Here is a little section of code (Mac OSX Python) that works for general, unconstrained ICP for a large group of files (3800 small files).
for i in range (0,loops):
callStr.extend(['/usr/bin/open', \
'-W', \
'-n', \
'-g', \
'-a', \
'/Applications/CloudCompare.app', \
'--args', \
'-SILENT', \
'-C_EXPORT_FMT', 'PLY', \
'-PLY_EXPORT_FMT', 'ASCII', \
'-NO_TIMESTAMP' \
])
fileStr = ('/<pathname>/<model_name>.txt')
callStr.extend (['-o', fileStr])
fileNum = (i * groups) + 1
print fileNum
fileStr = ('/<pathname>/pointcloud_%d_MERGED.ply' % fileNum)
callStr.extend (['-o', fileStr])
callStr.extend (['-ICP', \
'-REFERENCE_IS_FIRST', \
'-OVERLAP', '20' \
])
callStr.extend (['-POP_CLOUDS'])
call(callStr)
callStr = []