The latest alpha has the same problem.
here are a couple of scans:
https://files.fm/u/qg5ke7f7p
should apply a scale of 0.9996
is it possible to automate this operation via CLI?
I saw only APPLY_TRANS, but even after extraction of each scan center point, I couldn't manage it to work.
Code: Select all
@echo off
setlocal enableDelayedExpansion
set input_dir=Z:\new_transformed\
REM Scaling factor
set scale=0.9996
REM Read pose center coordinates from text file
set pose_file=pose_centers.txt
for /f "usebackq tokens=2,3,4 delims=," %%a in ("%pose_file%") do (
REM Calculate the translation vector to shift the point cloud to the coordinate center
set tx=%%a
set ty=%%b
set tz=%%c
set /a tx=-1*!tx!
set /a ty=-1*!ty!
set /a tz=-1*!tz!
REM Generate the transformation matrix for each file
set trans_file=trans_matrix.txt
echo !scale! 0.0000 0.0000 0.0000 > !trans_file!
echo 0.0000 !scale! 0.0000 0.0000 >> !trans_file!
echo 0.0000 0.0000 !scale! 0.0000 >> !trans_file!
echo !tx! !ty! !tz! 1.0000 >> !trans_file!
REM Apply the transformation to each file
for %%i in ("%input_dir%\*.e57") do (
REM Extract the filename and extension
set input_file=%%i
for %%j in ("!input_file!") do set input_name=%%~nj
for %%j in ("!input_file!") do set input_ext=%%~xj
REM Generate the output filename
set output_file=\!input_name!!input_ext!
REM Apply the transformation and save the output cloud
cloudcompare.exe -SILENT -NO_TIMESTAMP -C_EXPORT_FMT E57 -O "%%i" -APPLY_TRANS trans_matrix.txt -SAVE_CLOUDS FILE "%output_file%"
)
REM Remove the transformation matrix file
del %trans_file%
REM Exit the loop
exit
)
endlocal
pause