Storing PCA components and One Way descriptors in one yml file.

This commit is contained in:
Ilya Lysenkov
2010-06-02 05:19:09 +00:00
parent 08c377cb48
commit a702e5b2dc
5 changed files with 288 additions and 218 deletions

View File

@@ -203,9 +203,8 @@ void OneWayDescriptorMatch::initialize( const Params& _params)
void OneWayDescriptorMatch::add( const Mat& image, vector<KeyPoint>& keypoints )
{
if( base.empty() )
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, params.trainPath.c_str(),
params.pcaConfig.c_str(), params.pcaHrConfig.c_str(),
params.pcaDescConfig.c_str());
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, params.pcaFilename,
params.trainPath, params.trainImagesList);
size_t trainFeatureCount = keypoints.size();
@@ -225,9 +224,8 @@ void OneWayDescriptorMatch::add( const Mat& image, vector<KeyPoint>& keypoints )
void OneWayDescriptorMatch::add( KeyPointCollection& keypoints )
{
if( base.empty() )
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, params.trainPath.c_str(),
params.pcaConfig.c_str(), params.pcaHrConfig.c_str(),
params.pcaDescConfig.c_str());
base = new OneWayDescriptorObject( params.patchSize, params.poseCount, params.pcaFilename,
params.trainPath, params.trainImagesList);
size_t trainFeatureCount = keypoints.calcKeypointCount();