Introduction to Camera Interface
In this blog, we will discuss about the different Camera Interfaces available and how is it interfaced to an ARM board. This knowledge can be then used to develop a Linux Camera Driver.
There are two type of camera interfaces:
- Parallel Camera Interface
- Serial Camera Interface, also known as MIPI CSI (Camera Serial Interface)
We are referring to the CMOS camera sensors here and not the WebCam’s which are typically interfaced over the USB interface.
Parallel Camera Interface is the legacy interface which was used to interface camera modules to the ARM boards.
MIPI CSI is a recent standard which is used to interface camera sensors in the Mobile / Tablet platforms.
Parallel Camera Interface:
The following picture shows a typical parallel camera interface. Note that the picture does not show the various voltages that are supplied to the camera sensors.
In order to configure and use a camera sensor module over a parallel interface, the following signals are used:
- I2C Lines
- Control Lines
- Parallel Data Lines (8 Parallel Lines in this Example)
The I2C signals are used to configure the camera for generating the images in a particular format. For example, we can configure the camera sensor for:
- Different image resolution, for example, QVGA, VGA, 1 Mega Pixel, 5 Mega Pixel, etc
- Different image formats, for example, RGB565 format if we are previewing the image, YUV format if we are performing video recording, JPEG if we are capturing still images.
- Different frame rate, for example, 30 FPS for video recording, etc.
The control lines are used for sampling the images generated by the camera sensor.
- The Camera Clock is provided for the operation of the camera sensor module.
- Based on the Camera Clock provided, the camera sensor will generate the Pixel Clock. The pixel clock is used by the ARM processor for sampling the data.
- The HSYNC signal is used to determine the end of the line of image.
- The VSYNC signal is used to determine the end of the frame (or) end of image.
The data lines carry the image data from the sensor. The data lines are sampled based on the control signals, Pixel Clock, HSYNC and VSYNC.
Embedded Frame Markers:
The camera sensor modules also support the generation of embedded line and frame markers. This can be used if the number of interface (PIN’s) from the ARM processor are less. If the camera sensor is configured in embedded frame marker mode, then the HSYNC and VSYNC signals are not required.
Linux Camera Driver Development:
If you are interested in the development of Linux Camera Driver with 100% hand’s on experience and complete development from scratch, contact us (email@example.com) to register for the camera drivers course.