Skip to content

Templatizing the problems#47

Open
AlbertoJaenal wants to merge 3 commits intodanini:masterfrom
AlbertoJaenal:master
Open

Templatizing the problems#47
AlbertoJaenal wants to merge 3 commits intodanini:masterfrom
AlbertoJaenal:master

Conversation

@AlbertoJaenal
Copy link
Copy Markdown

Hello!

First, thanks for this amazing repo! I have been working a while with it and I am quite happy with everything.
However, one of the main problems that I found when implementing new minimal/non-minimal solvers is that you need to add a dedicated int findProblem() in the src/gcransac_python.cpp, and if you want to test 6 or 7 variants... Well, you easily end up with a script with 5-10k lines, and working there is a little bit clumsy.

So, I propose to templatize the problems into a smaller bunch (see include/problem_instances/*.hpp), so that the problems can be directly instantiated in the bindings.cpp, what makes sense, at least for me.

I just merged all the problems in the most straightforward way, and had to include some booleans in the functions for just some extra processing, but I think this can be improved in a lot of ways. This is just a first step.

For example, adding the P1ACQuerySolver, as in the commit 15e8b1b would only consist in:

  1. Adding the solver in the include/estimators/solver_acp1p_query.h
  2. Adding the typedef declaration in the include/types.h
    Screenshot_2024-08-25_18-07-46
  3. Instantiating the problem in the bindings.cpp
    Screenshot_2024-08-25_18-04-46

Hope you find it useful!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant