1) opencv3 パッケージを検索します。
$ anaconda search -t conda opencv3
Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
Name | Version | Package Types | Platforms
------------------------- | ------ | --------------- | ---------------
Changxu/opencv3 | 3.1.0_dev | conda | linux-64
clg_boar/opencv3 | 3.0.0 | conda | linux-64, win-64
janc/opencv3 | 3.1.0 | conda | osx-64
: with ffmpeg and opencl
jlaura/OpenCV3 | 3.0.0 | conda | linux-64, osx-64
: OpenCV 3.0.0 with the optional contrib modules
jqscali/opencv3 | 3.0.0 | conda | linux-64
lbernard/opencv3 | 3.1.0 | conda | linux-64
menpo/opencv3 | 3.2.0 | conda | linux-64, win-32, win-64, osx-64
2) opencv3 パッケージの詳細を表示します。
$ anaconda show menpo/opencv3
Using Anaconda API: https://api.anaconda.org
Name: opencv3
Summary:
Access: public
Package Types: conda
Versions:
+ 3.1.0
+ 3.2.0
To install this package with conda run:
conda install --channel https://conda.anaconda.org/menpo opencv3
3) conda コマンドを使用して opencv3 パッケージをインストールします。
$ conda install --channel https://conda.anaconda.org/menpo opencv3
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /Users/xxxxx/anaconda:
The following NEW packages will be INSTALLED:
opencv3: 3.1.0-py35_0 menpo
tbb: 4.3_20141023-0 menpo
Proceed ([y]/n)? y
tbb-4.3_201410 100% |################################| Time: 0:00:03 496.34 kB/s
opencv3-3.1.0- 100% |################################| Time: 0:01:05 608.20 kB/s
4) 画像が表示されればインストール完了です。
$ python
Python 3.5.2 |Anaconda 4.3.0 (x86_64)| (default, Jul 2 2016, 17:52:12)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> from matplotlib import pyplot as plt
>>> image = cv2.imread('./1.jpg')
>>> cv2.imshow('test', image)
>>> cv2.waitKey(0)
>>> cv2.waitKey(0)
0 件のコメント:
コメントを投稿