Giter Club home page Giter Club logo

real-time-shape-detection's Introduction

real-time-shape-detection

Project goal: use GPU on ODROID-XU4 and OpenCL acceleration to achieve real time shape and orientation detection of fast moving objects.

Part of system for automatic scarification and segregation of acorn seeds in an arboretum. Project done at the AGH University of Science and Technology.

Repository contains programs for detecting moving seed in a video stream. There is version for:

  • embedded system ODROID-XU4 running Debian/Ubuntu with Basler industrial camera
  • PC computer with default USB webcam

Repository also contains code for computing Hu moments and SVM classification of detected objects.

Run code on Ubuntu using your webcam

First, please install OpenCV 2.4

sudo apt install libopencv-dev

Compile application:

cd PC/camera
make

Run the application using default camera (usually webcam).

./capture

You will see that in the video stream from camera the application finds an object, shows its detected contour and computes the orientation. Orientation direction is shown in form of arrows.

Example output of the algorithm running on ODROID-XU4 minicomputer with Basler acA2000-165um high-speed camera:

Contours and orientation of a moving seed

OpenCL support on ODROID-XU4 with Ubuntu

Install https://developer.arm.com/technologies/compute-library

If the GL/gl.h is missing, install

sudo apt install mesa-common-dev

OpenCL generic Ubuntu packages

Basic installation

sudo apt install ocl-icd-libopencl1
sudo apt install opencl-headers
sudo apt install clinfo

Compiling OpenCL code

sudo apt install ocl-icd-opencl-dev

In order to run OpenCL on Intel GT (IvyBridge and up)

sudo apt install beignet

Information about OpenCL resources available on the machine

sudo apt install clinfo
clinfo

Some bibliography suggestions:

http://www.sci.utah.edu/~gerig/CS7960-S2010/handouts/Hu.pdf

http://www.sciencedirect.com/science/article/pii/003132039090053N

http://ro.ecu.edu.au/cgi/viewcontent.cgi?article=7351&context=ecuworks

http://www.ingentaconnect.com/content/tcsae/tcsae/2016/00000032/00000004/art00006

#Odroid XU4 user manual http://magazine.odroid.com/wp-content/uploads/odroid-xu4-user-manual.pdf

#Configuring OpenCL on Odroid: http://granolamatt.com/working/2015/02/configure-opencl-on-odroid-xu3/ http://forum.odroid.com/viewtopic.php?f=95&t=5559

#OpenCL introduction: http://www.drdobbs.com/parallel/a-gentle-introduction-to-opencl/231002854 https://people.maths.ox.ac.uk/gilesm/cuda/new_lectures/lec1.pdf https://people.maths.ox.ac.uk/gilesm/cuda/new_lectures/lec2.pdf

real-time-shape-detection's People

Contributors

palucki avatar qbicz 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

Watchers

 avatar  avatar  avatar  avatar  avatar

real-time-shape-detection's Issues

Create module for SVM testing

  • load SVM created by svm_train_and_save
  • pass some test data other than training data to verify if orientation is classified correctly

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.