Coder Social home page Coder Social logo

kylemcdonald / ofxfacetracker Goto Github PK

View Code? Open in Web Editor NEW
1.4K 125.0 371.0 1.1 MB

CLM face tracking addon for openFrameworks based on Jason Saragih's FaceTracker.

Home Page: http://facetracker.net/

License: Other

C++ 98.83% C 0.10% Python 0.33% Makefile 0.31% Processing 0.43%

ofxfacetracker's Introduction

ofxFaceTracker is openFrameworks addon for face tracking, based on Jason Saragih's FaceTracker library.

This addon breaks on OF 0.11.0 due OpenCV 4. Consider using ofxFaceTracker2

openFrameworks is an open source toolkit for creative coding.

All ofxFaceTracker code is available under the MIT license, while FaceTracker is provided free for non-commercial use. For commercial use of FaceTracker, please request a quote.

Installation

Required addons:

First, download ofxCv.

Then, you need to make a copy of the libs/FaceTracker/model/ directory in example-*/bin/data/model/ of each example. You can do this by hand, or python setup.py will take care of this for you.

Then you can generate project files with the OF project generator and run the examples. If you see the error Assertion failed: s.is_open() when running your app, that means you forgot to drop the model files in the right directory.

If you would like to prototype an idea involving face tracking, I encourage you to download FaceOSC. Dan Wilcox has some great FaceOSC templates that will help you get started in environments like Max, pd, Processing, and openFrameworks.

If you're interested in using ofxFaceTracker for face substitution, check out the FaceSubstitution repository.

Examples

iOS

Getting the combination of ofxFaceTracker and ofxCv working on iOS can be complicated and confusing. Try using this ofxFaceTracker-iOS repo as a starting point. Scott Hawley has also made a FaceOSC iOS port to interface with Wekinator that may helpful.

Advanced

Demonstrates how to get the image-space position of the face, and the 3d orientation (collectively, the face "pose") then applies these to the OpenGL context in order to draw an oriented face mesh.

Blink

An advanced example that shows how you might detect blinking from the extracted eye images. This is not necessarily a robust classifier for whether eyes are open or closed, but works well for blinks as events.

Calibrated

Fairly complicated example that demonstrates some advanced/experimental features of ofxCv and ofxFaceTracker for doing AR-style augmentation of the face.

Empty

Provides a minimal example of using an ofxVideoGrabber with an ofxFaceTracker, then extracts and draws the ofPolyline representing the left and right eyes.

Expression

Demonstrates the ExpressionClassifier, which can load, save, and classify expressions into pre-trained categories. Provides basic expressions (eyebrows raised, neutral, smiling) as examples.

Extraction

Demonstrates how to use the mean face mesh to draw pose and expression normalized representation of the face currently being tracked.

FaceOSC

FaceOSC sends as much data as possible from ofxFaceTracker via OSC, including its pose/position and gestural data, and its raw points. It also streams the image over Syphon.

You can download a pre-built binary in the releases page.

