From acb45104ff872568c3acb5674eaa6550764adafa Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Thu, 11 Apr 2013 15:40:12 -0400 Subject: [PATCH] minor improvements --- openbr/plugins/algorithms.cpp | 2 +- openbr/plugins/integral.cpp | 1 + openbr/plugins/regions.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openbr/plugins/algorithms.cpp b/openbr/plugins/algorithms.cpp index fb53e95..4463eeb 100644 --- a/openbr/plugins/algorithms.cpp +++ b/openbr/plugins/algorithms.cpp @@ -50,7 +50,7 @@ class AlgorithmsInitializer : public Initializer Globals->abbreviations.insert("SmallSIFT", "Open+LimitSize(512)+KeyPointDetector(SIFT)+KeyPointDescriptor(SIFT):KeyPointMatcher(BruteForce)"); Globals->abbreviations.insert("SmallSURF", "Open+LimitSize(512)+KeyPointDetector(SURF)+KeyPointDescriptor(SURF):KeyPointMatcher(BruteForce)"); Globals->abbreviations.insert("ColorHist", "Open+LimitSize(512)!EnsureChannels(3)+SplitChannels+Hist(256,0,8)+Cat+Normalize(L1):L2"); - Globals->abbreviations.insert("ImageClassification", "Open+CropSquare+LimitSize(256)+Cvt(Gray)+Gradient+Bin(0,360,9,true)+Merge+Integral+RecursiveIntegralSampler(4,2,8,Singleton(KMeans(1024)[fraction=0.2]))+Cat+Print+CvtFloat+Hist(1024):Dist(L1)"); + Globals->abbreviations.insert("ImageClassification", "Open+CropSquare+LimitSize(256)+Cvt(Gray)+Gradient+Bin(0,360,9,true)+Merge+Integral+RecursiveIntegralSampler(4,2,8,Singleton(KMeans(1024)[fraction=0.5]))+Cat+CvtFloat+Hist(1024):Dist(L1)"); // Hash Globals->abbreviations.insert("FileName", "Name+Identity:Identical"); diff --git a/openbr/plugins/integral.cpp b/openbr/plugins/integral.cpp index f081c61..1ebdca5 100644 --- a/openbr/plugins/integral.cpp +++ b/openbr/plugins/integral.cpp @@ -188,6 +188,7 @@ class RecursiveIntegralSamplerTransform : public Transform OutputDescriptor(dst.ptr(2), channels, 1) = ((a+b)-(c+d))/2.f; OutputDescriptor(dst.ptr(3), channels, 1) = ((a+c)-(b+d))/2.f; OutputDescriptor(dst.ptr(4), channels, 1) = ((a+d)-(b+c))/2.f; + dst = dst.reshape(1, 1); } Template subdivide(const Template &src) const diff --git a/openbr/plugins/regions.cpp b/openbr/plugins/regions.cpp index 281cc03..61e6a36 100644 --- a/openbr/plugins/regions.cpp +++ b/openbr/plugins/regions.cpp @@ -92,15 +92,15 @@ class CatTransform : public UntrainableMetaTransform qFatal("%d partitions does not evenly divide %d matrices.", partitions, src.size()); QVector sizes(partitions, 0); for (int i=0; i offsets(partitions, 0); for (int i=0; i