Package Details: mingw-w64-opencv 4.10.0-2

Git Clone URL: https://aur.archlinux.org/mingw-w64-opencv.git (read-only, click to copy)
Package Base: mingw-w64-opencv
Description: Open Source Computer Vision Library (mingw-w64)
Upstream URL: http://opencv.org/
Licenses: Apache-2.0
Submitter: xantares
Maintainer: eclairevoyant
Last Packager: CloverGit
Votes: 2
Popularity: 0.000000
First Submitted: 2015-09-14 18:31 (UTC)
Last Updated: 2025-05-12 12:32 (UTC)

Latest Comments

1 2 3 4 Next › Last »

eclairevoyant commented on 2025-11-01 22:58 (UTC)

Please add the following to prepare():

  sed '/cmake_minimum_required/ s/2.8.12.2/3.10/g' -i $srcdir/opencv-$pkgver/cmake/OpenCVGenPkgconfig.cmake

Or upgrade to newer opencv.

patlefort commented on 2025-05-09 00:19 (UTC)

The License should be Apache-2.0, it changed since version 4.5: https://opencv.org/license/

It's also affected by the cmake < 3.5 compatibility problem:

CMake Error at /pkgbuild/out/mingw-w64-opencv/src/opencv-4.10.0/cmake/OpenCVGenPkgconfig.cmake:113 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

patlefort commented on 2023-11-29 01:06 (UTC)

There are other errors regarding microsoft media foundation:

/pkgbuild/out/mingw-w64-opencv/src/opencv-4.8.1/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.hpp:106:27: error: could not convert template argument ‘cv::obsensor::ComPtr<IMFAttributes>::__T_IID_getter’ from ‘const IID& (cv::obsensor::ComPtr<IMFAttributes>::)()’ {aka ‘const GUID& (cv::obsensor::ComPtr<IMFAttributes>::)()’} to ‘const IID& (*)()’ {aka ‘const GUID& (*)()’}
  106 |     _COM_SMARTPTR_TYPEDEF(T, __uuidof(T));
      |                           ^

patlefort commented on 2023-11-29 00:43 (UTC)

/pkgbuild/out/mingw-w64-opencv/src/opencv-4.8.1/modules/videoio/src/cap_obsensor/obsensor_stream_channel_msmf.cpp:28:10: fatal error: Mferror.h: No such file or directory
   28 | #include <Mferror.h>
      |          ^~~~~~~~~~~

I'm quite sure that the problem is that the include should be in lower case.

drakkan commented on 2021-11-01 11:34 (UTC)

Thanks,

I added you as co-maintainer, no obligations, if you have time you can help

patlefort commented on 2021-10-29 03:01 (UTC)

I am able to compile it by replacing opencv-lapack-3.9.1.patch with this patch:

diff --git a/modules/calib3d/src/usac/dls_solver.cpp b/modules/calib3d/src/usac/dls_solver.cpp
index 0898734fb3..17820696a7 100644
--- a/modules/calib3d/src/usac/dls_solver.cpp
+++ b/modules/calib3d/src/usac/dls_solver.cpp
@@ -159,7 +159,7 @@ public:
         double wr[27], wi[27] = {0}; // 27 = mat_order
         std::vector<double> work(lwork), eig_vecs(729);
         char jobvl = 'N', jobvr = 'V'; // only left eigen vectors are computed
