AI Upscale Filter

Filter

RIF_IMAGE_FILTER_AI_UPSCALE

Description

Upscales an input image based on the selected AI mode.

Parameters

Parameter

Type

Input/Output

Description

mode

uint

input

Machine learning mode to use.
Can be one of the following:

  • RIF_AI_UPSCALE_MODE_GOOD_2X
    (default, fast mode with good enough upscaling results)

  • RIF_AI_UPSCALE_MODE_BEST_2X
    (slow mode with best upscaling results)

  • RIF_AI_UPSCALE_MODE_FAST_2X
    (fastest mode with good upscaling results)

modelPath

string

input

Path to machine learning model files (default is ./models).

Usage Example

rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_AI_UPSCALE, &filter);
rifImageFilterSetParameter1u(filter, "mode", RIF_AI_UPSCALE_MODE_GOOD_2X);
rifImageFilterSetParameterString(filter, "modelPath", "./models");
rifCommandQueueAttachImageFilter(queue, filter, inputImage, outputImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);

Results

Input image

Output image (mode = good)

Output image (mode = best)