2025-10-10 16:07:00 +08:00

107 lines
3.7 KiB
ReStructuredText
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Camera 概述
=======================
:link_to_translation:`en:[English]`
.. toctree::
:maxdepth: 1
1 工作原理
-------------------------------------
景物通过镜头LENS生成的光学图像投射到图像传感器SENSOR表面然后转为电信号经过A/D模数转换转换后变成数字图像信号再送到数字信号处理芯片DSP中加工处理后输出 YUV 或者 RGB 格式的数据。
.. figure:: ../../../../common/_static/camera_working_principle_flow.png
:align: center
:alt: camera_working_principle flow
:figclass: align-center
Figure 1.工作原理流程
2 主要部件
-------------------------------------
一般来说camera 主要是由 lens 和 sensor IC 两部分组成,其中有的 sensor IC 集成 了 DSP有的没有集成但也需要外部 DSP 处理。
1、lens镜头
camera 的镜头结构是有几片透镜组成分有塑胶透镜Plastic和玻璃透 镜(Glass) 通常镜头结构有1P,2P,1G1P,1G3P,2G2P,4G 等。
.. figure:: ../../../../common/_static/lens_type.png
:align: center
:alt: lens type
:figclass: align-center
Figure 2.镜头结构
2、sensor图像传感器
- Sensor 是一种半导体芯片有两种类型CCDCharge Coupled Device即电荷耦合器件的缩写 和 CMOSComplementaryMetal-OxideSemiconductor互补金属氧化物半导体。
- Sensor 将从 lens 上传导过来的光线转换为电信号, 再通过内部的 AD 转换为数字信号。 由于 sensor 的每个 pixel 只能感光 R 光或者 B 光或者 G 光, 因此每个像素此时存贮的是单色的, 我们称之为 RAW DATA 数据。
要想将每个像素的 RAW DATA 数据还原成三基色,就需要 ISP 来处理。 ISP图像信号处理 主要完成数字图像的处理工作,把 sensor 采集到的原始数据转换为显示支持的格式。
.. note::
- 1、CCD传感器电荷信号先传送后放大再A/D成像质量灵敏度高、分辨率好、噪声小处理速度慢造价高工艺复杂。
- 2、CMOS传感器电荷信号先放大后A/D再传送成像质量灵敏度低、噪声明显处理速度快造价低工艺简单。
3、CAMIFcamera 控制器
芯片上的 camera 接口电路,对设备进行控制,接收 sensor 采集的数据交给 CPU并送入 LCD 进行显示。
3 摄像头接口
-------------------------------------
摄像头常见的两种接口:UVC接口和DVP接口。
- USB接口只有数据线没有时钟线。
.. figure:: ../../../../common/_static/uvc_interface.png
:align: center
:alt: uvc interface
:figclass: align-center
Figure 3.UVC接口
- DVPDigital Video Port/Parally Port接口主要由电源总线输入总线输出总线组成。
.. figure:: ../../../../common/_static/dvp_interface.png
:align: center
:alt: dvp interface
:figclass: align-center
Figure 4.DVP接口
- 输入总线
PWDNcamera的使能管脚可以配置为两种模式一种为standby一种为normal work。当配置为standby时包括复位在内的一切操作对camera是无效的所以该管脚要设为normal work复位才有效。
MCLK提供给camera的工作时钟。
IIC_SDA/IIC_SCL用来读写sensor的寄存器配置寄存器。
- 输出总线
PCLK像素同步信号管脚。
VSYNC帧同步信号。
HSYN行同步信号。
DATA[0-7]:输出数据管脚。
- 电源总线
AVDDcamera的模拟电压主要给camera的感光区和ADC部分供电。
IOVDDcamera的GPIO口模拟电压主要给IIC或者DVP部分供电。
DVDDcamera的数字工作电压若供电不稳定可能会导致花屏。