-        dgeev_(&jobvl, &jobvr, &mat_order, (double*)solution_polynomial.data, &lda, wr, wi, nullptr, &ldvl,
+        LAPACK_dgeev(&jobvl, &jobvr, &mat_order, (double*)solution_polynomial.data, &lda, wr, wi, nullptr, &ldvl,
                &eig_vecs[0], &ldvr, &work[0], &lwork, &info);
         if (info != 0) return 0;
 #endif
diff --git a/modules/calib3d/src/usac/essential_solver.cpp b/modules/calib3d/src/usac/essential_solver.cpp
index 0adca0966f..e84b380baa 100644
--- a/modules/calib3d/src/usac/essential_solver.cpp
+++ b/modules/calib3d/src/usac/essential_solver.cpp
@@ -161,7 +161,7 @@ public:
         int mat_order = 10, info, lda = 10, ldvl = 10, ldvr = 1, lwork = 100;
         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
-        dgeev_(&jobvl, &jobvr, &mat_order, action_mat_data, &lda, wr, wi, eig_vecs, &ldvl,
+        LAPACK_dgeev(&jobvl, &jobvr, &mat_order, action_mat_data, &lda, wr, wi, eig_vecs, &ldvl,
                 nullptr, &ldvr, work, &lwork, &info);
         if (info != 0) return 0;
 #endif
diff --git a/modules/core/src/hal_internal.cpp b/modules/core/src/hal_internal.cpp
index 483281d1f7..05239e98f4 100644
--- a/modules/core/src/hal_internal.cpp
+++ b/modules/core/src/hal_internal.cpp
@@ -163,9 +163,9 @@ lapack_Cholesky(fptype* a, size_t a_step, int m, fptype* b, size_t b_step, int n
         if(n == 1 && b_step == sizeof(fptype))
         {
             if(typeid(fptype) == typeid(float))
-                sposv_(L, &m, &n, (float*)a, &lda, (float*)b, &m, &lapackStatus);
+                LAPACK_sposv(L, &m, &n, (float*)a, &lda, (float*)b, &m, &lapackStatus);
             else if(typeid(fptype) == typeid(double))
-                dposv_(L, &m, &n, (double*)a, &lda, (double*)b, &m, &lapackStatus);
+                LAPACK_dposv(L, &m, &n, (double*)a, &lda, (double*)b, &m, &lapackStatus);
         }
         else
         {
@@ -174,9 +174,9 @@ lapack_Cholesky(fptype* a, size_t a_step, int m, fptype* b, size_t b_step, int n
             transpose(b, ldb, tmpB, m, m, n);

             if(typeid(fptype) == typeid(float))
-                sposv_(L, &m, &n, (float*)a, &lda, (float*)tmpB, &m, &lapackStatus);
+                LAPACK_sposv(L, &m, &n, (float*)a, &lda, (float*)tmpB, &m, &lapackStatus);
             else if(typeid(fptype) == typeid(double))
-                dposv_(L, &m, &n, (double*)a, &lda, (double*)tmpB, &m, &lapackStatus);
+                LAPACK_dposv(L, &m, &n, (double*)a, &lda, (double*)tmpB, &m, &lapackStatus);

             transpose(tmpB, m, b, ldb, n, m);
             delete[] tmpB;
@@ -185,9 +185,9 @@ lapack_Cholesky(fptype* a, size_t a_step, int m, fptype* b, size_t b_step, int n
     else
     {
         if(typeid(fptype) == typeid(float))
-            spotrf_(L, &m, (float*)a, &lda, &lapackStatus);
+            LAPACK_spotrf(L, &m, (float*)a, &lda, &lapackStatus);
         else if(typeid(fptype) == typeid(double))
-            dpotrf_(L, &m, (double*)a, &lda, &lapackStatus);
+            LAPACK_dpotrf(L, &m, (double*)a, &lda, &lapackStatus);
     }

     if(lapackStatus == 0) *info = true;
@@ -227,17 +227,17 @@ lapack_SVD(fptype* a, size_t a_step, fptype *w, fptype* u, size_t u_step, fptype
     }

     if(typeid(fptype) == typeid(float))
-        sgesdd_(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)&work1, &lwork, iworkBuf, info);
+        LAPACK_sgesdd(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)&work1, &lwork, iworkBuf, info);
     else if(typeid(fptype) == typeid(double))
-        dgesdd_(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)&work1, &lwork, iworkBuf, info);
+        LAPACK_dgesdd(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)&work1, &lwork, iworkBuf, info);

     lwork = (int)round(work1); //optimal buffer size
     fptype* buffer = new fptype[lwork + 1];

     if(typeid(fptype) == typeid(float))
-        sgesdd_(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)buffer, &lwork, iworkBuf, info);
+        LAPACK_sgesdd(mode, &m, &n, (float*)a, &lda, (float*)w, (float*)u, &ldu, (float*)vt, &ldv, (float*)buffer, &lwork, iworkBuf, info);
     else if(typeid(fptype) == typeid(double))
-        dgesdd_(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)buffer, &lwork, iworkBuf, info);
+        LAPACK_dgesdd(mode, &m, &n, (double*)a, &lda, (double*)w, (double*)u, &ldu, (double*)vt, &ldv, (double*)buffer, &lwork, iworkBuf, info);

     if(!(flags & CV_HAL_SVD_NO_UV))
         transpose_square_inplace(vt, ldv, n);
