Class BatchIndirectDistanceImpl
java.lang.Object
cz.fidentis.analyst.engines.face.batch.distance.impl.BatchIndirectDistanceImpl
- All Implemented Interfaces:
BatchDistance
,BatchIndirectDistance
- Direct Known Subclasses:
BatchDistanceNearestNeighbors
,BatchDistanceRayCasting
An object that computes distance-based similarity of the set of faces.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchIndirectDistanceImpl
(HumanFace gaugeFace, int numFaces, BatchDistanceNearestNeighbors.DistCache<?> distCache) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
addToMeasurement
(HumanFace face) Adds the face to the N:N measurement.protected BatchDistanceNearestNeighbors.DistCache
<?> double[][]
Returns computed 2D matrix of sample standard deviations ornull
double[][]
Returns computed 2D matrix of distance similarities ornull
protected HumanFace
void
measure()
Computes pair-wise distance values.protected void
setDistDeviation
(int i, int j, double val) protected void
setDistSimilarity
(int i, int j, double val)
-
Constructor Details
-
BatchIndirectDistanceImpl
public BatchIndirectDistanceImpl(HumanFace gaugeFace, int numFaces, BatchDistanceNearestNeighbors.DistCache<?> distCache) Constructor.- Parameters:
gaugeFace
- A face serving as a "gauge". It is usually an average face of a set of faces.numFaces
- The number of faces to be measured (excluding the gauge face)distCache
- Distance cache
-
-
Method Details
-
addToMeasurement
Description copied from interface:BatchIndirectDistance
Adds the face to the N:N measurement.- Specified by:
addToMeasurement
in interfaceBatchIndirectDistance
- Parameters:
face
- Face to be measured
-
measure
public void measure()Description copied from interface:BatchIndirectDistance
Computes pair-wise distance values.- Specified by:
measure
in interfaceBatchIndirectDistance
-
getDistSimilarities
public double[][] getDistSimilarities()Description copied from interface:BatchDistance
Returns computed 2D matrix of distance similarities ornull
- Specified by:
getDistSimilarities
in interfaceBatchDistance
- Returns:
- computed 2D matrix of distance similarities or
null
-
getDistDeviations
public double[][] getDistDeviations()Description copied from interface:BatchDistance
Returns computed 2D matrix of sample standard deviations ornull
- Specified by:
getDistDeviations
in interfaceBatchDistance
- Returns:
- computed 2D matrix of sample standard deviations or
null
-
setDistSimilarity
protected void setDistSimilarity(int i, int j, double val) -
setDistDeviation
protected void setDistDeviation(int i, int j, double val) -
getDistCache
-
getGaugeFace
-