Package boofcv.alg.filter.misc
Class AverageDownSampleOps
java.lang.Object
boofcv.alg.filter.misc.AverageDownSampleOps
Operations 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
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Down samples the image.static void
Down samples the image.static void
Down samples the image.static void
Down samples the image.static void
Down samples the image.static void
Down samples the image.static void
Down samples the image.static void
static void
Down samples image.static <T extends ImageGray<T>>
voidDown samples a planar image.static <T extends ImageGray<T>>
voidDown samples a planar image.static <T extends ImageBase<T>>
voiddown
(T input, T output) Down samples image.static <T extends ImageGray<T>>
TdownMaxPixels
(T full, T small, int maxPixels) If the full resolution image is too large it's down sampled to match the maximum allowed pixels.static int
downSampleSize
(int length, int squareWidth) Computes the length of a down sampled image based on the original length and the square widthstatic 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
-
Constructor Details
-
AverageDownSampleOps
public AverageDownSampleOps()
-
-
Method Details
-
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
Reshapes an image so that it is the correct size to store the down sampled image -
downMaxPixels
If the full resolution image is too large it's down sampled to match the maximum allowed pixels.- Parameters:
full
- Full resolution imagesmall
- Small image to store down sampled, if applicablemaxPixels
- Maximum number of pixels in the image- Returns:
- Either full resolution image or the small image
-
down
-
down
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
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<T>> 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
Down samples a planar image. Type checking is done at runtime.- Parameters:
input
- Input image. Not modified.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-
down
Down samples the image.- Parameters:
input
- Input image. Not modified.sampleWidth
- Width of square region.output
- Output image. Modified.
-