TImageBuilder::FastDownsample

Very basic downsampling technqiue that just averages NxN pixel blocks. Multi-threaded.

Choose your operating system:

Windows

macOS

Linux

References

Module

GeometryCore

Header

/Engine/Source/Runtime/GeometryCore/Public/Image/ImageBuilder.h

Include

#include "Image/ImageBuilder.h"

Syntax

TImageBuilder< PixelType > FastDownsample
(
    int32 SubSteps,
    const PixelType & ZeroValue,
    TFunctionRef< PixelType(PixelType, int)> AverageFunc
) const

Remarks

Very basic downsampling technqiue that just averages NxN pixel blocks. Multi-threaded.

Parameters

Parameter

Description

SubSteps

each NxN pixel block of this size is averaged into 1 pixel in the output image

Zero

value to use with template PixelType must be provided, pixel values will be added to this value

AverageFunc

Called with Sum(Pixels) and PixelCount, return value is used as new pixel value (eg should be average)