@@ -288,18 +288,18 @@ lapack_QR(fptype* a, size_t a_step, int m, int n, int k, fptype* b, size_t b_ste
         if (k == 1 && b_step == sizeof(fptype))
         {
             if (typeid(fptype) == typeid(float))
-                sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)&work1, &lwork, info);
+                LAPACK_sgels(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)&work1, &lwork, info);
             else if (typeid(fptype) == typeid(double))
-                dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)&work1, &lwork, info);
+                LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)&work1, &lwork, info);

             lwork = cvRound(work1); //optimal buffer size
             std::vector<fptype> workBufMemHolder(lwork + 1);
             fptype* buffer = &workBufMemHolder.front();

             if (typeid(fptype) == typeid(float))
-                sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)buffer, &lwork, info);
+                LAPACK_sgels(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)b, &m, (float*)buffer, &lwork, info);
             else if (typeid(fptype) == typeid(double))
-                dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)buffer, &lwork, info);
+                LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)b, &m, (double*)buffer, &lwork, info);
         }
         else
         {
@@ -309,18 +309,18 @@ lapack_QR(fptype* a, size_t a_step, int m, int n, int k, fptype* b, size_t b_ste
             transpose(b, ldb, tmpB, m, m, k);

             if (typeid(fptype) == typeid(float))
-                sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)&work1, &lwork, info);
+                LAPACK_sgels(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)&work1, &lwork, info);
             else if (typeid(fptype) == typeid(double))
-                dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)&work1, &lwork, info);
+                LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)&work1, &lwork, info);

             lwork = cvRound(work1); //optimal buffer size
             std::vector<fptype> workBufMemHolder(lwork + 1);
             fptype* buffer = &workBufMemHolder.front();

             if (typeid(fptype) == typeid(float))
-                sgels_(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)buffer, &lwork, info);
+                LAPACK_sgels(mode, &m, &n, &k, (float*)tmpA, &ldtmpA, (float*)tmpB, &m, (float*)buffer, &lwork, info);
             else if (typeid(fptype) == typeid(double))
-                dgels_(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)buffer, &lwork, info);
+                LAPACK_dgels(mode, &m, &n, &k, (double*)tmpA, &ldtmpA, (double*)tmpB, &m, (double*)buffer, &lwork, info);

             transpose(tmpB, m, b, ldb, k, m);
         }

drakkan commented on 2021-09-01 15:02 (UTC)

Hi, there are some build issues with 4.5.3. I will update the PKGBUILD once I am able to fix them. Thanks for your patience

drakkan commented on 2019-10-16 11:37 (UTC)

@FoPref, OpenCV use cmake to find lapack during build, and it does not work, so lapack libs are manually setted

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mingw-w64-opencv#n61

this is needed for linux native build too

https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/opencv#n57

FoPref commented on 2019-09-11 13:51 (UTC)

Hello Drakkan, thank you for looking into these things. Unfortunately the patch does not work for me, as it leads to a binary that wants to link to opencv*411.dll files on runtime. I wonder why.

Modifying the lapack pkgconf file did not help as well. Does OpenCV during build use the PKGCONF to find lapack?