public abstract class OrientationAverage<D extends boofcv.struct.image.ImageGray> extends java.lang.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.
| Modifier and Type | Field and Description |
|---|---|
protected D |
derivX |
protected D |
derivY |
protected boolean |
isWeighted |
protected double |
objectToSample |
protected int |
radiusScale |
protected boofcv.struct.ImageRectangle |
rect |
protected int |
sampleRadius |
protected boofcv.struct.convolve.Kernel2D_F32 |
weights |
| Modifier | Constructor and Description |
|---|---|
protected |
OrientationAverage(double objectRadiusToScale,
boolean weighted) |
| Modifier and Type | Method and Description |
|---|---|
double |
compute(double X,
double Y)
Computes the orientation of a region about its center.
|
protected abstract double |
computeUnweightedScore()
Compute the score without using the optional weights
|
protected abstract double |
computeWeightedScore(int c_x,
int c_y)
Compute the score using the weighting kernel.
|
int |
getSampleRadius() |
boofcv.struct.convolve.Kernel2D_F32 |
getWeights() |
void |
setImage(D derivX,
D derivY)
Specifies input image data for estimating orientation.
|
void |
setObjectRadius(double radius)
Specifies the circle's radius that the orientation should be
|
void |
setSampleRadius(int sampleRadius) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetImageTypeprotected D extends boofcv.struct.image.ImageGray derivX
protected D extends boofcv.struct.image.ImageGray derivY
protected boofcv.struct.ImageRectangle rect
protected double objectToSample
protected int sampleRadius
protected int radiusScale
protected boolean isWeighted
protected boofcv.struct.convolve.Kernel2D_F32 weights
protected OrientationAverage(double objectRadiusToScale,
boolean weighted)
public int getSampleRadius()
public void setSampleRadius(int sampleRadius)
public boofcv.struct.convolve.Kernel2D_F32 getWeights()
public void setObjectRadius(double radius)
RegionOrientationsetObjectRadius in interface RegionOrientationradius - Object's radius.public void setImage(D derivX, D derivY)
OrientationGradientsetImage in interface OrientationGradient<D extends boofcv.struct.image.ImageGray>derivX - Image derivative along x-axis.derivY - Image derivative along y-axis.public double compute(double X,
double Y)
RegionOrientationcompute in interface RegionOrientationX - Center of the region in image pixels.Y - Center of the region in image pixels.protected abstract double computeUnweightedScore()
protected abstract double computeWeightedScore(int c_x,
int c_y)