Skip to content

Commit

Permalink
color convertion and roid fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HalfdanJ committed May 11, 2016
1 parent 70541c5 commit 821e93f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/ofxFaceTracker2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,14 @@ bool ofxFaceTracker2::update(Mat image, cv::Rect _roi) {

roi = _roi;
if(roi.width == 0 && roi.height == 0){
roi = cv::Rect(0,0,inputWidth, inputHeight);
roi = cv::Rect(0,0,im.cols, im.rows);
}

if(im.type() == CV_8UC3) {
cvtColor(im, gray, CV_RGB2GRAY);
} else if(im.type() == CV_8UC1) {
im.copyTo(gray);
//gray = im;
}
if(im.type() == CV_8UC1) {
im.copyTo(gray);
} else {
cvtColor(im, gray, CV_RGB2GRAY);
}
imageDirty = true;

dlib::cv_image<unsigned char> dlibimg(gray);
Expand Down

0 comments on commit 821e93f

Please sign in to comment.