Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About calib.txt in SemanticKITTI #21

Closed
2311762665 opened this issue Sep 17, 2022 · 3 comments
Closed

About calib.txt in SemanticKITTI #21

2311762665 opened this issue Sep 17, 2022 · 3 comments

Comments

@2311762665
Copy link

2311762665 commented Sep 17, 2022

Hello author, according to the read_calib(calib_path) function of pc_processor->dataset->semantc_kitti->parser in your code,

def read_calib(calib_path):
    """
    :param calib_path: Path to a calibration text file.
    :return: dict with calibration matrices.
    """
    calib_all = {}
    with open(calib_path, 'r') as f:
        for line in f.readlines():
            if line == '\n':
                break
            key, value = line.split(':', 1)
            calib_all[key] = np.array([float(x) for x in value.split()])
calib_out = {}
# 3x4 projection matrix for left camera
calib_out['P2'] = calib_all['P2'].reshape(3, 4)
calib_out['Tr'] = np.identity(4)  # 4x4 matrix
calib_out['Tr'][:3, :4] = calib_all['Tr'].reshape(3, 4)
return calib_out

Does your calib.txt file already contain the ''Tr'' value? Why do I download only '''P0''', '''P1''', '''P2'', '''''P3' from the official website?

@iris0329
Copy link
Collaborator

iris0329 commented Sep 20, 2022

Thanks for your attention, which file did you download? Could you share the link you use?

@2311762665
Copy link
Author

Excuse me, the problem has been solved. It turns out that additional data_odometry_calib needs to be downloaded.

@iris0329
Copy link
Collaborator

Congrats, thanks for your update !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants