public class GlobalHistogram
extends java.lang.Object
Constructor and Description |
---|
GlobalHistogram(Model3D model,
int shells,
int order)
Generates a global histogram of a Model3D object.
|
GlobalHistogram(Model3D model,
int shells,
int horizontal,
int vertical)
Generates a global histogram of a Model3D object.
|
GlobalHistogram(Model3D model,
int shells,
SphereApproximator sphere)
Generates a global histogram of a Model3D object.
|
Modifier and Type | Method and Description |
---|---|
void |
compareWith(java.lang.String histograms,
java.lang.String resultFile,
double similarity)
Compares this global histogram with a generated directory of global histograms.
|
static double[][] |
createDistanceMatrix(java.lang.String histograms,
java.lang.String claFile,
java.lang.String outputFile)
Returns the distance matrix of histograms in a generated histograms directory.
|
static double[][] |
createDistanceMatrix(java.lang.String histograms,
java.lang.String claFile,
java.lang.String outputFile,
ShapeDescriptor shape,
double similarity)
Returns the distance matrix of global histograms in a generated histograms directory.
|
static double[] |
openFromFile(java.io.File file)
Load a previously saved global histogram vector.
|
static double[] |
openFromFileStraight(java.io.File file)
Load a previously saved histogram vector.
|
void |
saveToFile(java.lang.String filename)
Save as histogram data to file with given filename.
|
public GlobalHistogram(Model3D model, int shells, SphereApproximator sphere)
model
- the Model3D object.shells
- the number of shells to use in histogram. (>= 1)sphere
- a SphereApproximator object used to describe the sectors.SphereApproximator
public GlobalHistogram(Model3D model, int shells, int order)
model
- the Model3D object.shells
- the number of shells to use in histogram. (>= 1)order
- number of subdivisions of sphere approximation.SphereApproximator
public GlobalHistogram(Model3D model, int shells, int horizontal, int vertical)
model
- the Model3D object.shells
- the number of shells to use in histogram. (>= 1)horizontal
- number of horizontal sectors.vertical
- number of vertical sectors.SphereApproximator
public void compareWith(java.lang.String histograms, java.lang.String resultFile, double similarity)
histograms
- the path to a generated directory of global histograms.resultFile
- the path to the result file.similarity
- at high values (above 10 or so) the distance function resembles
more the basic Euclidean distance; at low values (around 1), the function
incorporates more information about neighboring histogram bins.HistogramDirectory
,
QuadraticFormDistance
public static double[][] createDistanceMatrix(java.lang.String histograms, java.lang.String claFile, java.lang.String outputFile, ShapeDescriptor shape, double similarity)
histograms
- the path to a generated directory of global histograms.claFile
- the .cla file to use to generate the distance matrix.outputFile
- the filepath where you want to save your results.shape
- a global ShapeDescriptor with the same shape used in generating the
histograms directory.similarity
- at high values (above 10 or so) the distance function resembles
more the basic Euclidean distance; at low values (around 1), the function
incorporates more information about neighboring histogram bins.QuadraticFormDistance
,
ShapeDescriptor
public static double[][] createDistanceMatrix(java.lang.String histograms, java.lang.String claFile, java.lang.String outputFile)
histograms
- the path to a generated directory of global histograms.claFile
- the .cla file to use to generate the distance matrix.outputFile
- the filepath where you want to save your results.public void saveToFile(java.lang.String filename)
filename
- filename of histogram, "something.ghist"public static double[] openFromFile(java.io.File file)
file
- a File object of the histogram file.public static double[] openFromFileStraight(java.io.File file)
file
- a File object of the histogram file.