Class BatchPairwiseDistanceImpl
java.lang.Object
cz.fidentis.analyst.engines.face.batch.distance.impl.BatchPairwiseDistanceImpl
- All Implemented Interfaces:
BatchDistance
,BatchPairwiseDistance
Pair-wise N:N distance measurement.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
Returns computed 2D matrix of sample standard deviations ornull
double[][]
Returns computed 2D matrix of distance similarities ornull
void
Measure two faces in both directions.protected void
measureAndStoreOneDirection
(HumanFace faceA, HumanFace faceB, int indexA, int indexB) MeasuresfaceB
towardsfaceA
.protected void
setDistDeviation
(int i, int j, double val) protected void
setDistSimilarity
(int i, int j, double val) protected void
setDistValues
(int i, int j, MeshDistanceVisitor pairwiseVisitor, MeshDistanceVisitor meanFaceVisitor) Sets an average distance and a sample standard deviation but only considering vertices that are not copped either by the second face in the pairwise comparison or the mean face (if defined).
-
Constructor Details
-
BatchPairwiseDistanceImpl
Constructor.- Parameters:
cropFace
- If notnull
, then only surfaces overlapping thegaugeFace
are measured.numFaces
- The number of faces to be measured (excluding the gauge face)
-
-
Method Details
-
measure
Description copied from interface:BatchPairwiseDistance
Measure two faces in both directions.- Specified by:
measure
in interfaceBatchPairwiseDistance
- Parameters:
face1
- First faceface2
- Second faceface1Index
- The index under which is the result offace1->face2
measurement storedface2Index
- The index under which is the result offace2->face1
measurement stored
-
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) -
measureAndStoreOneDirection
protected void measureAndStoreOneDirection(HumanFace faceA, HumanFace faceB, int indexA, int indexB) MeasuresfaceB
towardsfaceA
. Omits that parts of thefaceB
that do not overlap the crop face.- Parameters:
faceA
- Face AfaceB
- Face BindexA
- index of face AindexB
- index of face B
-
setDistValues
protected void setDistValues(int i, int j, MeshDistanceVisitor pairwiseVisitor, MeshDistanceVisitor meanFaceVisitor) Sets an average distance and a sample standard deviation but only considering vertices that are not copped either by the second face in the pairwise comparison or the mean face (if defined).- Parameters:
i
- the first indexj
- the second indexpairwiseVisitor
- distance visitormeanFaceVisitor
- mean face visitor
-