c++ - Including calib3d gives many compilation errors -


i trying use cv::rodrigues function in order rotation matrix given vector of angles.

i have these includes in program:

#include "opencv2/video/tracking.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/videoio/videoio.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/core.hpp" 

without adding #include "opencv2/calib3d.hpp" compiles fine. when add in order able use cv::rodrigues compilation fails many errors.

i won't add whole error log because long , useless. starts this:

<command-line>:0:9: error: expected identifier before numeric constant <command-line>:0:9: error: expected '}' before numeric constant <command-line>:0:9: error: expected unqualified-id before numeric constant 

and after have many error such :

/usr/local/include/opencv2/features2d.hpp:1106:69: error: expected primary-expression before 'int'                                 const scalar& color=scalar::all(-1), int flags=drawmatchesflags::default );                                                                      ^ /usr/local/include/opencv2/features2d.hpp:1130:32: error: variable or field 'drawmatches' declared void  cv_exports_w void drawmatches( inputarray img1, const std::vector<keypoint>& keypoints1,                                 ^ /usr/local/include/opencv2/features2d.hpp:1130:32: error: 'inputarray' not declared in scope 

for completeness here part of code add:

void test(cv::matx33f& rot_mat){      float x =  50 * (m_pi/180);     float y =  -10 * (m_pi/180);     float z =  0 * (m_pi/180);      cv::matx31f rot_vec(x,y,z);      //converts rotation matrix     cv::rodrigues(rot_vec, rot_mat); } 

note: working on ubuntu 15.10 opencv 3.1.0 , did add -lopencv_calib3d makefile.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -