Refactor PP5 comparison handling

Introduce PP5GalleryTransform, a transform that compares incoming templates
against a fixed gallery (thereby avoiding the cost of repeatedly setting up
pp5 galleries for the same templates).

Modify AlgorithmCore to support supplying Transforms to the right of the
: in an algorithm string. If a distance cannot be created (testing if
defaultDistance is returned from Distance::make), store the comparison
part as a string, and use it to make a replacement for GalleryCompareTransfrom
in calls to AlgorithmCore::compare

This commit essentially disables DefaultDistance (which could previously
be used as a shorthand for DistDistance with some specific metric),
instead leaving DefaultDistance as a non-functional distance.
DefaultGallery and DefaultOutput apply their respective interfaces to
Format in  ways that are valid/useful, existing code which uses the
gallery/output interfaces is adapted to use Format as an end point.

In this case, we have distance which defines pairwise comparisons (well not
just pairwise, but comparisons for which both sides of the comparison are
input), which is a special case of probe->gallery comparison. In the
current comparison code, the 1-N comparison against a fixed gallery is
represented by GalleryCompareTransform, which has a distance and a gallery,
and uses the distance to compare incoming templates against the gallery.

What happens in this branch, is GalleryCompare is replaced by a different
transform which does largely the same thing, but maintains pp5 specific
data structures for the gallery. There is no point at which the Distance
interface is actually used in this scenario.



On Thu, Jul 3, 2014 at 9:10 AM, Josh Klontz <notifications@github.com>
wrote:

> In openbr/plugins/distance.cpp:
>
> > @@ -135,7 +135,7 @@ class DefaultDistance : public Distance
> >
> >      void init()
> >      {
> > -        distance = Distance::make("Dist("+file.suffix()+")");
> > +     //   distance = Distance::make("Dist("+file.suffix()+")");
>
> DefaultGallery constructs a Format
> DefaultOutput constructs Format
> DefaultDistance constructs a Transform?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/biometrics/openbr/pull/213/files#r14512097>.
>