Commit dc9a97a8 authored by Andrey Filippov's avatar Andrey Filippov

Added "roundness" and dual-scene for 100m

parent 33f052a0
...@@ -916,6 +916,10 @@ public class ComboMatch { ...@@ -916,6 +916,10 @@ public class ComboMatch {
zoom_lev, // int zoom_lev, zoom_lev, // int zoom_lev,
debugLevel); // final int debugLevel) debugLevel); // final int debugLevel)
if (warp == null) {
System.out.println("Failed correlateOrthoPair()");
return false;
}
//maps_collection.ortho_maps[gpu_pair[1]] //maps_collection.ortho_maps[gpu_pair[1]]
if (process_correlation) { if (process_correlation) {
if (update_match) { if (update_match) {
......
...@@ -57,10 +57,41 @@ public class ItemMatch { ...@@ -57,10 +57,41 @@ public class ItemMatch {
} }
return match.getMatches(); return match.getMatches();
} }
public double [] getMatchValues(GroundObjectPattern groundObjectPattern) { public double [] getMatchValues(GroundObjectPattern groundObjectPattern) {
return getMatchValues(groundObjectPattern.getPatternPath()); return getMatchValues(groundObjectPattern.getPatternPath());
} }
/**
* Get ratio of the worst and best partial pattern correlation values
* @param groundObjectPattern
* @return
*/
public double getRoundness (GroundObjectPattern groundObjectPattern) {
return getRoundness(groundObjectPattern.getPatternPath());
}
public double getRoundness (String pattern_path) {
ItemPatternMatch match = pattern_matches.get(pattern_path);
if (match == null) {
System.out.println("No matches found for pattern "+pattern_path);
return Double.NaN;
}
double [] matches = match.getMatches();
double best = matches[1];
double worst = matches[1];
for (int i = 1; i < matches.length; i++) {
if (matches[i] < worst) {
worst = matches[i];
}
if (matches[i] > best) {
best = matches[i];
}
}
return worst/best;
}
public double getMatchValue(String pattern_path, int indx) { public double getMatchValue(String pattern_path, int indx) {
ItemPatternMatch match = pattern_matches.get(pattern_path); ItemPatternMatch match = pattern_matches.get(pattern_path);
if (match == null) { if (match == null) {
......
...@@ -2193,6 +2193,7 @@ public class OrthoMap implements Comparable <OrthoMap>, Serializable{ ...@@ -2193,6 +2193,7 @@ public class OrthoMap implements Comparable <OrthoMap>, Serializable{
switch (ipatterns[n][i]) { switch (ipatterns[n][i]) {
case 1: dbg_img[n][i] = 1.0; break; case 1: dbg_img[n][i] = 1.0; break;
case 2: dbg_img[n][i] = -1.0; break; case 2: dbg_img[n][i] = -1.0; break;
case 3: dbg_img[n][i] = -2.0; break;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment