Radeon ProRender

Posterization Filter




Posterization of an image entails conversion of a continuous gradation of tone to several regions of fewer tones, with abrupt changes from one tone to another. This was originally done with photographic processes to create posters.


Parameter Type Input/Output Description
levels int input The number of color value levels which will remain in the output image. The values between the levels are given to the nearest level. Note that the number of levels is correct for the color range [0;1].
Value range is [1, 65536], default value is 1.

Usage Example

rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_POSTERIZE, &filter);
rifImageFilterSetParameter1u(filter, "levels", 2);
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);


Input image

Output image (levels = 3)