|
|
|
@ -382,10 +382,11 @@ void CvCascadeBoostTrainData::get_ord_var_data( CvDTreeNode* n, int vi, float* o |
|
|
|
|
vi*sample_count + n->offset ); |
|
|
|
|
for( int i = 0; i < nodeSampleCount; i++ ) |
|
|
|
|
sortedIndicesBuf[i] = shortIndices[i]; |
|
|
|
|
|
|
|
|
|
*sortedIndices = sortedIndicesBuf; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( vi < numPrecalcVal ) |
|
|
|
|
if( vi < numPrecalcVal ) |
|
|
|
|
{ |
|
|
|
|
for( int i = 0; i < nodeSampleCount; i++ ) |
|
|
|
|
{ |
|
|
|
@ -406,19 +407,8 @@ void CvCascadeBoostTrainData::get_ord_var_data( CvDTreeNode* n, int vi, float* o |
|
|
|
|
} |
|
|
|
|
else // vi >= numPrecalcIdx
|
|
|
|
|
{ |
|
|
|
|
vector<float> sampleValuesBuf; |
|
|
|
|
float* sampleValues = 0; |
|
|
|
|
|
|
|
|
|
if( sizeof(float) == sizeof(int) ) |
|
|
|
|
{ |
|
|
|
|
// use sampleIndices as temporary buffer for values
|
|
|
|
|
sampleValues = (float*)sampleIndices; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
sampleValuesBuf.resize(nodeSampleCount); |
|
|
|
|
sampleValues = &sampleValuesBuf[0]; |
|
|
|
|
} |
|
|
|
|
cv::AutoBuffer<float> abuf(nodeSampleCount); |
|
|
|
|
float* sampleValues = &abuf[0]; |
|
|
|
|
|
|
|
|
|
if ( vi < numPrecalcVal ) |
|
|
|
|
{ |
|
|
|
|