發表文章

目前顯示的是 7月, 2018的文章

Building C++ OpenTLD source code

圖片
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 本文使用 https://github.com/arthurv/OpenTLD 為基礎。用到的軟體版本如下: Windows 10 Git 2.16.2   CMake 3.12.0 Visual Studio Community 2017 安裝好上述軟體後,開啟 git bash,使用底下指令下載 OpenCV 3.4.1 的 source code: git clone -b 3.4.1 https://github.com/opencv/opencv git clone -b 3.4.1 https://github.com/opencv/opencv_contrib 接著使用CMake產生編譯 OpenCV 3.4.1 的 Visual Studio Community 的專案檔案,此部分可參考 OpenCV 3.2.0 的擴充 Contrib 函式庫如何編譯 與 使用 (Visual Studio) ,確認可以編譯並執行OpenCV3.4.1的範例。之後就可以用這個版本的OpenCV3.4.1來編譯 C++ OpenTLD。因為用Visual Studio Community 2017與OpenCV3.4.1來編譯,需要對原本的程式碼做一些修改,可至 https://github.com/pinglunliao/OpenTLD 下載。使用CMake來產生Visual Studio的專案: OpenCV_DIR要選擇 OpenCV3.4.1,此 資料夾是由前述Visual Studio Community 2017建置(build)出來的 install 資料夾內容 : 接著開啟 TLD 專案: 將OpenTLD\src\ 資料夾下的 PatchGenerator.cpp 加到 tld project裡: 此時就可以建置(build)出執行檔了。在OpenTLD\bin\Debug\ 資料夾下會看到 run_tld.exe 檔案: 可在命令提示字元(cmd)來執行此程式,指令如下: run_tld.exe -p ..\..\parameters.yml -s ..\..\datas...