diff --git a/modules/calib3d/src/five-point.cpp b/modules/calib3d/src/five-point.cpp index 3816e91263..5af82bde77 100644 --- a/modules/calib3d/src/five-point.cpp +++ b/modules/calib3d/src/five-point.cpp @@ -30,7 +30,6 @@ */ #include "precomp.hpp" -#include namespace cv { @@ -101,7 +100,7 @@ public: c[1] = (b[29]*b[7]*b[24]-b[29]*b[20]*b[11]+b[2]*b[20]*b[38]-b[2]*b[25]*b[33]-b[28]*b[20]*b[12]+b[28]*b[7]*b[25]-b[29]*b[19]*b[12]-b[3]*b[24]*b[33]+b[15]*b[33]*b[12]+b[3]*b[19]*b[38]-b[16]*b[6]*b[38]+b[3]*b[20]*b[37]+b[16]*b[32]*b[12]+b[29]*b[6]*b[25]-b[16]*b[7]*b[37]-b[3]*b[25]*b[32]-b[15]*b[7]*b[38]+b[16]*b[33]*b[11]); c[0] = -b[29]*b[20]*b[12]+b[29]*b[7]*b[25]+b[16]*b[33]*b[12]-b[16]*b[7]*b[38]+b[3]*b[20]*b[38]-b[3]*b[25]*b[33]; - std::vector > roots; + std::vector > roots; solvePoly(coeffs, roots); std::vector xs, ys, zs; @@ -111,8 +110,8 @@ public: double* e = ematrix.ptr(); for (size_t i = 0; i < roots.size(); i++) { - if (fabs(roots[i].imag()) > 1e-10) continue; - double z1 = roots[i].real(); + if (fabs(roots[i].im) > 1e-10) continue; + double z1 = roots[i].re; double z2 = z1 * z1; double z3 = z2 * z1; double z4 = z3 * z1; diff --git a/modules/core/include/opencv2/core/cvstd.inl.hpp b/modules/core/include/opencv2/core/cvstd.inl.hpp index ab278bb6e7..3f29a1b675 100644 --- a/modules/core/include/opencv2/core/cvstd.inl.hpp +++ b/modules/core/include/opencv2/core/cvstd.inl.hpp @@ -45,6 +45,7 @@ #define __OPENCV_CORE_CVSTDINL_HPP__ #ifndef OPENCV_NOSTL +# include # include #endif diff --git a/modules/core/include/opencv2/core/types.hpp b/modules/core/include/opencv2/core/types.hpp index 8add1dc2f1..e5708d2795 100644 --- a/modules/core/include/opencv2/core/types.hpp +++ b/modules/core/include/opencv2/core/types.hpp @@ -52,10 +52,6 @@ #include #include -#ifndef OPENCV_NOSTL -# include -#endif - #include "opencv2/core/cvdef.h" #include "opencv2/core/cvstd.hpp" #include "opencv2/core/matx.hpp" diff --git a/modules/ocl/src/fft.cpp b/modules/ocl/src/fft.cpp index 5edd07bb3f..d84d01a5bf 100644 --- a/modules/ocl/src/fft.cpp +++ b/modules/ocl/src/fft.cpp @@ -180,19 +180,19 @@ cv::ocl::FftPlan::FftPlan(Size _dft_size, int _src_step, int _dst_step, int _fla case C2C: inLayout = CLFFT_COMPLEX_INTERLEAVED; outLayout = CLFFT_COMPLEX_INTERLEAVED; - clStridesIn[1] = src_step / sizeof(std::complex); + clStridesIn[1] = src_step / (2*sizeof(float)); clStridesOut[1] = clStridesIn[1]; break; case R2C: inLayout = CLFFT_REAL; outLayout = CLFFT_HERMITIAN_INTERLEAVED; clStridesIn[1] = src_step / sizeof(float); - clStridesOut[1] = dst_step / sizeof(std::complex); + clStridesOut[1] = dst_step / (2*sizeof(float)); break; case C2R: inLayout = CLFFT_HERMITIAN_INTERLEAVED; outLayout = CLFFT_REAL; - clStridesIn[1] = src_step / sizeof(std::complex); + clStridesIn[1] = src_step / (2*sizeof(float)); clStridesOut[1] = dst_step / sizeof(float); break; default: diff --git a/modules/ocl/src/gemm.cpp b/modules/ocl/src/gemm.cpp index 840f6285cc..c5e14bffd7 100644 --- a/modules/ocl/src/gemm.cpp +++ b/modules/ocl/src/gemm.cpp @@ -121,12 +121,12 @@ void cv::ocl::gemm(const oclMat &src1, const oclMat &src2, double alpha, break; case CV_32FC2: { - lda /= sizeof(std::complex); - ldb /= sizeof(std::complex); - ldc /= sizeof(std::complex); - offa /= sizeof(std::complex); - offb /= sizeof(std::complex); - offc /= sizeof(std::complex); + lda /= (2*sizeof(float)); + ldb /= (2*sizeof(float)); + ldc /= (2*sizeof(float)); + offa /= (2*sizeof(float)); + offb /= (2*sizeof(float)); + offc /= (2*sizeof(float)); cl_float2 alpha_2 = {{alpha, 0}}; cl_float2 beta_2 = {{beta, 0}}; openCLSafeCall @@ -139,12 +139,12 @@ void cv::ocl::gemm(const oclMat &src1, const oclMat &src2, double alpha, break; case CV_64FC2: { - lda /= sizeof(std::complex); - ldb /= sizeof(std::complex); - ldc /= sizeof(std::complex); - offa /= sizeof(std::complex); - offb /= sizeof(std::complex); - offc /= sizeof(std::complex); + lda /= (2*sizeof(double)); + ldb /= (2*sizeof(double)); + ldc /= (2*sizeof(double)); + offa /= (2*sizeof(double)); + offb /= (2*sizeof(double)); + offc /= (2*sizeof(double)); cl_double2 alpha_2 = {{alpha, 0}}; cl_double2 beta_2 = {{beta, 0}}; openCLSafeCall