facebookresearch / Ego4d

Ego4d dataset repository. Download the dataset, visualize, extract features & example usage of the dataset
https://ego4d-data.org/docs/
MIT License
361 stars 49 forks source link

EgoExo4D Aria - Intrinsic Parameters #349

Open rupalsaxena opened 2 months ago

rupalsaxena commented 2 months ago

Hello,

Thank you for amazing work on EgoExo4D dataset!

I have a doubt regarding intrinsic parameters!

For Aria "camera-rgb" sensor, I can get intrinsic parameters from two sources:

  1. From json file: annotation/ego_pose/train/camera_pose/uuid.json
  2. Using projectaria_tools, example code below:

    class VrsHandler:
    def __init__(self, vrs_file, sensor_name = "camera-rgb"):
        self.provider = data_provider.create_vrs_data_provider(vrs_file)
        assert self.provider is not None, "Cannot open file"
        self.sensor_stream_id = self.provider.get_stream_id_from_label(sensor_name)
    
        # get calib and calibration algo
        self.initial_calib = self.provider.get_device_calibration().get_camera_calib(sensor_name)
        self.w, self.h = self.initial_calib.get_image_size()
        self.updated_calib = calibration.get_linear_camera_calibration(
            self.w, 
            self.h, 
            self.initial_calib.get_focal_lengths()[0], 
            "pinhole",
            self.initial_calib.get_transform_device_camera()
        )
        self.sensor_name = sensor_name
    
    def get_intrinsic_mattress(self):
        fx, fy = self.updated_calib.get_focal_lengths()
        cx, cy = self.updated_calib.get_principal_point()
    
        self.K = np.array([
            [fx, 0,   cx],
            [0,   fy, cy],
            [0,   0,   1]
        ])
    
        return self.K
    

    Now using both the methods, I am getting different K mattress. For eg for georgiatech_covid_09_2, from 1st method, I got [[150.0, 0.0, 255.5] [0.0, 150.0, 255.5] [0.0, 0.0, 1.0]]

From 2nd method, i.e. the code, I wrote, I got intrinsic mattress as [[610.52437819, 0, 703.5 ] [ 0, 610.52437819, 703.5 ] [ 0, 0, 1 ]]

I am confused, why are these values different??

Please let me know, thanks :) Best regards :)