Permalink
Browse files

Stop at the last stache

  • Loading branch information...
1 parent 491921f commit 5330712e0adc046ab9874e31367c6dfd041712ef @jadonk committed Apr 22, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 stache.cpp
View
@@ -170,16 +170,16 @@ void detectAndDisplay(Mat frame) {
}
void changeStache(int argc, const char** argv) {
- if(argc > currentStache) {
+ if(argc > currentStache + 1) {
currentStache++;
stacheMaskFile = argv[currentStache];
} else {
currentStache = 1;
if(argc > 1) stacheMaskFile = argv[1];
}
mask = cvLoadImage(stacheMaskFile);
- if(!mask) { fprintf(stderr, "Could not load %s\n", stacheMaskFile); exit(-2); }
fprintf(stdout, "{\"new_stache\":\"%s\"}\n", stacheMaskFile);
+ if(!mask) { fprintf(stderr, "Could not load %s\n", stacheMaskFile); exit(-2); }
}
void saveFrame(Mat frame) {

0 comments on commit 5330712

Please sign in to comment.