Hi @erik
Thank you for the information.
The following is the code I plan to test, please take a look if there is an obvious blunder.
script = pipeline.create(dai.node.Script)
script.setScript("""
imgs = [ImgFrame(400*640),ImgFrame(400*640)]
i=0
while True:
imgs[i]=node.io['in'].get()
o = (i+1)%2
node.io['out'].send(imgs[o])
i = o
""")
As you can see, I tried to create 2 img buffers (imgs) as a cyclic buffer. So the while loop just to get the current img and send the previous img.
The input of this script node may be from, says, a monoRight node as below:
`monoRight = pipeline.create(dai.node.MonoCamera)`
Do I need any clocking information to sync up the frame? or the node.io[].get() will automatically sync up the frame from the source?
In another words, would the following connection give me frame(n) and frame(n-1) to the sink node at the time n?
monoRight.out.link(sink.input1)
script.outputs['out'].link(sink.input2)
Please advise. Thanks.