免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
Installing OpenCV 3.0.0 on Ubuntu 14.04
相對于原文。
我這里有幾個更改的地方。
1: 用的是beta版本
2: 用的是Python3。
第一步install dependencies的時候,用的是下面的語句:
  $ sudo apt-get install build-essential
  $  sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
  $  sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev


----------------------------------------這里是原文---------------------------------

In this article, we’ll see how to install the computer vision library OpenCV 3.0.0 alpha, latest release, released two months ago (Ago 21, 2014) , on Ubuntu 14.04 LTS (Trusty Tahr) 64 bits. For those who already have installed previous releases, you’ll see that, basically, nothing has changed and it’s as easy as always. Watch the demonstration video to see how it works.

Notes:
- Tested on Ubuntu 14.04 LTS 64 bits and 32 bits;
- Tested on release 3.0.0 alpha and beta of OpenCV;

Pre-requirements:
- Ubuntu 14.04 LTS 64 bits or 32 bits installed and updated;

Lets get it started!

As I wrote in the pre-requirements, is always nice to have your OS updated. Then, run apt-get update and apt-get upgrade before we really start. For those who already have it done, skip this and don’t forget to comment these lines from the script if you choose to use it.

1st step: Install the Dependencies

To install the dependencies required from OpenCV, just run the following commands:

sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff4-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip

2nd step: Download OpenCV 3.0.0 alpha

You can download manually or run the commands below to get OpenCV:
mkdir opencv
cd opencv
wget https://github.com/Itseez/opencv/archive/3.0.0-alpha.zip -O opencv-3.0.0-alpha.zip
unzip opencv-3.0.0-alpha.zip

3rd step: Install OpenCV

Now, we’ll install OpenCV. Cmake command has a lot of options: choose those that better suit your needs and run the commands below. If you’re planning to use Qt 5.x, don’t use -D WITH_QT=ON. Learn how to use OpenCV 3 with Qt Creator 3.2 (Qt 5.3). According to one of the users that tested it on Ubuntu 14.10, you’ll need to use WITH_FFMPEG=OFF.

cd opencv-3.0.0-alpha
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
make -j $(nproc)
sudo make install

4rd step: Finishing installation

To get OpenCV working properly, we need to tell Ubuntu:
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig

After all is done I recommend rebooting your system. Done!
Then, you might be wondering: “So, that’s it?” Yes!

If you prefer, you can download the script below. If you do so, you’ll see that in addition to installing OpenCV, the script will generate a log for you, to know  how long did it take. At the end of this post you’ll see a demonstration video of the installation and test.

Script - Install OpenCV 3.0.0 (2646 downloads )

Lets test it!

We will test to check if everything is working properly. Doesn’t matter if I say you should do this way if it doesn’t work, right? Come on! I’m assuming you just restart your computer after you have performed the above steps or the given script.

1st test: Running an OpenCV sample

First of all, we need to compile the samples. Worth saying that the commands below can be avoided by adding the options to build samples on the 3rd step of installation.
cd opencv/opencv-3.0.0-alpha/samples/
sudo cmake .
sudo make -j $(nproc)

Now you can run a sample. I chose two, but feel free to run any other. The goal here is to prove that our OpenCV installation was a success. The samples we’re going to run are the FaceDetect and HoughtLines developed in C++.
cd cpp/
./cpp-example-facedetect lena.jpg // (../data/lena.jpg) OpenCV 3.0 beta
./cpp-example-houghlines pic1.png // (../data/pic1.jpg) OpenCV 3.0 beta

Note 1: If you’re using OpenCV 3.0 beta, both images are inside “../data/” directory;
Note 2: To close the window with Lenna, just press ENTER. The same to finish HoughLines. Go on and run other samples;

2nd test:  Running our own program

What about compiling something we made? Just below I am providing a simple program whose purpose is to display an image. Unzip it and run the commands below inside the folder you just created.
sudo cmake .
sudo make
./DisplayImage lena.jpg

If everything went right, you’ll see Lenna. Press ENTER to close.

OpenCV - DisplayImage Sample (587 downloads )

Watch the demonstration video to see how it worked on my computer. I chose to run the script.

We did it! OpenCV installed and tested.

Questions? Leave your comment or get in touch by email.

Test setup:
- Intel Core i5 2.6GHz
- 4GB of RAM
- 160GB of hard disk

本站僅提供存儲服務,所有內容均由用戶發(fā)布,如發(fā)現有害或侵權內容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
Installing OpenCV 2.1 in Ubuntu – Sebastian M...
Ubuntu20.4:安裝OpenCV4,配置vscode+CMake作為基本開發(fā)環(huán)境
Ubuntu安裝Opencv記錄(附人臉識別和人眼識別例子)
[翻譯]Ubuntu 14.04, 13.10 下安裝 OpenCV 2.4.9
Ubuntu 16.04 + Qt 5.11 +opencv 3.4完美配置(親測,最簡單完美的方法)
Ubuntu下Opencv與Python的協作 | 進擊的馬斯特
更多類似文章 >>
生活服務
分享 收藏 導長圖 關注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點擊這里聯系客服!

聯系客服