Lines Matching refs:rect

81     rect[CV_HAAR_FEATURE_MAX];
238 if( classifier->haar_feature[l].rect[k].r.width )
240 CvRect r = classifier->haar_feature[l].rect[k].r;
324 if( fabs(feature->rect[2].weight) < DBL_EPSILON ||
325 feature->rect[2].r.width == 0 ||
326 feature->rect[2].r.height == 0 )
327 memset( &(node->feature.rect[2]), 0, sizeof(node->feature.rect[2]) );
365 int rect_count = 2 + (classifier->haar_feature->rect[2].r.width != 0);
374 ipp_features[k] = classifier->haar_feature->rect[l].r;
376 ipp_weights[k] = classifier->haar_feature->rect[l].weight*ipp_weight_scale;
416 #define calc_sum(rect,offset) \
417 ((rect).p0[offset] - (rect).p1[offset] - (rect).p2[offset] + (rect).p3[offset])
419 #define calc_sumf(rect,offset) \
420 static_cast<float>((rect).p0[offset] - (rect).p1[offset] - (rect).p2[offset] + (rect).p3[offset])
534 if( !hidfeature->rect[k].p0 )
536 r[k] = feature->rect[k].r;
594 const float orig_feature_size = (float)(feature->rect[k].r.width)*feature->rect[k].r.height;
610 hidfeature->rect[k].p0 = sum_elem_ptr(*sum, tr.y, tr.x);
611 hidfeature->rect[k].p1 = sum_elem_ptr(*sum, tr.y, tr.x + tr.width);
612 hidfeature->rect[k].p2 = sum_elem_ptr(*sum, tr.y + tr.height, tr.x);
613 hidfeature->rect[k].p3 = sum_elem_ptr(*sum, tr.y + tr.height, tr.x + tr.width);
617 hidfeature->rect[k].p2 = sum_elem_ptr(*tilted, tr.y + tr.width, tr.x + tr.width);
618 hidfeature->rect[k].p3 = sum_elem_ptr(*tilted, tr.y + tr.width + tr.height,
620 hidfeature->rect[k].p0 = sum_elem_ptr(*tilted, tr.y, tr.x);
621 hidfeature->rect[k].p1 = sum_elem_ptr(*tilted, tr.y + tr.height, tr.x - tr.height);
624 hidfeature->rect[k].weight = (float)(feature->rect[k].weight * correction_ratio);
629 sum0 += hidfeature->rect[k].weight * tr.width * tr.height;
632 hidfeature->rect[0].weight = (float)(-sum0/area0);
673 __m256 offset = _mm256_set_ps(calc_sumf(nodes[7]->feature.rect[0], p_offset),
674 calc_sumf(nodes[6]->feature.rect[0], p_offset),
675 calc_sumf(nodes[5]->feature.rect[0], p_offset),
676 calc_sumf(nodes[4]->feature.rect[0], p_offset),
677 calc_sumf(nodes[3]->feature.rect[0], p_offset),
678 calc_sumf(nodes[2]->feature.rect[0], p_offset),
679 calc_sumf(nodes[1]->feature.rect[0], p_offset),
680 calc_sumf(nodes[0]->feature.rect[0], p_offset));
682 __m256 weight = _mm256_set_ps(nodes[7]->feature.rect[0].weight,
683 nodes[6]->feature.rect[0].weight,
684 nodes[5]->feature.rect[0].weight,
685 nodes[4]->feature.rect[0].weight,
686 nodes[3]->feature.rect[0].weight,
687 nodes[2]->feature.rect[0].weight,
688 nodes[1]->feature.rect[0].weight,
689 nodes[0]->feature.rect[0].weight);
693 offset = _mm256_set_ps(calc_sumf(nodes[7]->feature.rect[1], p_offset),
694 calc_sumf(nodes[6]->feature.rect[1], p_offset),
695 calc_sumf(nodes[5]->feature.rect[1], p_offset),
696 calc_sumf(nodes[4]->feature.rect[1], p_offset),
697 calc_sumf(nodes[3]->feature.rect[1], p_offset),
698 calc_sumf(nodes[2]->feature.rect[1], p_offset),
699 calc_sumf(nodes[1]->feature.rect[1], p_offset),
700 calc_sumf(nodes[0]->feature.rect[1], p_offset));
702 weight = _mm256_set_ps(nodes[7]->feature.rect[1].weight,
703 nodes[6]->feature.rect[1].weight,
704 nodes[5]->feature.rect[1].weight,
705 nodes[4]->feature.rect[1].weight,
706 nodes[3]->feature.rect[1].weight,
707 nodes[2]->feature.rect[1].weight,
708 nodes[1]->feature.rect[1].weight,
709 nodes[0]->feature.rect[1].weight);
713 if( nodes[0]->feature.rect[2].p0 )
714 tmp[0] = calc_sumf(nodes[0]->feature.rect[2], p_offset) * nodes[0]->feature.rect[2].weight;
715 if( nodes[1]->feature.rect[2].p0 )
716 tmp[1] = calc_sumf(nodes[1]->feature.rect[2], p_offset) * nodes[1]->feature.rect[2].weight;
717 if( nodes[2]->feature.rect[2].p0 )
718 tmp[2] = calc_sumf(nodes[2]->feature.rect[2], p_offset) * nodes[2]->feature.rect[2].weight;
719 if( nodes[3]->feature.rect[2].p0 )
720 tmp[3] = calc_sumf(nodes[3]->feature.rect[2], p_offset) * nodes[3]->feature.rect[2].weight;
721 if( nodes[4]->feature.rect[2].p0 )
722 tmp[4] = calc_sumf(nodes[4]->feature.rect[2], p_offset) * nodes[4]->feature.rect[2].weight;
723 if( nodes[5]->feature.rect[2].p0 )
724 tmp[5] = calc_sumf(nodes[5]->feature.rect[2], p_offset) * nodes[5]->feature.rect[2].weight;
725 if( nodes[6]->feature.rect[2].p0 )
726 tmp[6] = calc_sumf(nodes[6]->feature.rect[2], p_offset) * nodes[6]->feature.rect[2].weight;
727 if( nodes[7]->feature.rect[2].p0 )
728 tmp[7] = calc_sumf(nodes[7]->feature.rect[2], p_offset) * nodes[7]->feature.rect[2].weight;
780 double _sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
781 _sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
782 if( node->feature.rect[2].p0 )
783 _sum += calc_sum(node->feature.rect[2],p_offset) * node->feature.rect[2].weight;
803 double sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
804 sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
806 if( node->feature.rect[2].p0 )
807 sum += calc_sum(node->feature.rect[2],p_offset) * node->feature.rect[2].weight;
944 __m256 offset = _mm256_set_ps(calc_sumf(nodes[7]->feature.rect[0], p_offset),
945 calc_sumf(nodes[6]->feature.rect[0], p_offset),
946 calc_sumf(nodes[5]->feature.rect[0], p_offset),
947 calc_sumf(nodes[4]->feature.rect[0], p_offset),
948 calc_sumf(nodes[3]->feature.rect[0], p_offset),
949 calc_sumf(nodes[2]->feature.rect[0], p_offset),
950 calc_sumf(nodes[1]->feature.rect[0], p_offset),
951 calc_sumf(nodes[0]->feature.rect[0], p_offset));
953 __m256 weight = _mm256_set_ps(nodes[7]->feature.rect[0].weight,
954 nodes[6]->feature.rect[0].weight,
955 nodes[5]->feature.rect[0].weight,
956 nodes[4]->feature.rect[0].weight,
957 nodes[3]->feature.rect[0].weight,
958 nodes[2]->feature.rect[0].weight,
959 nodes[1]->feature.rect[0].weight,
960 nodes[0]->feature.rect[0].weight);
964 offset = _mm256_set_ps(calc_sumf(nodes[7]->feature.rect[1], p_offset),
965 calc_sumf(nodes[6]->feature.rect[1], p_offset),
966 calc_sumf(nodes[5]->feature.rect[1], p_offset),
967 calc_sumf(nodes[4]->feature.rect[1], p_offset),
968 calc_sumf(nodes[3]->feature.rect[1], p_offset),
969 calc_sumf(nodes[2]->feature.rect[1], p_offset),
970 calc_sumf(nodes[1]->feature.rect[1], p_offset),
971 calc_sumf(nodes[0]->feature.rect[1], p_offset));
973 weight = _mm256_set_ps(nodes[7]->feature.rect[1].weight,
974 nodes[6]->feature.rect[1].weight,
975 nodes[5]->feature.rect[1].weight,
976 nodes[4]->feature.rect[1].weight,
977 nodes[3]->feature.rect[1].weight,
978 nodes[2]->feature.rect[1].weight,
979 nodes[1]->feature.rect[1].weight,
980 nodes[0]->feature.rect[1].weight);
1011 double sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
1012 sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
1050 __m256 offset = _mm256_set_ps(calc_sumf(nodes[7]->feature.rect[0], p_offset),
1051 calc_sumf(nodes[6]->feature.rect[0], p_offset),
1052 calc_sumf(nodes[5]->feature.rect[0], p_offset),
1053 calc_sumf(nodes[4]->feature.rect[0], p_offset),
1054 calc_sumf(nodes[3]->feature.rect[0], p_offset),
1055 calc_sumf(nodes[2]->feature.rect[0], p_offset),
1056 calc_sumf(nodes[1]->feature.rect[0], p_offset),
1057 calc_sumf(nodes[0]->feature.rect[0], p_offset));
1059 __m256 weight = _mm256_set_ps(nodes[7]->feature.rect[0].weight,
1060 nodes[6]->feature.rect[0].weight,
1061 nodes[5]->feature.rect[0].weight,
1062 nodes[4]->feature.rect[0].weight,
1063 nodes[3]->feature.rect[0].weight,
1064 nodes[2]->feature.rect[0].weight,
1065 nodes[1]->feature.rect[0].weight,
1066 nodes[0]->feature.rect[0].weight);
1070 offset = _mm256_set_ps(calc_sumf(nodes[7]->feature.rect[1], p_offset),
1071 calc_sumf(nodes[6]->feature.rect[1], p_offset),
1072 calc_sumf(nodes[5]->feature.rect[1], p_offset),
1073 calc_sumf(nodes[4]->feature.rect[1], p_offset),
1074 calc_sumf(nodes[3]->feature.rect[1], p_offset),
1075 calc_sumf(nodes[2]->feature.rect[1], p_offset),
1076 calc_sumf(nodes[1]->feature.rect[1], p_offset),
1077 calc_sumf(nodes[0]->feature.rect[1], p_offset));
1079 weight = _mm256_set_ps(nodes[7]->feature.rect[1].weight,
1080 nodes[6]->feature.rect[1].weight,
1081 nodes[5]->feature.rect[1].weight,
1082 nodes[4]->feature.rect[1].weight,
1083 nodes[3]->feature.rect[1].weight,
1084 nodes[2]->feature.rect[1].weight,
1085 nodes[1]->feature.rect[1].weight,
1086 nodes[0]->feature.rect[1].weight);
1090 if( nodes[0]->feature.rect[2].p0 )
1091 tmp[0] = calc_sumf(nodes[0]->feature.rect[2],p_offset) * nodes[0]->feature.rect[2].weight;
1092 if( nodes[1]->feature.rect[2].p0 )
1093 tmp[1] = calc_sumf(nodes[1]->feature.rect[2],p_offset) * nodes[1]->feature.rect[2].weight;
1094 if( nodes[2]->feature.rect[2].p0 )
1095 tmp[2] = calc_sumf(nodes[2]->feature.rect[2],p_offset) * nodes[2]->feature.rect[2].weight;
1096 if( nodes[3]->feature.rect[2].p0 )
1097 tmp[3] = calc_sumf(nodes[3]->feature.rect[2],p_offset) * nodes[3]->feature.rect[2].weight;
1098 if( nodes[4]->feature.rect[2].p0 )
1099 tmp[4] = calc_sumf(nodes[4]->feature.rect[2],p_offset) * nodes[4]->feature.rect[2].weight;
1100 if( nodes[5]->feature.rect[2].p0 )
1101 tmp[5] = calc_sumf(nodes[5]->feature.rect[2],p_offset) * nodes[5]->feature.rect[2].weight;
1102 if( nodes[6]->feature.rect[2].p0 )
1103 tmp[6] = calc_sumf(nodes[6]->feature.rect[2],p_offset) * nodes[6]->feature.rect[2].weight;
1104 if( nodes[7]->feature.rect[2].p0 )
1105 tmp[7] = calc_sumf(nodes[7]->feature.rect[2],p_offset) * nodes[7]->feature.rect[2].weight;
1139 double sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
1140 sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
1141 if( node->feature.rect[2].p0 )
1142 sum += calc_sum(node->feature.rect[2],p_offset) * node->feature.rect[2].weight;
1168 __m128d sum = _mm_set_sd(calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight +
1169 calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight);
1184 double _sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
1185 _sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
1186 if( node->feature.rect[2].p0 )
1187 _sum += calc_sum(node->feature.rect[2],p_offset) * node->feature.rect[2].weight;
1212 double sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
1213 sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
1224 double sum = calc_sum(node->feature.rect[0],p_offset) * node->feature.rect[0].weight;
1225 sum += calc_sum(node->feature.rect[1],p_offset) * node->feature.rect[1].weight;
1226 if( node->feature.rect[2].p0 )
1227 sum += calc_sum(node->feature.rect[2],p_offset) * node->feature.rect[2].weight;
1785 if( r.area() > cv::Rect(result_comp.rect).area() )
1787 result_comp.rect = r;
1798 c.rect = rectList[i];
1880 &(classifier->haar_feature[l].rect[k].weight), &dl );
1882 classifier->haar_feature[l].rect[k].r = r;
1891 memset( classifier->haar_feature[l].rect + k, 0,
1892 sizeof(classifier->haar_feature[l].rect[k]) );
2193 "(stage %d, tree %d, node %d, rect %d)", i, j, k, l );
2201 "(stage %d, tree %d, node %d, rect %d)", i, j, k, l );
2211 "(stage %d, tree %d, node %d, rect %d)", i, j, k, l );
2221 "(stage %d, tree %d, node %d, rect %d)", i, j, k, l );
2229 "(stage %d, tree %d, node %d, rect %d)", i, j, k, l );
2233 classifier->haar_feature[k].rect[l].weight = (float) fn->data.f;
2234 classifier->haar_feature[k].rect[l].r = r;
2237 } /* for each rect */
2240 classifier->haar_feature[k].rect[l].weight = 0;
2241 classifier->haar_feature[k].rect[l].r = cvRect( 0, 0, 0, 0 );
2444 for( l = 0; l < CV_HAAR_FEATURE_MAX && feature->rect[l].r.width != 0; ++l )
2447 cvWriteInt( fs, NULL, feature->rect[l].r.x );
2448 cvWriteInt( fs, NULL, feature->rect[l].r.y );
2449 cvWriteInt( fs, NULL, feature->rect[l].r.width );
2450 cvWriteInt( fs, NULL, feature->rect[l].r.height );
2451 cvWriteReal( fs, NULL, feature->rect[l].weight );
2452 cvEndWriteStruct( fs ); /* rect */