TMarchingPixelInfill

[TMarchingPixelInfill](API\Runtime\GeometryCore\Image\TMarchingPixelInfill) implements a very basic infilling strategy where the missing pixel with the most "known" neighbours is set to the average value of those neighbours, and this is iterated until all missing pixels are known.

Choose your operating system:

Windows

macOS

Linux

References

Module

GeometryCore

Header

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

Include

#include "Image/ImageInfilling.h"

Syntax

template<typename PixelType>
class TMarchingPixelInfill

Remarks

TMarchingPixelInfill implements a very basic infilling strategy where the missing pixel with the most "known" neighbours is set to the average value of those neighbours, and this is iterated until all missing pixels are known. A Priority Queue is used to track the active front.

The infill sequence is tracked, which allows it to be "replayed" on multiple images. This is useful in cases where we have separate images with the same holes, which arises when baking textures from world sampling.

Variables

Name Description

Public variable

TArray< int32 >

 

InfillSequence

Encoding of infill operations, so that they can be applied to multiple images Values are [ NumPixels, Pixel1Count, Pixel1X, Pixel1Y, Pixel1Nbr1X, Pixel1Nbr1Y, ...

Functions

Name Description

Public function Const

void

 

ApplyInfill

(
    TImageBuilder< OtherPixelType >& I...,
    TFunctionRef< OtherPixelType(OtherP...
)

Fill the missing values in Image by replaying the infill sequence computed by ComputeInfill()

Public function Const

void

 

ApplyInfill

(
    TImageBuilder< PixelType >& Image,
    TFunctionRef< PixelType(PixelType S...
)

Fill the missing values in Image by replaying the infill sequence computed by ComputeInfill()

Public function

void

 

ComputeInfill

(
    TImageBuilder< PixelType >& Image,
    const TArray< FVector2i >& Missing...,
    PixelType MissingValue,
    TFunctionRef< PixelType(PixelType S...
)

Fill the values of MissingPixels in Image by propagating from known values.