public abstract class ChamferMask2D extends Object
ChamferMask3D, 
ChamferDistanceTransform2D| Modifier and Type | Class and Description | 
|---|---|
static class  | 
ChamferMask2D.FloatOffset
The shift to a neighbor of a reference pixel, as a pair (dx,dy),
 and the associated weights given as a float. 
 | 
static class  | 
ChamferMask2D.ShortOffset
The shift to a neighbor of a reference pixel, as a pair (dx,dy),
 and the associated weights given as a short. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static ChamferMask2D | 
BORGEFORS
Use weights 3 for orthogonal neighbors and 4 for diagonal neighbors
 (best approximation for 3-by-3 masks). 
 | 
static ChamferMask2D | 
CHESSBOARD
Use weight equal to 1 for all neighbors. 
 | 
static ChamferMask2D | 
CHESSKNIGHT
Use weights 5 for orthogonal neighbors, 7 for diagonal neighbors, and 11
 for chess-knight moves (recommended approximation for 5-by-5 masks). 
 | 
static ChamferMask2D | 
CITY_BLOCK
Use weights 1 for orthogonal neighbors and 2 for diagonal neighbors,
 and 3 for cube-diagonals. 
 | 
static ChamferMask2D | 
QUASI_EUCLIDEAN
Use weights 1 for orthogonal neighbors and sqrt(2) for diagonal neighbors. 
 | 
static ChamferMask2D | 
VERWER
Chamfer mask in the 7-by-7 neighborhood defined using four weights. 
 | 
| Constructor and Description | 
|---|
ChamferMask2D()  | 
| Modifier and Type | Method and Description | 
|---|---|
static ChamferMask2D | 
fromWeights(float[] weights)
Creates a new Chamfer mask from a list of weights. 
 | 
static ChamferMask2D | 
fromWeights(int[] weights)
Creates a new Chamfer mask from a list of weights. 
 | 
static ChamferMask2D | 
fromWeights(short[] weights)
Creates a new Chamfer mask from a list of weights. 
 | 
Collection<ChamferMask2D.FloatOffset> | 
getBackwardFloatOffsets()  | 
abstract Collection<ChamferMask2D.ShortOffset> | 
getBackwardOffsets()  | 
Collection<ChamferMask2D.FloatOffset> | 
getFloatOffsets()  | 
Collection<ChamferMask2D.FloatOffset> | 
getForwardFloatOffsets()  | 
abstract Collection<ChamferMask2D.ShortOffset> | 
getForwardOffsets()  | 
double | 
getNormalizationWeight()  | 
Collection<ChamferMask2D.ShortOffset> | 
getOffsets()  | 
abstract short | 
getShortNormalizationWeight()  | 
public static final ChamferMask2D CHESSBOARD
public static final ChamferMask2D CITY_BLOCK
public static final ChamferMask2D QUASI_EUCLIDEAN
public static final ChamferMask2D BORGEFORS
public static final ChamferMask2D CHESSKNIGHT
public static final ChamferMask2D VERWER
public static final ChamferMask2D fromWeights(int[] weights)
weights - the list of weights used for building the chamfer maskpublic static final ChamferMask2D fromWeights(short[] weights)
weights - the list of weights used for building the chamfer maskpublic static final ChamferMask2D fromWeights(float[] weights)
weights - the list of weights used for building the chamfer maskpublic Collection<ChamferMask2D.ShortOffset> getOffsets()
public Collection<ChamferMask2D.FloatOffset> getFloatOffsets()
public abstract Collection<ChamferMask2D.ShortOffset> getForwardOffsets()
public abstract Collection<ChamferMask2D.ShortOffset> getBackwardOffsets()
public Collection<ChamferMask2D.FloatOffset> getForwardFloatOffsets()
public Collection<ChamferMask2D.FloatOffset> getBackwardFloatOffsets()
public double getNormalizationWeight()
public abstract short getShortNormalizationWeight()
Copyright © 2014–2023 INRA-IJPB Modeling and Digital Imaging lab. All rights reserved.