I'm working with the DepthAI experiment called gen2-calc-spatials-on-host, which provides code to extract the relative spatial position in meters of certain pixeles using the camera as reference (X, Y and Z).
I need to save the depth matrix to use it later off-streaming. How can I save the array contained in the 'depthai.ImgFrame' object and simulate the camera parameters without connecting to it?? I will pass the "x" and "y" on the newer script to this code line (59 in main.py ):
spatials, centroid = hostSpatials.calc_spatials(depthai.ImgFrame, (x,y))
I other words, I want to be able to get the "z" (depth) value for any image region off-stream.
Thanks for your help!!