OutputFormat not recognized as parameter
GeoCastello opened this issue · 4 comments
Hi,
First of all, thank you very much for your great job! This are very nice tools :)
I want to export the point clouds with as .txt or .xyz and for that purpose I'm trying to use the parameter 'OutputFormat' as you indicate in the documentation.
Here is the line where I use it:
icp = globalICP('OutputFolder', 'H:\pycpd-master\data\output', 'TempFolder', 'H:\pycpd-master\data\output\temp', 'OutputFormat', 'xyz');
But when I execute the code it returns me this error:
Error using globalICP (line 95)
'OutputFormat' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this
function.
Error in ALStest (line 5)
icp = globalICP('OutputFolder', 'H:\pycpd-master\data\output', 'TempFolder', 'H:\pycpd-master\data\output\temp', 'OutputFormat',
'xyz');
Am I doing something wrong?
Thank you very much in advance!
Hi, happy to see that somebody out there is using this code. :-)
The parameter 'outputFormat'
does not exist. Can you tell me where you found it in the documentation?
If you want to export the point clouds after running the ICP algorithm in a specific format, you can do it with the following code:
icp = globalICP('OutputFolder', 'H:\pycpd-master\data\output', 'TempFolder', 'H:\pycpd-master\data\output\temp');
icp.addPC('LionScan1Approx.xyz');
icp.addPC('LionScan2Approx.xyz');
icp.addPC('LionScan3Approx.xyz');
icp.addPC('LionScan4Approx.xyz');
icp.addPC('LionScan5Approx.xyz');
icp.addPC('LionScan6Approx.xyz');
icp.runICP('UniformSamplingDistance', 2, ...
'PlaneSearchRadius', 2);
icp.exportPC(1, 'LionScan1Fine.xyz'); % export first added point cloud as xyz file
icp.exportPC(2, 'LionScan2Fine.txt'); % export second added point cloud as txt file
icp.exportPC(3, 'LionScan3Fine.xyz'); % ...
icp.exportPC(4, 'LionScan4Fine.xyz');
icp.exportPC(5, 'LionScan5Fine.xyz');
icp.exportPC(6, 'LionScan6Fine.xyz');
´´´
This should work.
Hi,
I read it in the file ICP.m. Here is the segment where it's explained:
--
% EXPORT PARAMETERS
| %
| % a ['OutputFolder', OutputFolder]
| % Path to directory in which output files are stored. If this option is
| % omitted, the path given by the command 'cd' is used as directory.
| %
| % b ['OutputFormat', OutputFormat]
| % Output format of transformed point clouds, e.g. 'ply', 'xyz', 'txt', 'las'.
| %
| % c ['TempFolder', TempFolder]
| % Folder in which temporary files are saved, e.g. imported point clouds. If
| % this option is omitted, the path given by the command 'tempdir' is used as
| % directory.
I tried like in your example, but it saves the files with .mat extension and with different name. In my case, I write left.xyz and right.xyz but it saves left_POSTICP.mat and right_POSTICP.mat
You're right, in ICP.m
the 'OutputFormat'
parameter exists. However, in the code above you didn't use ICP.m
but the globalICP
class, where the parameter does not exist.
ICP.m
is intended to be used from the windows command line or linux shell together with the Matlab Runtime. If you have a Matlab installation, however, it's recommended to use the globalICP
class as it is much more customizable.
Ok! Thank you very much!
And you were right, it works, the problem was that I was looking in the output folder and it saves it in the original folder... hahaha