Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templatizing the problems #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AlbertoJaenal
Copy link

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