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

Use ceres::Manifolds instead of ceres::LocalParameterization. #3243

Merged
merged 4 commits into from May 30, 2022

Conversation

vrabaud
Copy link
Contributor

@vrabaud vrabaud commented Apr 29, 2022

Use ceres::Manifolds instead of ceres::LocalParameterization.
The latter is deprecated.

This fixes #3218

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch

@asmorkalov asmorkalov assigned victor1234 and unassigned victor1234 May 4, 2022
@asmorkalov asmorkalov requested a review from victor1234 May 4, 2022 07:15
@asenyaev asenyaev requested review from asenyaev and victor1234 and removed request for victor1234 and asenyaev May 18, 2022 10:28
@@ -494,8 +499,13 @@ void EuclideanBundleCommonIntrinsics(
constant_translation.push_back(4);
constant_translation.push_back(5);

#if CERES_VERSION_MAJOR >= 2 && CERES_VERSION_MINOR >= 1
constant_translation_parameterization =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean constant_translation_manifold?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, thx. Fixed

@@ -485,7 +486,11 @@ void EuclideanBundleCommonIntrinsics(
PackCamerasRotationAndTranslation(tracks, *reconstruction);

// Parameterization used to restrict camera motion for modal solvers.
#if CERES_VERSION_MAJOR >= 2 && CERES_VERSION_MINOR >= 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not accurate as 3.0 version returns false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, fixed.

@asmorkalov asmorkalov requested a review from alalek May 25, 2022 13:22
@@ -538,8 +548,13 @@ void EuclideanBundleCommonIntrinsics(
}

if (bundle_constraints & BUNDLE_NO_TRANSLATION) {
#if CERES_VERSION_MAJOR >= 2 && CERES_VERSION_MINOR >= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same issue with 3.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, sorry about that.

@@ -586,10 +601,17 @@ void EuclideanBundleCommonIntrinsics(
// Always set K3 constant, it's not used at the moment.
constant_intrinsics.push_back(OFFSET_K3);

#if CERES_VERSION_MAJOR >= 2 && CERES_VERSION_MINOR >= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@asmorkalov asmorkalov self-requested a review May 30, 2022 15:16
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alalek alalek merged commit 63cab1b into opencv:3.4 May 30, 2022
@vrabaud vrabaud deleted the 3.4_ceres branch May 31, 2022 10:53
@Chuvi-w
Copy link

Chuvi-w commented Jun 16, 2022

problem.SetParameterization(current_camera_R_t,

error: cannot initialize a parameter of type 'ceres::LocalParameterization *' with an lvalue of type 'ceres::SubsetManifold *'

@alalek
Copy link
Member

alalek commented Jun 16, 2022

@Chuvi-w Fixup is here: #3274

hakaboom pushed a commit to hakaboom/opencv_contrib that referenced this pull request Jul 1, 2022
* Use ceres::Manifolds instead of ceres::LocalParameterization.

The latter is deprecated.

* Fix typo.

* Fix version check.

* And more version fixes.
@alalek alalek mentioned this pull request Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ceres::LocalParameterization is deprecated, libmv should move to using ceres::Manifold
5 participants