Program Listing for File random-camera-generator.h

Return to documentation for file (aslam_cv2/aslam_cv_cameras/include/aslam/cameras/random-camera-generator.h)

#ifndef ASLAM_RANDOM_CAMERA_GENERATOR_H_
#define ASLAM_RANDOM_CAMERA_GENERATOR_H_

#include <memory>
#include <string>
#include <unordered_map>
#include <vector>

#include <aslam/common/macros.h>
#include <aslam/common/pose-types.h>
#include <aslam/common/sensor.h>
#include <aslam/common/unique-id.h>
#include <aslam/common/yaml-serialization.h>
#include <gtest/gtest_prod.h>

#include <aslam/cameras/camera-pinhole.h>
#include <aslam/cameras/camera-unified-projection.h>
#include <aslam/cameras/camera.h>
#include <aslam/cameras/ncamera.h>

namespace aslam {

NCamera::Ptr createTestNCamera(size_t num_cameras);
NCamera::UniquePtr createUniqueTestNCamera(size_t num_cameras);

NCamera::Ptr createSurroundViewTestNCamera();
NCamera::UniquePtr createSurroundViewUniqueTestNCamera();

template <typename DistortionType>
PinholeCamera::Ptr createIntrinsicsPinholeTestCamera() {
  Distortion::UniquePtr zeros = DistortionType::createZeroTestDistortion();
  PinholeCamera::Ptr camera(
      new PinholeCamera(400, 400, 319.5, 239.5, 640, 480, zeros));
  CameraId id;
  generateId(&id);
  camera->setId(id);
  return camera;
}

}  // namespace aslam

#endif /* ASLAM_RANDOM_CAMERA_GENERATOR_H_ */