You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on running g++ transformations.cpp 'pkg-config --cflags --libs opencv'
I get transformations.cpp: In function ‘int main(int, char**)’: transformations.cpp:77:80: error: invalid initialization of reference of type ‘const Vec3d& {aka const cv::Vec<double, 3>&}’ from expression of type ‘cv::Point3f {aka cv::Point3_<float>}’ Affine3f cam_pose = viz::makeCameraPose(cam_pos, cam_focal_point, cam_y_dir); ^ In file included from /usr/local/include/opencv2/viz.hpp:52:0, from transformations.cpp:7: /usr/local/include/opencv2/viz/vizcore.hpp:81:29: error: in passing argument 1 of ‘cv::Affine3d cv::viz::makeCameraPose(const Vec3d&, const Vec3d&, const Vec3d&)’ CV_EXPORTS Affine3d makeCameraPose(const Vec3d& position, const Vec3d& focal_point, const Vec3d& y_dir); ^ transformations.cpp:81:132: error: invalid initialization of reference of type ‘const Vec3d& {aka const cv::Vec<double, 3>&}’ from expression of type ‘cv::Point3f {aka cv::Point3_<float>}’ Affine3f transform = viz::makeTransformToGlobal(Vec3f(0.0f,-1.0f,0.0f), Vec3f(-1.0f,0.0f,0.0f), Vec3f(0.0f,0.0f,-1.0f), cam_pos); ^ In file included from /usr/local/include/opencv2/viz.hpp:52:0, from transformations.cpp:7: /usr/local/include/opencv2/viz/vizcore.hpp:70:29: error: in passing argument 4 of ‘cv::Affine3d cv::viz::makeTransformToGlobal(const Vec3d&, const Vec3d&, const Vec3d&, const Vec3d&)’ CV_EXPORTS Affine3d makeTransformToGlobal(const Vec3d& axis_x, const Vec3d& axis_y, const Vec3d& axis_z, const Vec3d& origin = Vec3d::all(0));
Which gets resolved after the change I mentioned. Is there something else I am missing?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the viz tutorial sample code, it should be Vec3f instead of Point3f.