Giter Club home page Giter Club logo

opencv_examples's Introduction

OpenCV Example 工程使用指南

从GitHub仓库下载

  1. 打开浏览器,进入OpenCV_examples的仓库(如果访问慢的话点这里

    或者

  2. 在网页上(见上图),点击Clone and download>>Download ZIP,将GitHub仓库下载到本地。

解压并修改CMakeLists.txt

  1. 解压

  2. 找到CMakeLists.txt 文件

  3. 替换OpenCV路径:
    利用替换,搜索D:\\opencv411\\build\\install
    替换成本电脑OpenCV所在目录的build\\install路径,注意一定要把 \ 写成 \\

    (下图在Notepad++上编辑的界面)

从CLion导入GitHub仓库工程

  1. 导入模块的方法:

    (在之前没打开过任何工程的时候>>import project from sources)

    (在之前有打开过任何工程的时候)

  2. 输入之前解压后GitHub仓库的路径

测试课本程序运行

  1. 修改main.cpp文件

    原main.cpp文件内容:
#include "OpenCV_example.hpp"
#include <iostream>


int main() {


    return 0;
}
  1. 运行一个程序案例:
    假设要运行课本案例的Logo.cpp,在main.cpp文件的main函数里写上一行:run_logo();

  2. 设置运行参数(run>>Edit Configurations),讲working directory设置为当前工程的路径:




3. 重新编译配置:

4. 运行,结果如下:



*查看GitHub内各c++文件被我修改的内容




opencv_examples's People

Contributors

baiyun-u-smartai avatar

Stargazers

Zanerogl avatar

Watchers

James Cloos avatar Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.