拿我那八倍镜来 发表于 2023-5-12 12:10:16

wang540375563 发表于 2020-2-7 19:29
为什么下面没有显示没有

你要把读取的内容赋值给变量再显示,就好像有一堆书,我让你读本书完了告诉我讲的啥,那你得把内容记住然后跟书名关联起来。我问你读了没你说读了,我不问是哪本书你也没记住书名那怎么讲出来呢

旺旺同学爱编程 发表于 2023-7-31 20:17:41

wang540375563 发表于 2020-2-7 19:29
为什么下面没有显示没有

cv2.imread()只是读取这张图的信息,并没有什么显眼的结果,若你想展示这张图使用cv2.imshow()

幕有前 发表于 2024-12-27 14:39:36


123驾驭甲鱼正邦

人过无痕 发表于 8 小时前

为什么我在cmd 中下载这个opencv 会变成这样
Microsoft Windows [版本 10.0.26100.6584]
(c) Microsoft Corporation。保留所有权利。

C:\Users\Doraemon>python -m pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting opencv-python
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fa/80/eb88edc2e2b11cd2dd2e56f1c80b5784d11d6e6b7f04a1145df64df40065/opencv_python-4.12.0.88-cp37-abi3-win_amd64.whl (39.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.0/39.0 MB 24.5 MB/s0:00:01
Collecting numpy<2.3.0,>=2 (from opencv-python)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz (20.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 20.3/20.3 MB 24.2 MB/s0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─>
      + C:\Users\Doraemon\AppData\Local\Programs\Python\Python314\python.exe C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\vendored-meson\meson\meson.py setup C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl\meson-python-native-file.ini
      The Meson build system
      Version: 1.5.2
      Source dir: C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba
      Build dir: C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl
      Build type: native build
      Project name: NumPy
      Project version: 2.2.6
      WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

      ..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]
      The following exception(s) were encountered:
      Running `icl ""` gave " 系统找不到指定的文件。"
      Running `cl /?` gave " 系统找不到指定的文件。"
      Running `cc --version` gave " 系统找不到指定的文件。"
      Running `gcc --version` gave " 系统找不到指定的文件。"
      Running `clang --version` gave " 系统找不到指定的文件。"
      Running `clang-cl /?` gave " 系统找不到指定的文件。"
      Running `pgcc --version` gave " 系统找不到指定的文件。"

      A full log can be found at C:\Users\Doraemon\AppData\Local\Temp\pip-install-bwb3wnxv\numpy_102e17144c4a47e5abd7969277d079ba\.mesonpy-cv6pugrl\meson-logs\meson-log.txt
      

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

C:\Users\Doraemon>python -m pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
页: 1 2 [3]
查看完整版本: OpenCV 的基本操作 —— 通过案例学习图像处理及计算机视觉开发(1)