int DigitRecognizer::test() { cv::namedWindow("single", CV_WINDOW_AUTOSIZE); cv::namedWindow("all",CV_WINDOW_AUTOSIZE); learnFromImages(); setClassifier(); //runSelfTest(knearest); analyseImage("./images/buchstaben.png", true); return 0; }
Agent::Agent(unsigned char f, unsigned char g, unsigned short s, unsigned int p) : vm(0), zorder(p), timerrate(0), attr(0), visible(true) { core_init(); setClassifier(f, g, s); lastScript = -1; x = 0; y = 0; // note that c2e agents are moved in finishInit has_custom_core_size = false; velx.setFloat(0.0f); vely.setFloat(0.0f); avel = 0.0f; fvel = 0.0f; svel = 0.0f; admp = 0.0f; fdmp = 0.0f; sdmp = 0.0f; spin = 0.0f; spritesperrotation = 0; numberrotations = 0; wasmoved = false; if (engine.version == 2) { accg = 10; aero = 20; rest = 40; size = 127; // TODO: correct default? thrt = 0; falling = false; // TODO: it looks like grav should be 0, but make sure! } else if (engine.version > 2) { accg = 0.3f; aero = 0; elas = 0; perm = 50; // TODO: correct default? falling = true; } moved_last_tick = false; range = 500; // TODO: is this the correct default? clac[0] = 0; // message# for activate 1 if (engine.version < 3) { // TODO: is this the correct default? (this is equivalent to bhvr click == 0) clac[0] = -1; clac[1] = -1; clac[2] = -1; } clik = -1; dying = false; unid = -1; paused = displaycore = false; cr_can_push = cr_can_pull = cr_can_stop = cr_can_hit = cr_can_eat = cr_can_pickup = false; // TODO: check this imsk_key_down = imsk_key_up = imsk_mouse_move = imsk_mouse_down = imsk_mouse_up = imsk_mouse_wheel = imsk_translated_char = false; emitca_index = -1; emitca_amount = 0.0f; objp.setAgent(0); // not strictly necessary }