ImageEn, unit ievision

TIEVisionCascadeClassifierTrainer.getSamplesCount

TIEVisionCascadeClassifierTrainer.getSamplesCount


Declaration

function getSamplesCount(vecFile: PAnsiChar): int32_t; safecall;


Description

Returns the number of samples stored in a positive samples file.



Parameter Description
vecFile Source samples file


Demo

Demo  Demos\IEVision\TrainCascadeClassifier\TrainCascadeClassifier.dpr


Example

// trainCascade images count must be less than 85% of the images in "vec" file
imagesCount := trunc(cascadeTrainer.getSamplesCount('samples.vec') * 0.85);

// train the cascade classifier with 10 stages using LBP. The output will be "trainingresult\cascade.xml", the you should use in TIEVisionObjectsFinder to find objects.
cascadeTrainer.trainCascade('trainingresult', 'samples.vec', 'negative_images', imagesCount, 40, 40, 10, ievLBP);