Hi,
I'm trying to adapt an existing script to add in the capacity of matching the output coordinate of a NN for pose estimation, with the depth value of the stereo capture.
I've created my depth pipeline as :
stereo = pipeline.createStereoDepth()
stereo.setConfidenceThreshold(230)
stereo.setLeftRightCheck(True)
stereo.setDepthAlign(dai.CameraBoardSocket.RGB)
stereo.setSubpixel(False)
stereo.setMedianFilter(dai.StereoDepthProperties.MedianFilter.MEDIAN_OFF)
left.out.link(stereo.left)
right.out.link(stereo.right)
stereo.depth.link(spatial_location_calculator.inputDepth)
depth_out = pipeline.create(dai.node.XLinkOut)
depth_out.setStreamName("depth")
depth_out.input.setQueueSize(1)
depth_out.input.setBlocking(False)
stereo.depth.link(manager_script.inputs['depth_data'])
Then in the scipt load in the camera I've added
depth_link = node.io['depth_data'].get()
For getting the object ImgFrame, and when I try to check the type of the object it tells me that it is "lpb.ImgFrame". In this case the method as getFrame() does not exist for this object type.
What I'm trying to make is as this function show :
def get_depth(self, point):
depth_video = self.q_depth.get()
depth_frame = depth_video.getFrame()
depth = depth_frame[point[1]][point[0]]
Catching the depth value in millimeters of a specific coordinate.
I hope you would be able to help me
Thanks in advance