Making a depth and RGB capture on demand with C#
Hi all,
I have a project where only 2 FPS could be sufficient, is it possible to request RGB and depth frames on demand without passing through a pipeline with C#, eventually with EmguCV ? I want to avoid to pass through a pipeline because I work with several cameras and it takes few seconds to start all pipelines.
Best Regards. Hugo
-
Hi Hcharrier Can you confirm please whether your project using multicam code to automatically build a list of attached cameras with ctx.QueryDevices and creating a pipeline for each, like the example C# code for doing so in the link below?
https://github.com/IntelRealSense/librealsense/issues/3432#issuecomment-472570380
If you only require a very low FPS, using multicam code in combination with the lowest supported FPS mode available (6 FPS on D415 / D435 / D435i or 5 FPS on D455) may be the easiest approach.
Alternatively, there is also the ability to create your own custom frameset by defining a custom processing block. C# scripting for doing so using callbacks is in the link below.
https://github.com/IntelRealSense/librealsense/issues/2185#issuecomment-411685634
-
Hi MartyX Grover, thanks for the quck reply.
Can you confirm please whether your project using multicam code to automatically build a list of attached cameras with ctx.QueryDevices and creating a pipeline for each.
Indeed I am working with 8+ camera (8 to 16 cameras) for my application. Currently, I am using ctx.QueryDevices() to find all cameras. However, it is the call of pipeline.Start(ctx) that takes few seconds at initialisation.
Alternatively, there is also the ability to create your own custom frameset by defining a custom processing block. C# scripting for doing so using callbacks is in the link below.
I am currently not using frameCallbacks for processing, but instead there is a task always running for the acquisition using PollForFrame() (each new frame is added to a Queue) and a task that always running for processing checking if there is an image inside the Queue. But I am experiencing some issues with stream loss during the application running that is why I want to try another way.
-
The link below has a C# case where there was a start delay when using 16 cameras.
If you are using PollForFrames() then there is an important difference to WaitForFrames(). With PollForFrames() you need to manually control when the CPU is put to sleep and for how long, otherwise you can end up maxing out the CPU's usage percentage at 100% of a single core and negatively affecting performance.
Please sign in to leave a comment.
Comments
3 comments