Skip to content

CameraParams.yaml are ignored when running KITTI dataset #43

Description

@MarceloContreras

The camera parameters from params/CameraParams.yaml are ignored in favor to hardcoded values in the KittiDataProvider class. The provider expects a certain dataset file structure (kitti/xxxx) to assign the correct params.

See KittiDataProvider.hpp line 526

// hardcoded camera params
  // we use the dataset path to determine which camera params to load (0000-0013
  // is different from 0018-0020) and we expect the dataset path to be in the
  // form <path/to/kitti/XXXX> we use XXXX to determine which dataset us being
  // used and which params to use
  void setCameraParams(const fs::path& dataset_path) {
    std::string end_folder = dataset_path.parent_path().filename();
    LOG(INFO) << end_folder;
    int dataset_id;
    std::istringstream(end_folder) >> dataset_id;

    LOG(INFO) << "Loading KITTI camera params from dataset: " << dataset_id;

    if (dataset_id <= 13) {
      CameraParams::IntrinsicsCoeffs intrinsics(
          {721.5377, 721.5377, 609.5593, 172.8540});
      CameraParams::DistortionCoeffs distortion({0, 0, 0, 0});

      cv::Size image_size(1242, 375);
      camera_params_ =
          CameraParams(intrinsics, distortion, image_size, "radial_tangential");
      // IR projection of this dataset is 387.5744. IR = baseline * fx
      // (fx=721.5377)
      camera_params_->setDepthParams(0.57);

      params_.base_line = 387.5744;
    } else if (dataset_id >= 18 && dataset_id <= 20) {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions