GRIP
GRIP copied to clipboard
Add n-frame delay step
The general idea is to provide a step that provides a stream of frames delayed by n frames. Currently, one of the projects we're working on would benefit from seeing the difference between frames in a stream (i.e. what changes in the picture instead of what's actually in the picture).
I would propose that the inputs to the step be an image input stream and a scalar value for the delay that can either be a constant value specified by the user or be derived from some other value (delay value possibly dependent on frame rate, etc.). It would be great if you could have two output ports: 1 for the delayed frame and 1 for the un-delayed frame.
Preliminary thoughts on this. This operation could end up being pretty memory intensive as you would have to store a queue of images to send out the other end of the operation. Imagine you set your delay to something like 500. That means you'd have openCV hold the past 500 images in it's memory. Not sure where the line is but at some point that's going to become memory intensive.
Also, you'd need to figure out how you are going to store this queue of images. Maybe the best way of doing this would be some sort of variable size ring buffer? @SamCarlberg Thoughts? How would you implement something like this?
Sounds a bit like an XY problem. The ThresholdMoving operation already does this in the n=1 case
What problem are you trying to solve that needs knowledge of an arbitrary amount of previous frames?