OSC information

  • Pose
  • center position: /pose/position
  • scale: /pose/scale
  • orientation (which direction you're facing): /pose/orientation
  • Gestures
  • mouth width: /gesture/mouth/width
  • mouth height: /gesture/mouth/height
  • left eyebrow height: /gesture/eyebrow/left
  • right eyebrow height: /gesture/eyebrow/right
  • left eye openness: /gesture/eye/left
  • right eye openness: /gesture/eye/right
  • jaw openness: /gesture/jaw
  • nostril flate: /gesture/nostrils
  • Raw
  • raw points (66 xy-pairs): /raw

ofxfacetracker's People

Contributors

arturoc avatar aubergene avatar bakercp avatar danoli3 avatar danomatika avatar drscotthawley avatar edap avatar genekogan avatar golanlevin avatar halfdanj avatar javl avatar jeremyabel avatar kylemcdonald avatar mgsx-dev avatar mitogh avatar mosspassion 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  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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxfacetracker's Issues

ofxFaceTracker & Android

Hi
I've been trying to use ofxFaceTracke with an Android project (Eclipse, NDK). The App is working ok without ofxFaceTracker but when I run the setup() function the execution ends. I copied the model files to the bin/data/models folder. The program works very well on Windows and Linux. Any idea?

Tracked face ID or lifespan

Hi All and big thanks to Kyle for this great contrib.

I am doing some testing with the face tracker and am wondering if there is a way to detect the lifespan of a face, like when doing blob tracking and assigning IDs to the blobs. This is so i can write some code which reacts to when tracking is lost and a new face is detected. Would this be possible with the facetracker or does the tracker not use data from previous frames?

Expression class dosen't clear cv::Mat correctly

The classifier example crashes due to the Expression cv::Mat vector deleting the Mat objects incorrectly when the Classifier expressions vector is resized. This leads to puzzled students trying the example.

Adding a destructor to Expression which releases the cv::Mats in the vector fixes it for us:

Expression::~Expression() {
    for(int i = 0; i < samples.size(); ++i) {
       samples[i].release();
   }
}

set tolerance

Hey Kyle, thank you for the implementation of grayscale images in the library.

I have another question though... how can I change the tracker's tolerance? I know there's a tracker.setTolerance(float) method, but how should it be used? And what range of values does it accept?

Thanks again!

could use some commenting

For instance ... what's the difference between:

ofPolyline getImageFeature(Feature feature) const;
ofPolyline getObjectFeature(Feature feature) const;
ofPolyline getMeanObjectFeature(Feature feature) const;

example-calibrated compile error

I get an error in the updatePhysicalMesh function. Its the function call:

solvePnP(Mat(objectPoints),  Mat(imagePoints),
         cameraMatrix,  distCoeffs,
         rvec, tvec);

It gives me this:
OpenCV Error: Assertion failed (CV_IS_MAT(objectPoints) && CV_IS_MAT(imagePoints) && CV_IS_MAT(A) && CV_IS_MAT(rvec) && CV_IS_MAT(tvec)) in cvFindExtrinsicCameraParams2, file /Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/__BuildAllLibs/OpenCV-2.2.0/modules/calib3d/src/calibration.cpp, line 1156

I'm not quire sure what the problem is. Looks like one of the parameters isn't an Mat. But if I look up the variables in the debugger all of them seem to be an Mat object. Maybe it's because of the CV_IS_MAT function that wants to cast Mat to const Mat* ?

Thanks for your great work.

thread tracker

I know Arturo has code and I have code for a threaded tracker. Let me know if you want a PR with it ...

reg. compiling ofxFaceTracker

Hi, dear Kyle,

I tried your work, FaceOSC_win. It is AMAZING! I tried to compile ofxFaceTracker to get FaceOSC_win but met errors and hope get you helps. I use 64-bit windows 7 and VS2010.


The error is:
ContourFinder.obj : error LNK2019: unresolved external symbol "float cdecl ofxCv::trackingDistance(class cv::Rect const &,class cv::Rect const &)"


  1. I downloaded "openFrameWork 0072 under VS2010" at ttp://www.openframeworks.cc/download/.
  2. I then downloaded "ofxFaceTracker". I modified its file name "kylemcdonald-ofxFaceTracker-15060b2" as "ofxFaceTracker" and copied it into addons of "openFrameWrok at (..\of_v0072_vs2010_release\addons).
  3. I found "ofxFraceTracker" needs "ofxCv" and then downloaded it and copied it into addons (same as above).
  4. I run "projectGenerator.exe" of "openFramework" and added "ofxFraceTracker", "ofxOpenCv" and "ofxCv" as addons. After compiling generated "mySketch" using VS2010, I met the error in the top. Plus, I added codes as what the page of ofxCv said.

I really hope to get your helps, because it is supposed to be helpful to my current project. Sorry to bother you. I'll appreciate for your supports.

Compiling issues with Ubuntu and Codeblocks

Dear Kyle,
I'm having some issues with compiling the examples. I am using CodeBlocks on Ubuntu 12.10 - 64bit, and this is my very first project. I am trying to compile the FaceOSC program.

The first thing I changed was in the workspace file: I changed the linux paths to linux64 :-)

But I came across some other problems as well, so I tried to add the code modification for linux users in the makefile, as you suggested. But this doesn't seem to work for me. I'm probably doing it the wrong way. Could you explain a little further how I can put this code in the makefile?

I just left the suggested code out of the makefile for now and tried to make a sense out of the other errors I got:

There was a problem with gstreamer: In the makefile it said version 0,10 and the version that was automatically installed on my computer (with the use of the dependencies.sh file) is version 1.0. So I changed it all the 0.10's to 1.0 in the makefile. The error disappeared, hurray! I'm still wondering whether or not this will cause any trouble later on though.

