Skip to content

Commit

Permalink
getFaceBoundingBoxes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfdanJ committed Apr 10, 2016
1 parent 43dce1e commit 704ef49
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ofxFaceTracker2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,15 @@ int ofxFaceTracker2::size() const {

vector<ofRectangle> ofxFaceTracker2::getFaceBoundingBoxes() const {
vector<ofRectangle> ret;
for(auto rect : facesRects){
ret.push_back(ofRectangle(rect.left(),rect.top(), rect.width(), rect.height()));
for(int i=0; i<size(); i++){
ofRectangle rect = ofRectangle();
if(facesRects.size() > i){
rect = ofRectangle(facesRects[i].left(),
facesRects[i].top(),
facesRects[i].width(),
facesRects[i].height());
}
ret.push_back(rect);
}
return ret;
}
Expand Down

0 comments on commit 704ef49

Please sign in to comment.