arturoc / FaceSubstitution

Face substitution experiments using ofxFacetracker
Other
437 stars 120 forks source link

Exposing setter functions in ofxFaceTrackerThreaded #19

Open cupofnestor opened 11 years ago

cupofnestor commented 11 years ago

Kyle, Arturo, Great work, getting my app ready for installation next week! I'm working on attempting to expose the setters for "tweakable" properties of the threaded facetracker (rescale, iterations, tolerance... ). I've attempted to modify your ofxFaceTrackerThreaded.h to include a function like this:

void setScale(float s){
        if(lock()) {
            tracker->setRescale(s);
            unlock();
        }
    }

No luck, however, I get a BAD_ACCESS error on line 323 of ofxFaceTracker.cpp. I can set the properties by calling the function from inside the threadedFunction, but this does not allow me to easily change the value without recompiling. My knowledge of C++ and ofx is limited, so I must be missing something.