Package boofcv.alg.feature.orientation
Class OrientationAverage<D extends ImageGray<D>>
java.lang.Object
boofcv.alg.feature.orientation.OrientationAverage<D>
- All Implemented Interfaces:
OrientationGradient<D>
,RegionOrientation
- Direct Known Subclasses:
ImplOrientationAverage_F32
,ImplOrientationAverage_S16
,ImplOrientationAverage_S32
public abstract class OrientationAverage<D extends ImageGray<D>>
extends Object
implements OrientationGradient<D>
Computes the orientation of a region by summing up the derivative along each axis independently then computing the direction fom the sum. If weighted a Gaussian kernel centered around the targeted pixel is used.
-
Field Summary
Modifier and TypeFieldDescriptionprotected D
protected D
protected boolean
protected double
protected int
protected ImageRectangle
protected int
protected Kernel2D_F32
-
Constructor Summary
ModifierConstructorDescriptionprotected
OrientationAverage
(double objectRadiusToScale, boolean weighted) -
Method Summary
Modifier and TypeMethodDescriptiondouble
compute
(double X, double Y) Computes the orientation of a region about its center.protected abstract double
Compute the score without using the optional weightsprotected abstract double
computeWeightedScore
(int c_x, int c_y) Compute the score using the weighting kernel.int
void
Specifies input image data for estimating orientation.void
setObjectRadius
(double radius) Specifies the circle's radius that the orientation should bevoid
setSampleRadius
(int sampleRadius) Methods 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.OrientationGradient
getImageType
Methods inherited from interface boofcv.abst.feature.orientation.RegionOrientation
copy
-
Field Details
-
derivX
-
derivY
-
rect
-
objectToSample
protected double objectToSample -
sampleRadius
protected int sampleRadius -
radiusScale
protected int radiusScale -
isWeighted
protected boolean isWeighted -
weights
-
-
Constructor Details
-
OrientationAverage
protected OrientationAverage(double objectRadiusToScale, boolean weighted)
-
-
Method Details
-
getSampleRadius
public int getSampleRadius() -
setSampleRadius
public void setSampleRadius(int sampleRadius) -
getWeights
-
setObjectRadius
public void setObjectRadius(double radius) Description copied from interface:RegionOrientation
Specifies the circle's radius that the orientation should be- Specified by:
setObjectRadius
in interfaceRegionOrientation
- Parameters:
radius
- Object's radius.
-
setImage
Description copied from interface:OrientationGradient
Specifies input image data for estimating orientation.- Specified by:
setImage
in interfaceOrientationGradient<D extends ImageGray<D>>
- Parameters:
derivX
- Image derivative along x-axis.derivY
- Image derivative along y-axis.
-
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.
-
computeUnweightedScore
protected abstract double computeUnweightedScore()Compute the score without using the optional weights -
computeWeightedScore
protected abstract double computeWeightedScore(int c_x, int c_y) Compute the score using the weighting kernel.
-