Ask Your Question

Revision history [back]

Compiling Opencv 3.0 beta with CUDA 6.5

Hello,

I'm trying to compile opencv 3.0 with cuda support.

Got an error:

/home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp: In member function ‘virtual void ORB_test::run()’:
/home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:17: error: no matching function for call to ‘cv::ORB::ORB(int)’
     ORB orb(4000);
                 ^
/home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:17: note: candidates are:
In file included from /home/ubuntu/opencv-3.0.0-beta/modules/calib3d/include/opencv2/calib3d.hpp:48:0,
                 from /home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:4:
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note: cv::ORB::ORB()
 class CV_EXPORTS_W ORB : public Feature2D
                    ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note:   candidate expects 0 arguments, 1 provided
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note: cv::ORB::ORB(const cv::ORB&)
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note:   no known conversion for argument 1 from ‘int’ to ‘const cv::ORB&’
/home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:342:9: error: cannot declare variable ‘orb’ to be of abstract type ‘cv::ORB’
     ORB orb(4000);
         ^
In file included from /home/ubuntu/opencv-3.0.0-beta/modules/calib3d/include/opencv2/calib3d.hpp:48:0,
                 from /home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:4:
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:163:20: note:   because the following virtual functions are pure within ‘cv::ORB’:
 class CV_EXPORTS_W ORB : public Feature2D
                    ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:171:26: note:  virtual void cv::ORB::setMaxFeatures(int)
     CV_WRAP virtual void setMaxFeatures(int maxFeatures) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:172:25: note:  virtual int cv::ORB::getMaxFeatures() const
     CV_WRAP virtual int getMaxFeatures() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:174:26: note:  virtual void cv::ORB::setScaleFactor(double)
     CV_WRAP virtual void setScaleFactor(double scaleFactor) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:175:28: note:  virtual double cv::ORB::getScaleFactor() const
     CV_WRAP virtual double getScaleFactor() const = 0;
                            ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:177:26: note:  virtual void cv::ORB::setNLevels(int)
     CV_WRAP virtual void setNLevels(int nlevels) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:178:25: note:  virtual int cv::ORB::getNLevels() const
     CV_WRAP virtual int getNLevels() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:180:26: note:  virtual void cv::ORB::setEdgeThreshold(int)
     CV_WRAP virtual void setEdgeThreshold(int edgeThreshold) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:181:25: note:  virtual int cv::ORB::getEdgeThreshold() const
     CV_WRAP virtual int getEdgeThreshold() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:183:26: note:  virtual void cv::ORB::setFirstLevel(int)
     CV_WRAP virtual void setFirstLevel(int firstLevel) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:184:25: note:  virtual int cv::ORB::getFirstLevel() const
     CV_WRAP virtual int getFirstLevel() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:186:26: note:  virtual void cv::ORB::setWTA_K(int)
     CV_WRAP virtual void setWTA_K(int wta_k) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:187:25: note:  virtual int cv::ORB::getWTA_K() const
     CV_WRAP virtual int getWTA_K() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:189:26: note:  virtual void cv::ORB::setScoreType(int)
     CV_WRAP virtual void setScoreType(int scoreType) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:190:25: note:  virtual int cv::ORB::getScoreType() const
     CV_WRAP virtual int getScoreType() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:192:26: note:  virtual void cv::ORB::setPatchSize(int)
     CV_WRAP virtual void setPatchSize(int patchSize) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:193:25: note:  virtual int cv::ORB::getPatchSize() const
     CV_WRAP virtual int getPatchSize() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:195:26: note:  virtual void cv::ORB::setFastThreshold(int)
     CV_WRAP virtual void setFastThreshold(int fastThreshold) = 0;
                          ^
/home/ubuntu/opencv-3.0.0-beta/modules/features2d/include/opencv2/features2d.hpp:196:25: note:  virtual int cv::ORB::getFastThreshold() const
     CV_WRAP virtual int getFastThreshold() const = 0;
                         ^
/home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:346:43: error: no match for call to ‘(cv::ORB) (cv::Mat&, cv::Mat, std::vector<cv::KeyPoint>&, cv::Mat&)’
     orb(src, Mat(), keypoints, descriptors);
                                           ^
/home/ubuntu/opencv-3.0.0-beta/samples/gpu/performance/tests.cpp:349:43: error: no match for call to ‘(cv::ORB) (cv::Mat&, cv::Mat, std::vector<cv::KeyPoint>&, cv::Mat&)’
     orb(src, Mat(), keypoints, descriptors);
                                           ^
make[2]: *** [samples/gpu/CMakeFiles/example_gpu_performance.dir/performance/tests.cpp.o] Error 1
make[1]: *** [samples/gpu/CMakeFiles/example_gpu_performance.dir/all] Error 2

How to fix it?