The next error I got was:
cr/testApp.h:4:19: fatal error: ofxCv.h No such file or directory

I thought this had to do with the fact that the ofxCv library is called ofxOpenCv in the linux version of OpenFrameworks. And the folder where its in is also called ofxOpenCv instead of ofxCv. So I changed the path's names in the FaceOSC-linux.cbp file from ofxCv to ofxOpenCv. And I renamed all the of the #include "ofxCV.h" that I came across in the build logs as well.

But now I get the next errors:

src/testApp.cpp:3:17: error: 'ofxOpenCv' is not a namespace-name
scrc/testApp.cpp:154:35: error: 'toCv" was not declared in this scope
src/testApp.cpp:202;30: error: "applyMatrix" was not declared in this scope

And now I'm stuck :-(
I checked if the openCv examples that came as a standard within the OF package where working, just to be sure, and they are working fine.

Can you help me solving this problem?

Sincerely,
Marleen Andela

I

example_basic issue?

hi Kyle-

great stuff. thanks for letting us all play with this.

I had a few issues getting the basic example to compile and link. Now, I am just learning the xcode env. and I haven't done C++ in a while, so it could easily be me.. However, I noticed that there are two Tracker.h files between yours (in ofxCV/, associated with Tracker.cpp) and the one Jason uses (in libs/Tracker associated with Tracker.cc). I renamed yours to ofxTrackerKM.h, repointed the necessary files, and it built.
the linking errors are now limited to a vtable issue in ofxFaceTracker.. ?

I built the other examples fine, although they didn't fully load --I think b/c I am missing the model data. Ran out of time last night though...

thanks for any help/pointers.

best,
Cindy

Problems reading model files

I've cloned this repo, along with ofxCV and FaceSubstitution. I rebuilt the FaceSubstitution project using the ofProjectGenerator and linked all the current projects. The project does compile fine, but immidiately crashes upon launch with the following console output:

DVFreeThread - CFMachPortCreateWithPort hack = 0x3551190, fPowerNotifyPort= 0x3550590 DVFreeThread - CFMachPortCreateWithPort hack = 0x335a2a0, fPowerNotifyPort= 0x335a050 DVFreeThread - CFMachPortCreateWithPort hack = 0x335bb50, fPowerNotifyPort= 0x335a220 [notice ] ofFbo: checkGLSupport(): maxColorAttachments: 8, maxDrawBuffers: 8, maxSamples: 8 [notice ] ofFbo: checkGLSupport(): maxColorAttachments: 8, maxDrawBuffers: 8, maxSamples: 8 [notice ] ofFbo: checkGLSupport(): maxColorAttachments: 8, maxDrawBuffers: 8, maxSamples: 8 [notice ] ofFbo: checkGLSupport(): maxColorAttachments: 8, maxDrawBuffers: 8, maxSamples: 8 [notice ] ofFbo: checkGLSupport(): maxColorAttachments: 8, maxDrawBuffers: 8, maxSamples: 8 [ error ] Make sure you've placed the files face2.tracker, face.tri and face.con in the data/model/ folder. Assertion failed: (s.is_open()), function Load, file /Users/thorson/openFrameworks/of_v0.8.0_osx_release/addons/ofxFaceTracker/libs/FaceTracker/src/lib/Tracker.cc, line 59.

I read the Readme on the home page and definitely have the model files in the bin/data/model directory of this project (see screenshot)
screen shot 2013-10-27 at 2 36 42 pm

Can you think of any reason this would still be failing to read the model files? I'm using the most recent openFrameworks version 0.8.0, pulled off the website this morning.

Thanks, let me know if I can provide more info.

FACETRACKER type compile problem in FaceOSC

Hi, I have tried it all to get past the error: ‘FACETRACKER’ does not name a type compile error in FaceOSC.

I've changed the include paths, I've done a manual compile, I've changed the order of the includes..... no results.

is there anything I'm missing?

rendering getObjectMesh()

I'm trying to render with drawVertices() the 3D mesh obtained from ofxFaceTracker::getObjectMesh(), but the shape of the face are very different if compared to 2D face obtained by ofxFaceTracker::getImageMesh() and drawn by drawWireframe(). The mesh seems to be the same always, independently of the face of the person captured. Did I forget something? Is there any way to get the 3D mesh as the shape drawn on the frame of the webcam?

