Giter Club home page Giter Club logo

cpp-boilerplate-minimal's Introduction

Documentation

Intro

cpp-boilerplate-minimal is a skeleton for writing image processing C++. It contains a solid working CMakeLists structure, some fundamental thirdparty libraries built from source, and an adapted OpenCV sample to get you up to speed quickly.

Why 'minimal'? Because there's a not-so-minimal version with useful infrastructure frameworks not yet open-sourced.

How to use

  1. Copy (probably not clone unless you know better) the contents of this repository
  2. Replace "CPPBP" and "cppbp" in the root CMakeLists.txt and files within cmake/ folder to some short codename of your project
  3. Set up prerequisite libraries Boost and OpenCV (see below)
  4. Build the sample
  5. build new stuff based on the sample

Building sample

Assuming Visual Studio 9 2008 as your sole installed compiler. Then from the root of the copied & customized cpp-boilerplate, run this:

  • mkdir build.vc9 && cd build.vc9
  • cmake ..
  • start .sln
  • Build Solution (F7)

To run the sample, OpenCV dlls must be in the system path.

Setting up Boost

If you already have Boost installed or built, just set the BOOST_ROOT environment variable, like this:

set BOOST_ROOT=c:\Users\ansgri\thirdparty-src\boost_1_54_0

Otherwise, build it first following this approximate procedure:

  • you must have Visual Studio (or other compiler of choice) installed (obviously)
  • download and unpack the source archive
  • from the unpacked source dir execute bootstrap.bat
  • review the build options: b2 --help
  • build like this: b2 link=shared variant=release threading=multi runtime-link=shared

Setting up OpenCV

TODO: instructions for the case when OpenCV is installed via binary installer

Building from source on Windows:

  • git clone git://github.com/Itseez/opencv.git
  • git checkout 2.4.6 (or other stable tag; to see all, execute git tag)
  • mkdir build.user && cd build.user
  • cmake .. && start OpenCV.sln
  • build solution (F7) in both Release and Debug configurations
  • build 'INSTALL' target in both Release and Debug configurations (in Solution Explorer, right-click and Build, it's in CMake Targets folder)
  • you'll have install folder under build.user. Its full path must be set to OpenCV_DIR environment variable.

cpp-boilerplate-minimal's People

Contributors

ansgri avatar

Watchers

James Cloos avatar Todd Stellanova 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.