diff --git a/modules/calib3d/src/usac/dls_solver.cpp b/modules/calib3d/src/usac/dls_solver.cpp index ca6a664504..2e866b9389 100644 --- a/modules/calib3d/src/usac/dls_solver.cpp +++ b/modules/calib3d/src/usac/dls_solver.cpp @@ -155,7 +155,12 @@ public: const auto &eigen_vectors = eigen_solver.eigenvectors(); const auto &eigen_values = eigen_solver.eigenvalues(); #else + +#if defined (ACCELERATE_NEW_LAPACK) && defined (ACCELERATE_LAPACK_ILP64) + long mat_order = 27, info, lda = 27, ldvl = 1, ldvr = 27, lwork = 500; +#else int mat_order = 27, info, lda = 27, ldvl = 1, ldvr = 27, lwork = 500; +#endif double wr[27], wi[27] = {0}; // 27 = mat_order std::vector work(lwork), eig_vecs(729); char jobvl = 'N', jobvr = 'V'; // only left eigen vectors are computed diff --git a/modules/calib3d/src/usac/essential_solver.cpp b/modules/calib3d/src/usac/essential_solver.cpp index 6f0e6b1cfc..8f9b5b9d33 100644 --- a/modules/calib3d/src/usac/essential_solver.cpp +++ b/modules/calib3d/src/usac/essential_solver.cpp @@ -259,7 +259,11 @@ public: action_mat_data[83] = -1.0; // 8 row, 3 col action_mat_data[96] = -1.0; // 9 row, 6 col +#if defined (ACCELERATE_NEW_LAPACK) && defined (ACCELERATE_LAPACK_ILP64) + long mat_order = 10, info, lda = 10, ldvl = 10, ldvr = 1, lwork = 100; +#else int mat_order = 10, info, lda = 10, ldvl = 10, ldvr = 1, lwork = 100; +#endif double wr[10], wi[10] = {0}, eig_vecs[100], work[100]; // 10 = mat_order, 100 = lwork char jobvl = 'V', jobvr = 'N'; // only left eigen vectors are computed OCV_LAPACK_FUNC(dgeev)(&jobvl, &jobvr, &mat_order, action_mat_data, &lda, wr, wi, eig_vecs, &ldvl,