Hello,
I have some doubts about the node Spatial Calculator (both on device and on host, for the latter please consider the example provided in depthai-experiments).
As regards the node on the host, can you confirm that also in the latest depthai versions the y coordinate is still inverted?
As regards the provided host version: even here the y coordinate seems to be inverted, moreover there must be something wrong in the x and y measurements. In fact, in the function
def _calc_angle(self, frame, offset, HFOV):
return atan(tan(HFOV / 2.0) \* offset / (frame.shape[1] / 2.0))
tan(HFOV / 2.0) should be equal to (frame.shape[1] / 2.0) / focal_length_x, but, when I resolve for the focal length, I find a different value than the one stored in the camera intrinsics parameters (I'm working with OAK-D-PRO with the depth stream aligned on RGB).
Many thanks!
Best
Alessandro