广告
返回顶部
首页 > 资讯 > 后端开发 > Python >centos opencv + pyth
  • 361
分享到

centos opencv + pyth

centosopencvpyth 2023-01-31 06:01:48 361人浏览 独家记忆

Python 官方文档:入门教程 => 点击学习

摘要

Table of Contents 1. Installing OpenCV from source 1.1. We need CMake to configure the installation, GCC for compil

Table of Contents

  • 1. Installing OpenCV from source
    • 1.1. We need CMake to configure the installation, GCC for compilation, python-devel and Numpy for creating Python extensions etc.
    • 1.2. Next we need GTK support for GUI features, Camera support (libdc1394, libv4l), Media Support (FFmpeg, gstreamer)
    • 1.3. OpenCV comes with supporting files for image fORMats like PNG, JPEG, JPEG2000, TIFF, WEBP etc. But it may be a little old. If you want to get latest libraries, you can install development files for these formats.
    • 1.4. install OpenCV
    • 1.5. test.py

1 Installing OpenCV from source

1.1 We need CMake to configure the installation, GCC for compilation, Python-devel and Numpy for creating Python extensions etc.

yum install cmake
yum install python-devel numpy
yum install gcc gcc-c++

1.2 Next we need GTK support for GUI features, Camera support (libdc1394, libv4l), Media Support (ffmpeg, gstreamer)

yum install gtk2-devel
yum install libdc1394-devel
yum install libv4l-devel
yum install ffmpeg-devel
yum install gstreamer-plugins-base-devel

1.3 OpenCV comes with supporting files for image formats like PNG, JPEG, JPEG2000, TIFF, WebP etc. But it may be a little old. If you want to get latest libraries, you can install development files for these formats.

yum install libpng-devel
yum install libjpeg-turbo-devel
yum install jasper-devel
yum install openexr-devel
yum install libtiff-devel
yum install libwebp-devel

1.4 install OpenCV

  • yum install opencv
  • yum install opencv-python
  • yum install opencv-devel (opencv 开发包,含有头文件, for c++)

1.5 test.py

import cv2
import numpy as np

img = np.zeros((512, 512, 3), np.uint8)
cv2.line(img, (0,0), (511, 511), (255, 0, 0), 5)
cv2.imshow('img',img)
cv2.waiTKEy(1000)
cv2.destroyAllwindows()

--结束END--

本文标题: centos opencv + pyth

本文链接: https://www.lsjlt.com/news/189315.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • centos opencv + pyth
    Table of Contents 1. Installing OpenCV from source 1.1. We need CMake to configure the installation, GCC for compil...
    99+
    2023-01-31
    centos opencv pyth
  • Ubuntu下安装opencv与pyth
    首先先去opencv官网(http://opencv.org/downloads.html)下载linux版本的opencv压缩包,此处下载的opencv3.1版本的。 进入opencv下载的文件夹,解压 unzip opencv...
    99+
    2023-01-31
    Ubuntu opencv pyth
  • linux(CentOS)下升级pyth
    1。下载python3.3安装包:yum install readline-devel.x86_64wget https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz2。解压安装包:t...
    99+
    2023-01-31
    linux CentOS pyth
  • centOS升级python2至pyth
    今天安装了一个centos 6.9  ,查看默认python版本是2.6,所以准备升级,按着以前在ubuntu上的升级步骤:(1)  wget http://www.python.org/ftp/python/3.3.0/Python-3....
    99+
    2023-01-31
    centOS pyth
  • centos 7 yum 安装 pyth
    sudo yum install epel-releasesudo yum install python34...
    99+
    2023-01-31
    centos yum pyth
  • Python.PyADB -- Pyth
    Python的ADB交互接口 PyADBhttp://www.open-open.com/lib/view/open1340862229717.ht...
    99+
    2023-01-31
    Python PyADB Pyth
  • mysql-connector-pyth
    什么是MySQL Connector/Python?MySQL Connector/Python enables Python programs to access MySQL databases, using an API that is...
    99+
    2023-01-31
    mysql connector pyth
  • Something about Pyth
     In these series of posts we will see how to build some necessary tools from scratch to perform our tasks. Today we focu...
    99+
    2023-01-31
    Pyth
  • sublime text 3 Pyth
    重点问题 使用sublime text3编写python代码时,一些类声明函数调用都需要自己去敲写。很影响工作效率。敲写代码时加代码提示。 具体方法 点击Ctrl+Shift+P弹出 ...
    99+
    2023-01-31
    sublime text Pyth
  • 安装homeassistant+pyth
    1、基础信息 - 版本信息 - Scientific Linux release 7.6 (Nitrogen) - win10 linux 子系统,centos,wlinux - ...
    99+
    2023-01-31
    homeassistant pyth
  • CentOS OpenCV怎样在LINUX系统中编译安装
    CentOS OpenCV怎样在LINUX系统中编译安装,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。如何在Linux下編譯CentOS OpenCV (OS)...
    99+
    2023-06-16
  • Windows上Python2与Pyth
    Python3 虽是未来,不过 Python2 的用户群体仍然膨大,网上有大量优良的项目和模块可供使用,遇到问题也基本可以找到解决方法,推荐新人使用。   如果你还未安装 Python 2.x 版本,这里推荐下载 2.7.11 安装,...
    99+
    2023-01-31
    Windows Pyth
  • 【python 连接hbase】pyth
    python是通过thrift去访问操作hbase 1、首先需要先安装happyhbase和thrift pip install happybase pip install thrift 2、需要修改源码一个文件parser.p...
    99+
    2023-01-31
    python hbase pyth
  • Python 2.7.x 和 Pyth
    注:本文的原文地址为Key differences between Python 2.7.x and Python 3.x 许多 Python 初学者想知道他们应该从 Python 的哪个版本开始学习。对于这个问题我的答案是 “你学习...
    99+
    2023-01-31
    Python Pyth
  • subline text3 配置pyth
    环境win7 64位先安装Python 3.6,请记得打上红圈中的勾,将python的路径添加到系统变量中:下载subline text3 (简称ST3): http://www.sublimetext.com/安装Package Cont...
    99+
    2023-01-31
    subline pyth
  • Debian8下python3和pyth
    在bash下python会调用python2.x python3会调用python3.x 如果使用pip install命令安装模块会安装python2的模块。 而python3的pip命令使用的是pip3。 如果没有安装pip3...
    99+
    2023-01-31
    pyth
  • 【Python】安装MySQL-pyth
    // wget[root@wode006 tools]# wget https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip--2015-07...
    99+
    2023-01-31
    Python MySQL pyth
  • Intellij IDEA 安装Pyth
          百度网盘地址:https://pan.baidu.com/s/1d9ArRH6adhDUGiJvRqnZMw                 (1)建议手动安装插件   IDEA Pyhton插件地址:http://pl...
    99+
    2023-01-31
    Intellij IDEA Pyth
  • Python之路,Day1 - Pyth
    Python之路,Day1 - Python基础1本节内容Python介绍发展史Python 2 or 3安装Hello World程序变量用户输入模块初识.pyc是个什么鬼?数据类型初识数据运算表达式if ...else语句表达式for ...
    99+
    2023-01-31
    之路 Python Pyth
  • python 安装 mysql-pyth
    安装pip install MySQL-python 故障解决!   running build_ext     building '_mysql' extension     error: Microsoft Visual C++ 9.0...
    99+
    2023-01-31
    python mysql pyth
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作