Giter Club home page Giter Club logo

kinecamok's Introduction

kinecamok

Recieves face tracking data from FaceTrackingUdpSender. The Kinect space is mapped similar the way geometry is mapped in mapamok. Press 'n' to use the tip of the nose as a mapping point, or 'e' to use a point between the eyebrows. Press the middle mouse button to switch modes. Move the point onto either the nose of the tracked face, or between the eyebrows. Press the middle mouse again to confirm. And again to set a next point. Move the tracked face around the whole range of view while this process.

Once the calibration is done switch to face shading mode and view the videos on your face...

Installation

Install OpenFrameworks. Install ProCamToolkit from https://github.com/YCAMInterlab/ProCamToolkit/ Place this next to mapamok. copy the data dir from mapamok/bin/ to kinecamok/bin/ and add the required movies.

kinecamok's People

Watchers

 avatar  avatar

kinecamok's Issues

Nicer radial gradient

Using ofBackgroundGradient(ofColor::white,ofColor::black, OF_GRADIENT_CIRCULAR) as a mask to multiply in order to get a vignette. Probably need something nicer. Or at least some triangles in the corners to get rid of the bright spots.
Current code from libs/openFrameworks/graphics/ofGraphics.cpp :

void ofBackgroundGradient(const ofColor& start, const ofColor& end, ofGradientMode mode) {
    float w = ofGetWidth(), h = ofGetHeight();
    ofMesh mesh;
    mesh.setMode(OF_PRIMITIVE_TRIANGLE_FAN);
    if(mode == OF_GRADIENT_CIRCULAR) {
        // this could be optimized by building a single mesh once, then copying
        // it and just adding the colors whenever the function is called.
        ofVec2f center(w / 2, h / 2);
        mesh.addVertex(center);
        mesh.addColor(start);
        int n = 32; // circular gradient resolution
        float angleBisector = TWO_PI / (n * 2);
        float smallRadius = ofDist(0, 0, w / 2, h / 2);
        float bigRadius = smallRadius / cos(angleBisector);
        for(int i = 0; i <= n; i++) {
            float theta = i * TWO_PI / n;
            mesh.addVertex(center + ofVec2f(sin(theta), cos(theta)) * bigRadius);
            mesh.addColor(end);
        }
    }
    // ...
    glDepthMask(false);
    mesh.draw();
    glDepthMask(true);
}

play random video texture

When a new face is tracked play a random video texture. Stop and stay at the last frame. When the face isn't tracked for a while, restart a new video texture next time it is tracked.

Sometimes crashes on startup, segmentation error

Once it runs everything is stable, but sometimes the program crashes straight after start. Error message says "Segmentation fault (core dumped)"
Seems that this means there's some pointer being used that points to an uninitialized space in memory...

Perhaps a sound issue? Somewhere it was mentioned that it's important to close sound befor quitting the app. But I'm having the problem on startup...

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.