Morphological Antialiasing Filter
Filter
RIF_IMAGE_FILTER_MLAA
Description
The filter performs Morphological Antialiasing (MLAA) for input image. MLAA is an image-based, post-process filtering technique which identifies discontinuity patterns and blends colors in the neighbourhood of these patterns to perform effective anti-aliasing.
Parameters
Parameter |
Type |
Input/Output |
Description |
---|---|---|---|
meshIDImg |
image |
input |
The image containing IDs of meshes. Used to find boundaries of objects. The parameter is optional. If used, can improve finding of boundaries. |
normalsImg |
image |
input |
The image containing normal vectors in the [-1, 1] range. Used to find boundaries of objects. The parameter is optional. If used, can improve finding of boundaries. Use the |
depthImg |
image |
input |
The image containing depth value. Used to find boundaries of objects. The parameter is optional. If used, can improve finding of boundaries. Use the |
colorTreshold |
float |
input |
The color threshold of the detector of boundaries. The colors differing more than the threshold will be recognized as the boundary and subjected to smoothing. A greater value corresponds to a large color difference needed to trigger. |
normalTreshold |
float |
input |
The normals threshold of the detector of boundaries. The scalar product of the normal vectors near the border is less than the threshold will be recognized as the boundary and subjected to smoothing. The smallest value corresponds to a large normal difference needed to trigger. |
depthTreshold |
float |
input |
The depth threshold of the detector of boundaries. The depths differing more than the threshold value will be recognized as the boundary and subjected to smoothing. A greater value corresponds to a large depth difference needed to trigger. |
Usage Example
rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_MLAA, &filter);
rifImageFilterSetParameterImage(filter, "meshIDImg", meshIDImage);
rifImageFilterSetParameterImage(filter, "normalsImg", normalsImage);
rifImageFilterSetParameterImage(filter, "depthImg", depthImage);
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);