Giter Site home page Giter Site logo

gesturesamplecollector's Introduction

What is this ?

This is a sample collector for my gestures-based human-computer/robot interaction project, but also can be used to collect any samples using web-cam for general use.

It depends on Qt and Opencv, and sample images using a webcam.

Compile

Run

mkdir build
cd build
cmake ..
make

The sample collector program depends on Qt5 (with Qt5Core and Qt5Widgets) and OpenCV 3 (with the libs opencv_core, opencv_video, opencv_videoio, opencv_imgproc and opencv_imgcodecs).

After compilation, an executable file named collector will be generated in the bin folder. Just run it.

Note

During sampling, in the folder specified by you, two directories will be made. One directory is used to store BMP images obtained by sampling through the webcam, while the other directory is used to store PGM images who are generated through extracting hand regions from the corresponding BMP images.

The PGM images are generated by the function HandDetector::detect defiend in src/HandDetector.cpp. Basically, a PGM image is generated through

  • Color filtering

  • 7X7 Gaussian blurring with variance 0.8

  • Thresholding: set white color for pixels whose gray-scaled value is greater than 10 out of 255

  • Morphological transformation: opening first and then closing, both with a 9x9 kernel with the following shape

     `0, 0, 0, 0, 1, 0, 0, 0, 0`
    
     `0, 1, 1, 1, 1, 1, 1, 1, 0`
    
     `0, 1, 1, 1, 1, 1, 1, 1, 0`
    
     `1, 1, 1, 1, 1, 1, 1, 1, 1`
    
     `1, 1, 1, 1, 1, 1, 1, 1, 1`
    
     `1, 1, 1, 1, 1, 1, 1, 1, 1`
    
     `0, 1, 1, 1, 1, 1, 1, 1, 0`
    
     `0, 1, 1, 1, 1, 1, 1, 1, 0`
    
     `0, 0, 0, 0, 1, 0, 0, 0, 0`
    

gesturesamplecollector's People

Contributors

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