Is there any provision "cv2.INTER_AREA" in nvinfereserver methods?

• Hardware Platform (GPU)
• DeepStream Version: 6.1
• TensorRT Version : cuda11.3-trt8.0.1.6-ga
• NVIDIA GPU Driver Version: 515.65.01
• Issue Type: Question
Hello,

I want to replicate the same Opencv Python method in Nvinfereserver. But I couldn’t see such a process in the below URL.
https://docs.nvidia.com/metropolis/deepstream/5.0DP/dev-guide/DeepStream_Development_Guide/baggage/nvbufsurftransform_8h.html#a29da322f0c4f4ed65d19cc70471f54c0

I want to resize the frame with smooth and soft downsampling with this algorithm (cv2.INTER_AREA) and I have tried it in python using that algorithm with Opencv.

And, We have explored other methods of Nvinfereserver. But we could not get the accurate result as “cv2.INTER_AREA” does produce.

It would be great if that “cv2.INTER_AREA” provision is there in Nvinferesever.
Kindly help us to achieve smooth downsampling.

Thanks,
Dax Jain

as the opencv doc said " resampling using pixel area relation. It may be a preferred method for image decimation, as it gives moire’-free results. But when the image is zoomed, it is similar to the INTER_NEAREST method.",
why do you have to use this INTER_AREA? why not use nvidia NvBufSurfTransformInter_Nearest?

But we don’t want to zoom an image so we are not using NvBufSurfTransformInter_Nearest. We require to do downsampling with image smoothing like cv2.INTER_AREA does.

  • First image is the output of cv2.INTER_AREA with smooth edges.

  • Second image is the output of NvBufSurfTransformInter_Nearest with contrast edges.

combination

And we want the first result with Nvinfereserver.

  1. did you try other nvinferserver methods, you can modify frame_scaling_filter in nvinferserver configuration file, please find it in this doc: Gst-nvinferserver — DeepStream 6.2 Release documentation

  2. if still not meet demand, currently nvinferserver is opensource in DS6.2, you can implement as needed.

Yes, We have tried all those options from this URL: NVIDIA DeepStream SDK API Reference: nvbufsurftransform.h File Reference

And we found this method NvBufSurfTransformInter_Algo2 has produced satisfactory results.

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