[VPI] How can I do alpha blending of images in C++?

Please understand that my English is poor.


  • Create a single image by stitching multiple camera images.
  • At that time, I would like to weight the parts where the images overlap each other with a ratio of 0.0 to 1.0 and paste them together.


  1. Is alpha blending of images possible with VPI?

    • If VPI doesn’t have alpha blending function, does VPI have simple add and divide function between image objects (VPIImage)? Alpha blending is also possible by using them.
  2. If the above is difficult, is it possible to use VPI and CUDA together?

    • Implement only alpha blending with CUDA, and the rest with VPI.
    • In this case, what point should I pay attention to?
      • I need to be careful when using GPU (CUDA backend?) in VPI and CUDA at the same time, right?
  3. Or if there is a better way, please let me know.



• Hardware Platform (Jetson / GPU): Jetson Orin AGX 32GB Developer kit
• VPI Version: 2.1.6
• JetPack Version (valid for Jetson only): 5.02 (L4T: 35.1)
• TensorRT Version: 8.4.1
• NVIDIA GPU Driver Version (valid for GPU only) : N/A
• Issue Type( questions, new requirements, bugs) Questions


Your topic will be best served in the Jetson category.

I will move this post over for visibility.


Hello, Tom.
Thanks for moving the category !

Best regards,

1 Like


Unfortunately, VPI doesn’t have the add or divide function.

Yes, you can implement a custom CUDA to do so.
Please wrap buffer and stream from CUDA to ensure consistency.

OpenCV has CUDA-based blending function that you can give it a check.


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