Closed moratom closed 3 months ago
Neat! Does getFrame
remain zerocopy?
Neat! Does
getFrame
remain zerocopy? I don't think so, we can revisit though, the conversions seems of "manageable complexity" - 350 LOC.
Existing zero-copy is unsafe, so it would be nice if we somehow managed to tie the lifetimes now. Right now this crashes:
imgFrame = queue.get()
myNpFrame = imgFrame.getFrame()
imgFrame = None
myPixel = myNpFrame[3][5] # A likely crash as memory was already released :(
Added bindings instead of custom python implementations for the
getCvFrame
andgetFrame
functions.Should be easier to maintain with a single source of truth.
Another thing we get for free is
setCvFrame
from python - that one is quite neat :)TODO before merge: