Nvidia vpi image format conversion

The vpiSubmitBoxFilter encountered an error while processing the image:
terminate called after throwing an instance of ‘std::runtime_error’
what(): VPI_ERROR_INVALID_IMAGE_FORMAT: Source image format not supported

I get the VPIImageFormat of the image, how should I convert the unsupported Format to the Format I want

VPIImageFormat type;
CHECK_STATUS(vpiImageGetFormat(input, &type));

VPIImage output;
CHECK_STATUS(vpiImageCreate(w, h, type, 0, &output));

CHECK_STATUS(vpiSubmitBoxFilter(stream, VPI_BACKEND_CUDA, input, output, 5, 5, VPI_BORDER_ZERO));

I used the following interface to output the Format of the current image, the Format of the image is: VPI_IMAGE_FORMAT_BGR8

std::cout << vpiImageFormatGetName(type) << std::endl;

Hi,

Based on the document below, only gray images are supported by the BoxFilter.
https://docs.nvidia.com/vpi/group__VPI__BoxFilter.html#ga6d75b4b9c56195d9b4032fe291626c47

Please check the below sample for the demonstration of the BoxFilter with ColorCoverter.

/opt/nvidia/vpi2/samples/tutorial_blur

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.