Package boofcv.alg.feature.orientation
Class OrientationImageAverage<T extends ImageGray<T>>
java.lang.Object
boofcv.alg.feature.orientation.OrientationImageAverage<T>
- All Implemented Interfaces:
OrientationImage<T>
,RegionOrientation
- Direct Known Subclasses:
ImplOrientationImageAverage_F32
,ImplOrientationImageAverage_U8
public abstract class OrientationImageAverage<T extends ImageGray<T>>
extends Object
implements OrientationImage<T>
Computes the orientation of a region by computing a weighted sum of each pixel's intensity
using their respective sine and cosine values.
-
Field Summary
Modifier and TypeFieldDescriptionprotected T
protected Kernel2D_F32
protected Kernel2D_F32
protected double
protected double
protected ImageRectangle
protected int
-
Constructor Summary
ModifierConstructorDescriptionprotected
OrientationImageAverage
(double objectToSample, int defaultRadius) -
Method Summary
Modifier and TypeMethodDescriptiondouble
compute
(double X, double Y) Computes the orientation of a region about its center.protected abstract double
computeAngle
(int c_x, int c_y) void
Specifies input image data for estimating orientation.void
setObjectRadius
(double objectRadius) Specifies the circle's radius that the orientation should beMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface boofcv.abst.feature.orientation.OrientationImage
getImageType
Methods inherited from interface boofcv.abst.feature.orientation.RegionOrientation
copy
-
Field Details
-
image
-
rect
-
objectToSample
protected double objectToSample -
sampleRadius
protected int sampleRadius -
objectRadius
protected double objectRadius -
kerCosine
-
kerSine
-
-
Constructor Details
-
OrientationImageAverage
protected OrientationImageAverage(double objectToSample, int defaultRadius)
-
-
Method Details
-
setImage
Description copied from interface:OrientationImage
Specifies input image data for estimating orientation.- Specified by:
setImage
in interfaceOrientationImage<T extends ImageGray<T>>
- Parameters:
image
- Input image..
-
setObjectRadius
public void setObjectRadius(double objectRadius) Description copied from interface:RegionOrientation
Specifies the circle's radius that the orientation should be- Specified by:
setObjectRadius
in interfaceRegionOrientation
- Parameters:
objectRadius
- Object's radius.
-
compute
public double compute(double X, double Y) Description copied from interface:RegionOrientation
Computes the orientation of a region about its center.- Specified by:
compute
in interfaceRegionOrientation
- Parameters:
X
- Center of the region in image pixels.Y
- Center of the region in image pixels.- Returns:
- Orientation in radians. Angle zero points along x-axis and pi/2 along y-axis.
-
computeAngle
protected abstract double computeAngle(int c_x, int c_y)
-