You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a keypoint that has x and y and I want to convert this x and y into metric value as well as its z.
I want to know how I could exactly use the convert_depth_pixel_to_metric_coordinate method given these inputs:
keypoint_x # x value of a keypoint
keypoint_y # y value of a keypoint
and depth_frame where its type and shape are:
<class 'numpy.ndarray'>
(720, 1280)
My goal is to get as output the x, y, and z in metric coordinates.
Please note I only consider the keypoint_x and keypoint_y that are inside the image.
essentially I am not sure how to get x, y, z = convert_depth_pixel_to_metric_coordinate(depth_frame[i][j], keypoint_x, keypoint_y, intrinsic)
I want to know how I find the pixel i and j that refers to this keypoint? Perhaps this is supposed to be very easy but I am trying to wrap my head in the web and can't find much of such example usage.
The text was updated successfully, but these errors were encountered:
Hi @monacv There is a documentation page about the convert_depth_pixel_to_metric_coordinate function at the link below if you have not seen it already.
Depth is described as "The depth value of the image point".
The way that I interpret the structure of the function, as described in this link, is that it is requesting the XYZ coordinates of the pixel, except that the function orders it as ZXY (depth coordinate Z, pixel X value, pixel Y value).
The problem therefore becomes how to convert a 2D xy pixel coordinate into a 3D XYZ world coordinate. Typically, this may be done through using rs2_deproject_pixel_to_point
The output of convert_depth_pixel_to_metric_coordinate should be the x, y and z value in meters.
It seems as though this may be an over-complicated method of getting the depth value of a specific pixel and that you could instead use i and j to get the depth value of a specific pixel using the method in the link below:
I have a keypoint that has x and y and I want to convert this x and y into metric value as well as its z.
I want to know how I could exactly use the
convert_depth_pixel_to_metric_coordinate
method given these inputs:and
depth_frame
where its type and shape are:My goal is to get as output the
x
,y
, andz
in metric coordinates.Please note I only consider the
keypoint_x
andkeypoint_y
that are inside the image.essentially I am not sure how to get
x, y, z = convert_depth_pixel_to_metric_coordinate(depth_frame[i][j], keypoint_x, keypoint_y, intrinsic)
I want to know how I find the pixel
i
andj
that refers to this keypoint? Perhaps this is supposed to be very easy but I am trying to wrap my head in the web and can't find much of such example usage.The text was updated successfully, but these errors were encountered: