edu.stanford.hci.r3.pen.gesture
Class ShapeHistogram
java.lang.Object
edu.stanford.hci.r3.pen.gesture.ShapeHistogram
public class ShapeHistogram
- extends java.lang.Object
This software is distributed under the BSD License.
Constructor Summary |
ShapeHistogram()
|
ShapeHistogram(int[] bin_counts,
double[] mins,
double[] maxes,
boolean[] explicit_binning,
double[][] bins,
int bands)
|
Method Summary |
boolean |
addPoint(double[] input)
|
static DoubleMatrix2D |
bookstein(int N,
double[][] X,
double[][] X2,
double beta_k,
double[] E)
|
static void |
clear_covers(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static double[][] |
computeCostMatrix(java.util.ArrayList<ShapeHistogram> first,
java.util.ArrayList<ShapeHistogram> second,
int size1,
int size2,
double dummy_epsilon)
|
static void |
convert_path(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
java.util.ArrayList<ShapeHistogram.Pair> path)
|
static double |
distance(double[][] costMatrix,
int[] mapping,
int firstSize,
int secondSize)
|
static void |
erase_primes(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static ShapeHistogram.Pair |
find_a_zero(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static ShapeHistogram.Pair |
find_prime_in_row(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int row)
|
static double |
find_smallest(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static ShapeHistogram.Pair |
find_star_in_col(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int column)
|
static int |
find_star_in_row(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int row)
|
static int[] |
munkres(int n,
double[][] costs)
|
static double |
shapeContextCost(int N,
double[][] costs,
boolean[] good_rows,
boolean[] good_columns,
int good_count)
|
static double |
shapeContextMetric(ShapeContext shape1,
ShapeContext shape2,
boolean rotationInvariant,
boolean timeSensitive,
boolean verbose)
|
static boolean |
star_in_row(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int row)
|
static int |
step1(int n,
double[][] C,
int[][] M,
int[] Row,
int[] Col)
|
static int |
step2(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static int |
step3(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static int |
step4(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static int |
step5(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static int |
step6(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
|
static double[][] |
warp(double[][] X,
double[][] X2,
DoubleMatrix2D c,
int N)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
costWeighting
public static double costWeighting
ShapeHistogram
public ShapeHistogram()
ShapeHistogram
public ShapeHistogram(int[] bin_counts,
double[] mins,
double[] maxes,
boolean[] explicit_binning,
double[][] bins,
int bands)
bookstein
public static DoubleMatrix2D bookstein(int N,
double[][] X,
double[][] X2,
double beta_k,
double[] E)
clear_covers
public static void clear_covers(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
computeCostMatrix
public static double[][] computeCostMatrix(java.util.ArrayList<ShapeHistogram> first,
java.util.ArrayList<ShapeHistogram> second,
int size1,
int size2,
double dummy_epsilon)
convert_path
public static void convert_path(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
java.util.ArrayList<ShapeHistogram.Pair> path)
distance
public static double distance(double[][] costMatrix,
int[] mapping,
int firstSize,
int secondSize)
erase_primes
public static void erase_primes(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
find_a_zero
public static ShapeHistogram.Pair find_a_zero(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
find_prime_in_row
public static ShapeHistogram.Pair find_prime_in_row(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int row)
find_smallest
public static double find_smallest(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
find_star_in_col
public static ShapeHistogram.Pair find_star_in_col(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int column)
find_star_in_row
public static int find_star_in_row(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int row)
munkres
public static int[] munkres(int n,
double[][] costs)
shapeContextCost
public static double shapeContextCost(int N,
double[][] costs,
boolean[] good_rows,
boolean[] good_columns,
int good_count)
shapeContextMetric
public static double shapeContextMetric(ShapeContext shape1,
ShapeContext shape2,
boolean rotationInvariant,
boolean timeSensitive,
boolean verbose)
star_in_row
public static boolean star_in_row(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov,
int row)
step1
public static int step1(int n,
double[][] C,
int[][] M,
int[] Row,
int[] Col)
step2
public static int step2(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
step3
public static int step3(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
step4
public static int step4(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
step5
public static int step5(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
step6
public static int step6(int n,
double[][] C,
int[][] M,
int[] R_cov,
int[] C_cov)
warp
public static double[][] warp(double[][] X,
double[][] X2,
DoubleMatrix2D c,
int N)
addPoint
public boolean addPoint(double[] input)