liuyuan-pal / Gen6D

[ECCV2022] Gen6D: Generalizable Model-Free 6-DoF Object Pose Estimation from RGB Images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

理解不了最顶上的这个注释

Alanwaker opened this issue · comments

ref_vert_angle will rotate the reference image to ensure the "up" direction approximate the Y- of the image

if rectify_rot:
    if input_K is not None and input_pose is not None:
        # optionally, we may want to rotate the image with respect to a given pose so that they will be aligned.
        rfn = len(ref_poses)
        input_pose = np.repeat(input_pose[None, :], rfn, 0)
        input_K = np.repeat(input_K[None, :], rfn, 0)
        _, ref_vert_angle = scale_rotation_difference_from_cameras(
            ref_poses, input_pose, ref_Ks, input_K, object_center
        )  # rfn
    else:
        object_vert = get_object_vert(database)
        ref_vert_2d = np.asarray(
            [(pose[:, :3] @ object_vert)[:2] for pose in ref_poses]
        )
        mask = np.linalg.norm(ref_vert_2d, 2, 1) < 1e-5
        ref_vert_2d[mask] += 1e-5 * np.sign(ref_vert_2d[mask])  # avoid 0 vector
        ref_vert_angle = (
            -np.arctan2(ref_vert_2d[:, 1], ref_vert_2d[:, 0]) - np.pi / 2
        )

1、上面的注释指的是将物体法线旋转至接近图片的Y轴吗?
2、object_vert是指物体的垂直法线吗?

  1. 上面指的是按照当前的pose去旋转一下物体,相当于用前一帧的pose做初始化,这里大概是align好了。
  2. object vert指的是重力的反方向
  1. 上面指的是按照当前的pose去旋转一下物体,相当于用前一帧的pose做初始化,这里大概是align好了。
  2. object vert指的是重力的反方向

不好意思忘掉了这是markdown,其实我说的是这个注释嘞,是下面这个
"# ref_vert_angle will rotate the reference image to ensure the "up" direction approximate the Y- of the image"
我这里指的是调整object使其object vert在像素平面内指向上方"-v"方向的意思吗?谢谢

对这里的up指的是图像的Y-方向

对这里的up指的是图像的Y-方向

好嘞,谢谢