depthai-python icon indicating copy to clipboard operation
depthai-python copied to clipboard

[enhancement] get previous frame or X previous frames from python API with "getCvFrame"

Open stephansturges opened this issue 2 years ago • 2 comments

In order to build super-simple functions to enable temporal smoothing it would be fantastic to have an API to directly store the X previous frames and a an extension of the "getCvFrame" function that would allow to specify the Nth previous frame to retrieve. getCvFrame(n=-1) --> returns the last frame -1

stephansturges avatar Mar 16 '22 13:03 stephansturges

Hi @stephansturges With ImgFrame currently carrying only 1 frame per Message, this approach wouldn't be feasible. Another option would be some other mechanism to store older frames.

I think best case would be a host side pipeline with capability to queue up frames for such filter to be able to be applied.

themarpe avatar Mar 16 '22 17:03 themarpe

Hi @themarpe Thanks, that's what I'm doing right now so no problem then :)

stephansturges avatar Mar 20 '22 20:03 stephansturges