Object Pool Size
Hey,
I have a system that contains 6 cameras that capture simultaneously, and I am using the c# wrapper for this project.
I am having trouble with the object pool because of the massive amount of data the program uses when capturing with all 6 cameras (and applying filters to the frames when needed).
I am doing my best managing the frames and filters, via the 'using' statement and calling 'Dispose' directly, but the object pool doesn't seem to be big enough for my needs and the only solution that works for me is to reduce the number of frames each camera captures.
I was wondering if there is a way to increase the size of the object pool, or at least if I can get more information about the object pool (like it's size), so I can adjust my program accordingly.
Thanks in advance.
-
Hi Amitelle1337 There is little information on this subject. My research indicates though that a librealsense C# wrapper file called RefCountedPooledObject.cs is involved in the pool object counting.
-
If you have 6 cameras attached to the same computer and streaming simultaneously, it is always going to be demanding to process. Even for a four-camera multicam setup on the same machine, a powerful i7 processor is recommended.
An alternative would be to divide the cameras between multiple small and affordable computing devices such as Raspberry Pis and then combine the data at a more powerful central computer. Intel has an open source networking project to demonstrate this. The guide uses Raspberry Pi by default but different computing devices can be substituted into it relatively easily.
-
I mean, I don't really care for the processing time, I just want the capturing time to be as fast as possible with ~30 frames from each camera (15 frames work fine right now, but I would like the bump up that frame number).
The Raspberry Pi solution sounds good, but I am not sure this is in the scope I am looking for in this project.
Another solution that came to my mind is to allocate new processes to capturing and a little bit of processing (Basically the same work the Raspberry Pis in your solution would do), thus each process will have its own object pool (That's assuming, of course, that the object pool is not global).
Edit: Right now I am launching tasks for this purpose (To keep things as fast as possible) but, of course, the tasks are running in the same process, thus utilizing the same object pool.
What do you think about this solution? -
I am not a C# specialist and creating librealsense applications in that language can be more complex than developing in C++ or Python. If you post a question on the RealSense GitHub forum then there should be a developer on the RealSense team there who can provide expert advice about a C# solution. You can post a question there by visiting the link below and clicking on the New Issue button.
-
I'll try that, thank you.
Edit: After posting an issue on github, I've got my question answered.
If anyone interested in the response, here is the issue: https://github.com/IntelRealSense/librealsense/issues/7201
Please sign in to leave a comment.
Comments
6 comments