0

While building opencv 3.0.0 dev in centOS.

The cmake command I use is :

cmake -D CMAKE_BUILD_TYPE=Debug -D WITH_TBB=OFF -D WITH_EIGEN=OFF -D BUILD_DOCS=OFF -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=OFF -D BUILD_opencv_gpucodec=OFF -D BUILD_opencv_gpufeatures2d=OFF -D BUILD_opencv_gpufilters=OFF -D BUILD_opencv_gpuimgproc=OFF -D BUILD_opencv_gpulegacy=OFF -D BUILD_opencv_gpuoptflow=OFF -D BUILD_opencv_gpustereo=OFF -D BUILD_opencv_gpuwarping=OFF -D BUILD_JASPER=OFF -D BUILD_ZLIB=OFF -D BUILD_opencv_photo=OFF -D BUILD_opencv_calib3d=OFF -D BUILD_opencv_ccalib=OFF -D OPENCV_EXTRA_MODULES_PATH=/Softwares/opencv_contrib/modules -D BUILD_SHARED_LIBS=OFF ..

I get 2 different errors building photo module in opencv. These seem to be core libraries so I can't even disable them The errors are :

In file included from /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:48, from /Softwares/opencv/modules/photo/src/denoising.cpp:44: /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp:63: error: ‘sampleType’ does not name a type /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp:63: note: (perhaps ‘typename pixelInfo_::sampleType’ was intended) /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp:68: error: ‘sampleType’ does not name a type /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker_commons.hpp:68: note: (perhaps ‘typename pixelInfo_::sampleType’ was intended) In file included from /Softwares/opencv/modules/photo/src/denoising.cpp:44: /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp: In constructor ‘FastNlMeansDenoisingInvoker::FastNlMeansDenoisingInvoker(const cv::Mat&, cv::Mat&, int, int, const float*) [with T = unsigned char, IT = int, UIT = unsigned int, D = DistSquared, WT = int]’: /Softwares/opencv/modules/photo/src/denoising.cpp:56: instantiated from ‘void fastNlMeansDenoising_(const cv::Mat&, cv::Mat&, const std::vector >&, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’ /Softwares/opencv/modules/photo/src/denoising.cpp:130: instantiated from here /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:121: error: ‘sampleMax’ is not a member of ‘pixelInfo’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:122: error: ‘sampleMax’ is not a member of ‘pixelInfo’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp: In constructor ‘FastNlMeansDenoisingInvoker::FastNlMeansDenoisingInvoker(const cv::Mat&, cv::Mat&, int, int, const float*) [with T = cv::Vec, IT = int, UIT = unsigned int, D = DistSquared, WT = int]’: /Softwares/opencv/modules/photo/src/denoising.cpp:62: instantiated from ‘void fastNlMeansDenoising_(const cv::Mat&, cv::Mat&, const std::vector >&, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’ /Softwares/opencv/modules/photo/src/denoising.cpp:130: instantiated from here /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:121: error: ‘sampleMax’ is not a member of ‘pixelInfo >’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:122: error: ‘sampleMax’ is not a member of ‘pixelInfo’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp: In constructor ‘FastNlMeansDenoisingInvoker::FastNlMeansDenoisingInvoker(const cv::Mat&, cv::Mat&, int, int, const float*) [with T = cv::Vec, IT = int, UIT = unsigned int, D = DistSquared, WT = cv::Vec]’: /Softwares/opencv/modules/photo/src/denoising.cpp:66: instantiated from ‘void fastNlMeansDenoising_(const cv::Mat&, cv::Mat&, const std::vector >&, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’ /Softwares/opencv/modules/photo/src/denoising.cpp:130: instantiated from here /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:121: error: ‘sampleMax’ is not a member of ‘pixelInfo >’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:122: error: ‘sampleMax’ is not a member of ‘pixelInfo >’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp: In constructor ‘FastNlMeansDenoisingInvoker::FastNlMeansDenoisingInvoker(const cv::Mat&, cv::Mat&, int, int, const float*) [with T = cv::Vec, IT = int, UIT = unsigned int, D = DistSquared, WT = int]’: /Softwares/opencv/modules/photo/src/denoising.cpp:72: instantiated from ‘void fastNlMeansDenoising_(const cv::Mat&, cv::Mat&, const std::vector >&, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’ /Softwares/opencv/modules/photo/src/denoising.cpp:130: instantiated from here /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:121: error: ‘sampleMax’ is not a member of ‘pixelInfo >’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:122: error: ‘sampleMax’ is not a member of ‘pixelInfo’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp: In constructor ‘FastNlMeansDenoisingInvoker::FastNlMeansDenoisingInvoker(const cv::Mat&, cv::Mat&, int, int, const float*) [with T = cv::Vec, IT = int, UIT = unsigned int, D = DistSquared, WT = cv::Vec]’: /Softwares/opencv/modules/photo/src/denoising.cpp:76: instantiated from ‘void fastNlMeansDenoising_(const cv::Mat&, cv::Mat&, const std::vector >&, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’ /Softwares/opencv/modules/photo/src/denoising.cpp:130: instantiated from here /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:121: error: ‘sampleMax’ is not a member of ‘pixelInfo >’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp:122: error: ‘sampleMax’ is not a member of ‘pixelInfo >’ /Softwares/opencv/modules/photo/src/fast_nlmeans_denoising_invoker.hpp: In constructor ‘FastNlMeansDenoisingInvoker::FastNlMeansDenoisingInvoker(const cv::Mat&, cv::Mat&, int, int, const float*) [with T = cv::Vec, IT = int, UIT = unsigned int, D = DistSquared, WT = int]’: /Softwares/opencv/modules/photo/src/denoising.cpp:82: instantiated from ‘void fastNlMeansDenoising_(const cv::Mat&, cv::Mat&, const std::vector >&, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’

When I do a cmake with -D build_opencv_photo=OFF; make -k, there is another error that pops up :

[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir//src2/cv2.cpp.o /Softwares/opencv/modules/python/src2/cv2.cpp:117: error: ‘Stitcher’ has not been declared /Softwares/opencv/modules/python/src2/cv2.cpp:117: error: expected initializer before ‘Status’ /Softwares/opencv/modules/python/src2/cv2.cpp:449: error: ISO C++ forbids declaration of ‘Status’ with no type [-fpermissive] /Softwares/opencv/modules/python/src2/cv2.cpp:449: error: expected ‘,’ or ‘...’ before ‘&’ token /Softwares/opencv/modules/python/src2/cv2.cpp:449: error: template-id ‘pyopencv_from<>’ for ‘PyObject* pyopencv_from(int)’ does not match any template declaration make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir//src2/cv2.cpp.o] Error 1 make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2

navderm
  • 799
  • 2
  • 11
  • 33
  • I suggest using `cmake-gui` so that you can see all options set. Though this answer is written for mac os x, it shouldn't be much different on cent os as it is `cmake` - https://stackoverflow.com/questions/19671827/opencv-installation-on-mac-os-x/29215934#29215934 – kiranpradeep Mar 24 '15 at 21:03
  • Unfortunately its a server. I can't use cmake-gui – navderm Mar 24 '15 at 21:09

0 Answers0