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
FieldsModifier and TypeFieldDescriptionprotected Tprotected Kernel2D_F32protected Kernel2D_F32protected doubleprotected doubleprotected ImageRectangleprotected int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOrientationImageAverage(double objectToSample, int defaultRadius) -
Method Summary
Modifier and TypeMethodDescriptiondoublecompute(double X, double Y) Computes the orientation of a region about its center.protected abstract doublecomputeAngle(int c_x, int c_y) voidSpecifies input image data for estimating orientation.voidsetObjectRadius(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, waitMethods inherited from interface boofcv.abst.feature.orientation.OrientationImage
getImageTypeMethods 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:OrientationImageSpecifies input image data for estimating orientation.- Specified by:
setImagein interfaceOrientationImage<T extends ImageGray<T>>- Parameters:
image- Input image..
-
setObjectRadius
public void setObjectRadius(double objectRadius) Description copied from interface:RegionOrientationSpecifies the circle's radius that the orientation should be- Specified by:
setObjectRadiusin interfaceRegionOrientation- Parameters:
objectRadius- Object's radius.
-
compute
public double compute(double X, double Y) Description copied from interface:RegionOrientationComputes the orientation of a region about its center.- Specified by:
computein 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)
-