ORBSLAM2双目.yaml
时间: 2024-12-27 17:29:09 浏览: 4
### ORB-SLAM2 双目相机配置 YAML 文件示例
对于双目相机,在使用 ORB-SLAM2 时,需要创建一个特定的 YAML 配置文件来定义相机的各项参数。以下是基于已有资料整理的一个典型双目相机配置文件模板:
```yaml
%YAML:1.0
#-----
# Camera Parameters. Adjust them!
#-----------------------------------------------------------------------------------------------
# CAMERA calibration and distortion parameters (OpenCV)
Camera.fx: 718.856 # Focal length in pixels, X-axis [^1]
Camera.fy: 718.856 # Focal length in pixels, Y-axis
Camera.cx: 607.193 # Principal point of the image plane, X-coordinate [^1]
Camera.cy: 185.216 # Principal point of the image plane, Y-coordinate
Camera.k1: 0.0 # Radial distortion coefficient k1 [^1]
Camera.k2: 0.0 # Radial distortion coefficient k2
Camera.p1: 0.0 # Tangential distortion coefficient p1
Camera.p2: 0.0 # Tangential distortion coefficient p2
Camera.k3: 0.0 # Third radial distortion coefficient k3
# Camera frames per second
Camera.fps: 30.0 # Frames Per Second
# Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
Camera.RGB: 1 # If true, color order will be considered as RGB; otherwise, it's assumed to be BGR
# stereo baseline times fx
Camera.bf: 400.0 # Baseline multiplied by focal length
#-----------------------------------------------------------------------------------------------
# ORB Parameters
#-----------------------------------------------------------------------------------------------
# ORB Extractor: Number of features per image
ORBextractor.nFeatures: 1200 # Maximum number of keypoints that can be extracted from a single frame
# ORB Extractor: Scale factor between levels in the scale pyramid
ORBextractor.scaleFactor: 1.2 # Ratio between consecutive scales at which keypoint detection occurs
# ORB Extractor: Number of levels in the scale pyramid
ORBextractor.nLevels: 8 # Total number of layers used in the scale space representation
# ORB Extractor: Fast threshold
# Image is divided in a grid. At each cell FAST algorithm is applied independently.
ORBextractor.iniThFAST: 20 # Initial threshold value for detecting corners using FAST detector
ORBextractor.minThFAST: 7 # Minimum allowed threshold during non-maximum suppression phase
# Use this instead of above if you want to extract ORB on RGB channels.
# ORB Extractor: Number of features per channel/image
# ORBextractorRGBD.nFeatures: 1200
# ORB Extractor: Scale factor between levels in the scale pyramid
# ORBextractorRGBD.scaleFactor: 1.2
# ORB Extractor: Number of levels in the scale pyramid
# ORBextractorRGBD.nLevels: 8
# ORB Extractor: Fast threshold
# ORBextractorRGBD.iniThFAST: 20
# ORBextractorRGBD.minThFAST: 7
#-----
Viewer.KeyFrameSize: 0.05 # Size of KeyFrames when drawing graphically
Viewer.KeyFrameLineWidth: 1 # Line width for edges connecting KeyFrames visually
Viewer.GraphLineWidth: 0.9 # Width of lines representing connections within map points
Viewer.PointSize: 2 # Diameter size of MapPoints displayed on screen
Viewer.CameraSize: 0.08 # Dimensional scaling factor applied to camera model rendering
Viewer.ViewpointX: 0 # Position offset along X axis relative to origin where viewer looks towards scene center
Viewer.ViewpointY: -0.7 # Position offset along Y axis relative to origin where viewer looks towards scene center
Viewer.ViewpointZ: -1.8 # Position offset along Z axis relative to origin where viewer looks towards scene center
Viewer.ViewpointF: 500 # Field-of-view angle defining frustum extent around viewpoint direction vector [^1]
```
此配置文件涵盖了从摄像机校准到特征提取器设置以及可视化选项的关键方面。
阅读全文