看此篇前请先阅读
https://blog.csdn.net/qq_20330595/article/details/144134160?spm=1001.2014.3001.5502
https://blog.csdn.net/qq_20330595/article/details/144134160?spm=1001.2014.3001.5502
https://blog.csdn.net/qq_20330595/article/details/144216351?spm=1001.2014.3001.5502 ⭐⭐⭐
先上效果图
编译环境
CMD命令
Microsoft Windows [版本 10.0.19045.5131]
(c) Microsoft Corporation。保留所有权利。C:\Users\>opencv_version
4.10.0C:\Users\>cmake --version
cmake version 3.26.4CMake suite maintained and supported by Kitware (kitware.com/cmake).C:\Users\>g++ --version
g++ (MinGW-W64 x86_64-msvcrt-posix-seh, built by Brecht Sanders) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
以下是在 Windows 下使用 Mingw 和 CMake 集成 OpenCV 的详细步骤:
打开GUI
新建编译目录
# 1. Generate CMakeFile - 生成CMake文件
# 2. Configure - 配置生成
# 3. mingw32-make -j 8 - 使用8个线程进行并行构建
# 4. mingw32-make install - 安装生成的项目