Opencv | camera model

To apply three different camera models in different situations.
在这里插入图片描述
Today, we are talking about models in camera. As we all know, there are a lot of lens in different position to change the road of light, and it’s so important to carefully calculate their distance as well as shape. Let’s pay more attention to several basic models about camera.
**

1.Perspective Projection

**在这里插入图片描述

2.Affine Projection

在这里插入图片描述

3.Orthographic projection

When it is a prior known that the camera always remains at a roughly constant distance from the scene, we can go further and normalize the image.
在这里插入图片描述
When it is a prior known that the camera always remains at a roughly constant distance from the scene, we can further normalize the image coordinates, so that m=-1.
All light rays parallel to the k axis and orthogonal to the image plane ’.
Therefore, the metric is well preserved in the image.
在这里插入图片描述
There is a picture to describe the theory of camera clearly.
在这里插入图片描述
In reality, the perspective equation is only valid when all distances are measured in the camera’s reference frame, and image coordinates have their own origin.
In practice, the world and camera coordinate systems are related by a set of parameters.
Intrinsic parameters relates the camera’s coordinate system to the image pixel coordinate system.
Extrinsic parameters relate the camera’s coordinate system to a fixed world coordinate system and specify its position and orientation in space.
A process to estimate intrinsic & extrinsic parameters is known as geometric camera calibration.

That’s all, thank you for watching~

### COLMAP 中相机模型文档与解释 #### 相机模型概述 COLMAP 支持多种相机模型,每种模型描述了不同的成像几何特性。这些模型用于校准和重建过程中,确保三维重建的准确性[^1]。 #### 文件结构 对于每一个稀疏重建项目,存在一个 `cameras.bin` 或者 `cameras.txt` 文件,具体取决于所使用的文件格式(二进制或文本)。此文件包含了所有参与重建过程的摄像设备的信息。每个条目代表一台特定的照相机,并记录其唯一标识符、采用的投影方式以及分辨率尺寸等属性[^3]。 #### 参数定义 在上述提到的摄像头配置文件里,除了基本的身份编号之外,还会指定具体的摄影装置类型及其对应的参数集: - **PINHOLE**: 这是最简单的针孔相机模型,适用于大多数标准镜头。它仅需四个额外参数——焦距 f 和主点坐标 u0,v0 来表征内参矩阵 K。 - **SIMPLE_PINHOLE**: 类似于 PINHOLE ,但是假设主点位于图像中心位置,因此只需提供单个焦距值作为输入即可完成初始化工作。 - **RADIAL**: 基础版径向畸变矫正方案,在此基础上增加了两个系数 k1,k2 用来量化由透镜引起的桶形失真效应程度;同样地,默认认为光轴穿过画面正中央。 - 更复杂的选项还包括 OPENCV_FISHEYE 等鱼眼变形处理办法,它们能够更好地适应广角视角下的特殊需求场景。 ```cpp // C++ code snippet showing how to read a camera from the cameras file. Camera ReadCamera(const std::string& path_to_cam_file, const int camera_id) { Camera cam; // Implementation details depend on whether reading .bin or .txt files... return cam; } ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值