Giter Site home page Giter Site logo

opencv-template's Introduction

Linux:

sudo apt install build-essential cmake gcc libopencv-dev
mkdir build
cd build
cmake ..
cmake --build .

Windows MSVC:

Download and install the following dependencies:

Navigate to where you have cloned this repository. Open a terminal and enter the following commands in order.

mkdir build
cd build
cmake .. -DOpenCV_DIR="<path/where/you/extracted/opencv/build/x64/vc16/lib>"

Note: DOpenCV_DIR is case-sensitive.

Once the commands finish executing, you should be able to find a MSVC solution (.sln) file in the build directory (i.e. /path/to/this-repository-name/build). Open the solution file and run the program via the green "Local Windows Debugger" button at the top.

When "Debug" is chosen in the configuration dropdown, OpenCV will output some error messages in the console but they can be ignored and do not appear if the configuration is switched to "Release"

If you add new files to the project, ensure you rerun: (terminal inside the build directory)

cmake .. -DOpenCV_DIR="<path/where/you/extracted/opencv/build/x64/vc16/lib>"

This will regenerate all the necessary project files to recognize the newly added file.

Windows MSYS

Download and install the following dependencies:

Navigate to where you have cloned this repository. Open a terminal and enter the following commands in order.

mkdir build
cd build
cmake .. -DOpenCV_DIR="<path/where/you/extracted/opencv/build/x64/mingw/lib>"
ninja

Note: DOpenCV_DIR is case-sensitive.

The built executable should be placed into the build directory.

If you make changes or add new files to the project, ensure you rerun: (terminal inside the build directory)

ninja

opencv-template's People

Contributors

martinstarkov avatar

Watchers

 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.