title: Error Making opencv 3.0.0-dev in CentOS
body: <p>While building opencv 3.0.0 dev in centOS. </p>
  
  <p>The cmake command I use is : </p>
  
  <pre><code>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 ..
  </code></pre>
  
  <p>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 : </p>
  
  <blockquote>
    <p>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&amp;, cv::Mat&amp;, 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&amp;, cv::Mat&amp;, const std::vector >&amp;, 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&amp;, cv::Mat&amp;, 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&amp;, cv::Mat&amp;, const std::vector >&amp;, 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&amp;, cv::Mat&amp;, 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&amp;, cv::Mat&amp;, const std::vector >&amp;, 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&amp;, cv::Mat&amp;, 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&amp;, cv::Mat&amp;, const std::vector >&amp;, 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&amp;, cv::Mat&amp;, 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&amp;, cv::Mat&amp;, const std::vector >&amp;, 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&amp;, cv::Mat&amp;, 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&amp;, cv::Mat&amp;, const std::vector >&amp;, int, int) [with ST = unsigned char, IT = int, UIT = unsigned int, D = DistSquared]’</p>
  </blockquote>
  
  <p>When I do a cmake with -D build_opencv_photo=OFF; make -k, there is another error that pops up : </p>
  
  <blockquote>
    <p>[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/<strong>/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 ‘&amp;’ token
    /Softwares/opencv/modules/python/src2/cv2.cpp:449: error: template-id ‘pyopencv_from&lt;>’ for ‘PyObject* pyopencv_from(int)’ does not match any template declaration
    make[2]: *** [modules/python2/CMakeFiles/opencv_python2.dir/</strong>/src2/cv2.cpp.o] Error 1
    make[1]: *** [modules/python2/CMakeFiles/opencv_python2.dir/all] Error 2</p>
  </blockquote>