public abstract class OrientationAverage<D extends boofcv.struct.image.ImageSingleBand> 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 int |
radius |
protected int |
radiusScale |
protected boofcv.struct.ImageRectangle |
rect |
protected boofcv.struct.convolve.Kernel2D_F32 |
weights |
| Modifier | Constructor and Description |
|---|---|
protected |
OrientationAverage(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 |
getRadius() |
boofcv.struct.convolve.Kernel2D_F32 |
getWeights() |
void |
setImage(D derivX,
D derivY)
Specifies input image data for estimating orientation.
|
void |
setRadius(int radius) |
void |
setScale(double scale)
Specifies scale at which the orientation is estimated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetImageTypeprotected D extends boofcv.struct.image.ImageSingleBand derivX
protected D extends boofcv.struct.image.ImageSingleBand derivY
protected boofcv.struct.ImageRectangle rect
protected int radius
protected int radiusScale
protected boolean isWeighted
protected boofcv.struct.convolve.Kernel2D_F32 weights
public int getRadius()
public void setRadius(int radius)
public boofcv.struct.convolve.Kernel2D_F32 getWeights()
public void setScale(double scale)
RegionOrientationsetScale in interface RegionOrientationscale - Scale of the orientation region.public void setImage(D derivX, D derivY)
OrientationGradientsetImage in interface OrientationGradient<D extends boofcv.struct.image.ImageSingleBand>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)