LoginSignup
5
8

More than 5 years have passed since last update.

備忘録:OpenCV 3.1.0 ソースコンパイル時のヘッダファイルがなくて困る現象まとめ

Last updated at Posted at 2018-06-13

Torch7のためにどうしてもOpencv3.1.0がソースからのビルドで必要になった時の備忘録
Ubuntu14.04で確認

linux/videodev.h not found

https://stackoverflow.com/questions/5842235/linux-videodev-h-no-such-file-or-directory-opencv-on-ubuntu-11-04

ここの回答が一番解決しやすい。要はlibv4l-devをapt-get install して、リンクを張るだけで解決します。

sys/videoio.h not found

https://github.com/opencv/opencv/issues/6262

ここのissueが解決につながった。要はもともと必要ないものらしく、cmakeオプションで

-D WITH_V4L=OFF

を追加することで、回避可能

ffmpeg/avformat.h not found

/usr/include/libavformat/内に同名のファイルが存在。バージョンの違いにより細かくなっているらしい そのままリンクでつなげば大丈夫

メモ:graphcuts でbuild中にerrorが発生

CUDA8.0以降で発生らしい

https://github.com/stereolabs/zed-opencv/issues/41
https://github.com/opencv/opencv/pull/6510/files

バージョン問題らしいので、もしエラーが発生したらソースコードを上記の#6510のように追記しましょう。

5
8
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
5
8