refactoring latentSVM

This commit is contained in:
Evgeniy Kozinov
2011-07-12 18:43:41 +00:00
parent ea8e27961e
commit 07eed8c489
10 changed files with 354 additions and 409 deletions

View File

@@ -127,8 +127,7 @@ CvLSVMFeaturePyramid* createFeaturePyramidWithBorder(IplImage *image,
CvLSVMFeaturePyramid *H;
// Obtaining feature pyramid
opResult = getFeaturePyramid(image, LAMBDA, SIDE_LENGTH, 0, 0,
image->width, image->height, &H);
opResult = getFeaturePyramid(image, &H);
if (opResult != LATENT_SVM_OK)
{
@@ -139,7 +138,7 @@ CvLSVMFeaturePyramid* createFeaturePyramidWithBorder(IplImage *image,
// Addition nullable border for each feature map
// the size of the border for root filters
computeBorderSize(maxXBorder, maxYBorder, &bx, &by);
for (level = 0; level < H->countLevel; level++)
for (level = 0; level < H->numLevels; level++)
{
addNullableBorder(H->pyramid[level], bx, by);
}
@@ -196,7 +195,7 @@ int searchObject(const CvLSVMFeaturePyramid *H, const CvLSVMFilterObject **all_F
// Transformation filter displacement from the block space
// to the space of pixels at the initial image
// that settles at the level number LAMBDA
convertPoints(H->countLevel, H->lambda, LAMBDA, (*points),
convertPoints(H->numLevels, LAMBDA, LAMBDA, (*points),
(*levels), (*partsDisplacement), (*kPoints), n,
maxXBorder, maxYBorder);
@@ -305,7 +304,7 @@ int searchObjectThreshold(const CvLSVMFeaturePyramid *H,
// Transformation filter displacement from the block space
// to the space of pixels at the initial image
// that settles at the level number LAMBDA
convertPoints(H->countLevel, H->lambda, LAMBDA, (*points),
convertPoints(H->numLevels, LAMBDA, LAMBDA, (*points),
(*levels), (*partsDisplacement), (*kPoints), n,
maxXBorder, maxYBorder);