Jump to content

Best practices for Plugin with OpenCV point tracking?


photo

Recommended Posts

Posted

Hello,

For a current project, we would need to build a plugin to perform real-time point tracking using OpenCV. We are looking for architectural advice to ensure we maintain a processing rate well over 30 FPS. What is the most efficient pipeline to grab raw RGB frame data? Does anyone have a basic C++ skeleton or a Visual Studio template demonstrating how to capture and store the video buffer to feed the external library? Any API pointers, snippets, or general best practices would be hugely appreciated.

Thanks in advance!

Posted

Hi Marilou,

Could you please give us a bit more information about your use-case? Do you need to run OpenCV on the same PC, or you can run it on another one and just stream video from engine to it?

The most effective approach (considering all the new graphical APIs limitations) is to use CUDA to grab the final image from the engine. There are several samples available that shows how to access engine graphical resources, the most relevant probably is CUDATextureTransfer: https://developer.unigine.com/en/docs/2.21/sdk/api_samples/third_party/nvidia/#texture_transfer

You can either grab the textures and encode them to the video stream (for example, using the nVidia Codec SDK) or try to map the CUDA texture directly to the OpenCV (not 100% sure if that's possible out of the box, though).

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hello !

Thank you for your answer we will start to see what we can do with CUDA.

For now, since we are working offline, we are running OpenCV on a different workstation. However, for the actual use of the plugin, both the graphics generation and the OpenCV point tracker calculations will be running on the same machine.

Thanks!

×
×
  • Create New...