amplement weidhting according to L. Bourdev and J. Brandt paper "Robust Object Detection Via Soft Cascade"

This commit is contained in:
marina.kolpakova
2012-12-12 15:35:30 +04:00
parent c091092174
commit a8d0e04912
4 changed files with 20 additions and 3 deletions

View File

@@ -1116,6 +1116,12 @@ bool CvBoost::train( CvMLData* _data,
return result;
}
void CvBoost::initial_weights(double (&p)[2])
{
p[0] = 1.;
p[1] = 1.;
}
void
CvBoost::update_weights( CvBoostTree* tree )
{
@@ -1159,8 +1165,9 @@ CvBoost::update_weights( CvBoostTree* tree )
// in case of logitboost and gentle adaboost each weak tree is a regression tree,
// so we need to convert class labels to floating-point values
double w0 = 1./n;
double p[2] = { 1, 1 };
double w0 = 1./ n;
double p[2] = { 1., 1. };
initial_weights(p);
cvReleaseMat( &orig_response );
cvReleaseMat( &sum_response );