Compile error on RGBD modul (opencv_contrib) (Bug #3558)


Added by Alexandre Benoit about 11 years ago. Updated about 11 years ago.


Status:Done Start date:2014-02-17
Priority:Blocker Due date:
Assignee:Vincent Rabaud % Done:

0%

Category:build/install
Target version:3.0-alpha
Affected version:branch 'master' (3.0-dev) Operating System:Linux
Difficulty:Medium HW Platform:x64
Pull request:

Description

Hi,
i report compile error on modules/rgbd/samples/odometry_evaluation.cpp
at line 38 and following

Here is a description :

these 3 include lines generate compile error
instead of

#include <opencv2/rgbd/rgbd.hpp>

we should see

#include <opencv2/rgbd.hpp>

same remark for highgui and contrib includes

I have the following compilation error:

[ 80%] Built target opencv_rgbd
Scanning dependencies of target example_rgbd_odometry_evaluation
[ 80%] Building CXX object modules/rgbd/CMakeFiles/example_rgbd_odometry_evaluation.dir/samples/odometry_evaluation.cpp.o
/home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/samples/odometry_evaluation.cpp:36:33: fatal error: opencv2/rgbd/rgbd.hpp: Aucun fichier ou dossier de ce type
#include <opencv2/rgbd/rgbd.hpp>
^
compilation terminated.
make2: * [modules/rgbd/CMakeFiles/example_rgbd_odometry_evaluation.dir/samples/odometry_evaluation.cpp.o] Erreur 1
make1:
[modules/rgbd/CMakeFiles/example_rgbd_odometry_evaluation.dir/all] Erreur 2
make: *
* [all] Erreur 2

After correcting includes, i got this compile error
This must be related to missing opencv_XXX libraries links :

Scanning dependencies of target example_rgbd_odometry_evaluation
[ 80%] Building CXX object modules/rgbd/CMakeFiles/example_rgbd_odometry_evaluation.dir/samples/odometry_evaluation.cpp.o
In file included from /home/noob/install/OpenCV/github/opencv/modules/core/include/opencv2/core.hpp:56:0,
from /home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/include/opencv2/rgbd.hpp:43,
from /home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/samples/odometry_evaluation.cpp:36:
/home/noob/install/OpenCV/github/opencv/modules/core/include/opencv2/core/types.hpp: In function ‘cv::Scalar cv::operator*(const cv::Matx<_Tp, 4, 4>&, const Scalar&) [with Tp = double; cv::Scalar = cv::Scalar<double>]’:
/home/noob/install/OpenCV/github/opencv/modules/core/include/opencv2/core/types.hpp:1874:45: warning: dereferencing type-punned pointer might break strict-aliasing rules [-Wstrict-aliasing]
return reinterpret_cast<const Scalar&>(c);
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/samples/odometry_evaluation.cpp: In function ‘int main(int, char**)’:
/home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/samples/odometry_evaluation.cpp:147:55: error: conversion from ‘cv::OdometryFrame*’ to non-scalar type ‘cv::Ptr<cv::OdometryFrame>’ requested
Ptr<OdometryFrame> frame_prev = new OdometryFrame(),
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/samples/odometry_evaluation.cpp:148:59: error: conversion from ‘cv::OdometryFrame*’ to non-scalar type ‘cv::Ptr<cv::OdometryFrame>’ requested
frame_curr = new OdometryFrame();
^
/home/noob/install/OpenCV/github/opencv_contrib/modules/rgbd/samples/odometry_evaluation.cpp:209:35: error: ‘CV_BGR2GRAY’ was not declared in this scope
cvtColor(image, gray, CV_BGR2GRAY);
^
make2: * [modules/rgbd/CMakeFiles/example_rgbd_odometry_evaluation.dir/samples/odometry_evaluation.cpp.o] Erreur 1
make1:
[modules/rgbd/CMakeFiles/example_rgbd_odometry_evaluation.dir/all] Erreur 2
make: *
* [all] Erreur 2


Associated revisions

Revision 2bddbd2c
Added by Vadim Pisarevsky about 10 years ago

Merge pull request #3558 from ilya-lavrenov:sse_resize

History

Updated by Alexander Karsakov about 11 years ago

  • Status changed from New to Open

Updated by Vincent Rabaud about 11 years ago

I had indeed not compiled the sample. It all works fine now. It has only been tested with clang and gcc on Linux though.

  • Status changed from Open to Done

Also available in: Atom PDF