`
rotter
  • 浏览: 8872 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

OpenCV with Python - Getting start

阅读更多
== Env Setup (Windows OS) ==

  • OpenCV - 2.0
  • Python - 2.6.5

Step 1: System Parameter setup for Python Path:
set %PYTHON_HOME%=D:\Rotter\OCR\python26
set %PATH%=%PATH%;%PYTHON_HOME%


Step 2: Set OpenCV lib into Python lib path:
Ref:
http://docs.python.org/library/site.html
http://www.juyimeng.com/how-to-find-and-add-a-python-search-library-path.html

Create opencv.pth in %PYTHON_PATH%\Lib\site-packages:
D:\Rotter\OCR\OpenCV2.0\Python2.6\Lib\site-packages\opencv
D:\Rotter\OCR\OpenCV2.0\bin


Note: Needn't run the 'setup-for-win.py' script in
OpenCV2.0\interfaces\swig\python as some tutorials said.

Step 3: (Just get some video & pic resources)
Create a fold name as 'src' for the test code.
Copy 'D:\Rotter\OCR\OpenCV2.0\samples\c' fold in to 'src'.

At last, the directory tree looks like:
OCR
|- OpenCV2.0
|- python26
    |- Lib
       |- site-packages
          |- opencv.pth
|- src
    |- c

Exampel.py: (put it in the 'src')
import cv
import highgui
 
if __name__=='__main__':
    image=highgui.cvLoadImage("./c/airplane.jpg",1)
    highgui.cvNamedWindow("picwin")
    highgui.cvShowImage("picwin",image)
    highgui.cvWaitKey(0)
    highgui.cvDestroyWindow("picwin")


You can get:


Python IDE suggestion:
http://pyclassroom.appspot.com/2009/08/11/ide-recommend.html
  • 大小: 51.7 KB
分享到:
评论

相关推荐

    opencv-python-4.10.0.84.tar.gz

    Python版本的OpenCV库,也就是`opencv-python`,为Python程序员提供了方便的接口来利用这个功能丰富的库。在本案例中,我们讨论的是OpenCV的Python接口的4.10.0.84版本,它是一个经过编译的二进制包,文件名为`...

    opencv-python-4.5.5-cp311-cp311-win-amd64.zip

    在给定的压缩包"opencv-python-4.5.5-cp311-cp311-win-amd64.zip"中,包含的是OpenCV的Python绑定版本4.5.5,专为Python 3.11编译,并适用于Windows操作系统上的AMD64架构。这个安装包使得开发者能够在Python环境中...

    opencv-python-4.5.5.64.tar.gz

    Python版本的OpenCV(即`opencv-python`)提供了丰富的接口,使得Python开发者能够轻松地利用这个库进行图像和视频操作。`opencv-python-4.5.5.64.tar.gz`是一个包含了OpenCV Python接口的特定版本4.5.5.64的源码或...

    opencv-python-3.1.0-cp34-cp34m-win-amd64.zip

    在给定的压缩包"opencv-python-3.1.0-cp34-cp34m-win-amd64.zip"中,包含的是OpenCV Python接口的3.1.0版本,专为32位或64位的Windows系统以及Python 3.4编译。`cp34m`表示这是针对Python 3.4的 ABI(应用程序二进制...

    opencv-python-4.10.0.82.tar.gz

    这个压缩包“opencv-python-4.10.0.82.tar.gz”包含了Python接口的OpenCV库版本4.10.0.82,是开发人员在Python环境中进行图像和视频处理的重要资源。 OpenCV-Python是OpenCV库的一个Python绑定,它使得Python程序员...

    opencv_python-3.4.7-cp37-cp37m-win_amd64.rar

    由于官网没有提供opencv_python‑3.4.7+contrib‑cp37‑cp37m‑win_amd64.whl的下载了,可以通过先下载opencv_python-3.4.7-cp37-cp37m-win_amd64....pip install --user opencv-contrib-python==3.4.7.28  两步实现

    opencv_python-4.2.0.32-cp38-cp38-win32.whl

    opencv_python-4.2.0.32-cp38-cp38-win32.whl 在线cmd命令pip3 install opencv_python 网速过慢也导致出错的问题。 操作方法:将文件下载后拷贝至Anaconda或者python安装目录下的\libs\site-packages文件夹下(没有...

    Python库 | opencv_python-4.3.0.38-cp37-cp37m-win_amd64.whl

    《Python库OpenCV:探索计算机视觉的神器》 在当今数据驱动的世界中,计算机视觉作为一门重要的技术领域,正日益成为科研与开发的热点。OpenCV(Open Source Computer Vision Library)是一个开源的强大计算机视觉...

    PyPI 官网下载 | opencv-python-4.5.3.56.tar.gz

    《OpenCV-Python 4.5.3.56:深度学习与计算机视觉的利器》 OpenCV(开源计算机视觉库)是计算机视觉和机器学习领域的重要工具,它提供了丰富的功能,用于处理图像和视频数据。在Python环境中,OpenCV通过`opencv-...

    opencv-python-4.9.0.80-cp37-abi3-win-amd64.whl

    opencv-python-4.9.0.80-cp37-abi3-win-amd64.whl

    opencv-python-headless-4.6.0.66-cp36-abi3-win-amd64.whl

    opencv_python_headless-4.6.0.66-cp36-abi3-win_amd64.whl 下载官网:https://pypi.org/project/opencv-python-headless/4.6.0.66/#files

    opencv_python-3.4.0-cp36-cp36m-win_amd64.whl

    opencv_python-3.4.0-cp36-cp36m-win_amd64.whl,适用于python3.6,window 64位。上传它是因为原下载链接打不开了。【opencv_python-3.4.0-cp36-cp36m-win_amd64.whl】,用于python安装opencv模块。

    opencv-python-4.5.5.64-cp36-abi3-win-amd64.whl

    该资源为opencv_python-4.5.5.64-cp36-abi3-win_amd64.whl,欢迎下载使用哦!

    opencv-python-4.10.0.84-cp37-abi3-win-amd64.whl

    opencv-python-4.10.0.84-cp37-abi3-win-amd64.whl

    opencv-python-4.8.0.76-cp37-abi3-win-amd64.whl

    opencv-python-4.8.0.76-cp37-abi3-win-amd64.whl

    opencv-python-4.11.0.86.tar.gz

    而opencv-python就是OpenCV库的Python接口,它使得开发者可以更加便捷地使用Python语言进行计算机视觉相关的开发工作。由于Python语言的易用性,opencv-python的出现降低了计算机视觉入门的门槛,让更多的人能够参与...

    opencv_python-4.10.0.84-cp37-abi3-win32.whl

    该资源为opencv_python-4.10.0.84-cp37-abi3-win32.whl,欢迎下载使用哦!

    opencv_python-4.11.0.86-cp37-abi3-win_amd64.whl

    该资源为opencv_python-4.11.0.86-cp37-abi3-win_amd64.whl,欢迎下载使用哦!

    opencv-python-4.5.5.62.tar.gz

    在给定的压缩包文件"opencv-python-4.5.5.62.tar.gz"中,包含的是OpenCV的Python绑定版本4.5.5.62,这是一个重要的软件更新,提供了许多新功能、优化和错误修复。 OpenCV-Python是OpenCV库与Python语言的接口,使得...

Global site tag (gtag.js) - Google Analytics