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

Compile time error fix: cv::Matx / float #312

Closed
wants to merge 1 commit into from

Conversation

pkok
Copy link

@pkok pkok commented May 6, 2021

operator/ isn't implemented for cv::Matx and float. However, operator* is implemented for these argument types.

A quick fix is to replace M / f with M * (1/f).

`operator/` isn't implemented for `cv::Matx` and `float`.
However, `operator*` is implemented for these argument types.

A quick fix is to replace `M / f`  with `M * (1/f)`.
@@ -531,6 +531,6 @@ namespace ORB_SLAM3 {

cv::SVD::compute(A,w,u,vt,cv::SVD::MODIFY_A| cv::SVD::FULL_UV);
cv::Matx41f x3D_h = vt.row(3).t();
x3D = x3D_h.get_minor<3,1>(0,0) / x3D_h(3);
x3D = x3D_h.get_minor<3,1>(0,0) (1/x3D_h(3));
Copy link

Choose a reason for hiding this comment

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

I think you forgot to place the * symbol for the multiplication

@1hada
Copy link

1hada commented Oct 15, 2021

Works for me!

@jdtardos jdtardos closed this Dec 23, 2021
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.

None yet

4 participants