FPP
, array size limitation for large byte buffer (pixel buffer)
#1647
-
Hello, I would like to specify in my topology that two components must exchange an image (pixel buffer) containing a large number of pixels (let's take for example 16 million U32).
I create a port to pass an image from an acquisition component to a processing component:
Unfortunately, I run into a limitation in FPP that does not allow arrays larger than 256: How to solve this problem? Define the type in C++ and reference it in FPP? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 9 replies
-
We typically pass around images using the |
Beta Was this translation helpful? Give feedback.
-
@timcanham What would be the key things to consider when making a trade-off between an |
Beta Was this translation helpful? Give feedback.
-
The key thing IMHO is the size. If it is a relatively small array and it makes sense to pass it by value through message queues, that gives you clear ownership of the data. If it is a larger data set like an image, it makes more sense to pass around |
Beta Was this translation helpful? Give feedback.
-
As a note, we followed @timcanham pattern of passing buffers for our imaging in the upcoming system reference. The library we use to capture and store images is OpenCV, so there is a little uncontrolled dynamic memory. We will fix that, but our images are passed between components using |
Beta Was this translation helpful? Give feedback.
-
@pelmini @LeStarch Why did you reuse the @timcanham As I understand it, there are two types of buffer management, one dynamic with With As for This component would simply be a global pool of static memory of a size configurable by global deployment-specific parameters ( In my application case, I would have 3 cameras with different image sizes (512x512, 1024x1024, 2048x2048) and I want to statically allocate memory areas to store and process the images. The memory areas for these images are not coalescing because I need to map them to different memory addresses. Using the
Did I correctly understand the implications of these components? |
Beta Was this translation helpful? Give feedback.
We typically pass around images using the
Fw::Buffer
pattern. You create a pool of image buffers inSvc/BufferManager
, and then use theFw/Buffer
port to send them around and return them toSvc/BufferManager
when you are done.