FX on multiple input / output images
Posted: 2018-04-20T07:30:04-07:00
I have a ugly MSVC++ thing I wrote which uses Magick++ to manipulate a series of images ( think a filter for processing video frames ) so you have a series of images a[0...N] and you take a range of them, do some compute task, and output an image in a new series.
From one output image to the next, there will be significant overlap in terms of the input images used. So one image might be derived from input images a[23, 24, ... 35] the next from a[25,26,...37]
So significant time is saved, even on top of disk caching in the OS, if you create an in memory cache of image objects and recycle them. But this is about the only thing I need to write code for otherwise the operations could be reduced to convert operations scripted from the command line.
Basically what is being saved is the overhead of creating the image objects and then destroying them only to need many of them again for the next output frame.
Is there some means to get the existing CLI tools to do this? E.g. cache and recycle rather than reread and recreate frequently accessed images at rest? Or am I still needing to create an application rather than a script?
Or is there some pipeline framework that is better suited to these sliding window sort of repetetetive functions?
-- Bob
From one output image to the next, there will be significant overlap in terms of the input images used. So one image might be derived from input images a[23, 24, ... 35] the next from a[25,26,...37]
So significant time is saved, even on top of disk caching in the OS, if you create an in memory cache of image objects and recycle them. But this is about the only thing I need to write code for otherwise the operations could be reduced to convert operations scripted from the command line.
Basically what is being saved is the overhead of creating the image objects and then destroying them only to need many of them again for the next output frame.
Is there some means to get the existing CLI tools to do this? E.g. cache and recycle rather than reread and recreate frequently accessed images at rest? Or am I still needing to create an application rather than a script?
Or is there some pipeline framework that is better suited to these sliding window sort of repetetetive functions?
-- Bob