Affected files: .obsidian/workspace 01. 個人/00. Informations/Datas.md 01. 個人/01. Daily/2018/2018-10-05(週五).md 01. 個人/01. Daily/2018/2018-10-06(週六).md 01. 個人/01. Daily/2018/2018-10-08(週一).md 01. 個人/01. Daily/2018/2018-10-12(週五).md 01. 個人/01. Daily/2018/2018-10-13(週六).md 01. 個人/01. Daily/2018/2018-11-30(週五).md 01. 個人/01. Daily/2018/2018-12-03(週一).md 01. 個人/01. Daily/2018/2018-12-07(週五).md 01. 個人/01. Daily/2019/2019-09-12(週四).md 01. 個人/01. Daily/2020/02/2020-02-07(週五).md 01. 個人/01. Daily/2020/02/2020-02-14(週五).md 01. 個人/01. Daily/2020/03/2020-03-06(週五).md 01. 個人/01. Daily/2020/03/2020-03-12(週四).md 01. 個人/01. Daily/2020/03/2020-03-22(週日).md 01. 個人/01. Daily/2020/03/2020-03-23(週一).md 01. 個人/01. Daily/2020/03/2020-03-24(週二).md 01. 個人/01. Daily/2020/03/2020-03-25(週三).md 01. 個人/01. Daily/2020/03/2020-03-29(週日).md 01. 個人/01. Daily/2020/04/2020-04-02(週四).md 01. 個人/01. Daily/2020/04/2020-04-15(週三).md 01. 個人/01. Daily/2020/04/2020-04-18(週六).md 01. 個人/01. Daily/2020/04/2020-04-19(週日).md 01. 個人/01. Daily/2020/04/2020-04-22(週三).md 01. 個人/01. Daily/2020/04/2020-04-27(週一).md 01. 個人/01. Daily/2020/05/2020-05-09(週六).md 01. 個人/01. Daily/2020/05/2020-05-10(週日).md 01. 個人/01. Daily/2020/05/2020-05-11(週一).md 01. 個人/01. Daily/2020/05/2020-05-13(週三).md 01. 個人/01. Daily/2020/05/2020-05-14(週四).md 01. 個人/01. Daily/2020/05/2020-05-15(週五).md 01. 個人/01. Daily/2020/05/2020-05-16(週六).md 01. 個人/01. Daily/2020/05/2020-05-17(週日).md 01. 個人/01. Daily/2020/05/2020-05-18(週一).md 01. 個人/01. Daily/2020/05/2020-05-19(週二).md 01. 個人/01. Daily/2020/05/2020-05-20(週三).md 01. 個人/01. Daily/2020/07/2020-07-10(週五).md 01. 個人/01. Daily/2020/07/2020-07-24(週三).md 01. 個人/01. Daily/2020/08/2020-08-13(週四).md 01. 個人/01. Daily/2020/09/2020-09-12(週六).md 01. 個人/01. Daily/2020/10/2020-10-06(週二).md 01. 個人/01. Daily/2020/10/2020-10-22(週四).md 01. 個人/01. Daily/2020/11/2020-11-10(週二).md 01. 個人/01. Daily/2020/12/2020-12-02(週三).md 01. 個人/01. Daily/2020/12/2020-12-03(Thu).md 01. 個人/01. Daily/2020/12/2020-12-04(Fri).md 01. 個人/01. Daily/2020/12/2020-12-05(Sat).md 01. 個人/01. Daily/2020/12/2020-12-06(Sun).md 01. 個人/01. Daily/2020/12/2020-12-09(Wed).md 01. 個人/01. Daily/2020/12/2020-12-10(Thu).md 01. 個人/01. Daily/2020/12/2020-12-11(Fri).md 01. 個人/01. Daily/2020/12/2020-12-12(Sat).md 01. 個人/01. Daily/2020/12/2020-12-13(Sun).md 01. 個人/01. Daily/2020/12/2020-12-16(Wed).md 01. 個人/01. Daily/2020/12/2020-12-17(Thu).md 01. 個人/01. Daily/2020/12/2020-12-18(Fri).md 01. 個人/01. Daily/2020/12/2020-12-19(Sat).md 01. 個人/01. Daily/2020/12/2020-12-21(Mon).md 01. 個人/01. Daily/2020/12/2020-12-22(Tue).md 01. 個人/01. Daily/2020/12/2020-12-24(Thu).md 01. 個人/01. Daily/2020/12/2020-12-25(Fri).md 01. 個人/01. Daily/2020/12/2020-12-26(Sat).md 01. 個人/01. Daily/2020/12/2020-12-27(Sun).md 01. 個人/01. Daily/2020/12/2020-12-30(Wed).md 01. 個人/01. Daily/2021/01/2021-01-06(Wed).md 01. 個人/01. Daily/2021/01/2021-01-09(Sat).md 01. 個人/01. Daily/2021/01/2021-01-10(Sun).md 01. 個人/01. Daily/2021/01/2021-01-11(Mon).md 01. 個人/01. Daily/2021/01/2021-01-13(Wed).md 01. 個人/01. Daily/2021/01/2021-01-14(Thu).md 01. 個人/01. Daily/2021/01/2021-01-15(Fri).md 01. 個人/01. Daily/2021/01/2021-01-16(Sat).md 01. 個人/01. Daily/2021/01/2021-01-17(Sun).md 01. 個人/01. Daily/2021/01/2021-01-18(Mon).md 01. 個人/01. Daily/2021/01/2021-01-21(Thu).md 01. 個人/01. Daily/2021/01/2021-01-22(Fri).md 01. 個人/01. Daily/2021/01/2021-01-23(Sat).md 01. 個人/01. Daily/2021/01/2021-01-24(Sun).md 01. 個人/01. Daily/2021/01/2021-01-25(Mon).md 01. 個人/01. Daily/2021/01/2021-01-26(Tue).md 01. 個人/01. Daily/2021/01/2021-01-27(Wed).md 01. 個人/01. Daily/2021/01/2021-01-28(Thu).md 01. 個人/01. Daily/2021/01/2021-01-30(Sat).md 01. 個人/01. Daily/2021/02/2021-02-01(Mon).md 01. 個人/01. Daily/2021/02/2021-02-02(Tue).md 01. 個人/01. Daily/2021/02/2021-02-03(Wed).md 01. 個人/01. Daily/2021/02/2021-02-04(Thu).md 01. 個人/01. Daily/2021/02/2021-02-08(Mon).md 01. 個人/01. Daily/2021/02/2021-02-13(Sat).md 01. 個人/01. Daily/2021/02/2021-02-15(Mon).md 01. 個人/01. Daily/2021/02/2021-02-16(Tue).md 01. 個人/01. Daily/2021/02/2021-02-20(Sat).md 01. 個人/01. Daily/2021/02/2021-02-21(Sun).md 01. 個人/01. Daily/2021/02/2021-02-22(Mon).md 01. 個人/01. Daily/2021/03/2021-03-01(Mon).md 01. 個人/01. Daily/2021/03/2021-03-13(週六).md 01. 個人/01. Daily/2021/03/2021-03-15(週一).md 01. 個人/01. Daily/2021/03/2021-03-17(週三).md 01. 個人/01. Daily/2021/03/2021-03-20(週六).md 01. 個人/01. Daily/2021/03/2021-03-21(週日).md 01. 個人/01. Daily/2021/03/2021-03-27(週六).md 01. 個人/01. Daily/2021/03/2021-03-28(週日).md 01. 個人/01. Daily/2021/04/2021-04-05(週一).md 01. 個人/01. Daily/2021/04/2021-04-06(週二).md 01. 個人/01. Daily/2021/04/2021-04-08(週四).md 01. 個人/01. Daily/2021/04/2021-04-10(週六).md 01. 個人/01. Daily/2021/04/2021-04-11(週日).md 01. 個人/01. Daily/2021/04/2021-04-12(週一).md 01. 個人/01. Daily/2021/05/2021-05-02(週日).md 01. 個人/01. Daily/2021/05/2021-05-22(週六).md 01. 個人/01. Daily/2021/05/2021-05-24(週一).md 01. 個人/01. Daily/2021/05/2021-05-25(週二).md 01. 個人/01. Daily/2021/05/2021-05-26(週三).md 01. 個人/01. Daily/2021/05/2021-05-27(週四).md 01. 個人/01. Daily/2021/05/2021-05-28(週五).md 01. 個人/01. Daily/2021/05/2021-05-29(週六).md 01. 個人/01. Daily/2021/06/2021-06-01(週二).md 01. 個人/01. Daily/2021/06/2021-06-02(週三).md 01. 個人/01. Daily/2021/06/2021-06-03(週四).md 01. 個人/01. Daily/2021/06/2021-06-04(週五).md 01. 個人/01. Daily/2021/06/2021-06-05(週六).md 01. 個人/01. Daily/2021/06/2021-06-06(週日).md 01. 個人/01. Daily/2021/06/2021-06-07(週一).md 01. 個人/01. Daily/2021/06/2021-06-08(週二).md 01. 個人/01. Daily/2021/06/2021-06-09(週三).md 01. 個人/01. Daily/2021/06/2021-06-10(週四).md 01. 個人/01. Daily/2021/06/2021-06-11(週五).md 01. 個人/01. Daily/2021/06/2021-06-12(週六).md 01. 個人/01. Daily/2021/06/2021-06-15(週二).md 01. 個人/01. Daily/2021/06/2021-06-26(週六).md 01. 個人/01. Daily/2021/06/2021-06-28(週一).md 01. 個人/01. Daily/2021/07/2021-07-01(週四).md 01. 個人/01. Daily/2021/07/2021-07-02(週五).md 01. 個人/01. Daily/2021/07/2021-07-04(週日).md 01. 個人/01. Daily/2021/07/2021-07-05(週一).md 01. 個人/01. Daily/2021/07/2021-07-06(週二).md 01. 個人/01. Daily/2021/07/2021-07-07(週三).md 01. 個人/01. Daily/2021/07/2021-07-09(週五).md 01. 個人/01. Daily/2021/07/2021-07-10(週六).md 01. 個人/01. Daily/2021/07/2021-07-11(週日).md 01. 個人/01. Daily/2021/07/2021-07-14(週三).md 01. 個人/01. Daily/2021/07/2021-07-15(週四).md 01. 個人/01. Daily/2021/07/2021-07-16(週五).md 01. 個人/01. Daily/2021/07/2021-07-17(週六).md 01. 個人/01. Daily/2021/07/2021-07-18(週日).md 01. 個人/01. Daily/2021/07/2021-07-19(週一).md 01. 個人/01. Daily/2021/07/2021-07-20(週二).md 01. 個人/01. Daily/2021/07/2021-07-21(週三).md 01. 個人/01. Daily/2021/07/2021-07-22(週四).md 01. 個人/01. Daily/2021/07/2021-07-23(週五).md 01. 個人/01. Daily/2021/07/2021-07-24(週六).md 01. 個人/01. Daily/2021/07/2021-07-25(週日).md 01. 個人/01. Daily/2021/07/2021-07-26(週一).md 01. 個人/01. Daily/2021/07/2021-07-27(週二).md 01. 個人/01. Daily/2021/07/2021-07-28(週三).md 01. 個人/01. Daily/2021/07/2021-07-29(週四).md 01. 個人/01. Daily/2021/07/2021-07-30(週五).md 01. 個人/01. Daily/2021/07/2021-07-31(週六).md 01. 個人/01. Daily/2021/08/2021-08-02(週一).md 01. 個人/01. Daily/2021/08/2021-08-03(週二).md 01. 個人/01. Daily/2021/08/2021-08-04(週三).md 01. 個人/01. Daily/2021/08/2021-08-05(週四).md 01. 個人/01. Daily/2021/08/2021-08-06(週五).md 01. 個人/01. Daily/2021/08/2021-08-07(週六).md 01. 個人/01. Daily/2021/08/2021-08-08(週日).md 01. 個人/01. Daily/2021/08/2021-08-09(週一).md 01. 個人/01. Daily/2021/08/2021-08-10(週二).md 01. 個人/01. Daily/2021/08/2021-08-11(週三).md 01. 個人/01. Daily/2021/08/2021-08-13(週五).md 01. 個人/01. Daily/2021/08/2021-08-14(週六).md 01. 個人/01. Daily/2021/08/2021-08-16(週一).md 01. 個人/01. Daily/2021/08/2021-08-17(週二).md 01. 個人/01. Daily/2021/08/2021-08-20(週五).md 01. 個人/01. Daily/2021/08/2021-08-24(週二).md 01. 個人/01. Daily/2021/08/2021-08-25(週三).md 01. 個人/01. Daily/2021/08/2021-08-26(週四).md 01. 個人/01. Daily/2021/09/2021-09-01(週三).md 01. 個人/01. Daily/2021/09/2021-09-02(週四).md 01. 個人/01. Daily/2021/09/2021-09-09(週四).md 01. 個人/01. Daily/2021/09/2021-09-13(週一).md 01. 個人/01. Daily/2021/09/2021-09-16(週四).md 01. 個人/01. Daily/2021/09/2021-09-22(週三).md 01. 個人/01. Daily/2021/09/2021-09-23(週四).md 01. 個人/01. Daily/2021/09/2021-09-24(週五).md 01. 個人/01. Daily/2021/09/2021-09-27(週一).md 01. 個人/01. Daily/2021/09/2021-09-28(週二).md 01. 個人/01. Daily/2021/10/2021-10-04(週一).md 01. 個人/01. Daily/2021/10/2021-10-06(週三).md 01. 個人/01. Daily/2021/10/2021-10-14(週四).md 01. 個人/01. Daily/2021/10/2021-10-20(週三).md 01. 個人/01. Daily/2021/10/2021-10-28(週四).md 01. 個人/01. Daily/2021/11/2021-11-01(週一).md 01. 個人/01. Daily/2021/11/2021-11-04(週四).md 01. 個人/01. Daily/2021/11/2021-11-12(週五).md 01. 個人/01. Daily/2021/11/2021-11-15(週一).md 01. 個人/01. Daily/2021/12/2021-12-01(週三).md 01. 個人/01. Daily/2021/12/2021-12-13(週一).md 01. 個人/01. Daily/2021/12/2021-12-15(週三).md 01. 個人/01. Daily/2021/12/2021-12-16(週四).md 01. 個人/01. Daily/2021/12/2021-12-17(週五).md 01. 個人/01. Daily/2021/12/2021-12-18(週六).md 01. 個人/01. Daily/2021/12/2021-12-20(週一).md 01. 個人/01. Daily/2021/12/2021-12-21(週二).md 01. 個人/01. Daily/2021/12/2021-12-23(週四).md 01. 個人/01. Daily/2021/12/2021-12-24(週五).md 01. 個人/01. Daily/2022-06-01(週三).md 01. 個人/01. Daily/2022-06-06(週一).md 01. 個人/01. Daily/2022-07-15(週五).md 01. 個人/01. Daily/2022/01/2022-01-01(週六).md 01. 個人/01. Daily/2022/01/2022-01-08(週六).md 01. 個人/01. Daily/2022/01/2022-01-10(週一).md 01. 個人/01. Daily/2022/01/2022-01-13(週四).md 01. 個人/01. Daily/2022/01/2022-01-19(週三).md 01. 個人/01. Daily/2022/01/2022-01-24(週一).md 01. 個人/01. Daily/2022/01/2022-01-26(週三).md 01. 個人/01. Daily/2022/02/2022-02-10(週四).md 01. 個人/01. Daily/2022/02/2022-02-11(週五).md 01. 個人/01. Daily/2022/02/2022-02-14(週一).md 01. 個人/01. Daily/2022/02/2022-02-15(週二).md 01. 個人/01. Daily/2022/03/2022-03-04(週五).md 01. 個人/01. Daily/2022/03/2022-03-28(週一).md 01. 個人/01. Daily/2022/04/2022-04-06(週三).md 01. 個人/01. Daily/2022/04/2022-04-08(週五).md 01. 個人/01. Daily/2022/04/2022-04-12(週二).md 01. 個人/01. Daily/2022/04/2022-04-14(週四).md 01. 個人/01. Daily/2022/年度目標.md 01. 個人/02. 專注Study/20150803 - Android/ADB 取得 APK 的 icon.md 01. 個人/02. 專注Study/20150803 - Android/ADB.md 01. 個人/02. 專注Study/20150803 - Android/AOSP.md 01. 個人/02. 專注Study/20150803 - Android/Ktor.md 01. 個人/02. 專注Study/20150803 - Android/Service.md 01. 個人/02. 專注Study/20150803 - Android/Tools.md 01. 個人/02. 專注Study/20150803 - Android/UI.md 01. 個人/02. 專注Study/20200207 - Study RxKotlin.md 01. 個人/02. 專注Study/20220601 - C++/C++17 1.md 01. 個人/02. 專注Study/20220601 - C++/C++17.md 01. 個人/02. 專注Study/20220601 - C++/Class template.md 01. 個人/02. 專注Study/20220601 - C++/Structured binding declaration.md 01. 個人/02. 專注Study/20220601 - C++/for_each.md 01. 個人/02. 專注Study/20220601 - C++/lambda.md 01. 個人/02. 專注Study/20220601 - C++/lvalue.md 01. 個人/02. 專注Study/20220601 - C++/move operator.md 01. 個人/02. 專注Study/20220601 - C++/rvalue.md 01. 個人/02. 專注Study/20220601 - C++/智慧指標.md 02. PARA/02. Area(領域)/00000000 - 投資.md 02. PARA/02. Area(領域)/001. Study Android Programming.md 02. PARA/02. Area(領域)/002. Study RxKotlin.md 02. PARA/02. Area(領域)/003. LBRY.md 02. PARA/02. Area(領域)/004. IPFS.md 02. PARA/02. Area(領域)/005. 投資.md 02. PARA/03. Resources(資源)/00. Informations/核芯達.md 02. PARA/03. Resources(資源)/WEB Programming.md 02. PARA/03. Resources(資源)/vim.md 02. PARA/04. Archives(歸檔)/01. Project(專案)/002. Bolide firmware verfication.md 02. PARA/04. Archives(歸檔)/01. Project(專案)/003. Meetup firmware update check.md 02. PARA/04. Archives(歸檔)/01. Project(專案)/004. Group firmware update check.md 02. PARA/04. Archives(歸檔)/03. Resources(資源)/Make Google Docs Look Like Dropbox Paper.md 02. PARA/04. Archives(歸檔)/03. Resources(資源)/PARA筆記.md 03. 資料收集/01. 架站/01. Nginx Layer4 Reverse Proxy.md 03. 資料收集/01. 架站/02. SWAG Reverse proxy.md 03. 資料收集/01. 架站/03. Trojan.md 03. 資料收集/01. 架站/04. Gitea.md 03. 資料收集/50. 軍武/虎式.md 03. 資料收集/51. 模型/Traxxas Sledge.md 03. 資料收集/51. 模型/舊化作例.md 03. 資料收集/802.11.md 03. 資料收集/99. templates/blogHeader.md 03. 資料收集/99. templates/date.md 03. 資料收集/99. templates/front matter.md 03. 資料收集/99. templates/note.md 03. 資料收集/99. templates/table.md 03. 資料收集/99. templates/thisWeek.md 03. 資料收集/99. templates/日記.md 03. 資料收集/99. templates/讀書筆記.md 03. 資料收集/Android operating.md 03. 資料收集/Android programming.md 03. 資料收集/COM/20210726 - COM Interface.md 03. 資料收集/Design Pattern.md 03. 資料收集/FFMPEG/00. Introduction.md 03. 資料收集/FFMPEG/01. Setup.md 03. 資料收集/FFMpeg.md 03. 資料收集/Flask.md 03. 資料收集/HDR Sensor.md 03. 資料收集/HTTP Server/Apache.md 03. 資料收集/HTTP Server/Nginx.md 03. 資料收集/IPFS.md 03. 資料收集/Linux/CLI.md 03. 資料收集/Linux/Programming.md 03. 資料收集/Linux/Timezone.md 03. 資料收集/Linux/Ubuntu.md 03. 資料收集/Linux/scp.md 03. 資料收集/Media Foundation/20210604 - Windows media foundation.md 03. 資料收集/MkDocs.md 03. 資料收集/MySQL.md 03. 資料收集/NextDNS.md 03. 資料收集/Nginx.md 03. 資料收集/Obsidian.md 03. 資料收集/OpenCV.md 03. 資料收集/OpenGL.md 03. 資料收集/Pelican blog.md 03. 資料收集/Proxmox VE.md 03. 資料收集/Python/argparse.ArgumentParser.md 03. 資料收集/Python/decorator.md 03. 資料收集/Python/logging.md 03. 資料收集/Python/opencv.md 03. 資料收集/Python/subprocess.md 03. 資料收集/Python/threading.md 03. 資料收集/Python/tkinter.md 03. 資料收集/Python/檢測工具.md 03. 資料收集/QT/Dropdown button.md 03. 資料收集/QT/QVariant.md 03. 資料收集/QT/Qt.md 03. 資料收集/Qt.md 03. 資料收集/RC.md 03. 資料收集/RaspberryPi.md 03. 資料收集/SLAM.md 03. 資料收集/Scripts.md 03. 資料收集/Storj.md 03. 資料收集/Tool Setup/Chrome.md 03. 資料收集/Tool Setup/Obisidian.md 03. 資料收集/Tool Setup/SublimeText.md 03. 資料收集/Tool Setup/VirtualBox.md 03. 資料收集/Tool Setup/Visual Studio Code.md 03. 資料收集/Tool Setup/Windows Setup.md 03. 資料收集/Tool Setup/Windows Terminal.md 03. 資料收集/Tool Setup/freefilesync.md 03. 資料收集/Tool Setup/vim.md 03. 資料收集/Trojan.md 03. 資料收集/UML.md 03. 資料收集/V2Ray.md 03. 資料收集/__其他.md 03. 資料收集/docker.md 03. 資料收集/frp.md 03. 資料收集/git/apply.md 03. 資料收集/git/submodule.md 03. 資料收集/sqlite.md 03. 資料收集/名言佳句.md 03. 資料收集/每週外食.md 03. 資料收集/演算法.md 03. 資料收集/翻牆/V2Ray.md 03. 資料收集/翻牆/Wireguard.md 03. 資料收集/讀書筆記/20201201 - 學習如何學習.md 03. 資料收集/讀書筆記/20201218 - Kotlin權威2.0.md 03. 資料收集/讀書筆記/20201224 - 寫作是最好的自我投資.md 03. 資料收集/讀書筆記/20210119 - 中產悲歌.md 03. 資料收集/讀書筆記/20210220 - 最高學習法.md 03. 資料收集/讀書筆記/20210320 - 最高學以致用法.md 03. 資料收集/讀書筆記/20210406 - 精準購買.md 03. 資料收集/讀書筆記/20210723 - 高手學習.md 03. 資料收集/讀書筆記/20220526 - 深入淺出設計模式.md 03. 資料收集/讀書筆記/20220619 - 精確的力量.md 03. 資料收集/財經.md 03. 資料收集/量子電腦.md 03. 資料收集/鋰電池.md
18 KiB
18 KiB
Build code
前置作業
CMake && Visual Studio
-
下載OpenCV:opencv
-
解壓縮後放到
D:\temp\build_opencv\opencv-4.5.3\source -
建立
D:\temp\build_opencv\opencv-4.5.3\build -
下載OpenCV contrib:opencv_contrib
-
解壓縮後放到
D:\temp\build_opencv\opencv_contrib -
打開cmake-gui
-
用
Add Entry先加入以下define !
如果是檔名,type就選FILEPATH,如果是目錄,type就選PATH- PYTHON3_EXECUTABLE=C:/python39/python.exe
- PYTHON3_INCLUDE_DIR=C:/python39/include
- PYTHON3_LIBRARY=C:/python39/libs/python39.lib
- PYTHON3_NUMPY_INCLUDE_DIRS=C:/python39/Lib/site-packages/numpy/core/include
- PYTHON3_PACKAGES_PATH=C:/python39/Lib/site-packages
如果要build win32 + Python 3.6.3 x86的話,改為以下設定:
- PYTHON3_EXECUTABLE=C:/Python363/python.exe
- PYTHON3_INCLUDE_DIR=C:/Python363/include
- PYTHON3_LIBRARY=C:/Python363/libs/python36.lib
- PYTHON3_NUMPY_INCLUDE_DIRS=C:/Python363/Lib/site-packages/numpy/core/include
- PYTHON3_PACKAGES_PATH=C:/Python363/Lib/site-packages
-
這些要打勾
- BUILD_opencv_world
- BUILD_opencv_python3
- OPENCV_DNN_CUDA
- OPENCV_PYTHON3_VERSION
- OPENCV_FORCE_PYTHON_LIBS
- OPENCV_ENABLE_NONFREE
- ENABLE_FAST_MATH
- WITH_CUDA
- WITH_OPENMP
- OPENCV_EXTRA_MODULES_PATH=D:/temp/build_opencv/opencv_contrib/modules
-
再按一次Configure,必須沒有錯誤的跑完,像是
General configuration for OpenCV 4.5.3 ===================================== Version control: unknown Extra modules: Location (extra): D:/temp/build_opencv/opencv_contrib/modules Version control (extra): 4.5.3-6-g907efb96 Platform: Timestamp: 2021-08-18T03:40:06Z Host: Windows 10.0.19043 AMD64 CMake: 3.21.1 CMake generator: Visual Studio 16 2019 CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/MSBuild/Current/Bin/MSBuild.exe MSVC: 1929 Configuration: Debug Release CPU/HW features: Baseline: SSE SSE2 SSE3 requested: SSE3 Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX SSE4_1 (17 files): + SSSE3 SSE4_1 SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX AVX2 (31 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX512_SKX (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX C/C++: Built as dynamic libs?: YES C++ standard: 11 C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe (ver 19.29.30040.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP /MD /O2 /Ob2 /DNDEBUG C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /MP /MD /O2 /Ob2 /DNDEBUG C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:fast /MP /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:x64 /INCREMENTAL:NO Linker flags (Debug): /machine:x64 /debug /INCREMENTAL ccache: NO Precompiled headers: NO Extra dependencies: cudart_static.lib nppc.lib nppial.lib nppicc.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cudnn.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/lib/x64 3rdparty dependencies: OpenCV modules: To be built: aruco barcode bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot python3 quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode world xfeatures2d ximgproc xobjdetect xphoto Disabled: - Disabled by dependency: - Unavailable: alphamat cvv freetype hdf java julia matlab ovis python2 python2 sfm viz Applications: tests perf_tests apps Documentation: NO Non-free algorithms: NO Windows RT support: NO GUI: Win32 UI: YES VTK support: NO Media I/O: ZLib: build (ver 1.2.11) JPEG: build-libjpeg-turbo (ver 2.1.0-62) WEBP: build (ver encoder: 0x020f) PNG: build (ver 1.6.37) TIFF: build (ver 42 - 4.2.0) JPEG 2000: build (ver 2.4.0) OpenEXR: build (ver 2.3.0) HDR: YES SUNRASTER: YES PXM: YES PFM: YES Video I/O: DC1394: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (58.134.100) avformat: YES (58.76.100) avutil: YES (56.70.100) swscale: YES (5.9.100) avresample: YES (4.0.0) GStreamer: NO DirectShow: YES Media Foundation: YES DXVA: YES Parallel framework: Concurrency Trace: YES (with Intel ITT) Other third-party libraries: Intel IPP: 2020.0.0 Gold [2020.0.0] at: D:/temp/build_opencv/opencv-4.5.3/build/3rdparty/ippicv/ippicv_win/icv Intel IPP IW: sources (2020.0.0) at: D:/temp/build_opencv/opencv-4.5.3/build/3rdparty/ippicv/ippicv_win/iw Lapack: NO Eigen: NO Custom HAL: NO Protobuf: build (3.5.1) NVIDIA CUDA: YES (ver 11.4, CUFFT CUBLAS) NVIDIA GPU arch: 35 37 50 52 60 61 70 75 80 86 NVIDIA PTX archs: cuDNN: YES (ver 8.2.2) OpenCL: YES (NVD3D11) Include path: D:/temp/build_opencv/opencv-4.5.3/source/3rdparty/include/opencl/1.2 Link libraries: Dynamic load Python 3: Interpreter: C:/python39/python.exe (ver 3.9.6) Libraries: C:/python39/libs/python39.lib (ver 3.9.6) numpy: C:/python39/Lib/site-packages/numpy/core/include (ver 1.19.5) install path: C:/python39/Lib/site-packages/cv2/python-3.9 Python (for build): C:/python39/python.exe Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO Install to: D:/temp/build_opencv/opencv-4.5.3/build/install ----------------------------------------------------------------- Configuring done -
按下Generate按鈕就會生sln檔案。
CMake by command
用command line的話就可以將多個平台一次編起來,不用一直改GUI。
寫了一個build.bat可以編譯不同版本與平台:
rem build.bat
echo on
rem build.bat
rem win32 ARCH=%1, win32/x64
rem 15 VS_CODE=%2, 15/16
rem 2017 VS_VERSION=%3, 2017/2019
rem DEBUG BUILD_TYPE=%4, DEBUG/RELEASE
rem "C:/Python363/python.exe" PYTHON3_EXE=%5
rem "C:/Python363/include" PYTHON3_INCLUDE=%6
rem "C:/Python363/libs/python36.lib" PYTHON3_LIB=%7
rem "C:/Python363/Lib/site-packages/numpy/core/include" PYTHON3_NP_INCLUDE=%8
rem "C:/Python363/Lib/site-packages" PYTHON3_PACKAGES=%9
rem 3.6.3 PY_VERSION=%10
rem 1 CLEAN_BUILD=%11, 1: Delete build folder, 0: Do nothing
set DO_CONFIG=1
set DO_BUILD=1
set ARCH=%1
set VS_CODE=%2
set VS_VERSION=%3
set BUILD_TYPE=%4
set PYTHON3_EXE=%5
set PYTHON3_INCLUDE=%6
set PYTHON3_LIB=%7
set PYTHON3_NP_INCLUDE=%8
set PYTHON3_PACKAGES=%9
set GENERATOR="Visual Studio %VS_CODE% %VS_VERSION%"
shift
set PY_VERSION=%9
set CV_VERSION=4.5.3
set CV_SOURCE="opencv-%CV_VERSION%\source"
set CV_BUILD=build\vs%VS_VERSION%.%ARCH%.%BUILD_TYPE%
set CV_EXTRA_MODULES="opencv_contrib\modules"
shift
set CLEAN_BUILD=%9
if %CLEAN_BUILD% == 1 (
rmdir /s /q %CV_BUILD%
)
if %DO_CONFIG% == 1 (
mkdir %CV_BUILD%
"C:\Program Files\CMake\bin\cmake.exe" ^
-B%CV_BUILD% ^
-H%CV_SOURCE% ^
-G%GENERATOR% ^
-A%ARCH% ^
-DCMAKE_BUILD_TYPE=%BUILD_TYPE% ^
-DOPENCV_EXTRA_MODULES_PATH=%CV_EXTRA_MODULES% ^
-DCMAKE_INSTALL_PREFIX=%CV_BUILD% ^
-DINSTALL_PYTHON_EXAMPLES=OFF ^
-DINSTALL_C_EXAMPLES=OFF ^
-DBUILD_opencv_python3=ON ^
-DPYTHON3_EXECUTABLE=%PYTHON3_EXE% ^
-DPYTHON3_INCLUDE_DIR=%PYTHON3_INCLUDE% ^
-DPYTHON3_LIBRARY=%PYTHON3_LIB% ^
-DPYTHON3_NUMPY_INCLUDE_DIRS=%PYTHON3_NP_INCLUDE% ^
-DPYTHON3_PACKAGES_PATH=%PYTHON3_PACKAGES% ^
-DOPENCV_PYTHON3_VERSION=%PY_VERSION% ^
-DOPENCV_FORCE_PYTHON_LIBS=ON ^
-DBUILD_opencv_world=ON ^
-DOPENCV_ENABLE_NONFREE=ON ^
-DENABLE_FAST_MATH=ON ^
-DWITH_OPENMP=ON ^
-DWITH_OPENGL=ON
)
if %DO_BUILD% == 1 (
"C:\Program Files\CMake\bin\cmake.exe" --build %CV_BUILD% --target INSTALL --config %BUILD_TYPE%
)
這樣以後就可以用參數的方法來設定,譬如要使用vs2019來編譯x64 release的話,就可以這樣下:
rem build_vs2019.x64.RELEASE.bat
echo off
rem ----------------------------------------------------------------------------------------------------
rem
rem x64, RELEASE, 2019, CLEAN
rem
set ARCH=x64
set VS_CODE=16
set VS_VERSION=2019
set BUILD_TYPE=RELEASE
set PYTHON3_EXE="C:/Python39/python.exe"
set PYTHON3_INCLUDE="C:/Python39/include"
set PYTHON3_LIB="C:/Python39/libs/python39.lib"
set PYTHON3_NP_INCLUDE="C:/Python39/Lib/site-packages/numpy/core/include"
set PYTHON3_PACKAGES="C:/Python39/Lib/site-packages"
set PY_VERSION=3.9
set CLEAN_BUILD=1
echo "============================================================"
echo "Build %ARCH%.%VS_VERSION%(%VS_CODE%).%BUILD_TYPE%, Python=%PY_VERSION%, CLEAN_BUILD=%CLEAN_BUILD%"
echo ""
call build.bat ^
%ARCH% %VS_CODE% %VS_VERSION% %BUILD_TYPE% %PYTHON3_EXE% ^
%PYTHON3_INCLUDE% %PYTHON3_LIB% %PYTHON3_NP_INCLUDE% %PYTHON3_PACKAGES% ^
%PY_VERSION% %CLEAN_BUILD%
rem ----------------------------------------------------------------------------------------------------
參考
- Build OpenCV GPU Version On Windows 10
- Cannot install openCV 3.1.0 with python3. CMAKE not including or linking python correctly
- 在Windows上编译带CUDA(GPU)的OpenCV
- How to use OpenCV DNN Module with Nvidia GPU on Windows
- Accelerate OpenCV 4.5.0 on Windows – build with CUDA and python bindings - James Bowley
影像處理
- sift
def adjust_gamma(image, gamma=1.0): invGamma = 1.0 / gamma table = np.array([((i / 255.0) ** invGamma) * 255 for i in np.arange(0, 256)]).astype("uint8") return cv2.LUT(image, table) def sift_compare(path_a, path_b): ''' Use SIFT features to measure image similarity @args: {str} path_a: the path to an image file {str} path_b: the path to an image file @returns: TODO ''' # initialize the sift feature detector orb = cv2.ORB_create() # get the images img_a = cv2.imread(path_a) img_b = cv2.imread(path_b) img_a = adjust_gamma(img_a, 0.1) img_b = adjust_gamma(img_b, 0.1) # find the keypoints and descriptors with SIFT kp_a, desc_a = orb.detectAndCompute(img_a, None) kp_b, desc_b = orb.detectAndCompute(img_b, None) # print(f'len kp_a = {len(kp_a)}, len desc_a = {len(desc_a)}') # print(f'type kp_b = {type(kp_b)}, type desc_b = {type(desc_b)}') # print(f'len kp_b = {len(kp_b)}, len desc_b = {len(desc_b) if desc_b else 0}') if desc_a is None or desc_b is None: # rr.LOG('Error: desc_a = {}, desc_b = {}'.format(type(desc_a), type(desc_b))) # rr.LOG('Error: Return score 0.') return 0 # Initialize the bruteforce matcher bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) # match.distance is a float between {0:100} - lower means more similar matches = bf.match(desc_a, desc_b) similar_regions = [i for i in matches if i.distance < 70] # print('Length of similar_regions = {}'.format(len(similar_regions))) # print('Length of matches = {}'.format(len(matches))) sorted_matches = sorted(matches, key = lambda x:x.distance) good_matches = sorted_matches[:int(len(sorted_matches) * 0.5)] similar_regions2 = [i for i in good_matches if i.distance < 70] # print('Length of good_matches = {}'.format(len(good_matches))) if len(matches) == 0: return 0 return len(similar_regions) / len(matches)
Color tempertature
code
img1 = cv2.imread(file)
B, G, R = cv2.split(img1)
avgB = cv2.mean(B)[0]
avgG = cv2.mean(G)[0]
avgR = cv2.mean(R)[0]
# X = avgR * -0.14282 + avgG * 1.54924 + avgB * -0.95641
# Y = avgR * -0.32466 + avgG * 1.57837 + avgB * -0.73191
# Z = avgR * -0.68202 + avgG * 0.77073 + avgB * 0.56332
X = 2.789 * avgR + 1.7517 * avgG + 1.1302 * avgB
Y = 1 * avgR + 4.5907 * avgG + 0.0601 * avgB
Z = 0 * avgR + 0.0565 * avgG + 5.5943 * avgB
x = X / (X + Y + Z)
y = Y / (X + Y + Z)
n = (x - 0.3320) / (0.1858 - y)
# n = (0.23881 * avgR + 0.25499 * avgG + -0.58291 * avgB) / (0.11109 * avgR + -0.85406 * avgG + 0.52289 * avgB)
CCT = 449 * pow(n, 3) + 3525 * pow(n, 2) + 6823.3 * n + 5520.33
# CCT = 437 * pow(n, 3) + 3601 * pow(n, 2) + 6831 * n + 5517
# print(f'x = {x}')
# print(f'y = {y}')
# print(f'n = {n}')
print(f'{file}: CCT = {CCT}')
- How to Calculate the Color Temperature / Tint of the Colors in an Image?
- Calculating Color Temperature and Illuminance using the TAOS TCS3414CS Digital Color Sensor_
- Java RGB转色温(CCT)
- Calculate color temperature (CCT) from CIE 1931 xy coordinates
- OpenCV: Color conversions
- sRGB色彩空間 - 維基百科,自由的百科全書
- Color temperature - Wikipedia
- What color is a blackbody? - some pixel rgb values

