Coder Social home page Coder Social logo

cuda-opencv-examples's Introduction

CUDA & Open CV Examples

Many examples exist for using ready-to-go CUDA implementations of algorithms in Open CV. But what if you want to start writing your own CUDA kernels in combination with already existing functionality in Open CV? This repository demonstrates several examples to do just that. Before doing so, it is recommended to at least go through the first half of the CUDA basics. More information is provided in the comments of the examples.

Content

The examples start out simple with an empty kernel and gradually become more difficult until the point where we are able to manipulate vectors of Open CV Mat objects on the GPU. It is recommended to go through them in the order as presented below.

Basic Kernels:

  1. hello.cu: our first kernel.
  2. add.cu: basic kernel for parallel additions.
  3. ptp.cu: smart usage of pointers on the device.

Image Processing Kernels:

  1. bgrtogray.cu: our first image processing kernel.
  2. invert_1.cu: image invert using low-level operations.
  3. invert_2.cu: image invert using high-level Open CV objects.

Advanced Usage:

  1. diff_1.cu: image differencing using high-level Open CV objects.
  2. diff_2.cu: image differencing with smart usage of pointers.
  3. conversions.cpp: conversions between high-level Open CV objects.
  4. diff_proper.cu: including the kernel template and operation overloading.
  5. split.cu: image splitting by combining predefined and custom kernels.

Requirements

These examples require Open CV and CUDA to be installed on your system. Additionally, CMake is required for building. The examples were tested with Open CV 3.2, CUDA 8.0 on Ubuntu 14.04 LTS.

Building

To build the examples is done as follows.

cd build
cmake ..
make

cuda-opencv-examples's People

Contributors

erikbcg avatar evlasblom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.