void calculateFirstWindow( const Image& image ){ /* Various window sizes have been used for Face Detection. Commonly they range from 16x16 to 32x32. 24x24 generally provided the most stable detection. */ int window[24][24]; // 24 x 24 window getWindow( image, window, 0, 0 ); // Calculate Haar Images std::vector< std::vector< double > > features = calculateHaarFeatures( window ); printFeatures( features ); // Output feature stats }
Static void doMusic(void) { Char STR1[256], STR2[256]; Char STR4[256]; first_paragraph = true; pmx_preamble_done = false; bar_no = 1; *repeat_sign = '\0'; must_respace = false; must_restyle = false; do { final_paragraph = endOfInfile(); memcpy(orig_P, P, sizeof(paragraph)); if (para_len > 0 && !ignore_input && thisCase()) { if (no_commands_yet) { interpretCommands(); printFeatures(false); one_beat = 64 / meterdenom; full_bar = meternum * one_beat; if (nvoices > standardPMXvoices) { sprintf(STR4, "You have %s voices; standard PMX can only handle %s", toString(STR1, nvoices), toString(STR2, standardPMXvoices)); warning(STR4, !print); } initMTX(); initUptext(); initStatus(); initLyrics(); no_commands_yet = false; } if (startsWithBracedWord(P[0])) lyricsParagraph(); else { musicParagraph(); first_paragraph = false; writeRepeat(repeat_sign); } } readParagraph(P, orig_line_no, ¶_len); } while (para_len != 0); }
/* Calculate the Haar features each 24 x 24 window for the image. Output the results. */ void calculateAllWindows( const Image& im ){ int rows = im.getNRows(), cols = im.getNCols(); int window[24][24]; // 24 x 24 window for( int h = 0; h < rows - 24; h++ ){ for( int w = 0; w < cols - 24; w++ ){ getWindow( im, window, h, w ); // Calculate Haar Images std::vector< std::vector< double > > features = calculateHaarFeatures( window ); printFeatures( features ); // Output feature stats } } }