[Bug 789075] opencv: new cameracalibrate and cameraundistort elements

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Aug 2 13:11:12 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=789075

--- Comment #12 from Vivia Nikolaidou <vivia at ahiru.eu> ---
$ make -j4
make: *** No rule to make target
'../../gst-libs/gst/opencv/libgstopencv-1.0.la', needed by 'libgstopencv.la'. 
Stop.
make: *** Waiting for unfinished jobs....
  CXX      libgstopencv_la-gstcameracalibrate.lo
  CXX      libgstopencv_la-gstcameraundistort.lo
gstcameraundistort.cpp:83:31: fatal error: opencv2/calib3d.hpp: No such file or
directory
 #include <opencv2/calib3d.hpp>
                               ^
compilation terminated.
Makefile:1162: recipe for target 'libgstopencv_la-gstcameraundistort.lo' failed
make: *** [libgstopencv_la-gstcameraundistort.lo] Error 1
gstcameracalibrate.cpp:90:31: fatal error: opencv2/calib3d.hpp: No such file or
directory
 #include <opencv2/calib3d.hpp>
                               ^
compilation terminated.
Makefile:1155: recipe for target 'libgstopencv_la-gstcameracalibrate.lo' failed
make: *** [libgstopencv_la-gstcameracalibrate.lo] Error 1

[...]

$ git diff
diff --git a/ext/opencv/gstcameracalibrate.cpp
b/ext/opencv/gstcameracalibrate.cpp
index ba59a194b..6f076fcc3 100644
--- a/ext/opencv/gstcameracalibrate.cpp
+++ b/ext/opencv/gstcameracalibrate.cpp
@@ -87,7 +87,7 @@
 #if (CV_MAJOR_VERSION >= 3)
 #include <opencv2/imgproc.hpp>
 #endif
-#include <opencv2/calib3d.hpp>
+#include <opencv2/calib3d/calib3d.hpp>

 #include <gst/opencv/gstopencvutils.h>

diff --git a/ext/opencv/gstcameraundistort.cpp
b/ext/opencv/gstcameraundistort.cpp
index a50300851..dc731ec91 100644
--- a/ext/opencv/gstcameraundistort.cpp
+++ b/ext/opencv/gstcameraundistort.cpp
@@ -80,7 +80,7 @@
 #if (CV_MAJOR_VERSION >= 3)
 #include <opencv2/imgproc.hpp>
 #endif
-#include <opencv2/calib3d.hpp>
+#include <opencv2/calib3d/calib3d.hpp>

 #include <gst/opencv/gstopencvutils.h>

justin at walter:~/gst/master/gst-plugins-bad/ext/opencv$ make
  CXX      libgstopencv_la-gstcameracalibrate.lo
gstcameracalibrate.cpp: In function ‘void
gst_camera_calibrate_init(GstCameraCalibrate*)’:
gstcameracalibrate.cpp:310:23: error: ‘cv::fisheye’ has not been declared
    calib->flags = cv::fisheye::CALIB_FIX_SKEW |
cv::fisheye::CALIB_RECOMPUTE_EXTRINSIC |
                       ^~~~~~~
gstcameracalibrate.cpp:310:53: error: ‘cv::fisheye’ has not been declared
    calib->flags = cv::fisheye::CALIB_FIX_SKEW |
cv::fisheye::CALIB_RECOMPUTE_EXTRINSIC |
                                                     ^~~~~~~
gstcameracalibrate.cpp:312:12: error: ‘cv::fisheye’ has not been declared
        cv::fisheye::CALIB_FIX_K2 | cv::fisheye::CALIB_FIX_K3 |
cv::fisheye::CALIB_FIX_K4;
            ^~~~~~~
gstcameracalibrate.cpp:312:40: error: ‘cv::fisheye’ has not been declared
        cv::fisheye::CALIB_FIX_K2 | cv::fisheye::CALIB_FIX_K3 |
cv::fisheye::CALIB_FIX_K4;
                                        ^~~~~~~
gstcameracalibrate.cpp:312:68: error: ‘cv::fisheye’ has not been declared
        cv::fisheye::CALIB_FIX_K2 | cv::fisheye::CALIB_FIX_K3 |
cv::fisheye::CALIB_FIX_K4;
                                                                    ^~~~~~~
gstcameracalibrate.cpp:319:25: error: ambiguous overload for ‘operator=’
(operand types are ‘cv::Mat’ and ‘int’)
   calib->cameraMatrix = 0;
                         ^
In file included from /usr/include/opencv2/core/core.hpp:4856:0,
                 from gstcameracalibrate.h:51,
                 from gstcameracalibrate.cpp:85:
/usr/include/opencv2/core/mat.hpp:281:13: note: candidate: cv::Mat&
cv::Mat::operator=(const cv::Mat&)
 inline Mat& Mat::operator = (const Mat& m)
             ^~~
In file included from gstcameracalibrate.h:51:0,
                 from gstcameracalibrate.cpp:85:
/usr/include/opencv2/core/core.hpp:1775:10: note: candidate: cv::Mat&
cv::Mat::operator=(const Scalar&)
     Mat& operator = (const Scalar& s);
          ^~~~~~~~
gstcameracalibrate.cpp:320:23: error: ambiguous overload for ‘operator=’
(operand types are ‘cv::Mat’ and ‘int’)
   calib->distCoeffs = 0;
                       ^
In file included from /usr/include/opencv2/core/core.hpp:4856:0,
                 from gstcameracalibrate.h:51,
                 from gstcameracalibrate.cpp:85:
/usr/include/opencv2/core/mat.hpp:281:13: note: candidate: cv::Mat&
cv::Mat::operator=(const cv::Mat&)
 inline Mat& Mat::operator = (const Mat& m)
             ^~~
In file included from gstcameracalibrate.h:51:0,
                 from gstcameracalibrate.cpp:85:
/usr/include/opencv2/core/core.hpp:1775:10: note: candidate: cv::Mat&
cv::Mat::operator=(const Scalar&)
     Mat& operator = (const Scalar& s);
          ^~~~~~~~
gstcameracalibrate.cpp: In function ‘double
camera_calibrate_calc_reprojection_errors(const
std::vector<std::vector<cv::Point3_<float> > >&, const
std::vector<std::vector<cv::Point_<float> > >&, const std::vector<cv::Mat>&,
const std::vector<cv::Mat>&, const cv::Mat&, const cv::Mat&,
std::vector<float>&, bool)’:
gstcameracalibrate.cpp:606:11: error: ‘cv::fisheye’ has not been declared
       cv::fisheye::projectPoints(objectPoints[i], imagePoints2,
           ^~~~~~~
gstcameracalibrate.cpp: In function ‘bool
camera_calibrate_calibrate_full(GstCameraCalibrate*, cv::Size&, cv::Mat&,
cv::Mat&, std::vector<std::vector<cv::Point_<float> > >, std::vector<cv::Mat>&,
std::vector<cv::Mat>&, std::vector<float>&, double&)’:
gstcameracalibrate.cpp:674:15: error: ‘cv::fisheye’ has not been declared
     rms = cv::fisheye::calibrate(objectPoints, imagePoints, imageSize,
               ^~~~~~~
Makefile:1155: recipe for target 'libgstopencv_la-gstcameracalibrate.lo' failed
make: *** [libgstopencv_la-gstcameracalibrate.lo] Error 1

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list