public abstract class OrientationHistogram<D extends boofcv.struct.image.ImageGray> extends java.lang.Object implements OrientationGradient<D>
Estimates the orientation by creating a histogram of discrete angles around the entire circle. The angle with the largest sum of edge intensities is considered to be the direction of the region. If weighted a Gaussian kernel centered around the targeted pixel is used.
| Modifier and Type | Field and Description |
|---|---|
protected double |
angleDiv |
protected double |
angleRound |
protected D |
derivX |
protected D |
derivY |
protected boolean |
isWeighted |
protected int |
numAngles |
protected double |
objectToSample |
protected int |
radiusScale |
protected boofcv.struct.ImageRectangle |
rect |
protected double[] |
sumDerivX |
protected double[] |
sumDerivY |
protected boofcv.struct.convolve.Kernel2D_F32 |
weights |
| Constructor and Description |
|---|
OrientationHistogram(double objectToSample,
int numAngles,
boolean isWeighted)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
double |
compute(double X,
double Y)
Computes the orientation of a region about its center.
|
protected abstract void |
computeUnweightedScore()
Compute the score without using the optional weights
|
protected abstract void |
computeWeightedScore(int c_x,
int c_y)
Compute the score using the weighting kernel.
|
double |
getObjectToSample() |
boofcv.struct.convolve.Kernel2D_F32 |
getWeights() |
void |
setImage(D derivX,
D derivY)
Specifies input image data for estimating orientation.
|
void |
setObjectRadius(double objectRadius)
Specifies the circle's radius that the orientation should be
|
void |
setObjectToSample(int objectToSample)
Specify the size of the region that is considered.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetImageTypeprotected double objectToSample
protected int radiusScale
protected D extends boofcv.struct.image.ImageGray derivX
protected D extends boofcv.struct.image.ImageGray derivY
protected boofcv.struct.ImageRectangle rect
protected int numAngles
protected double[] sumDerivX
protected double[] sumDerivY
protected double angleDiv
protected double angleRound
protected boolean isWeighted
protected boofcv.struct.convolve.Kernel2D_F32 weights
public OrientationHistogram(double objectToSample,
int numAngles,
boolean isWeighted)
objectToSample - Converts the size of the object to the sample region sizenumAngles - Number of discrete angles that the orientation is estimated inside ofpublic double getObjectToSample()
public void setObjectToSample(int objectToSample)
objectToSample - public boofcv.struct.convolve.Kernel2D_F32 getWeights()
public void setObjectRadius(double objectRadius)
RegionOrientationsetObjectRadius in interface RegionOrientationobjectRadius - 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 void computeUnweightedScore()
protected abstract void computeWeightedScore(int c_x,
int c_y)