Ask Your Question
0

how to install libopencv-imgcodecs-dev on ubuntu?

asked 2018-04-24 05:46:38 -0600

tengfei han gravatar image

updated 2018-04-26 15:32:17 -0600

when I tried to built my project using Kdevelop, some evident errors was displayed at "build"tools view. /home/htf/slambook/ch7/triangulation.cpp: error: ‘CV_FM_8POINT’ was not declared in this scope /home/htf/slambook/ch7/triangulation.cpp: error: ‘CV_LOAD_IMAGE_COLOR’ was not declared in this scope

the opencv version is 4.0.0, so I was thinking these errors should not have appeared.Then I planned to installed some packages to solve this problem,unfortunately, I do not know where could I find the package named imgcodecs. if you have some good ideas or helpful approaches, please contact me as soon as you can , Thank you very much.

1.

Mat fundamental_matrix; fundamental_matrix = findFundamentalMat ( points1, points2, CV_FM_8POINT ); cout<<"fundamental_matrix is "<<endl&lt;&lt; fundamental_matrix&lt;<endl;<="" p="">

2.

Mat img_1 = imread ( argv[1],CV_LOAD_IMAGE_COLOR ); Mat img_2 = imread ( argv[2],CV_LOAD_IMAGE_COLOR);

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2018-04-24 05:54:53 -0600

berak gravatar image

updated 2018-04-24 07:01:41 -0600

most flag names were changed in opencv3 already, so try with cv::IMREAD_COLOR and cv::FM_8_POINT

(in general: try to avoid using the old C-API flags with CV_ prefix. this seems to be NOT an install problem, but one about outdated code / usage)

also, there is no such thing as libopencv-imgcodecs-dev

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-04-24 05:46:38 -0600

Seen: 1,335 times

Last updated: Apr 24 '18