@@ -22,7 +22,7 @@ class ofApp : public ofBaseApp {
22
22
msa::tf::ImageClassifier classifier;
23
23
24
24
// for webcam input
25
- shared_ptr<ofVideoGrabber> video_grabber;
25
+ // shared_ptr<ofVideoGrabber> video_grabber;
26
26
27
27
// folder of images to classify
28
28
ofDirectory image_dir;
@@ -93,16 +93,16 @@ class ofApp : public ofBaseApp {
93
93
// --------------------------------------------------------------
94
94
void update () {
95
95
// if video_grabber active,
96
- if (video_grabber) {
97
- // grab frame
98
- video_grabber->update ();
99
-
100
- if (video_grabber->isFrameNew ()) {
101
- // send to classification if keypressed
102
- if (ofGetKeyPressed (' ' ))
103
- classify (video_grabber->getPixels ());
104
- }
105
- }
96
+ // if(video_grabber) {
97
+ // // grab frame
98
+ // video_grabber->update();
99
+
100
+ // if(video_grabber->isFrameNew()) {
101
+ // // send to classification if keypressed
102
+ // if(ofGetKeyPressed(' '))
103
+ // classify(video_grabber->getPixels());
104
+ // }
105
+ // }
106
106
}
107
107
108
108
@@ -112,11 +112,11 @@ class ofApp : public ofBaseApp {
112
112
ofSetColor (255 );
113
113
114
114
// if video grabber active, draw in bottom left corner
115
- if (video_grabber) {
116
- int vy = ofGetHeight () - 240 ;
117
- ofDrawBitmapString (" Press SPACE to classify" , 10 , vy - 10 );
118
- video_grabber->draw (0 , vy, 320 , 240 );
119
- }
115
+ // if(video_grabber) {
116
+ // int vy = ofGetHeight() - 240;
117
+ // ofDrawBitmapString("Press SPACE to classify", 10, vy - 10);
118
+ // video_grabber->draw(0, vy, 320, 240);
119
+ // }
120
120
121
121
float x = 0 ;
122
122
@@ -174,11 +174,11 @@ class ofApp : public ofBaseApp {
174
174
switch (key) {
175
175
176
176
case ' v' :
177
- if (video_grabber) video_grabber = NULL ;
178
- else {
179
- video_grabber = make_shared<ofVideoGrabber>();
180
- video_grabber->setup (320 , 240 );
181
- }
177
+ // if(video_grabber) video_grabber = NULL;
178
+ // else {
179
+ // video_grabber = make_shared<ofVideoGrabber>();
180
+ // video_grabber->setup(320, 240);
181
+ // }
182
182
break ;
183
183
184
184
case ' l' :
0 commit comments