public enum FLineSampler extends Enum<FLineSampler> implements LineSampler<FImage,float[]>
FImage
.Enum Constant and Description |
---|
INTERPOLATED
Sample the pixel values at regular intervals along the full
length of the line using bilinear interpolation to get
sub-pixel values.
|
INTERPOLATED_DERIVATIVE
Sample the pixel values at regular intervals along the full
length of the line using bilinear interpolation and then
compute the derivative using [1 0 -1] filter.
|
NEAREST_NEIGHBOUR
Sample the pixel values at regular intervals along the full length
of the line taking the sample value from the nearest pixel.
|
NEAREST_NEIGHBOUR_DERIVATIVE
Sample the pixel values at regular intervals along the full
length of the line using nearest-neighbour pixels and then
compute the derivative using [1 0 -1] filter.
|
PIXELSTEP_INTERPOLATED
Sample at 1-pixel intervals about the centre of the
line using bilinear interpolation to estimate sub-pixel
values.
|
PIXELSTEP_INTERPOLATED_DERIVATIVE
Sample at 1-pixel intervals about the centre of the
line using bilinear interpolation to estimate sub-pixel values
and then compute the derivative using [1 0 -1] filter.
|
PIXELSTEP_NEAREST_NEIGHBOUR
Sample at 1-pixel intervals about the centre of the
line using nearest-neighbour interpolation.
|
PIXELSTEP_NEAREST_NEIGHBOUR_DERIVATIVE
Sample at 1-pixel intervals about the centre of the
line using nearest neighbour interpolation to estimate values
and then compute the derivative using [1 0 -1] filter.
|
Modifier and Type | Method and Description |
---|---|
abstract float[] |
extractSamples(Line2d line,
FImage image,
int numSamples)
Extract a numSamples samples along the given line
in the given image.
|
Line2d |
getSampleLine(Line2d line,
FImage image,
int numSamples)
Get the a line representing the extremities of
the pixels that are actually sampled.
|
static FLineSampler |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FLineSampler[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FLineSampler PIXELSTEP_NEAREST_NEIGHBOUR
public static final FLineSampler NEAREST_NEIGHBOUR
public static final FLineSampler PIXELSTEP_INTERPOLATED
public static final FLineSampler INTERPOLATED
public static final FLineSampler PIXELSTEP_NEAREST_NEIGHBOUR_DERIVATIVE
public static final FLineSampler NEAREST_NEIGHBOUR_DERIVATIVE
public static final FLineSampler PIXELSTEP_INTERPOLATED_DERIVATIVE
public static final FLineSampler INTERPOLATED_DERIVATIVE
public static FLineSampler[] values()
for (FLineSampler c : FLineSampler.values()) System.out.println(c);
public static FLineSampler valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Line2d getSampleLine(Line2d line, FImage image, int numSamples)
LineSampler
getSampleLine
in interface LineSampler<FImage,float[]>
line
- the lineimage
- the image to sample fromnumSamples
- the number of samplespublic abstract float[] extractSamples(Line2d line, FImage image, int numSamples)
LineSampler
extractSamples
in interface LineSampler<FImage,float[]>
line
- the lineimage
- the image to sample fromnumSamples
- the number of samples