public class FImageGradients extends Object implements ImageAnalyser<FImage>
Modifier and Type | Class and Description |
---|---|
static class |
FImageGradients.Mode
Modes of operation for signed and unsigned orientations
|
Modifier and Type | Field and Description |
---|---|
FImage |
magnitudes
The gradient magnitudes
|
FImageGradients.Mode |
mode
The orientation mode
|
FImage |
orientations
The gradient orientations
|
Constructor and Description |
---|
FImageGradients()
Default constructor using
FImageGradients.Mode.Signed mode. |
FImageGradients(FImageGradients.Mode mode)
Construct using the given
FImageGradients.Mode . |
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(FImage image)
Analyse an image.
|
static FImageGradients |
getGradientMagnitudesAndOrientations(FImage image)
Static helper to create a new
FImageGradients and call
analyseImage(FImage) with the image. |
static FImageGradients |
getGradientMagnitudesAndOrientations(FImage image,
FImageGradients.Mode mode)
Static helper to create a new
FImageGradients and call
analyseImage(FImage) with the image. |
static void |
gradientMagnitudesAndOrientations(FImage image,
FImage magnitudes,
FImage orientations)
Estimate gradients magnitudes and orientations by calculating pixel
differences.
|
static void |
gradientMagnitudesAndQuantisedOrientations(FImage image,
FImage[] magnitudes)
Estimate gradients magnitudes and orientations by calculating pixel
differences.
|
static void |
gradientMagnitudesAndQuantisedOrientations(FImage image,
FImage[] magnitudes,
boolean interp,
FImageGradients.Mode mode)
Estimate gradients magnitudes and orientations by calculating pixel
differences.
|
static void |
gradientMagnitudesAndUnsignedOrientations(FImage image,
FImage magnitudes,
FImage orientations)
Estimate gradients magnitudes and orientations by calculating pixel
differences.
|
public FImage magnitudes
public FImage orientations
public FImageGradients.Mode mode
public FImageGradients()
FImageGradients.Mode.Signed
mode.public FImageGradients(FImageGradients.Mode mode)
FImageGradients.Mode
.mode
- the modepublic void analyseImage(FImage image)
ImageAnalyser
analyseImage
in interface ImageAnalyser<FImage>
image
- The image to process in place.public static FImageGradients getGradientMagnitudesAndOrientations(FImage image)
FImageGradients
and call
analyseImage(FImage)
with the image.image
- the imagepublic static FImageGradients getGradientMagnitudesAndOrientations(FImage image, FImageGradients.Mode mode)
FImageGradients
and call
analyseImage(FImage)
with the image.image
- the imagemode
- the orientation modepublic static void gradientMagnitudesAndOrientations(FImage image, FImage magnitudes, FImage orientations)
atan2
function and will be in
the range +/-PI.image
- the input imagemagnitudes
- the output gradient magnitudesorientations
- the output gradient orientationspublic static void gradientMagnitudesAndUnsignedOrientations(FImage image, FImage magnitudes, FImage orientations)
atan
function and will be in
the range +/- PI/2.image
- the input imagemagnitudes
- the output gradient magnitudesorientations
- the output gradient orientationspublic static void gradientMagnitudesAndQuantisedOrientations(FImage image, FImage[] magnitudes)
The orientations are quantised into magnitudes.length
bins and
the magnitudes are spread to the adjacent bin through linear interpolation.
The magnitudes parameter must be fully allocated as an array of num
orientation bin images, each of the same size as the input image.
image
- magnitudes
- public static void gradientMagnitudesAndQuantisedOrientations(FImage image, FImage[] magnitudes, boolean interp, FImageGradients.Mode mode)
The orientations are quantised into magnitudes.length
bins.
Magnitudes are optionally spread to the adjacent bin through linear
interpolation. The magnitudes parameter must be fully allocated as an array
of num orientation bin images, each of the same size as the input image.
image
- magnitudes
- interp
- mode
-