you can see this example, the getObjectMesh() drawn vertices are totally differents from getImageMesh():
mesh

Thank you,
Riccardo.

Compile successfully but when I run the program will crash

My development environment
Windows 7 64bits and Codeblocks

When I run the program, looks good
I can see the images from the webcam
But when my face into the screen, the program will crash
Then pop up an error window shows "ntdll.dll appcrash"

I also used to debug / continue, some messages are as follows:


Building to ensure sources are up-to-date
Build succeeded
Selecting target:
release
Adding source dir: D:\of_v0072_win_cb_release\apps\myApps\test_1
Adding source dir: D:\of_v0072_win_cb_release
Changing directory to: bin
Adding file: bin\test_1.exe
Starting debugger:
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
(no debugging symbols found)
Debugger name and version: GNU gdb 6.8
Child process PID: 3896
(no debugging symbols found)
Program received signal SIGSEGV, Segmentation fault.
In ?? () ()
Continuing...
Program received signal SIGSEGV, Segmentation fault.
In ntdll!LdrQueryProcessModuleInformation () (C:\Windows\system32\ntdll.dll)
Continuing...
Program exited with code 030000000005.
Debugger finished with status 0


I do not know how to solve this problem.
Can anyone help me to solve this problem?

How do I get the data from FaceOSC?

Sends as much data as possible from ofxFaceTracker via OSC, including various "gestures", position, and orientation.

Can you explain how to get this data? Does "OSC" refer to this? I can listen on the port specified using node.js and see some raw datagram data. I don't know where to go from there. Maybe I'm doing it wrong. Can you help?

threaded tracker segfaults on RPI

Not that this is a main target ... but the threaded tracker segfaults when grabbing positions, features, mesh, etc on the RaspberryPi. It's updating ok, but it crashes when trying to draw (has to grab the position and mesh etc). The example works when I comment out draw() and the variable grabbing.

The non-threaded tracker works but is understandably slow.

I imagine the issue is something to do with synchronization with a slower CPU that we don't see on our laptops. Yeah, thread errors.

multi-face support

this is definitely possible, and might go along with better re-initialization algorithms. doing a manual haar face detection pass and using the results to initialize multiple face trackers, rather than relying on the internal haar detector, would help a lot in this direction.

required libraries

Hi - do you have any additional instructions about where to download / put the required libraries, such as opencv?

grayscale camera image

hey, thanks for the great library :)

i'm trying to use ofxFaceTracker with a FireFlyMV USB camera, which generates raw grayscale images. as i'm working in osx, i'm using this ofxLibdc-FireflyMV library as well. problem is, i'm having this error while updating the tracker's image:

"OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor"

I know ofxFaceTracker::update() expects a 3-channel image, so what should I do? convert the raw grayscale image from the camera to RGB?

unsupported Matrix type

hi,
i am trying to run this thing on windows, i successfully(?) compiled the LIB from source
trying to run example-basic i get:
Error(......\addons\ofxFaceTracker\libs\src\IO.cc,73) : unsupported Matrix type 92!

example-cutout not compiling in vs2010

example-cutout testApp.cpp

line 60 -
ofMesh triangulated = delaunay.triangleMesh;

ofxDelaunay is not included in ofxFaceTracker but it would be nice because it seems the source code is out of sync. I tried compiling using https://code.google.com/p/julapy/source/browse/trunk/openframeworks/ofxDelaunay/

Errors:

1>c:\users\jonas\documents\github\openframeworks\examples\ofxfacetracker\example-cutout\src\testapp.cpp(60): error C2039: 'triangleMesh' : is not a member of 'ofxDelaunay'
1> c:\users\jonas\documents\github\openframeworks\examples\addons\ofxdelaunay\src\ofxdelaunay.h(32) : see declaration of 'ofxDelaunay'

Xcode Project Validity

I grabbed the repo and tried to open the examples on mac OS 10.8.5, and XCode 5.0.1. After changing the build settings not to use C++11 (not your problem), the app still won't compile because it can't find a reference to imatrix.h Would love to know if there's a step I'm missing, or if the projects need to be updated.

linking problem

Hi,
I'm trying to build the CodeBlocks project for Win32 with MinGW, I fixed the paths of the libraries in the project file, and now I have linking errors:

