1e41f4b71Sopenharmony_ci# Introduction to Camera Kit 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ciWith the APIs provided by Camera Kit, you can develop a camera application. The application accesses and operates the camera hardware to implement basic operations, such as preview, photographing, and video recording. It can also perform more operations, for example, controlling the flash and exposure time, and focusing or adjusting the focus. 4e41f4b71Sopenharmony_ci 5e41f4b71Sopenharmony_ci## When to Use 6e41f4b71Sopenharmony_ci 7e41f4b71Sopenharmony_ciWhen you want to develop a camera application or develop a camera module in an application, you can refer to the development model described below to understand the working process of the camera before the development. For details, see [Camera Development Preparations](camera-preparation.md). 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ciIf you only need to start the system camera to take a photo or record a video, you can directly use the CameraPicker module, without applying for the camera permission. For details, see [Camera Picker](../../reference/apis-camera-kit/js-apis-cameraPicker.md). 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_ci## Development Model 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ciThe camera application invokes the camera hardware to collect and process image and video data, and output images and videos. It can be used when there are multiple lenses (such as wide-angle lens, long-focus lens, and ToF lens) in various service scenarios (such as different requirements on the resolution, format, and effect). 14e41f4b71Sopenharmony_ci 15e41f4b71Sopenharmony_ciThe figure below illustrates the working process of the camera module. The working process can be summarized into three parts: input device management, session management, and output management. 16e41f4b71Sopenharmony_ci 17e41f4b71Sopenharmony_ci- During input device management, the camera application invokes the camera hardware to collect data and uses the data as an input stream. 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci- During session management, you can configure an input stream to determine the camera to be used. You can also set parameters, such as the flash, exposure time, focus, and focus adjustment, to implement different shooting effects in various service scenarios. The application can switch between sessions to meet service requirements in different scenarios. 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci- During output management, you can configure an output stream, which can be a preview stream, photo stream, or video stream. 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci**Figure 1** Camera working process 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ciFor better application development, you are also advised understanding the camera development model. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci**Figure 2** Camera development model 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ciThe camera application controls the camera hardware to implement basic operations such as image display (preview), photo saving (photographing), and video recording. During the implementation, the camera service controls the camera hardware to collect and output data, and transmits the data to a specific module for processing through a BufferQueue at the bottom camera device hardware interface (HDI) layer. You can ignore the BufferQueue during application development. It is used to send the data processed by the bottom layer to the upper layer for image display. 32e41f4b71Sopenharmony_ci 33e41f4b71Sopenharmony_ciFor example, in a video recording scenario, the recording service creates a video surface and provides it to the camera service for data transmission. The camera service controls the camera device to collect video data and generate a video stream. After processing the collected data at the HDI layer, the camera service transmits the video stream to the recording service through the surface. The recording service processes the video stream and saves it as a video file. Now video recording is complete. 34e41f4b71Sopenharmony_ci 35e41f4b71Sopenharmony_ci## Samples 36e41f4b71Sopenharmony_ci 37e41f4b71Sopenharmony_ciThe following sample is provided to help you better understand how to develop the camera service: 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci- [Camera and MediaLibrary (ArkTS, Full SDK, API version 10)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SystemFeature/Media/Camera) 40