| 37 | //TODO: change to double instead of float |
| 38 | |
| 39 | class Settings { |
| 40 | public: |
| 41 | /* |
| 42 | * Enum for the different camera types implemented |
| 43 | */ |
| 44 | enum CameraType { |
| 45 | PinHole = 0, |
| 46 | Rectified = 1, |
| 47 | KannalaBrandt = 2 |
| 48 | }; |
| 49 | |
| 50 | /* |
| 51 | * Delete default constructor |
| 52 | */ |
| 53 | Settings() = delete; |
| 54 | |
| 55 | /* |
| 56 | * Constructor from file |
| 57 | */ |
| 58 | Settings(const std::string &configFile, const int& sensor); |
| 59 | |
| 60 | /* |
| 61 | * Ostream operator overloading to dump settings to the terminal |
| 62 | */ |
| 63 | friend std::ostream &operator<<(std::ostream &output, const Settings &s); |
| 64 | |
| 65 | /* |
| 66 | * Getter methods |
| 67 | */ |
| 68 | CameraType cameraType() {return cameraType_;} |
| 69 | GeometricCamera* camera1() {return calibration1_;} |
| 70 | GeometricCamera* camera2() {return calibration2_;} |
| 71 | cv::Mat camera1DistortionCoef() {return cv::Mat(vPinHoleDistorsion1_.size(),1,CV_32F,vPinHoleDistorsion1_.data());} |
| 72 | cv::Mat camera2DistortionCoef() {return cv::Mat(vPinHoleDistorsion2_.size(),1,CV_32F,vPinHoleDistorsion1_.data());} |
| 73 | |
| 74 | Sophus::SE3f Tlr() {return Tlr_;} |
| 75 | float bf() {return bf_;} |
| 76 | float b() {return b_;} |
| 77 | float thDepth() {return thDepth_;} |
| 78 | |
| 79 | bool needToUndistort() {return bNeedToUndistort_;} |
| 80 | |
| 81 | cv::Size newImSize() {return newImSize_;} |
| 82 | float fps() {return fps_;} |
| 83 | bool rgb() {return bRGB_;} |
| 84 | bool needToResize() {return bNeedToResize1_;} |
| 85 | bool needToRectify() {return bNeedToRectify_;} |
| 86 | |
| 87 | float noiseGyro() {return noiseGyro_;} |
| 88 | float noiseAcc() {return noiseAcc_;} |
| 89 | float gyroWalk() {return gyroWalk_;} |
| 90 | float accWalk() {return accWalk_;} |
| 91 | float imuFrequency() {return imuFrequency_;} |
| 92 | Sophus::SE3f Tbc() {return Tbc_;} |
| 93 | bool insertKFsWhenLost() {return insertKFsWhenLost_;} |
| 94 | |
| 95 | float depthMapFactor() {return depthMapFactor_;} |
| 96 |
nothing calls this directly
no outgoing calls
no test coverage detected