public class SurfDescribeOps
extends java.lang.Object
| Constructor and Description |
|---|
SurfDescribeOps() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends boofcv.struct.image.ImageGray> |
createGradient(boolean useHaar,
java.lang.Class<T> imageType)
Creates a class for computing the image gradient from an integral image in a sparse fashion.
|
static void |
gradient_noborder(boofcv.struct.image.GrayF32 ii,
double tl_x,
double tl_y,
double samplePeriod,
int regionSize,
double kernelWidth,
float[] derivX,
float[] derivY)
Faster version of
gradient(T, double, double, double, int, double, boolean, double[], double[]) which assumes the region is entirely contained inside the
of the image. |
static void |
gradient_noborder(boofcv.struct.image.GrayS32 ii,
double tl_x,
double tl_y,
double samplePeriod,
int regionSize,
double kernelWidth,
int[] derivX,
int[] derivY)
Faster version of
gradient(T, double, double, double, int, double, boolean, double[], double[]) which assumes the region is entirely contained inside the
of the image. |
static <T extends boofcv.struct.image.ImageGray> |
gradient(T ii,
double tl_x,
double tl_y,
double samplePeriod,
int regionSize,
double kernelWidth,
boolean useHaar,
double[] derivX,
double[] derivY)
Computes the of a square region.
|
static boolean |
isInside(int width,
int height,
double tl_x,
double tl_y,
double regionSize,
double sampleSize)
Tests to see if the rectangular region being sampled is contained inside the image.
|
static <T extends boofcv.struct.image.ImageGray> |
isInside(T ii,
double X,
double Y,
int radiusRegions,
int kernelSize,
double scale,
double c,
double s)
Checks to see if the region is contained inside the image.
|
static double |
rotatedWidth(double width,
double c,
double s)
Computes the width of a square containment region that contains a rotated rectangle.
|
public static <T extends boofcv.struct.image.ImageGray> void gradient(T ii,
double tl_x,
double tl_y,
double samplePeriod,
int regionSize,
double kernelWidth,
boolean useHaar,
double[] derivX,
double[] derivY)
Computes the of a square region. The region considered has a radius of ceil(radius*s) pixels. The derivative is computed every 's' pixels.
Deviation from paper:
tl_x - Top left corner.tl_y - Top left corner.samplePeriod - Distance between sample points (in pixels)regionSize - Width of region being considered in samples points (not pixels).kernelWidth - Size of the kernel's width (in pixels) .useHaar - derivX - Derivative x wavelet output. length = radiusRegions*radiusRegionsderivY - Derivative y wavelet output. length = radiusRegions*radiusRegionspublic static void gradient_noborder(boofcv.struct.image.GrayF32 ii,
double tl_x,
double tl_y,
double samplePeriod,
int regionSize,
double kernelWidth,
float[] derivX,
float[] derivY)
gradient(T, double, double, double, int, double, boolean, double[], double[]) which assumes the region is entirely contained inside the
of the image. This includes the convolution kernel's radius.public static void gradient_noborder(boofcv.struct.image.GrayS32 ii,
double tl_x,
double tl_y,
double samplePeriod,
int regionSize,
double kernelWidth,
int[] derivX,
int[] derivY)
gradient(T, double, double, double, int, double, boolean, double[], double[]) which assumes the region is entirely contained inside the
of the image. This includes the convolution kernel's radius.public static <T extends boofcv.struct.image.ImageGray> boofcv.struct.sparse.SparseScaleGradient<T,?> createGradient(boolean useHaar,
java.lang.Class<T> imageType)
useHaar - Should it use a haar wavelet or an derivative kernel.imageType - Type of image being processed.public static <T extends boofcv.struct.image.ImageGray> boolean isInside(T ii,
double X,
double Y,
int radiusRegions,
int kernelSize,
double scale,
double c,
double s)
X - Center of the interest point.Y - Center of the interest point.radiusRegions - Radius in pixels of the whole region at a scale of 1kernelSize - Size of the kernel in pixels at a scale of 1scale - Scale factor for the region.c - Cosine of the orientations - Sine of the orientationpublic static boolean isInside(int width,
int height,
double tl_x,
double tl_y,
double regionSize,
double sampleSize)
Tests to see if the rectangular region being sampled is contained inside the image. Sampling is done using a square region with the specified size, where size corresponds to the length of each side. The sample region's size is discretized and rounded up, making this a conservative estimate for containment.
This takes in account how integral images are read. To read in a rectangular region the pixel below the lower left corner is read, which results in an extra minus along enough axis for the lower bound. It is also assumed that points are discretized by rounding.
width - Image's width.height - Image's height.tl_x - Top left corner of region being sampled.tl_y - Top left corner of region being sampled.regionSize - Size of the region being sampled.sampleSize - Length of each side in the sample region. See comment above.public static double rotatedWidth(double width,
double c,
double s)
width - Size of the original rectangle.c - Cosine(theta)s - Sine(theta)