void input_generator2 (INPUT_DESC *input, int status __attribute__ ((unused))) { if (input->win == 0) { init_visual_search_thin (input); } else { if (status == MOVE) { check_input_bounds (input, input->wxd, input->wxd); glutSetWindow (input->win); input_display (); update_input_filters(); } } }
void input_generator (INPUT_DESC *input, int status) { // Inicializacao executada apenas uma vez por janela if (input->win == 0) { init_class_cnae(input); } else { if (status == MOVE) { if (input->wxd < 0) GetNewDocument (input, DIRECTION_REWIND); else if (input->wxd >= IN_WIDTH) /*BUG => BEFORE: IMAGE_WIDTH, NOW: IN_WIDTH */ GetNewDocument (input, DIRECTION_FORWARD); output_update(&nl_class_cnae_out); glutSetWindow (input->win); input_display (); } } }
void input_generator (INPUT_DESC *input, int status) { if (input->win == 0) { init_visual_search_thin (input); } else { if (status == MOVE) { check_input_bounds (input, input->wxd, input->wxd); glutSetWindow (input->win); input_display (); update_input_filters(); all_dendrites_update (); all_neurons_update (); filter_update(get_filter_by_name((char*)"nl_v1_activation_map_f_filter")); //this filter is obligatory all_outputs_update (); } } }
void input_generator (INPUT_DESC *input, int status) { if ((input->win != 0) && (status == MOVE)) { update_input_neurons (input); check_input_bounds (input, input->wxd, input->wyd); glutSetWindow(input->win); input_display (); all_filters_update (); all_outputs_update (); } if (input->win == 0) { int x, y; make_input_image (input); init (input); glutInitWindowSize (input->ww, input->wh); if (read_window_position (input->name, &x, &y)) glutInitWindowPosition (x, y); else glutInitWindowPosition (-1, -1); input->win = glutCreateWindow (input->name); glGenTextures (1, (GLuint *)(&(input->tex))); input_init (input); glutReshapeFunc (input_reshape); glutDisplayFunc (input_display); glutKeyboardFunc (keyboard); glutPassiveMotionFunc (input_passive_motion); glutMouseFunc (input_mouse); } }
void input_generator (INPUT_DESC *input, int status) { FILTER_DESC *filter; // Inicializacao executada apenas uma vez por janela if (input->win == 0) { init_face_recog(input); #ifdef NO_INTERFACE input->win = 1; #endif } else { if (status == MOVE) { if (input->wxd < 0) GetNewFace (input, DIRECTION_REWIND); else if (input->wxd >= IMAGE_WIDTH) GetNewFace (input, DIRECTION_FORWARD); // output_update(&out_face_recog_lp); filter = get_filter_by_output(out_face_recog_lp.neuron_layer); filter_update(filter); output_update(&out_face_recog_lp); filter = get_filter_by_output(out_face_recog_lp_f.neuron_layer); filter_update(filter); output_update(&out_face_recog_lp_f); #ifndef NO_INTERFACE glutSetWindow (input->win); input_display (); #endif } } }
void input_generator (INPUT_DESC *input, int status) { FILTER_DESC *filter; // Inicializacao executada apenas uma vez por janela if (input->win == 0) { init_face_recog(input); } else { if (status == MOVE) { if (input->wxd < 0) GetNewFace (input, DIRECTION_REWIND); else if (input->wxd >= IMAGE_WIDTH) GetNewFace (input, DIRECTION_FORWARD); LOG_POLAR_SCALE_FACTOR = sqrtf ((float) ((g_nLeftEyeX - g_nRightEyeX) * (g_nLeftEyeX - g_nRightEyeX) + (g_nLeftEyeY - g_nRightEyeY) * (g_nLeftEyeY - g_nRightEyeY))) / (EYE_BASELINE / FOV_HORIZONTAL * input->neuron_layer->dimentions.x); LOG_POLAR_THETA_CORRECTION = (((g_nLeftEyeX + g_nRightEyeX) / 2 - input->wxd) != 0) ? -atanf ((float) ((g_nLeftEyeX + g_nRightEyeX) / 2 - input->wxd) / (float) ((g_nLeftEyeY + g_nRightEyeY) / 2 - input->wyd)) : 0.0; printf ("LOG_POLAR_SCALE_FACTOR = %f [], LOG_POLAR_THETA_CORRECTION = %f [deg]\n", LOG_POLAR_SCALE_FACTOR, 180.0f / M_PI * LOG_POLAR_THETA_CORRECTION); switch (g_nFacePart) { /*case EYE: { filter = get_filter_by_output(out_eye_v1.neuron_layer); filter_update(filter); output_update(&out_eye_v1); filter = get_filter_by_output(out_eye_h1.neuron_layer); filter_update(filter); output_update(&out_eye_h1); } break;*/ case NOSE: { filter = get_filter_by_output(out_nose_v1.neuron_layer); filter_update(filter); output_update(&out_nose_v1); filter = get_filter_by_output(out_nose_h1.neuron_layer); filter_update(filter); output_update(&out_nose_h1); } break; /*case MOUTH: { filter = get_filter_by_output(out_mouth_v1.neuron_layer); filter_update(filter); output_update(&out_mouth_v1); filter = get_filter_by_output(out_mouth_h1.neuron_layer); filter_update(filter); output_update(&out_mouth_h1); } break;*/ /*case VIEW_LOG_POLAR: { filter = get_filter_by_output(out_face_recog_lp.neuron_layer); filter_update(filter); output_update(&out_face_recog_lp); } break;*/ } glutSetWindow (input->win); input_display (); } } }