PoseLib icon indicating copy to clipboard operation
PoseLib copied to clipboard

Draft: Radial distortion homography solvers

Open marcusvaltonen opened this issue 2 years ago • 8 comments

This PR is a draft containing the homography solvers discussed in #60.

It is incomplete because of the following:

  • Naming convention. I gave a proposal in the README, but did not propagate this to the rest of the code. If you are fine with this convention, please let me know.
  • Cheirality check destoyed in generate_homography_problems(). I wanted to have more realistic rotation inputs than the relative pose problem. This should be an easy fix, when time permits.
  • Minor TODOs, e.g. header guards, that I iwll fix before a final PR.

Please let me know your thoughts on this, e.g. the newly introduced HomographyProblemInstance. Some of the wrappers don't look great since you need to send homographies and extra parameters separately. Perhaps one should introduce something like CameraPoseVector but for homographies. This could also be good since some of the homography solvers can decompose the homography (even in the partially calibrated cases) to extract the intrinsic parameters.

marcusvaltonen avatar Feb 12 '23 12:02 marcusvaltonen

@vlarsson What do you think about the naming convention proposed in the README? If you are fine with this convention, please let me know, and I will propagate this to the rest of the code.

Also, some of the wrappers don't look great since you need to send homographies and extra parameters separately. Perhaps one should introduce something like CameraPoseVector but for homographies. This could also be good since some of the homography solvers can decompose the homography (even in the partially calibrated cases) to extract the intrinsic parameters.

marcusvaltonen avatar Feb 12 '23 15:02 marcusvaltonen

Hi @vlarsson et al,

Please use and redistribute any of my codes as you need. I believe the code is licensed to allow this (MIT), but let me know if you see a conflict. Please just add a link for the relevant paper to cite if it is used.

Best, Jimmy

On Sun, Feb 12, 2023 at 3:43 PM Viktor Larsson @.***> wrote:

@.**** commented on this pull request.

In PoseLib/misc/gj.cc https://github.com/vlarsson/PoseLib/pull/61#discussion_r1103815479:

@@ -0,0 +1,138 @@ +// Copyright (c) 2018 James Pritts

We should probably check with @prittjam https://github.com/prittjam that it's okay we include this one.

— Reply to this email directly, view it on GitHub https://github.com/vlarsson/PoseLib/pull/61#pullrequestreview-1294724343, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITKUIFVCXQ7ROEODHYFPDWXDZI5ANCNFSM6AAAAAAUZI2P54 . You are receiving this because you were mentioned.Message ID: @.***>

prittjam avatar Feb 12 '23 23:02 prittjam

Hi @vlarsson et al, Please use and redistribute any of my codes as you need. I believe the code is licensed to allow this (MIT), but let me know if you see a conflict. Please just add a link for the relevant paper to cite if it is used. Best, Jimmy On Sun, Feb 12, 2023 at 3:43 PM Viktor Larsson @.> wrote: @.* commented on this pull request. ------------------------------ In PoseLib/misc/gj.cc <#61 (comment)>: > @@ -0,0 +1,138 @@ +// Copyright (c) 2018 James Pritts We should probably check with @prittjam https://github.com/prittjam that it's okay we include this one. — Reply to this email directly, view it on GitHub <#61 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITKUIFVCXQ7ROEODHYFPDWXDZI5ANCNFSM6AAAAAAUZI2P54 . You are receiving this because you were mentioned.Message ID: @.***>

BSD-3 and MIT should be fully compatible, as long as the full text of the licence is there it so no legal problem. I am not sure about the original paper to be honest, since it was originally retrieved here:

https://github.com/prittjam/repeats/blob/master/matlab_extras/gj/gj.c

I can only see it being used in the CVPR18 paper (except the reimplementation of the "radial distortion homography" paper)

marcusvaltonen avatar Feb 13 '23 06:02 marcusvaltonen

@vlarsson What do you think about the naming convention proposed in the README? If you are fine with this convention, please let me know, and I will propagate this to the rest of the code.

Also, some of the wrappers don't look great since you need to send homographies and extra parameters separately. Perhaps one should introduce something like CameraPoseVector but for homographies. This could also be good since some of the homography solvers can decompose the homography (even in the partially calibrated cases) to extract the intrinsic parameters.

I fixed all comments above, just let me know your thoughts on the above.

marcusvaltonen avatar Feb 13 '23 09:02 marcusvaltonen

Hi @vlarsson et al, Please use and redistribute any of my codes as you need. I believe the code is licensed to allow this (MIT), but let me know if you see a conflict. Please just add a link for the relevant paper to cite if it is used. Best, Jimmy On Sun, Feb 12, 2023 at 3:43 PM Viktor Larsson @.> wrote: _@**._* commented on this pull request. ------------------------------ In PoseLib/misc/gj.cc <#61 (comment)>: > @@ -0,0 +1,138 @@ +// Copyright (c) 2018 James Pritts We should probably check with @prittjam https://github.com/prittjam that it's okay we include this one. — Reply to this email directly, view it on GitHub <#61 (review)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAITKUIFVCXQ7ROEODHYFPDWXDZI5ANCNFSM6AAAAAAUZI2P54 . You are receiving this because you were mentioned.Message ID: _@_.*>

BSD-3 and MIT should be fully compatible, as long as the full text of the licence is there it so no legal problem. I am not sure about the original paper to be honest, since it was originally retrieved here:

https://github.com/prittjam/repeats/blob/master/matlab_extras/gj/gj.c

I can only see it being used in the CVPR18 paper (except the reimplementation of the "radial distortion homography" paper)

Ok, I thought you might be using the solvers. If you're using the underlying Gauss-Jordan implementation, it's not associated with any publication. For my code, the license is in the main GIT and applies to the entire repository. I'll be interested to see what you guys are up to :) Cheers!

prittjam avatar Feb 16 '23 09:02 prittjam

@vlarsson Are these solvers still desirable? I can make an effort to rebase it on the latest master branch and fix the last parts within a reasonable time.

marcusvaltonen avatar Dec 06 '23 09:12 marcusvaltonen

Yes, Sorry about the delay. The reason is that I started working on some refactorization of the camera models (https://github.com/PoseLib/PoseLib/tree/camera_models), which would also include the division model. So the plan was to have this in place and make it consistent here. However, the refactorization has taken longer than I expected, mainly due to lack of time :) But I hope to make some progress over Christmas. So maybe it's better to rebase them once that is ready.

vlarsson avatar Dec 06 '23 10:12 vlarsson

Yes, Sorry about the delay. The reason is that I started working on some refactorization of the camera models (https://github.com/PoseLib/PoseLib/tree/camera_models), which would also include the division model. So the plan was to have this in place and make it consistent here. However, the refactorization has taken longer than I expected, mainly due to lack of time :) But I hope to make some progress over Christmas. So maybe it's better to rebase them once that is ready.

Any progress update?

marcusvaltonen avatar Apr 03 '24 11:04 marcusvaltonen