I would like to modify the frame image by transforming the image with some padding and crop to the main buffer gstreamer. This will be like implementing a custom nvvideoconvert.
Below are steps how I plan to do and I need help from Nvidia-er to correctly or guide.
get origin NvBufSurface from GstBuffer input data
allocate a new NvBufSurface with custom NvBufSurfaceCreateParams by NvBufSurfaceCreate and then do our transform convert data from input to output
release input data NvBufSurface by NvBufSurfaceDestroy and assign new NvBufSurface
Hi,
The input/output resolution is not changed in dsexample plugin. For changing resolution, you would need to use nvvideoconvert to run like:
... ! nvvideoconvert ! nvdsexample ! ...
or
... ! nvdsexample ! nvvideoconver ! ...
You can configure the properties to cop the images:
src-crop : Pixel location left:top:width:height
Use string with values of crop location to set the prope
rty.
e.g. 20:20:40:50
flags: readable, writable, changeable only in NULL or RE
ADY state
String. Default: "0:0:0:0"
dest-crop : Pixel location left:top:width:height
Use string with values of crop location to set the prope
rty.
e.g. 20:20:40:50
flags: readable, writable, changeable only in NULL or RE
ADY state
String. Default: "0:0:0:0"
Hi,
You may downscale/upscale to the resolution with identical aspect ratio. For example, if the source is in 1920x1080,you can downscale to 1280x720 or 630x360 to keep the resolution.
Hi,
We don’t have sample code for setting NvBufSurfTransformCompositeBlendParams and call NvBufSurfTransformCompositeBlend(). We will evaluate to add this in future release.
We have checked and discussed with our teams and confirms there is no existing code to change padding color to grey. One possible solution is to access the buffer and overwrite the region directly. You can call NvBufSurfaceMap() to get pointer to the buffer and overwrite the region.
There is sample of using NvBuffer APIs. Please refer to nvbuff_do_clearchroma() in