LoginSignup
1
0

More than 5 years have passed since last update.

FaceSubstitutionをUbuntu1404で使う。

Last updated at Posted at 2017-08-02

目的

ofxFaceTrakerを使った、openFrameworksの顔交換アプリFaceSubstitutionをUbuntu1404で使う。

Github FaceSubstitution:
https://github.com/arturoc/FaceSubstitution

openFrameworks、ofxFaceTrakerのインストール

[ofxFaceTrakerをUbuntu1404で使う。]を参照のこと。(http://qiita.com/nnn112358/items/602276937880ce3c1983)

FaceSubstitutionのダウンロード

FaceSubstitutionをgitからダウンロードする。

cd ofx_dev/app/
git clone https://github.com/arturoc/FaceSubstitution.git

CPUCloningの動作確認

下記のコマンドでコンパイルする。

cd ofx_dev/app/CPUCloning
cp ../../../apps/myApps/emptyExample/Makefile .
cp ../../../apps/myApps/emptyExample/config.make .
cp ../../../apps/myApps/emptyExample/emptyExample.qbs .
make 
make RunRelease

ここで

error: ‘drawHighlightString’ was not declared in this scope

とエラーが発生する。

drawHighlightString()の書き換え

ソース内でdrawHighlightString関数を使っているが、これは古いversionのopenFrameworksの関数である。drawHighlightString()をofDrawBitmapStringHighlight()に書き換える。
LNK2019 #39

FaceSubstitutionの動作確認

学習器(face.con,face.tracker,face.tri,face2.tracker)をコピーする。
CloningWrapperから、Clone.cpp、Clone.hをコピーする。
drawHighlightString()をofDrawBitmapStringHighlight()に書き換える。

cd ofx_dev/app/FaceSubstitution

cp ../CloningWrapper/src/Clone.cpp ./src
cp ../CloningWrapper/src/Clone.h ./src

cp ../../../apps/myApps/emptyExample/Makefile .
cp ../../../apps/myApps/emptyExample/config.make .
cp ../../../apps/myApps/emptyExample/emptyExample.qbs .
mkdir ./bin/data/model -p
cp ../../../addons/ofxFaceTracker/libs/FaceTracker/model/face* ./bin/data/model

下記のコマンドでコンパイル・実行する。

make 
make RunRelease

参考
vimeo Face Substitution:https://vimeo.com/29348533

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0