Open yunshangyue71 opened 2 years ago
i use * to replace the precision number
I can't get what you're saying. We just resized the original high-resolution images to low-resolution ones without cropping. In other word, we did not crop the original images, but just resized it to a smaller size.
your original image is high resolution, you want to protect the subjects, so the published img is cropped. i think you want make the crop as the original image, but the cam parm you offered is wrong or somthing forgotted. your change your princeple ,for example from (13, 7) to (27,18), the intrisic is not change. your changed the camera ceil's position, but only changed the camera princeple
dataset.py
campos, camrot = np.array(cameras[str(capture_id)]['campos'][str(cam)], dtype=np.float32), \ np.array(cameras[str(capture_id)]['camrot'][str(cam)], dtype=np.float32) focal, princpt = np.array(cameras[str(capture_id)]['focal'][str(cam)], dtype=np.float32), \ np.array(cameras[str(capture_id)]['princpt'][str(cam)], dtype=np.float32)
def cam2pixel(cam_coord, f, c): x = cam_coord[:, 0] / (cam_coord[:, 2] + 1e-8) f[0] + c[0] y = cam_coord[:, 1] / (cam_coord[:, 2] + 1e-8) f[1] + c[1] z = cam_coord[:, 2] img_coord = np.concatenate((x[:,None], y[:,None], z[:,None]), 1) return img_coord why i think you not change intrinsic is , the scale of x and the scale y is equal