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 Details

    • image

      protected T extends ImageGray<T> image
    • rect

      protected ImageRectangle rect
    • objectToSample

      protected double objectToSample
    • sampleRadius

      protected int sampleRadius
    • objectRadius

      protected double objectRadius
    • kerCosine

      protected Kernel2D_F32 kerCosine
    • kerSine

      protected Kernel2D_F32 kerSine
  • Constructor Details

    • OrientationImageAverage

      protected OrientationImageAverage​(double objectToSample, int defaultRadius)
  • Method Details

    • setImage

      public void setImage​(T image)
      Description copied from interface: OrientationImage
      Specifies input image data for estimating orientation.
      Specified by:
      setImage in interface OrientationImage<T extends ImageGray<T>>
      Parameters:
      image - Input image..
    • setObjectRadius

      public void setObjectRadius​(double objectRadius)
      Description copied from interface: RegionOrientation
      Specifies the circle's radius that the orientation should be
      Specified by:
      setObjectRadius in interface RegionOrientation
      Parameters:
      objectRadius - Object's radius.
    • compute

      public double compute​(double X, double Y)
      Description copied from interface: RegionOrientation
      Computes the orientation of a region about its center.
      Specified by:
      compute in interface RegionOrientation
      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)