../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.text+0xb51): undefined reference to _Unwind_Resume' ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.text+0xb8a): undefined reference to_Unwind_Resume'
../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.text+0xc18): undefined reference to _Unwind_Resume' ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.text+0xd0b): undefined reference to_Unwind_Resume'
../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.text+0xdbb): undefined reference to _Unwind_Resume' ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.text$_ZN13ofVideoPlayerD0Ev[ofVideoPlayer::~ofVideoPlayer()]+0x137): more undefined references to_Unwind_Resume' follow
../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.eh_frame+0x533): undefined reference to __gxx_personality_v0' ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.eh_frame$_ZN13ofVideoPlayerD1Ev+0x13): undefined reference to__gxx_personality_v0'
../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofVideoPlayer.o):ofVideoPlayer.cpp:(.eh_frame$_ZN13ofVideoPlayerD0Ev+0x13): undefined reference to __gxx_personality_v0' ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofAppGlutWindow.o):ofAppGlutWindow.cpp:(.text+0xcf8): undefined reference to_Unwind_Resume'
../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofAppGlutWindow.o):ofAppGlutWindow.cpp:(.text+0xe3a): undefined reference to _Unwind_Resume' ../../../libs/openFrameworksCompiled/lib/win_cb/openFrameworks.lib(ofAppGlutWindow.o):ofAppGlutWindow.cpp:(.text+0x1253): undefined reference to_Unwind_Resume'

The problem is related to the bad version of CodeBlocks / Openframeworks / MinGW? Which version should I use?

many thanks,
Riccardo

ofPolyline manipulation?

hi Kyle!

have been having a great time working with your library. Am a bit stuck at the moment - I want to take the ofPolylines from the getGesture/getFeature and put them in a fixed position elsewhere on the screen (as opposed to it reflecting the movement of the face via the videograbber). Is my best bet to iterate through ofVec3f vectors and do some sort of constraint on the x, y coordinates, or is there some sort of trick I could use with translate()?

thanks!
Cindy

Weird error, Lion/Xcode 4 Related?

Hi Kyle, just barely started poking around at your source, and have yet to get any of the examples running. They compile fine, but then we just get a SIGABRT error thrown when calling tracker.setup(). Here's the output:

GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".tty /dev/ttys010
[Switching to process 4414 thread 0x0]
OF: OF_LOG_WARNING: ofBaseVideoGrabber::setPixelFormat not implemented
DVFreeThread - CFMachPortCreateWithPort hack = 0x2146b10, fPowerNotifyPort= 0x2146af0

DVFreeThread - CFMachPortCreateWithPort hack = 0xa5a3b0, fPowerNotifyPort= 0xa5a560
(unavailable) device[0] DV Video
(unavailable) device[1] IIDC FireWire Video
device[2] USB Video Class Video - Built-in iSight

DVFreeThread - CFMachPortCreateWithPort hack = 0xc39d40, fPowerNotifyPort= 0xc38ff0
OF: OF_LOG_WARNING: No camera settings to load
Assertion failed: (s.is_open()), function Load, file /Volumes/data/sandbox/of/openFrameworks_working/addons/ofxFaceTracker/example-basic/../libs/Tracker/Tracker.cc, line 59.
sharedlibrary apply-load-rules all
warning: Could not find object file "/Developer/usr/lib/gcc/i686-apple-darwin10/4.0.1/libgcc.a(_eprintf.o)" - no debug information available for "/var/tmp/gcc_40/gcc_40-5494~211/src/gcc/libgcc2.c".

warning: Could not find object file "/Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/openFrameworks/apps/devApps/macDragDropExample/buildGlutFrameworkHackedWindowLevel10.4/libForeground.a(macx_foreground.o)" - no debug information available for "/Users/mcast/Code/GLUT-ToPost/macx_foreground.m".

imatrix.h not found

The examples almost launch, but then fail to build returning one error:
Lexical or Preprocessor issue
'imatrix.h' file not found

am I missing something?
any suggestions?

Thank you so much for your help!

FACETRACKER namespace issue

I know #17 is close but could you please explain me in detail how is "the dance" made to compile the project.

I´m a really newbie in Codeblocks lynux dev, but love ur your work.

Thanks in advance.

Face tracking library

Hello,

Is there existing face tracking library link of Jason Saragih? Or I really need to mail him to get the files?

