STORM-IRIT / OpenGR

OpenGR: A C++ library for 3D Global Registration
https://storm-irit.github.io/OpenGR/
Other
347 stars 73 forks source link

Visualization of the bases selected by super4pcs #24

Open UditSinghParihar opened 5 years ago

UditSinghParihar commented 5 years ago

Hello sir, I am trying to visualize the corresponding bases selected by Super4pcs in input and output PointCloud, for debugging purposes and extending this library for a segmentation network. I have made following changes in the code:-

  1. I think base_ and current_congruent_ are the data members that hold the indices of points consisting of the bases in the input and output PointClouds after final iteration, (from here). So I make them public members in the derived class Match4pcsBase(shown here).
  2. Then I am using these data members in demos/Super4PCS/super4pcs_test.cc (shown here). And printing these 3D points to the terminal (shown here).
  3. Now after taking these points I am visualizing these points in pcl (shown here).
  4. Now during visualization it seems that the bases selected in input and output point cloud are not exactly corresponding bases and laying on different regions of chairs. (bases shown below in red) final_chair
  5. The resulting rotation from super4pcs is coming out to be 22 degree while the ground truth is 30 degree.

My question is: Are the bases really non-corresponding in this scenario or I have made some wrong assumptions of the data members storing final bases coordinates. Please let me know how can I access the final bases and possibly change them at the starting point itself.

Thanks

nmellado commented 5 years ago

Hi, thanks for this very detailed report.

Do you have a repo I can access to look at your changes ?

UditSinghParihar commented 5 years ago

Hi,

  1. Yes I have forked your repo, you can see the changes here .
    1. Sir, I would like to know that how you have done the implementation of your algorithm and where could I get access to the final pair of quadrilaterals selected by you algorithm(and possibly visualize them too) and possibly add some new constraints to the selection of correspondences, like prior information of Rotation-translation?
    2. I would be glad to implement these features myself, since this library is very useful for our purposes where we are dealing with high viewpoint variations.
nmellado commented 5 years ago

Yes I have forked your repo, you can see the changes here .

Thanks, I will try to have a look asap. I'm very busy these days but hopefully I can have a look early next week.

get access to the final pair of quadrilaterals selected by you algorithm(and possibly visualize them too)

It is a very important feature and we are currently working on it, hopefully we should release a software a GUI to check the algorithm output. I will check your code as well, and see if we can merge it to master.

like prior information of Rotation-translation

Extending pairs filtering is easy to do, by implementing a dedicated filter inheriting gr::PairFilterConcept. As you can see here, gr::FunctorSuper4PCS takes a filter template parameter, that is then used in the different algorithm to filter invalid pairs.

Note there are already options in the code to set the maximum angular and translation motion (see declaration at matchBase.h:106, and use at algorithms/PointPairFilter.h:105,114). It is just that they are not wired to the CLI.

I would be glad to implement these features myself, since this library is very useful for our purposes where we are dealing with high viewpoint variations.

A simple thing you can do is to update the file demos/demo-utils.h to load and set the fields max_color_distance and max_angle.