Class AbstractDistanceMetric
- java.lang.Object
-
- science.aist.imaging.core.imageprocessing.distance.AbstractDistanceMetric
-
- Direct Known Subclasses:
ChessboardDistanceMetric
,EuclidianDistanceMetric
,ManhattanDistanceMetric
public abstract class AbstractDistanceMetric extends Object
Abstract implementation of a distance metric
- Since:
- 1.0
- Author:
- Christoph Praschl
-
-
Constructor Summary
Constructors Constructor Description AbstractDistanceMetric()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract double
calculateMaskValue(int x, int y)
Method which calculates the mask value at the given positiondouble[][]
create(int masksize)
Creates a distance metric mask with given masksize
-
-
-
Method Detail
-
create
public double[][] create(int masksize)
Creates a distance metric mask with given masksize- Parameters:
masksize
- masksize of the distance metric must be odd and >= 3 (because a distance metric of 1 is always 0)- Returns:
- distance metric
-
calculateMaskValue
protected abstract double calculateMaskValue(int x, int y)
Method which calculates the mask value at the given position- Parameters:
x
- x positiony
- y position- Returns:
- mask value for the given position
-
-