Hi,
The function NvBufSurfTransformCompositeBlend() does not support applying different alpha value to each pixel. You would need to implement CUDA code for this step. A possible solution is:
- Call NvBufSurfTransformCompositeBlend() to stitch A and B NvBufsurface into C NvBufsurface
- Call NvBufsurface and CUDA APIs to get CUDA pointer of C NvBufsurface
- Implement CUDA code to apply alpha value to R, B, B channels of C NvBufsurface
Here is a patch for using NvBuffer APIs:
Resources for custom nvivafilter for Jetpack 5.1.1 Jetson NX - #11 by DaneLLL
NvBuffer APIs are replaced with NvBufsurface APIs on Jetpack 5. Although the patch is based on NvBuffer, you can find similar APIs in NvBufsurface.
NvBufSurfTransformCompositeBlend() is demonstrated in 13_argus_multi_camera sample.