微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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.jb51.cc/centos/376336.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。