Esempio n. 1
0
  // FloatsLF
  public static final FloatsLF get(FloatsLF q, ALocalFeaturesGroup<FloatsLF> g, double sqMaxDist) {
    FloatsLF res = null;
    double resDist = sqMaxDist;

    for (FloatsLF curr : g.lfArr) {
      double sqD = L2.getSquared(q.values, curr.values, sqMaxDist);
      if (sqD >= 0 && sqD < resDist) {
        res = curr;
        resDist = sqD;
      }
    }

    return res;
  }
Esempio n. 2
0
  // RootSIFT
  public static final RootSIFT get(RootSIFT q, ALocalFeaturesGroup<RootSIFT> g, int sqMaxDist) {
    RootSIFT res = null;
    int resDist = sqMaxDist;

    for (RootSIFT curr : g.lfArr) {
      int sqD = L2.getSquared(q.values, curr.values, sqMaxDist);
      if (sqD >= 0 && sqD < resDist) {
        res = curr;
        resDist = sqD;
      }
    }

    return res;
  }