Batch process for registration and differences

Feel free to ask any question here
Post Reply
burcarjo
Posts: 8
Joined: Mon May 13, 2013 8:34 am

Batch process for registration and differences

Post by burcarjo »

Hello Daniel,
My objective is create a batch process to do a registration and difference computation in an unattented mode (without graphic components).
I see two options:
1. Directly access to the CC libraries Project from my Visual Studio 2010 Project.
2. Use commandline to call the registration and difference funtionality as a external process fom my Project.

From Visual Studio 2010 I'm building only CC_DLL component and it generate the CC_DLL.dll library. I also have to build ALL_BUILD, triangle and ZERO_CHECK components or I only need CC_DLL library ? . There are some basic example to call the registration function from a external code ?

I see that commandLineParse funtion is in qCC. Is qCC depending of the graphics libraries ?

Thank you in advance.

Best regards.

David.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Batch process for registration and differences

Post by daniel »

While part of the qCC application (which is indeed dependent on Qt) the command line mode of CloudCompare is not dependent on the GUI and I believe it's the simplest way to do what you are looking for. It spawns a minimal GUI console by default but this console can be hidden (silent mode).

You only have to extend the command line parser (ccCommandLineParser.cpp, 'parse' method): add new keywords and the corresponding code for registration and distance computation. Example code can be found in MainWindow.cpp (doActionRegister) and in ccComparisonDlg.cpp (compute).

Otherwise, you can use CC_DLL in a dedicated application. CC_DLL depends on Qt by default (for the multi-threading framework) but this can be disabled. CC_DLL also depends on the 'Triangle' library which is statically linked so once it is compiled you only have to keep the CC_DLL.lib and CC_DLL.dll files (and headers of course). Your dedicated application will have to take care of data loading itself, and you'll have to use point cloud/meshes structures compatible with CC_DLL (i.e. GenericMesh, GenericCloud, etc.)

Don't hesitate to ask for more precise information,
Daniel, CloudCompare admin
burcarjo
Posts: 8
Joined: Mon May 13, 2013 8:34 am

Re: Batch process for registration and differences

Post by burcarjo »

Ok, I will try add new functionality to commandLineParse.
I have two questions:

1. When I try to depure the solution from VS 2010 I get this message:
"Can not start the application:
c:\cloudbuild\qCC\x64\Debug\ALL_BUILD
The system can not find the file specified

2. Doing:
cloudcompare.exe -O "myfile.stl" , works fine.
cloudcompare.exe -O "myfile.stl" -SS "RANDOM", the console shows that the input file is opened well but when try to progress with the SS parameter it says:
"No point cloud to resample (be sure to open one with -O [cloud filename] before -SS)" .

Thanks.

David.
daniel
Site Admin
Posts: 7717
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Batch process for registration and differences

Post by daniel »

1. In Visual Studio, you must select the 'CloudCompare' project, right click on it, then select "Set as startup project". Moreover, as CC depends on DLLs, the best way to make it launchable from Visual is to:
  • set the "CloudCompare" project default executable to point to the installation folder (you only have to do this once per configuration release/debug): right click on this project + "Properties", then select the "Debugging" entry, then browse to the corresponding executable (CloudCompare.exe or CloudCompare_debug.exe) in the installation folder (it is displayed at the end of the compilation process when you compile the 'INSTALL' project).
  • after that, always build the 'INSTALL' project whenever you made changes to the code (right click on this project + "Build")
2. STL files are meshes. And CC expects a cloud for applying the subsampling method. If you want to apply the subsampling method on the vertices only, you could add a command line option to tell CC to forgot about the triangles and only keep the vertices as a cloud?
Daniel, CloudCompare admin
Post Reply