Lines Matching refs:classifier

90     CvHidHaarClassifier* classifier;  member
216 if( !stage_classifier->classifier || in icvCreateHidHaarClassifierCascade()
229 CvHaarClassifier* classifier = stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade() local
231 total_nodes += classifier->count; in icvCreateHidHaarClassifierCascade()
232 for( l = 0; l < classifier->count; l++ ) in icvCreateHidHaarClassifierCascade()
236 if( classifier->haar_feature[l].rect[k].r.width ) in icvCreateHidHaarClassifierCascade()
238 CvRect r = classifier->haar_feature[l].rect[k].r; in icvCreateHidHaarClassifierCascade()
239 int tilted = classifier->haar_feature[l].tilted; in icvCreateHidHaarClassifierCascade()
289 hid_stage_classifier->classifier = haar_classifier_ptr; in icvCreateHidHaarClassifierCascade()
304 CvHaarClassifier* classifier = stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade() local
305 CvHidHaarClassifier* hid_classifier = hid_stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade()
306 int node_count = classifier->count; in icvCreateHidHaarClassifierCascade()
316 CvHaarFeature* feature = classifier->haar_feature + l; in icvCreateHidHaarClassifierCascade()
318 node->threshold = classifier->threshold[l]; in icvCreateHidHaarClassifierCascade()
319 node->left = classifier->left[l]; in icvCreateHidHaarClassifierCascade()
320 node->right = classifier->right[l]; in icvCreateHidHaarClassifierCascade()
330 memcpy( alpha_ptr, classifier->alpha, (node_count+1)*sizeof(alpha_ptr[0])); in icvCreateHidHaarClassifierCascade()
366 CvHaarClassifier* classifier = stage_classifier->classifier + j; in icvCreateHidHaarClassifierCascade() local
367 int rect_count = 2 + (classifier->haar_feature->rect[2].r.width != 0); in icvCreateHidHaarClassifierCascade()
369 ipp_thresholds[j] = classifier->threshold[0]; in icvCreateHidHaarClassifierCascade()
370 ipp_val1[j] = classifier->alpha[0]; in icvCreateHidHaarClassifierCascade()
371 ipp_val2[j] = classifier->alpha[1]; in icvCreateHidHaarClassifierCascade()
376 ipp_features[k] = classifier->haar_feature->rect[l].r; in icvCreateHidHaarClassifierCascade()
378 ipp_weights[k] = classifier->haar_feature->rect[l].weight*ipp_weight_scale; in icvCreateHidHaarClassifierCascade()
526 for( l = 0; l < cascade->stage_classifier[i].classifier[j].count; l++ ) in cvSetImagesForHaarClassifierCascade()
529 &_cascade->stage_classifier[i].classifier[j].haar_feature[l]; in cvSetImagesForHaarClassifierCascade()
533 &cascade->stage_classifier[i].classifier[j].node[l].feature; in cvSetImagesForHaarClassifierCascade()
665 double icvEvalHidHaarClassifier( CvHidHaarClassifier* classifier, in icvEvalHidHaarClassifier() argument
672 CvHidHaarTreeNode* node = classifier->node + idx; in icvEvalHidHaarClassifier()
684 return classifier->alpha[-idx]; in icvEvalHidHaarClassifier()
740 stage_sum += icvEvalHidHaarClassifier( ptr->classifier + j, in cvRunHaarClassifierCascade()
770 CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascade() local
771 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascade()
777 a = classifier->alpha[0]; in cvRunHaarClassifierCascade()
778 b = classifier->alpha[1]; in cvRunHaarClassifierCascade()
786 CvHidHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in cvRunHaarClassifierCascade() local
787 CvHidHaarTreeNode* node = classifier->node; in cvRunHaarClassifierCascade()
796 a = classifier->alpha[0]; in cvRunHaarClassifierCascade()
797 b = classifier->alpha[1]; in cvRunHaarClassifierCascade()
818 cascade->stage_classifier[i].classifier + j, in cvRunHaarClassifierCascade()
1558 cascade->stage_classifier[i].classifier = in icvLoadCascadeCART()
1559 (CvHaarClassifier*)cvAlloc( count*sizeof(cascade->stage_classifier[i].classifier[0])); in icvLoadCascadeCART()
1563 CvHaarClassifier* classifier = cascade->stage_classifier[i].classifier + j; in icvLoadCascadeCART() local
1567 sscanf( stage, "%d%n", &classifier->count, &dl ); in icvLoadCascadeCART()
1570 classifier->haar_feature = (CvHaarFeature*) cvAlloc( in icvLoadCascadeCART()
1571 classifier->count * ( sizeof( *classifier->haar_feature ) + in icvLoadCascadeCART()
1572 sizeof( *classifier->threshold ) + in icvLoadCascadeCART()
1573 sizeof( *classifier->left ) + in icvLoadCascadeCART()
1574 sizeof( *classifier->right ) ) + in icvLoadCascadeCART()
1575 (classifier->count + 1) * sizeof( *classifier->alpha ) ); in icvLoadCascadeCART()
1576 classifier->threshold = (float*) (classifier->haar_feature+classifier->count); in icvLoadCascadeCART()
1577 classifier->left = (int*) (classifier->threshold + classifier->count); in icvLoadCascadeCART()
1578 classifier->right = (int*) (classifier->left + classifier->count); in icvLoadCascadeCART()
1579 classifier->alpha = (float*) (classifier->right + classifier->count); in icvLoadCascadeCART()
1581 for( l = 0; l < classifier->count; l++ ) in icvLoadCascadeCART()
1594 &(classifier->haar_feature[l].rect[k].weight), &dl ); in icvLoadCascadeCART()
1596 classifier->haar_feature[l].rect[k].r = r; in icvLoadCascadeCART()
1601 classifier->haar_feature[l].tilted = strncmp( str, "tilted", 6 ) == 0; in icvLoadCascadeCART()
1605 memset( classifier->haar_feature[l].rect + k, 0, in icvLoadCascadeCART()
1606 sizeof(classifier->haar_feature[l].rect[k]) ); in icvLoadCascadeCART()
1609 sscanf( stage, "%f%d%d%n", &(classifier->threshold[l]), in icvLoadCascadeCART()
1610 &(classifier->left[l]), in icvLoadCascadeCART()
1611 &(classifier->right[l]), &dl ); in icvLoadCascadeCART()
1614 for( l = 0; l <= classifier->count; l++ ) in icvLoadCascadeCART()
1616 sscanf( stage, "%f%n", &(classifier->alpha[l]), &dl ); in icvLoadCascadeCART()
1739 cvFree( &cascade->stage_classifier[i].classifier[j].haar_feature ); in cvReleaseHaarClassifierCascade()
1740 cvFree( &cascade->stage_classifier[i].classifier ); in cvReleaseHaarClassifierCascade()
1835 CV_CALL( cascade->stage_classifier[i].classifier = in icvReadHaarClassifier()
1837 * sizeof( cascade->stage_classifier[i].classifier[0] ) ) ); in icvReadHaarClassifier()
1840 cascade->stage_classifier[i].classifier[j].haar_feature = NULL; in icvReadHaarClassifier()
1849 CvHaarClassifier* classifier; in icvReadHaarClassifier() local
1852 classifier = &cascade->stage_classifier[i].classifier[j]; in icvReadHaarClassifier()
1861 classifier->count = tree_fn->data.seq->total; in icvReadHaarClassifier()
1862 CV_CALL( classifier->haar_feature = (CvHaarFeature*) cvAlloc( in icvReadHaarClassifier()
1863 classifier->count * ( sizeof( *classifier->haar_feature ) + in icvReadHaarClassifier()
1864 sizeof( *classifier->threshold ) + in icvReadHaarClassifier()
1865 sizeof( *classifier->left ) + in icvReadHaarClassifier()
1866 sizeof( *classifier->right ) ) + in icvReadHaarClassifier()
1867 (classifier->count + 1) * sizeof( *classifier->alpha ) ) ); in icvReadHaarClassifier()
1868 classifier->threshold = (float*) (classifier->haar_feature+classifier->count); in icvReadHaarClassifier()
1869 classifier->left = (int*) (classifier->threshold + classifier->count); in icvReadHaarClassifier()
1870 classifier->right = (int*) (classifier->left + classifier->count); in icvReadHaarClassifier()
1871 classifier->alpha = (float*) (classifier->right + classifier->count); in icvReadHaarClassifier()
1964 classifier->haar_feature[k].rect[l].weight = (float) fn->data.f; in icvReadHaarClassifier()
1965 classifier->haar_feature[k].rect[l].r = r; in icvReadHaarClassifier()
1971 classifier->haar_feature[k].rect[l].weight = 0; in icvReadHaarClassifier()
1972 classifier->haar_feature[k].rect[l].r = cvRect( 0, 0, 0, 0 ); in icvReadHaarClassifier()
1982 classifier->haar_feature[k].tilted = ( fn->data.i != 0 ); in icvReadHaarClassifier()
1990 classifier->threshold[k] = (float) fn->data.f; in icvReadHaarClassifier()
2002 classifier->left[k] = fn->data.i; in icvReadHaarClassifier()
2021 if( last_idx >= classifier->count + 1 ) in icvReadHaarClassifier()
2027 classifier->left[k] = -last_idx; in icvReadHaarClassifier()
2028 classifier->alpha[last_idx++] = (float) fn->data.f; in icvReadHaarClassifier()
2041 classifier->right[k] = fn->data.i; in icvReadHaarClassifier()
2060 if( last_idx >= classifier->count + 1 ) in icvReadHaarClassifier()
2066 classifier->right[k] = -last_idx; in icvReadHaarClassifier()
2067 classifier->alpha[last_idx++] = (float) fn->data.f; in icvReadHaarClassifier()
2072 if( last_idx != classifier->count + 1 ) in icvReadHaarClassifier()
2165 CvHaarClassifier* tree = &cascade->stage_classifier[i].classifier[j]; in icvWriteHaarClassifier()
2275 CV_CALL( cascade->stage_classifier[i].classifier = in icvCloneHaarClassifier()
2277 * sizeof( cascade->stage_classifier[i].classifier[0] ) ) ); in icvCloneHaarClassifier()
2283 cascade->stage_classifier[i].classifier[j].haar_feature = NULL; in icvCloneHaarClassifier()
2289 &cascade_src->stage_classifier[i].classifier[j]; in icvCloneHaarClassifier()
2290 CvHaarClassifier* classifier = in icvCloneHaarClassifier() local
2291 &cascade->stage_classifier[i].classifier[j]; in icvCloneHaarClassifier()
2293 classifier->count = classifier_src->count; in icvCloneHaarClassifier()
2294 CV_CALL( classifier->haar_feature = (CvHaarFeature*) cvAlloc( in icvCloneHaarClassifier()
2295 classifier->count * ( sizeof( *classifier->haar_feature ) + in icvCloneHaarClassifier()
2296 sizeof( *classifier->threshold ) + in icvCloneHaarClassifier()
2297 sizeof( *classifier->left ) + in icvCloneHaarClassifier()
2298 sizeof( *classifier->right ) ) + in icvCloneHaarClassifier()
2299 (classifier->count + 1) * sizeof( *classifier->alpha ) ) ); in icvCloneHaarClassifier()
2300 classifier->threshold = (float*) (classifier->haar_feature+classifier->count); in icvCloneHaarClassifier()
2301 classifier->left = (int*) (classifier->threshold + classifier->count); in icvCloneHaarClassifier()
2302 classifier->right = (int*) (classifier->left + classifier->count); in icvCloneHaarClassifier()
2303 classifier->alpha = (float*) (classifier->right + classifier->count); in icvCloneHaarClassifier()
2304 for( k = 0; k < classifier->count; ++k ) in icvCloneHaarClassifier()
2306 classifier->haar_feature[k] = classifier_src->haar_feature[k]; in icvCloneHaarClassifier()
2307 classifier->threshold[k] = classifier_src->threshold[k]; in icvCloneHaarClassifier()
2308 classifier->left[k] = classifier_src->left[k]; in icvCloneHaarClassifier()
2309 classifier->right[k] = classifier_src->right[k]; in icvCloneHaarClassifier()
2310 classifier->alpha[k] = classifier_src->alpha[k]; in icvCloneHaarClassifier()
2312 classifier->alpha[classifier->count] = in icvCloneHaarClassifier()
2313 classifier_src->alpha[classifier->count]; in icvCloneHaarClassifier()