Thanks!

Exception in toCv while running the sample ofxFaceTracker program

Hi Kyle,

I am getting an exception error while trying to run a sample application for faceTracking.

I have made OfxCv to work in iOS and ofxCv is working fine.

exception arises in :

tracker.update(toCv(cam));

Description of Exception ::

OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/__BuildAllLibs/OpenCV-2.3.1-iPhone/modules/imgproc/src/color.cpp, line 2433

terminate called after throwing an instance of 'cv::Exception'
what(): /Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/__BuildAllLibs/OpenCV-2.3.1-iPhone/modules/imgproc/src/color.cpp:2433: error: (-215) scn == 3 || scn == 4 in function cvtColor


I am not able to figure out why this arises an exception for iOS while the same statement works fine for Window OS.

Awaiting your reply :)

Namespace problem?

Hi,
I've been trying to compile FaceOSC and BasicExample, and even after fixing some header paths in the projects (for some reason, the OF_CORE_HEADERS variable wasn't defined), I always get stuck during the precompiling step of the targeted app :

Precompile Carbon.h ...in /System/Library/Frameworks/Carbon.framework/Headers 
'::memcpy' has not been declared

Detail :

/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20:0 In file included from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h

/System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21:0 In file included from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h

/System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h:20:0 In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/AE.framework/Headers/AE.h

/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:20:0 In file included from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h

/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:25:0 In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h

../../../libs/poco/include/Poco/string.h:43:0 In file included from ../../../libs/poco/include/Poco/string.h

../../../libs/poco/include/Poco/Foundation.h:143:0 In file included from ../../../libs/poco/include/Poco/Foundation.h

../../../libs/poco/include/Poco/Bugcheck.h:44:0 In file included from ../../../libs/poco/include/Poco/Bugcheck.h

/usr/include/c++/4.2.1/string:47:0 In file included from /usr/include/c++/4.2.1/string

/usr/include/c++/4.2.1/bits/char_traits.h:45:0 In file included from /usr/include/c++/4.2.1/bits/char_traits.h

/usr/include/c++/4.2.1/cstring:80:0 '::memcpy' has not been declared in /usr/include/c++/4.2.1/cstring

Lots of similar erros follow.

Does that ring familiar to anyone?

I'm using macos10.6.3, XCcode 3.2 and just checked out all last versions of OF, FaceTracker and ofxCv (although I also had these errors with previous versions as well). I also have Jason's code.

Thank you,
Julien

Had to add CLD lib to search paths

Hi,

I'm fairly new to Openframeworks and Xcode.

To be clear, this was what I did, is this the correct workflow?

Downloaded this repo and your ofxCV repo.
Put both in the addons folder residing in openframeworks root folder.

Then I tried to run the example-advanced xcode project file. But it didn't compile because it couldn't find imatrix.h
So what I did was add ../../../addons/ofxCv/libs/CLD/include/CLD to my Header Search Paths directive.

Did I do something wrong? Or was there something missing in the project file?

Everything works fine now though, only seeing warnings :)

Compile successfully but when I run the program will crash

My development environment OSX 10.8.2 version and Xcode 4.5.2 version.

My name’s Lander Larrañaga and I’m an Audiovisual student in the University of ESDi in Barcelona, Spain. I’m working with interactive systems.

I'm working with the face tracker, advanced example. When I run the program is succesfully, but pop up an error window shows:

Captura de pantalla 2013-01-17 a la s 19 01 57

I do not know how to solve this problem.
Can anyone help me to solve this problem?

Thank you very much.

Greetings,

Lander Larrañaga.

linux makefile specifics

from an email, apparently there are some extra steps to getting ofxFaceTracker working on linux.

The problems are:
1- The arch option does not work in linux so it has to be removed in ubuntu
2- In ubuntu is important for the compiler to write the dependencies at the end of the line (see the modification)

%.o: %.cc Makefile
    @# Make dependecy file
    $(CXX) -MM -MT $@ -MF $(patsubst %.cc,%.d,$<) $(CFLAGS) $(DEFINES) $(INCLUDES) $<
    @# Compile
    $(CXX)  -c -o $@  $(CFLAGS) $(DEFINES) $(INCLUDES) $< 


bin/face_tracker: $(ALL_OBJECTS)
    $(CXX)  -o $@ $(ALL_OBJECTS) $(LDFLAGS) $(LIBRARIES)

