Lines Matching refs:classifier
107 CvHidHaarClassifier* classifier; member
218 if( !stage_classifier->classifier || in icvCreateHidHaarClassifierCascade()
231 CvHaarClassifier* classifier = stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade() local
233 total_nodes += classifier->count; in icvCreateHidHaarClassifierCascade()
234 for( l = 0; l < classifier->count; l++ ) in icvCreateHidHaarClassifierCascade()
238 if( classifier->haar_feature[l].rect[k].r.width ) in icvCreateHidHaarClassifierCascade()
240 CvRect r = classifier->haar_feature[l].rect[k].r; in icvCreateHidHaarClassifierCascade()
241 int tilted = classifier->haar_feature[l].tilted; in icvCreateHidHaarClassifierCascade()
291 hid_stage_classifier->classifier = haar_classifier_ptr; in icvCreateHidHaarClassifierCascade()
306 CvHaarClassifier* classifier = stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade() local
307 CvHidHaarClassifier* hid_classifier = hid_stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade()
308 int node_count = classifier->count; in icvCreateHidHaarClassifierCascade()
318 CvHaarFeature* feature = classifier->haar_feature + l; in icvCreateHidHaarClassifierCascade()
320 node->threshold = classifier->threshold[l]; in icvCreateHidHaarClassifierCascade()
321 node->left = classifier->left[l]; in icvCreateHidHaarClassifierCascade()
322 node->right = classifier->right[l]; in icvCreateHidHaarClassifierCascade()
332 memcpy( alpha_ptr, classifier->alpha, (node_count+1)*sizeof(alpha_ptr[0])); in icvCreateHidHaarClassifierCascade()
513 for( l = 0; l < cascade->stage_classifier[i].classifier[j].count; l++ ) in cvSetImagesForHaarClassifierCascade()
516 &_cascade->stage_classifier[i].classifier[j].haar_feature[l]; in cvSetImagesForHaarClassifierCascade()
520 &cascade->stage_classifier[i].classifier[j].node[l].feature; in cvSetImagesForHaarClassifierCascade()
642 double icvEvalHidHaarClassifierAVX( CvHidHaarClassifier* classifier, in icvEvalHidHaarClassifierAVX() argument
653 nodes[0] = (classifier+0)->node + idxV[0]; in icvEvalHidHaarClassifierAVX()
654 nodes[1] = (classifier+1)->node + idxV[1]; in icvEvalHidHaarClassifierAVX()
655 nodes[2] = (classifier+2)->node + idxV[2]; in icvEvalHidHaarClassifierAVX()
656 nodes[3] = (classifier+3)->node + idxV[3]; in icvEvalHidHaarClassifierAVX()
657 nodes[4] = (classifier+4)->node + idxV[4]; in icvEvalHidHaarClassifierAVX()
658 nodes[5] = (classifier+5)->node + idxV[5]; in icvEvalHidHaarClassifierAVX()
659 nodes[6] = (classifier+6)->node + idxV[6]; in icvEvalHidHaarClassifierAVX()
660 nodes[7] = (classifier+7)->node + idxV[7]; in icvEvalHidHaarClassifierAVX()
751 res += (classifier+i)->alpha[-idxV[i]]; in icvEvalHidHaarClassifierAVX()
763 double icvEvalHidHaarClassifier( CvHidHaarClassifier* classifier, in icvEvalHidHaarClassifier() argument
800 CvHidHaarTreeNode* node = classifier->node + idx; in icvEvalHidHaarClassifier()
813 return classifier->alpha[-idx]; in icvEvalHidHaarClassifier()
878 ptr->classifier + j, in cvRunHaarClassifierCascadeSum()
885 … stage_sum += icvEvalHidHaarClassifier( ptr->classifier + j, variance_norm_factor, p_offset ); in cvRunHaarClassifierCascadeSum()
917 classifiers[0] = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum()
919 classifiers[1] = cascade->stage_classifier[i].classifier + j + 1; in cvRunHaarClassifierCascadeSum()
921 classifiers[2] = cascade->stage_classifier[i].classifier + j + 2; in cvRunHaarClassifierCascadeSum()
923 classifiers[3] = cascade->stage_classifier[i].classifier + j + 3; in cvRunHaarClassifierCascadeSum()
925 classifiers[4] = cascade->stage_classifier[i].classifier + j + 4; in cvRunHaarClassifierCascadeSum()
927 classifiers[5] = cascade->stage_classifier[i].classifier + j + 5; in cvRunHaarClassifierCascadeSum()
929 classifiers[6] = cascade->stage_classifier[i].classifier + j + 6; in cvRunHaarClassifierCascadeSum()
931 classifiers[7] = cascade->stage_classifier[i].classifier + j + 7; in cvRunHaarClassifierCascadeSum()
1007 … CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum() local
1008 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascadeSum()
1013 stage_sum += classifier->alpha[sum >= t]; in cvRunHaarClassifierCascadeSum()
1022 classifiers[0] = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum()
1024 classifiers[1] = cascade->stage_classifier[i].classifier + j + 1; in cvRunHaarClassifierCascadeSum()
1026 classifiers[2] = cascade->stage_classifier[i].classifier + j + 2; in cvRunHaarClassifierCascadeSum()
1028 classifiers[3] = cascade->stage_classifier[i].classifier + j + 3; in cvRunHaarClassifierCascadeSum()
1030 classifiers[4] = cascade->stage_classifier[i].classifier + j + 4; in cvRunHaarClassifierCascadeSum()
1032 classifiers[5] = cascade->stage_classifier[i].classifier + j + 5; in cvRunHaarClassifierCascadeSum()
1034 classifiers[6] = cascade->stage_classifier[i].classifier + j + 6; in cvRunHaarClassifierCascadeSum()
1036 classifiers[7] = cascade->stage_classifier[i].classifier + j + 7; in cvRunHaarClassifierCascadeSum()
1135 … CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum() local
1136 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascadeSum()
1143 stage_sum += classifier->alpha[sum >= t]; in cvRunHaarClassifierCascadeSum()
1161 … CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum()
1162 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascadeSum()
1166 __m128d a = _mm_set_sd(classifier->alpha[0]); in cvRunHaarClassifierCascadeSum()
1167 __m128d b = _mm_set_sd(classifier->alpha[1]); in cvRunHaarClassifierCascadeSum()
1178 … CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum()
1179 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascadeSum()
1182 __m128d a = _mm_set_sd(classifier->alpha[0]); in cvRunHaarClassifierCascadeSum()
1183 __m128d b = _mm_set_sd(classifier->alpha[1]); in cvRunHaarClassifierCascadeSum()
1209 … CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum() local
1210 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascadeSum()
1214 stage_sum += classifier->alpha[sum >= t]; in cvRunHaarClassifierCascadeSum()
1221 … CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascadeSum() local
1222 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascadeSum()
1228 stage_sum += classifier->alpha[sum >= t]; in cvRunHaarClassifierCascadeSum()
1249 cascade->stage_classifier[i].classifier + k, in cvRunHaarClassifierCascadeSum()
1258 cascade->stage_classifier[i].classifier + k, in cvRunHaarClassifierCascadeSum()
1844 cascade->stage_classifier[i].classifier = in icvLoadCascadeCART()
1845 (CvHaarClassifier*)cvAlloc( count*sizeof(cascade->stage_classifier[i].classifier[0])); in icvLoadCascadeCART()
1849 CvHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in icvLoadCascadeCART() local
1853 sscanf( stage, "%d%n", &classifier->count, &dl ); in icvLoadCascadeCART()
1856 classifier->haar_feature = (CvHaarFeature*) cvAlloc( in icvLoadCascadeCART()
1857 classifier->count * ( sizeof( *classifier->haar_feature ) + in icvLoadCascadeCART()
1858 sizeof( *classifier->threshold ) + in icvLoadCascadeCART()
1859 sizeof( *classifier->left ) + in icvLoadCascadeCART()
1860 sizeof( *classifier->right ) ) + in icvLoadCascadeCART()
1861 (classifier->count + 1) * sizeof( *classifier->alpha ) ); in icvLoadCascadeCART()
1862 classifier->threshold = (float*) (classifier->haar_feature+classifier->count); in icvLoadCascadeCART()
1863 classifier->left = (int*) (classifier->threshold + classifier->count); in icvLoadCascadeCART()
1864 classifier->right = (int*) (classifier->left + classifier->count); in icvLoadCascadeCART()
1865 classifier->alpha = (float*) (classifier->right + classifier->count); in icvLoadCascadeCART()
1867 for( l = 0; l < classifier->count; l++ ) in icvLoadCascadeCART()
1880 &(classifier->haar_feature[l].rect[k].weight), &dl ); in icvLoadCascadeCART()
1882 classifier->haar_feature[l].rect[k].r = r; in icvLoadCascadeCART()
1887 classifier->haar_feature[l].tilted = strncmp( str, "tilted", 6 ) == 0; in icvLoadCascadeCART()
1891 memset( classifier->haar_feature[l].rect + k, 0, in icvLoadCascadeCART()
1892 sizeof(classifier->haar_feature[l].rect[k]) ); in icvLoadCascadeCART()
1895 sscanf( stage, "%f%d%d%n", &(classifier->threshold[l]), in icvLoadCascadeCART()
1896 &(classifier->left[l]), in icvLoadCascadeCART()
1897 &(classifier->right[l]), &dl ); in icvLoadCascadeCART()
1900 for( l = 0; l <= classifier->count; l++ ) in icvLoadCascadeCART()
1902 sscanf( stage, "%f%n", &(classifier->alpha[l]), &dl ); in icvLoadCascadeCART()
2014 cvFree( &cascade->stage_classifier[i].classifier[j].haar_feature ); in cvReleaseHaarClassifierCascade()
2015 cvFree( &cascade->stage_classifier[i].classifier ); in cvReleaseHaarClassifierCascade()
2106 cascade->stage_classifier[i].classifier = in icvReadHaarClassifier()
2108 * sizeof( cascade->stage_classifier[i].classifier[0] ) ); in icvReadHaarClassifier()
2111 cascade->stage_classifier[i].classifier[j].haar_feature = NULL; in icvReadHaarClassifier()
2120 CvHaarClassifier* classifier; in icvReadHaarClassifier() local
2123 classifier = &cascade->stage_classifier[i].classifier[j]; in icvReadHaarClassifier()
2132 classifier->count = tree_fn->data.seq->total; in icvReadHaarClassifier()
2133 classifier->haar_feature = (CvHaarFeature*) cvAlloc( in icvReadHaarClassifier()
2134 classifier->count * ( sizeof( *classifier->haar_feature ) + in icvReadHaarClassifier()
2135 sizeof( *classifier->threshold ) + in icvReadHaarClassifier()
2136 sizeof( *classifier->left ) + in icvReadHaarClassifier()
2137 sizeof( *classifier->right ) ) + in icvReadHaarClassifier()
2138 (classifier->count + 1) * sizeof( *classifier->alpha ) ); in icvReadHaarClassifier()
2139 classifier->threshold = (float*) (classifier->haar_feature+classifier->count); in icvReadHaarClassifier()
2140 classifier->left = (int*) (classifier->threshold + classifier->count); in icvReadHaarClassifier()
2141 classifier->right = (int*) (classifier->left + classifier->count); in icvReadHaarClassifier()
2142 classifier->alpha = (float*) (classifier->right + classifier->count); in icvReadHaarClassifier()
2233 classifier->haar_feature[k].rect[l].weight = (float) fn->data.f; in icvReadHaarClassifier()
2234 classifier->haar_feature[k].rect[l].r = r; in icvReadHaarClassifier()
2240 classifier->haar_feature[k].rect[l].weight = 0; in icvReadHaarClassifier()
2241 classifier->haar_feature[k].rect[l].r = cvRect( 0, 0, 0, 0 ); in icvReadHaarClassifier()
2251 classifier->haar_feature[k].tilted = ( fn->data.i != 0 ); in icvReadHaarClassifier()
2259 classifier->threshold[k] = (float) fn->data.f; in icvReadHaarClassifier()
2271 classifier->left[k] = fn->data.i; in icvReadHaarClassifier()
2289 if( last_idx >= classifier->count + 1 ) in icvReadHaarClassifier()
2295 classifier->left[k] = -last_idx; in icvReadHaarClassifier()
2296 classifier->alpha[last_idx++] = (float) fn->data.f; in icvReadHaarClassifier()
2309 classifier->right[k] = fn->data.i; in icvReadHaarClassifier()
2327 if( last_idx >= classifier->count + 1 ) in icvReadHaarClassifier()
2333 classifier->right[k] = -last_idx; in icvReadHaarClassifier()
2334 classifier->alpha[last_idx++] = (float) fn->data.f; in icvReadHaarClassifier()
2339 if( last_idx != classifier->count + 1 ) in icvReadHaarClassifier()
2420 CvHaarClassifier* tree = &cascade->stage_classifier[i].classifier[j]; in icvWriteHaarClassifier()
2520 cascade->stage_classifier[i].classifier = in icvCloneHaarClassifier()
2522 * sizeof( cascade->stage_classifier[i].classifier[0] ) ); in icvCloneHaarClassifier()
2527 cascade->stage_classifier[i].classifier[j].haar_feature = NULL; in icvCloneHaarClassifier()
2532 &cascade_src->stage_classifier[i].classifier[j]; in icvCloneHaarClassifier()
2533 CvHaarClassifier* classifier = in icvCloneHaarClassifier() local
2534 &cascade->stage_classifier[i].classifier[j]; in icvCloneHaarClassifier()
2536 classifier->count = classifier_src->count; in icvCloneHaarClassifier()
2537 classifier->haar_feature = (CvHaarFeature*) cvAlloc( in icvCloneHaarClassifier()
2538 classifier->count * ( sizeof( *classifier->haar_feature ) + in icvCloneHaarClassifier()
2539 sizeof( *classifier->threshold ) + in icvCloneHaarClassifier()
2540 sizeof( *classifier->left ) + in icvCloneHaarClassifier()
2541 sizeof( *classifier->right ) ) + in icvCloneHaarClassifier()
2542 (classifier->count + 1) * sizeof( *classifier->alpha ) ); in icvCloneHaarClassifier()
2543 classifier->threshold = (float*) (classifier->haar_feature+classifier->count); in icvCloneHaarClassifier()
2544 classifier->left = (int*) (classifier->threshold + classifier->count); in icvCloneHaarClassifier()
2545 classifier->right = (int*) (classifier->left + classifier->count); in icvCloneHaarClassifier()
2546 classifier->alpha = (float*) (classifier->right + classifier->count); in icvCloneHaarClassifier()
2547 for( k = 0; k < classifier->count; ++k ) in icvCloneHaarClassifier()
2549 classifier->haar_feature[k] = classifier_src->haar_feature[k]; in icvCloneHaarClassifier()
2550 classifier->threshold[k] = classifier_src->threshold[k]; in icvCloneHaarClassifier()
2551 classifier->left[k] = classifier_src->left[k]; in icvCloneHaarClassifier()
2552 classifier->right[k] = classifier_src->right[k]; in icvCloneHaarClassifier()
2553 classifier->alpha[k] = classifier_src->alpha[k]; in icvCloneHaarClassifier()
2555 classifier->alpha[classifier->count] = in icvCloneHaarClassifier()
2556 classifier_src->alpha[classifier->count]; in icvCloneHaarClassifier()