public abstract class OrientationAverage<D extends 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 ImageRectangle |
rect |
protected 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() |
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, wait
getImageType
protected D extends ImageSingleBand derivX
protected D extends ImageSingleBand derivY
protected ImageRectangle rect
protected int radius
protected int radiusScale
protected boolean isWeighted
protected Kernel2D_F32 weights
public int getRadius()
public void setRadius(int radius)
public Kernel2D_F32 getWeights()
public void setScale(double scale)
RegionOrientation
setScale
in interface RegionOrientation
scale
- Scale of the orientation region.public void setImage(D derivX, D derivY)
OrientationGradient
setImage
in interface OrientationGradient<D extends ImageSingleBand>
derivX
- Image derivative along x-axis.derivY
- Image derivative along y-axis.public double compute(double X, double Y)
RegionOrientation
compute
in interface RegionOrientation
X
- 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)
Copyright © 2011-2012 Peter Abeles