Zedboard Installing desktop Systems Ubuntu and OPENCV (2)

Source: Internet
Author: User

Next, install OpenCV below.

Generally refer to the Lu Jiahua of the white cover of the "Hardware and software co-design", but have to say that the book is too rough, a lot of details are not explained.

First of all, the PC and this board method is the same, so the PC is not installed can also follow this method

The general approach is to cross-compile the method because fast. But I don't want to be so lazy, so, just follow the local compilation method.

Portal: http://opencv.org/

The following is step 1. Please download the source package, or get it via git.

2. Copy to working directory, suggest copy to ~ and unzip

Unzip Open[tab]

3. Get root

4.

Install build-essentialaptinstall cmakeaptinstall libgtk2. 0-devaptinstall libavcodec-dev libavformat-dev libswscale-devaptInstall libdc1394--devaptinstall libjpeg-dev libpng-dev Libtiff-dev Libjasper-dev

These are some of the necessary libraries. But it is very likely that the installation will be particularly slow because the server is abroad. Therefore, it is recommended to update the source first, the specific method please Baidu, here is not much to say.

5. Enter into the OpenCV directory such as: CD ~/open[tab]

Then enter the following command (for PC)

mkdir-D cmake_build_type=release-d cmake_install_prefix=/usr/local.

If it is Zedboard, please follow the command below

mkdir-D cmake_build_type=release-d-D build_opencv_gpu=off-d with_cuda=off-d With_1394=off CMAKE_ Install_prefix=/usr/local.

The command above basically turns off everything that is related to the GPU, because Zynq doesn't have a GPU

6. Compile (Takes a long time)

 Make  Make Install

7. Loading

Ldconfig

8. Verify that the installation is successful

Enter SAMPLE/C this folder

Execute the following statement

chmod 777 Build_all. SH
./build_all.sh

After the compilation is complete, just find a file and execute it.

Please note that if there is an error in the compilation, please Baidu, generally can find the problem, do not ignore the error. After you find the solution to the error, rewrite the CMake file, and make and make install.

At the end of the day, I didn't understand what a "cross-compilation" was, and had been operating on Zedboard Linux on a book-by-case basis. As everyone knows, the principle of the method is that the computer must be compiled in the PC Zedboard code execution rather than on the Zedboard directly compiled. So it has not been able to install successfully.

Compiling in this way, the speed will be much slower than cross-compiling, the more than 2-3 hours, in the compilation when I went downstairs to eat, shopping and so on (escape). It does reduce the variety of strange problems in cross-compilation.

Zedboard Installing desktop Systems Ubuntu and OPENCV (2)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.