Skip to content

Compile error on RGBD modul (opencv_contrib)  #12

@albenoit

Description

@albenoit

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>

i guess it should be

#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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions