CentOS6.5安装Opencv3.1的‘SIZE_MAX’ was not declared in this scope异常处理

前端之家收集整理的这篇文章主要介绍了CentOS6.5安装Opencv3.1的‘SIZE_MAX’ was not declared in this scope异常处理前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

CentOS6.5安装Opencv3.1的‘SIZE_MAX’ was not declared in this scope异常处理

项目中用到人脸识别,使用opencv的库文件,所以在安装过程中需要安装opencv。
刚开始是在CentOS5.4上安装的,结果发现opencv还没装,依赖库cmake就安装失败了。

‘SIZE_MAX’ was not declared in this scope
[ 52%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/denoising.cuda.cpp.o
In file included from /usr/include/jasper/jasper.h:77,from /usr/local/opencv-3.1.0/modules/imgcodecs/src/grfmt_jpeg2000.cpp:59:
/usr/include/jasper/jas_math.h: In function ‘bool jas_safe_size_mul(size_t,size_t,size_t*)’:
/usr/include/jasper/jas_math.h:143: error: ‘SIZE_MAX’ was not declared in this scope
/usr/include/jasper/jas_math.h: In function ‘bool jas_safe_size_add(size_t,size_t*)’:
/usr/include/jasper/jas_math.h:170: error: ‘SIZE_MAX’ was not declared in this scope
make[2]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/src/grfmt_jpeg2000.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 53%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/tonemap.cpp.o
[ 53%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/seamless_cloning.cpp.o
[ 53%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/hdr_common.cpp.o
[ 53%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/src/denoising.cpp.o
[ 53%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/src/optflowgf.cpp.o
[ 53%] Building CXX object modules/video/CMakeFiles/opencv_video.dir/opencl_kernels_video.cpp.o
make[1]: *** [modules/imgcodecs/CMakeFiles/opencv_imgcodecs.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 53%] Building CXX object modules/photo/CMakeFiles/opencv_photo.dir/opencl_kernels_photo.cpp.o
In file included from /usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:45:
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp: In member function ‘void FastNlMeansMultiDenoisingInvoker<T,IT,UIT,D,WT>::operator()(const cv::Range&) const [with T = cv::Vec<short unsigned int,4>,IT = long int,UIT = long unsigned int,D = DistAbs,WT = cv::Vec<int,4>]’:
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:247: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:249: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp: In member function ‘void FastNlMeansMultiDenoisingInvoker<T,WT = int]’:
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:247: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:249: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp: In member function ‘void FastNlMeansMultiDenoisingInvoker<T,3>,3>]’:
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:247: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:249: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp: In member function ‘void FastNlMeansMultiDenoisingInvoker<T,2>,2>]’:
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:247: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:249: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp: In member function ‘void FastNlMeansMultiDenoisingInvoker<T,WT>::operator()(const cv::Range&) const [with T = unsigned char,WT>::operator()(const cv::Range&) const [with T = cv::Vec<unsigned char,IT = int,UIT = unsigned int,D = DistSquared,WT = int]’:
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:247: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/local/opencv-3.1.0/modules/photo/src/denoising.cpp:433:   instantiated from here
/usr/local/opencv-3.1.0/modules/photo/src/fast_nlmeans_multi_denoising_invoker.hpp:249: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Linking CXX static library ../../lib/libopencv_video.a
[ 53%] Built target opencv_video
Linking CXX static library ../../lib/libopencv_photo.a
[ 53%] Built target opencv_photo
make: *** [all] Error 2
[root@bj-s-14-v10 build]#
原文链接:https://www.f2er.com/centos/376336.html

猜你在找的CentOS相关文章