public class AreaCameraDistanceEstimator extends java.lang.Object implements DistanceEstimator
Modifier and Type | Class and Description |
---|---|
static class |
AreaCameraDistanceEstimator.AreaDistancePair
A class which represents a pair of area percentage and distance.
|
Constructor and Description |
---|
AreaCameraDistanceEstimator(AreaCameraDistanceEstimator.AreaDistancePair close,
AreaCameraDistanceEstimator.AreaDistancePair far)
Creates an instance of an area distance estimator.
|
Modifier and Type | Method and Description |
---|---|
double |
getDistance(Target target)
Get the distance to the target from the camera.
|
public AreaCameraDistanceEstimator(AreaCameraDistanceEstimator.AreaDistancePair close, AreaCameraDistanceEstimator.AreaDistancePair far)
close
- The percent of the area the target takes up at close range.far
- The percent of the area the target takes up at far range.public double getDistance(Target target)
DistanceEstimator
getDistance
in interface DistanceEstimator
target
- The target.