ofxFaceTracker: Undefined symbols for architecture i386

After adding targets into header search paths under build settings, I then experience linking errors on some of the examples.

I git clone "ofxFaceTracker" into "of_v0.8.0_osx_release/addons" as well as "ofxCv" into same directory.

I then run "python update-projects.py" in terminal for both. Beyond that, I have to edit scheme (CMD-<) in run of application and set executable from None to "ofApp.app" (name is populated in drop down menu by XCode 4, not set by me, mileage may vary) for each application that I want to build.

I then proceed down the list of examples in "ofxFaceTracker", with attempts at all included, what I had to do to get each to work (or not work, but at least fail at some further stage)

[example-advanced]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

VOILA! WORKS!

[example-blink]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.
  • addons/ofxFaceTracker/example-blink/src/testApp.h:5:10: 'ofxOsc.h' file not found
    ** Add "../../../addons/ofxOsc/src" as target in header search paths.
  • addons/ofxOsc/src/ofxOscSender.h:41:10: 'OscTypes.h' file not found
    ** Add "../../../addons/ofxOsc/libs/oscpack/src/osc" as target in header search paths.
  • addons/ofxOsc/src/ofxOscReceiver.h:45:10: 'UdpSocket.h' file not found
    ** Add "../../../addons/ofxOsc/libs/oscpack/src/ip" as target in header search paths.

And while everything appears to go alright and clear past the missing header files, I then get slammed with:


Undefined symbols for architecture i386:
"ofxOscMessage::ofxOscMessage()", referenced from:
testApp::update() in testApp.o
"ofxOscMessage::addIntArg(int)", referenced from:
testApp::update() in testApp.o
"ofxOscSender::~ofxOscSender()", referenced from:
testApp::~testApp() in testApp.o
"ofxOscSender::sendMessage(ofxOscMessage&)", referenced from:
testApp::update() in testApp.o
"ofxOscMessage::~ofxOscMessage()", referenced from:
testApp::update() in testApp.o
"ofxOscSender::setup(std::string, int)", referenced from:
testApp::setup() in testApp.o
"ofxOscSender::ofxOscSender()", referenced from:
testApp::testApp() in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

(null): "ofxOscMessage::ofxOscMessage()", referenced from:
(null): "ofxOscMessage::addIntArg(int)", referenced from:
(null): "ofxOscSender::~ofxOscSender()", referenced from:
(null): "ofxOscSender::sendMessage(ofxOscMessage&)", referenced from:
(null): "ofxOscMessage::~ofxOscMessage()", referenced from:
(null): "ofxOscSender::setup(std::string, int)", referenced from:
(null): "ofxOscSender::ofxOscSender()", referenced from:

(null): Linker command failed with exit code 1 (use -v to see invocation)

I've tried everything, including chasing after "of_v0.8.0_osx_release/libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj" and trying to juggle around with Base SDK (it's set at Current OSX, but I tried setting to 10.7 and 10.8) as well as changing Project Format to Xcode 3.2-compatible; all to no avail.

[example-calibrated]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

Undefined symbols for architecture i386:
"convertFromIndices(ofMesh const&)", referenced from:
testApp::updatePhysicalMesh() in testApp.o
"buildNormals(ofMesh&)", referenced from:
testApp::updatePhysicalMesh() in testApp.o
ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

[example-cutout]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.
  • addons/ofxFaceTracker/example-cutout/src/testApp.h:6:10: 'ofxDelaunay.h' file not found
    ** cd addons; git clone https://github.com/obviousjim/ofxDelaunay.git
    ** Add "../../../addons/ofxDelaunay/src" as target in header search paths.
  • addons/ofxDelaunay/src/ofxDelaunay.h:18:10: 'Delaunay.h' file not found
    ** Add "../../../addons/ofxDelaunay/libs/Delaunay" as target in header search paths.

Undefined symbols for architecture i386:
"ofxDelaunay::addPoint(ofVec3f const&)", referenced from:
testApp::draw() in testApp.o
"ofxDelaunay::triangulate()", referenced from:
testApp::draw() in testApp.o
ld: symbol(s) not found for architecture i386

clang: error: linker command failed with exit code 1 (use -v to see invocation)

[example-empty]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

VOILA! WORKS!

[example-expression]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

VOILA! WORKS!

