ofxCvHaarFinderとofBeginShape()を一緒に使ったら顔認識されなくなった #openFrameworks

3月 9, 2016   //   by rssfeeder   //   未分類  //  ofxCvHaarFinderとofBeginShape()を一緒に使ったら顔認識されなくなった #openFrameworks はコメントを受け付けていません

cvgraphics

ofxCvHaarFinder × ofBeginShape()

Raspberry PI の openFrameworks で ofxCvHaarFinderのfindHaarObjects()とofBeginShape() / ofEndShape()を使ったコードを書いていたら、何故か顔認識動かない。ofBeginShape() ~ ofEndShape()をコメントアウトすると認識される。

とりあえず解決案 – ofPushStyle() ~ ofPopStyle();


ofPushStyle(); //追加

ofBeginShape();

ofVertexes(); //描画

ofEndShape();

ofPopStyle(); //追加

ofBeginShape() ~ ofEndShape()するときに内部で描画設定を変えられてるからかな〜と推測して、前後にofPopStyle()とofPushStyle()で囲んだら顔認識動いた。

Comments are closed.

Archives