OpenCVのインストールとバージョンの確認
matplotlibでなく、OpneCVで描画しようかなと…
macOSにはインストールしてあったと思うけど、最近はUbuntuをメインで使っているので、Let's NoteのUbuntuにインストールしてみた。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
10:19 kimi@kimi-CFSZ5-3:~ $python -m pip install opencv-python Collecting opencv-python Obtaining dependency information for opencv-python from https://files.pythonhosted.org/packages/b7/8a/b2f7e1a434d56bf1d7570fc5941ace0847404e1032d7f1f0b8fed896568d/opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata Downloading opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB) Requirement already satisfied: numpy>=1.21.2 in ./.pyenv/versions/3.11.3/lib/python3.11/site-packages (from opencv-python) (1.24.3) Downloading opencv_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (61.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.7/61.7 MB 2.8 MB/s eta 0:00:00 Installing collected packages: opencv-python Successfully installed opencv-python-4.8.1.78 10:20 kimi@kimi-CFSZ5-3:~ $python -m pip install opencv-contrib-python Collecting opencv-contrib-python Obtaining dependency information for opencv-contrib-python from https://files.pythonhosted.org/packages/32/9e/4dcc0bb70e3b365dc85b8f96c63e6a306653f7cc6ed061aa6cc7b2bddee7/opencv_contrib_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata Downloading opencv_contrib_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB) Requirement already satisfied: numpy>=1.21.2 in ./.pyenv/versions/3.11.3/lib/python3.11/site-packages (from opencv-contrib-python) (1.24.3) Downloading opencv_contrib_python-4.8.1.78-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67.8 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 67.8/67.8 MB 3.1 MB/s eta 0:00:00 Installing collected packages: opencv-contrib-python Successfully installed opencv-contrib-python-4.8.1.78 10:20 kimi@kimi-CFSZ5-3:~ $pip3 list | grep opencv opencv-contrib-python 4.8.1.78 opencv-python 4.8.1.78 10:21 kimi@kimi-CFSZ5-3:~ $python Python 3.11.3 (main, Apr 30 2023, 15:49:09) [GCC 11.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 >>> cv2.__version__ '4.8.1' >>> 10:29 kimi@kimi-CFSZ5-3:~ |