[example-extraction]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

VOILA! WORKS!

[example-threaded]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

VOILA! WORKS!

[FaceOSC]

  • addons/ofxCv/libs/ofxCv/include/ofxCv/Wrappers.h:35:10: 'imatrix.h' file not found
    ** Add "../../../addons/ofxCv/libs/CLD/include/CLD" as target in header search paths.

[ error ] ofxXmlSettings: pushTag(): tag "source" not found
[ error ] ofxXmlSettings: pushTag(): tag "camera" not found
2013-09-23 03:34:56.904 ofAppDebug[36540:303] Opening shmem segment com.allocinit.CTCtrl2
2013-09-23 03:34:56.905 ofAppDebug[36540:303] Opening shmem segment com.allocinit.CTImg2.0
2013-09-23 03:34:56.905 ofAppDebug[36540:303] Opening shmem segment com.allocinit.CTImg2.1
DVFreeThread - CFMachPortCreateWithPort hack = 0x1c7d9b0, fPowerNotifyPort= 0x1c7d220
DVFreeThread - CFMachPortCreateWithPort hack = 0x1c7eed0, fPowerNotifyPort= 0x1c7e830
DVFreeThread - CFMachPortCreateWithPort hack = 0xe74fb0, fPowerNotifyPort= 0xea1660
DVFreeThread - CFMachPortCreateWithPort hack = 0x1a8ec30, fPowerNotifyPort= 0x1a8b0f0
[ error ] ofxXmlSettings: pushTag(): tag "movie" not found
[ error ] Movie filename tag not set in settings, reverting to camera input
[ error ] ofxXmlSettings: pushTag(): tag "face" not found
[ error ] Make sure you've placed the files face2.tracker, face.tri and face.con in the data/model/ folder.
Assertion failed: (s.is_open()), function Load, file /of_v0.8.0_osx_release/addons/ofxFaceTracker/FaceOSC/../libs/FaceTracker/src/lib/Tracker.cc, line 59.

(lldb)

  • Placed face.con, face.tracker, face.tri, and face2.tracker into data/model/ folder and it's still a no-go.

"Skipped by case label" compile errors on Windows

Just ran into this, sorry don't have time to send a pull at the moment. On Windows (VS2010), you'll get a skipped by case label error regarding innerMouth and faceOutline in ofxFaceTracker.cpp unless you put brackets around those case statements. (Scope issue.)

Here's the block in question with the bracket fix:

vector<int> ofxFaceTracker::getFeatureIndices(Feature feature) {
    switch(feature) {
        case LEFT_JAW: return consecutive(0, 9);
        case RIGHT_JAW: return consecutive(8, 17);
        case JAW: return consecutive(0, 17);
        case LEFT_EYEBROW: return consecutive(17, 22);
        case RIGHT_EYEBROW: return consecutive(22, 27);
        case LEFT_EYE: return consecutive(36, 42);
        case RIGHT_EYE: return consecutive(42, 48);
        case OUTER_MOUTH: return consecutive(48, 60);
        case INNER_MOUTH: {
            static int innerMouth[] = {48,60,61,62,54,63,64,65};
            return vector<int>(innerMouth, innerMouth + 8);
        }
        case NOSE_BRIDGE: return consecutive(27, 31);
        case NOSE_BASE: return consecutive(31, 36);
        case FACE_OUTLINE: {
            static int faceOutline[] = {17,18,19,20,21,22,23,24,25,26, 16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
            return vector<int>(faceOutline, faceOutline + 27);
        }
        case ALL_FEATURES: return consecutive(0, 66);
    }
}

FaceOSC-linux in Lucid i386/amd64 not working

I uncompress FaceOSC-Linux.zip proyect and run it but nothing happens. No messages, no logs. I follow the code (thanks but i couldnt make it compile) and install dev prerequisites,but i dont get output from the FaceOSC app, i modify Settings.xlm pointing to /dev/video0 (webcam tested with cheese), but nothing happends.

Any suggestions? Thanks in advance.

Record Face

hi,

i wanna know if someone has try to save a face and recognize the same face before.

i start to find some projects/examples about, but i am still finding.

if someone has a light, let me know.

thx

should returned features be closed?

The ofPolyLine returned by ofxFaceTracekr::getImageFeature() is not closed. Should it be closed? That makes sense to me but perhaps I'm missing something ...

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.