boofcv.alg.filter.misc
Class AverageDownSampleOps
- java.lang.Object
-
- boofcv.alg.filter.misc.AverageDownSampleOps
-
public class AverageDownSampleOps extends java.lang.ObjectOperations related to down sampling image by computing the average within square regions. The first square region is from (0,0) to (w-1,w-1), inclusive. Each square region after that is found by skipping over 'w' pixels in x and y directions. partial regions along the right and bottom borders are handled by computing the average with the rectangle defined by the intersection of the image and the square region.
NOTE: Errors are reduced in integer images by rounding instead of standard integer division.
-
-
Constructor Summary
Constructors Constructor and Description AverageDownSampleOps()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voiddown(GrayF32 input, int sampleWidth, GrayF32 output)Down samples the image.static voiddown(GrayF64 input, int sampleWidth, GrayF64 output)Down samples the image.static voiddown(GrayS16 input, int sampleWidth, GrayI16 output)Down samples the image.static voiddown(GrayS32 input, int sampleWidth, GrayS32 output)Down samples the image.static voiddown(GrayS8 input, int sampleWidth, GrayI8 output)Down samples the image.static voiddown(GrayU16 input, int sampleWidth, GrayI16 output)Down samples the image.static voiddown(GrayU8 input, int sampleWidth, GrayI8 output)Down samples the image.static voiddown(ImageGray input, int sampleWidth, ImageGray output)Down samples image.static <T extends ImageGray>
voiddown(Planar<T> input, int sampleWidth, Planar<T> output)Down samples a planar image.static <T extends ImageGray>
voiddown(Planar<T> input, Planar<T> output)Down samples a planar image.static <T extends ImageBase>
voiddown(T input, T output)Down samples image.static intdownSampleSize(int length, int squareWidth)Computes the length of a down sampled image based on the original length and the square widthstatic voidreshapeDown(ImageBase image, int inputWidth, int inputHeight, int squareWidth)Reshapes an image so that it is the correct size to store the down sampled image
-
-
-
Method Detail
-
downSampleSize
public static int downSampleSize(int length, int squareWidth)Computes the length of a down sampled image based on the original length and the square width- Parameters:
length- Length of side in input imagesquareWidth- Width of region used to down sample images- Returns:
- Length of side in down sampled image
-
reshapeDown
public static void reshapeDown(ImageBase image, int inputWidth, int inputHeight, int squareWidth)
Reshapes an image so that it is the correct size to store the down sampled image
-
down
public static void down(ImageGray input, int sampleWidth, ImageGray output)
Down samples image. Type checking is done at runtime.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static <T extends ImageBase> void down(T input, T output)
Down samples image. Type checking is done at runtime.- Parameters:
input- Input image. Not modified.output- Output image. Modified.
-
down
public static <T extends ImageGray> void down(Planar<T> input, int sampleWidth, Planar<T> output)
Down samples a planar image. Type checking is done at runtime.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static <T extends ImageGray> void down(Planar<T> input, Planar<T> output)
Down samples a planar image. Type checking is done at runtime.- Parameters:
input- Input image. Not modified.output- Output image. Modified.
-
down
public static void down(GrayU8 input, int sampleWidth, GrayI8 output)
Down samples the image.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static void down(GrayS8 input, int sampleWidth, GrayI8 output)
Down samples the image.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static void down(GrayU16 input, int sampleWidth, GrayI16 output)
Down samples the image.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static void down(GrayS16 input, int sampleWidth, GrayI16 output)
Down samples the image.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static void down(GrayS32 input, int sampleWidth, GrayS32 output)
Down samples the image.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
down
public static void down(GrayF32 input, int sampleWidth, GrayF32 output)
Down samples the image.- Parameters:
input- Input image. Not modified.sampleWidth- Width of square region.output- Output image. Modified.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG