2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

opencvビルド/windows10

Last updated at Posted at 2020-05-26

概要

windows10でopencvをソースビルドする。

環境

OS: windows10 pro 64bit
IDE : Visual Studio 2017 Community
OpenCV 3.4.2 -> 3.4.10に変更しました。
  -> winpackを使います
CMake 3.17.1

パッケージ

winpackのwindowsを選択します。
image.png

image.png

参考

https://qiita.com/iwatake2222/items/337dce2148b3d6cee560#%E7%92%B0%E5%A2%83%E5%A4%89%E6%95%B0%E3%81%AE%E8%A8%AD%E5%AE%9A
OpenCV 最新版のビルドとインストール,CUDA 対応可能(ソースコードを使用)(Windows 上)

SDKのインストール/ビルド

C:\SDK\opencv342\sourceに置きました。cmakeは右のGroupedチェックで見やすくなります。
image.png
この画面で64bitを指定する。デフォルトは32bit
image.png

サンプルの実行

サンプルslnが次にできている。
C:\SDK\opencv342\source\samples\bin

opencv_highgui342.dllが無いと言われる。

検索するとC:\SDK\opencv342\build\bin\Releaseにある。パスが未通もしくはinstall処理失敗と推測。

projectの環境フィールドにパスを設定する。
PATH=%PATH%;$(ProjectDir)\xxx

Linux環境のcmake install相当の処理をすれば、解決すると思うが、やり方がわからない。次の場所へコピーするのが正式なやり方だと思う。
image.png

(sample)imageをビルド
image.png

(sample)videocapture_cameraをビルド
事前にUSBカメラ接続しておく。

CUDAや拡張機能を有効にしてビルド

arucoが必要になった

installフォルダ

INSTALLプロジェクトをビルドすると install フォルダが生成される。
image.png

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?