how to use ICPRegistration in my own project

Any question about the database & algorithms library 'CCLib'
Post Reply
石江南
Posts: 2
Joined: Thu Apr 20, 2023 11:38 am

how to use ICPRegistration in my own project

Post by 石江南 »

I am learning the point cloud registration algorithm these days. I found that the fine registration(icp) in cc is much better than that in PCL. So I downloaded the source code and try to use the icp algorithm. The functions related to registration include MainWindow::doActionRegister in mainwindow.cpp,CCCoreLib::ICPRegistrationTools::Register in ccRegistrationTools.cpp, and ICPRegistrationTools::Register in RegistrationTools.cpp. So I imitated the process of ccRegistrationTools::ICP, and created two PointClassTpl classes, and use function "addPoint" to get Modeldata and Clouddata. Then defined the GenericIndexedCloudPersist pointer equal to modeldata and clouddata. Removed and modified all parts that do not belong to cccorelib.The program runs normally, but the registration results obtained are poor.
Did I miss any step in registration process or set any Incorrect parameters ?
Thanks in advance for your support.
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: how to use ICPRegistration in my own project

Post by daniel »

Ah, it's hard to tell like that. Care to share some code? (maybe somewhere on github?)
Daniel, CloudCompare admin
石江南
Posts: 2
Joined: Thu Apr 20, 2023 11:38 am

Re: how to use ICPRegistration in my own project

Post by 石江南 »

The program is very simple so I just created the main.cpp. The only libraries included are CCCorelib and PCL.
(I'm not very sure about uploading programs on Github,maybe I can try it later )
Attachments
CCCorelib_PCL.rar
(2.28 KiB) Downloaded 1255 times
daniel
Site Admin
Posts: 7711
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: how to use ICPRegistration in my own project

Post by daniel »

Hi again,

I finally had the time to look at your code.

Are you using the 'partial overlap' feature? (just asking, because if you don't, you can make it simpler and it will be one less source of error).

Also, using a fixed number of iterations is generally a bad idea: did you also use a fixed number of iterations in CloudCompare?
Daniel, CloudCompare admin
Post Reply