tobibaum / metrabs_trt

Running 3D HPE at 30fps
12 stars 3 forks source link

bbox reprojection method “corners” #4

Closed yunshangyue71 closed 1 year ago

yunshangyue71 commented 1 year ago
if method in ('balanced', 'side_midpoints'):
    old_side_midpoints = center + np.stack([-dx, -dy, dx, dy])
    new_side_midpoints = cameralib.reproject_image_points(
        old_side_midpoints, old_camera, new_camera)
    new_midpoint_box = boxlib.bb_of_points(new_side_midpoints)

if method in ('balanced', 'corners'):
    old_corners = center + np.stack([-dx - dy, dx - dy, dx + dy, -dx + dy])
    new_corners = cameralib.reproject_image_points(
        old_corners, old_camera, new_camera)
    new_corner_box = boxlib.bb_of_points(new_corners)

center + np.stack([-dx - dy, dx - dy, dx + dy, -dx + dy]); i can't guess what you think? center + np.stack([-dx - dy, dx - dy, dx + dy, -dx + dy]) ==>center + np.stack([-dx, -dy, dx, dy]) + np.stack([-dy, dx, dy, -dx]) is this an error? Is this what you really think? center + np.stack([-dx, -dy, dx, dy]) + np.stack([-dy, -dx, dy, dx])==》 center + np.stack([-dx - dy, -dx - dy, dx + dy, dx + dy])