11 CvPoint artvert_corners
[4];
19 void useModelFile( const char *modelfile
);
21 bool buildCached(int nbcam
, CvCapture
*capture
, bool cache
, planar_object_recognizer
&detector
,
22 bool run_on_binoculars
= false);
24 int getImageWidth() { return image_width
; }
25 int getImageHeight() { return image_height
; }
27 /// update the interactive training on binoculars
28 void interactiveTrainBinocularsUpdate(IplImage
* frame
, bool button_red
, bool button_green
, bool button_blue
);
29 /// draw the interactive training on binucolurs
30 void interactiveTrainBinocularsDraw();
32 /// true if we're running interactive training on the binoculars
33 bool isInteractiveTrainBinocularsRunning() { return interactive_train_running
; }
34 /// tell the interactive training to abort
35 void abortInteractiveTrainBinoculars() { if( interactive_train_running
) interactive_train_should_stop
= true; }
37 /// true if learning is in progress
38 bool isLearnInProgress() { return learn_running
; }
39 /// get the training progress message
40 const char* getLearnProgressMessage() { return progress_string
; }
45 int image_width
, image_height
;
48 const char *modelfile
;
50 enum State
{ TAKE_SHOT
, CORNERS
, ARTVERT_CORNERS
};
53 static void onMouseStatic(int event
, int x
, int y
, int flags
, void* param
);
54 void onMouse(int event
, int x
, int y
, int flags
);
55 bool interactiveSetup(CvCapture
*capture
);
57 bool interactiveTrainBinoculars();
58 IplImage
* train_working_image
, *train_shot
;
59 IplTexture train_texture
;
60 bool interactive_train_running
;
61 bool train_should_proceed
;
62 bool interactive_train_should_stop
;
66 bool debounce_green
, debounce_redblue
;
71 static char progress_string
[2048];
72 static void learnProgressionFunc( int phase
, int current
, int total
);