CN115706869A - Terminal image processing method and device and terminal equipment - Google Patents

Terminal image processing method and device and terminal equipment Download PDF

Info

Publication number
CN115706869A
CN115706869A CN202110923173.0A CN202110923173A CN115706869A CN 115706869 A CN115706869 A CN 115706869A CN 202110923173 A CN202110923173 A CN 202110923173A CN 115706869 A CN115706869 A CN 115706869A
Authority
CN
China
Prior art keywords
color
image
terminal device
black
white
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110923173.0A
Other languages
Chinese (zh)
Inventor
李光源
廖川
许集润
邵涛
周茂森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110923173.0A priority Critical patent/CN115706869A/en
Publication of CN115706869A publication Critical patent/CN115706869A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The embodiment of the application provides an image processing method and device for a terminal and terminal equipment, wherein the terminal comprises a black-and-white camera and a color camera, and the method comprises the following steps: after the photographing function of the terminal is operated, acquiring a color RAW image through a color camera and acquiring a black-and-white RAW image through a black-and-white camera in the previewing process; acquiring a shooting instruction, and controlling a color camera to shoot a current shooting scene to acquire a color RAW image of the shooting scene; carrying out RAW domain processing on the color RAW image to obtain a processed color RAW image; processing the processed color RAW image to obtain a color YUV image; processing the black and white RAW image acquired in the preview process through a second Bayer domain processing algorithm link to obtain a black and white YUV image; and fusing the color YUV image and the black-and-white YUV image to obtain a target color image, thereby retaining more image details and improving the color reduction degree of the target color image.

Description

终端的图像处理方法、装置和终端设备Terminal image processing method, device and terminal equipment

技术领域technical field

本申请实施例涉及智能终端技术领域,特别涉及一种终端的图像处理方法、装置和终端设备。The embodiments of the present application relate to the technical field of smart terminals, and in particular, to a terminal image processing method, device, and terminal equipment.

背景技术Background technique

现在,拍照已成为手机中的常用功能。随着智能手机的普及,摄像头的应用越来越广泛,拍照功能也越发优异。优异的拍照性能已成为智能手机的一大卖点,围绕拍照功能的技术创新层出不穷,光圈和传感器尺寸也越来越大,这些技术和硬件的升级对智能手机拍照来说,无论是照片质量还是整体的拍照体验都有非常大的提升。在追求照片质量的同时,智能手机机身的轻薄化也是智能手机发展的一大趋势,因此,现在的智能手机大多采用至少两个摄像头模组,不仅可以提高拍摄照片的质量,也可以满足手机机身轻薄化的需求。Taking pictures is now a common function in mobile phones. With the popularization of smart phones, the application of cameras has become more and more extensive, and the camera function has become more and more excellent. Excellent camera performance has become a major selling point of smartphones. Technological innovations around the camera function are emerging in an endless stream, and the aperture and sensor size are getting larger and larger. These technology and hardware upgrades have a significant impact on smartphone photography, both in terms of photo quality and overall quality. The camera experience has been greatly improved. While pursuing the quality of photos, the thinning and lightening of smartphone bodies is also a major trend in the development of smartphones. Therefore, most smartphones now use at least two camera modules, which can not only improve the quality of photos taken, but also meet the needs of mobile phones. The need for a thinner and lighter body.

然而,以智能手机采用两个摄像头模组为例,直接使用双摄像头获得的是两张不同的图像,因此,还需要利用图像融合算法将两张双摄图像进行融合,才能得到最终的双摄增强图像。However, taking a smart phone with two camera modules as an example, two different images are obtained directly by using the dual cameras. Therefore, image fusion algorithms need to be used to fuse the two dual-camera images to obtain the final Enhance images.

现有的图像融合方法损失了较多的图像细节,导致最后成像的色彩还原度较差;特别是在顺光场景下拍摄风光和/或静物等,由于单一摄像头器件能力以及算法的细节增强能力有限,部分细节尤其是高频细节无法完全恢复。The existing image fusion method loses more image details, resulting in poor color reproduction of the final image; especially when shooting scenery and/or still life in a forward-lit scene, due to the ability of a single camera device and the detail enhancement ability of the algorithm Limited, some details, especially high-frequency details, cannot be fully recovered.

发明内容Contents of the invention

本申请实施例提供了一种终端的图像处理方法、装置、服务器和终端设备,本申请实施例还提供一种计算机可读存储介质,以实现终端设备先对彩色摄像头采集的彩色RAW图像进行RAW域处理转换成彩色YUV图像之后,再与黑白YUV图像进行融合,从而保留较多的图像细节,提高最后成像的色彩还原度。Embodiments of the present application provide a terminal image processing method, device, server, and terminal equipment. Embodiments of the present application also provide a computer-readable storage medium, so that the terminal equipment first performs RAW on the color RAW image collected by the color camera. After the color YUV image is converted into a color YUV image by domain processing, it is then fused with the black and white YUV image, thereby retaining more image details and improving the color reproduction of the final image.

第一方面,本申请提供了一种终端的图像处理方法,上述终端包括黑白摄像头和彩色摄像头,上述方法包括:在终端的拍照功能运行之后,预览过程中,通过彩色摄像头采集彩色RAW图像,通过黑白摄像头采集黑白RAW图像;终端设备获取拍摄指令之后,响应于上述拍摄指令获取预览过程中采集的彩色RAW图像,对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像;通过第二拜耳域处理算法链路对预览过程中采集的黑白RAW图像进行处理,获得黑白YUV图像。最后,终端设备将上述彩色YUV图像和上述黑白YUV图像进行融合,获得目标彩色图像。In the first aspect, the present application provides an image processing method of a terminal. The above-mentioned terminal includes a black-and-white camera and a color camera. The above-mentioned method includes: after the camera function of the terminal is run, during the preview process, the color RAW image is collected by the color camera, and the The black-and-white camera collects black-and-white RAW images; after the terminal device obtains the shooting instruction, it responds to the above-mentioned shooting instruction to obtain the color RAW image collected during the preview process, and performs RAW domain processing on the color RAW image collected during the preview process to obtain a color YUV image; The two-Bayer domain processing algorithm link processes the black and white RAW images collected during the preview process to obtain black and white YUV images. Finally, the terminal device fuses the above color YUV image and the above black and white YUV image to obtain the target color image.

其中一种可能的实现方式中,响应于上述拍摄指令获取预览过程中采集的彩色RAW图像可以为:终端设备响应于上述拍摄指令,从缓存中获取预览过程中采集的彩色RAW图像。In one possible implementation manner, acquiring the color RAW image captured during the preview process in response to the above shooting instruction may be: the terminal device acquires the color RAW image captured during the preview process from a cache in response to the above shooting instruction.

其中一种可能的实现方式中,终端设备对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像之前,还可以通过第一拜耳域处理算法链路对预览过程中采集的彩色RAW图像,进行线性化和坏点校正处理。In one possible implementation, the terminal device performs RAW domain processing on the color RAW image collected during the preview process, and before obtaining the color YUV image, it can also process the color RAW image collected during the preview process through the first Bayer domain processing algorithm link. Image, linearization and dead point correction processing.

其中一种可能的实现方式中,终端设备获取拍摄指令之前,还可以根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景。In one possible implementation manner, before the terminal device acquires the shooting instruction, it may also determine that the current shooting scene is a non-high dynamic scene according to the color RAW image collected during the preview process.

其中一种可能的实现方式中,终端设备在预览过程中采集的彩色RAW图像包括至少两帧彩色RAW图像,这样,对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像包括:对至少两帧彩色RAW图像进行预处理;对预处理后的至少两帧彩色RAW图像进行降噪处理,以将至少两帧彩色RAW图像融合成一帧彩色RAW图像;将融合获得的彩色RAW图像转换成彩色RGB图像;调整上述彩色RGB图像的颜色和亮度;将调整颜色和亮度后的彩色RGB图像转换为彩色YUV图像。In one possible implementation manner, the color RAW image collected by the terminal device during the preview process includes at least two frames of color RAW images. In this way, performing RAW domain processing on the color RAW image collected during the preview process to obtain a color YUV image includes: Perform preprocessing on at least two frames of color RAW images; perform noise reduction processing on at least two frames of color RAW images after preprocessing, so as to fuse at least two frames of color RAW images into one frame of color RAW images; convert the color RAW images obtained by fusion Become a color RGB image; adjust the color and brightness of the above color RGB image; convert the color RGB image after adjusting the color and brightness into a color YUV image.

其中一种可能的实现方式中,终端设备对上述至少两帧彩色RAW图像进行预处理包括:将至少两帧彩色RAW图像的尺寸对齐;将至少两帧彩色RAW图像中每两帧图像中的像素进行映射,获得像素之间的对应关系;对所述对应关系进行错误检测,对发生错误的对应关系进行校正。In one possible implementation manner, the terminal device's preprocessing of the above-mentioned at least two frames of color RAW images includes: aligning the sizes of at least two frames of color RAW images; Mapping is performed to obtain the corresponding relationship between pixels; error detection is performed on the corresponding relationship, and the corresponding relationship that occurs in error is corrected.

其中一种可能的实现方式中,终端设备将彩色YUV图像和黑白YUV图像进行融合,获得目标彩色图像可以为:将彩色YUV图像和黑白YUV图像的尺寸对齐;从对齐尺寸后的彩色YUV图像和对齐尺寸后的黑白YUV图像中,获取彩色YUV图像中需要融合的区域和黑白YUV图像中需要融合的区域;然后,将彩色YUV图像需要融合的区域中的像素与黑白YUV图像需要融合的区域中的像素进行映射,获得像素之间的对应关系;接下来,对上述对应关系进行错误检测,对发生错误的对应关系进行校正;最后,将彩色YUV图像需要融合的区域和黑白YUV图像需要融合的区域中的清晰像素,融合到对应的模糊像素上。In one of the possible implementations, the terminal device fuses the color YUV image and the black-and-white YUV image, and the target color image can be obtained by: aligning the size of the color YUV image and the black-and-white YUV image; from the aligned size of the color YUV image and In the black-and-white YUV image after aligning the size, obtain the area that needs to be fused in the color YUV image and the area that needs to be fused in the black-and-white YUV image; The pixels are mapped to obtain the corresponding relationship between pixels; next, the error detection of the above-mentioned corresponding relationship is performed, and the corresponding relationship that occurs is corrected; finally, the color YUV image needs to be fused with the black and white YUV image. The sharp pixels in the region are fused to the corresponding blurred pixels.

其中一种可能的实现方式中,预览过程中,确定当前的拍摄场景为非高动态场景之后,终端设备通过彩色摄像头采集的彩色RAW图像中包括短时曝光的彩色RAW图像和正常曝光的彩色RAW图像;上述方法还可以包括:采用交叠曝光高动态技术将短时曝光的彩色RAW图像和正常曝光的彩色RAW图像进行融合;在预览过程中,显示融合获得的彩色图像。In one possible implementation, after the current shooting scene is determined to be a non-high dynamic scene during the preview process, the color RAW images collected by the terminal device through the color camera include short-time exposure color RAW images and normal exposure color RAW images. Image; the above method may also include: using overlapping exposure high dynamic technology to fuse the short-time exposure color RAW image and the normal exposure color RAW image; in the preview process, display the color image obtained by fusion.

其中一种可能的实现方式中,预览过程中,终端设备通过彩色摄像头采集彩色RAW图像之后,还可以缓存上述正常曝光的彩色RAW图像。In one possible implementation manner, during the preview process, after the terminal device captures the color RAW image through the color camera, it may also cache the above normal exposed color RAW image.

本申请实施例提供的终端的图像处理方法中,终端设备先对彩色RAW图像进行RAW域处理,将彩色RAW图像转成彩色YUV图像之后,再与黑白YUV图像融合,从而可以保留较多的图像细节,提高目标彩色图像的色彩还原度。In the terminal image processing method provided in the embodiment of the present application, the terminal device first performs RAW domain processing on the color RAW image, converts the color RAW image into a color YUV image, and then fuses it with the black and white YUV image, so that more images can be retained Details, improve the color reproduction of the target color image.

第二方面,本申请实施例提供一种终端的图像处理装置,该装置包含在终端设备中,该装置具有实现第一方面及第一方面的可能实现方式中终端设备行为的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,接收模块或单元、处理模块或单元、发送模块或单元等。In a second aspect, an embodiment of the present application provides an image processing apparatus for a terminal, the apparatus is included in a terminal device, and the apparatus has a function of realizing the behavior of the terminal device in the first aspect and possible implementation manners of the first aspect. The functions may be implemented by hardware, or may be implemented by executing corresponding software through hardware. Hardware or software includes one or more modules or units corresponding to the functions described above. For example, a receiving module or unit, a processing module or unit, a sending module or unit, and the like.

第三方面,本申请实施例提供一种终端设备,包括:包括黑白摄像头和彩色摄像头;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中一个或多个计算机程序被存储在存储器中,一个或多个计算机程序包括指令,当上述指令被终端设备执行时,使得终端设备执行以下步骤:在终端设备的拍照功能运行之后,预览过程中,通过彩色摄像头采集彩色RAW图像,通过黑白摄像头采集黑白RAW图像;获取拍摄指令之后,响应于上述拍摄指令获取预览过程中采集的彩色RAW图像,对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像;通过第二拜耳域处理算法链路对预览过程中采集的黑白RAW图像进行处理,获得黑白YUV图像;将彩色YUV图像和黑白YUV图像进行融合,获得目标彩色图像。In the third aspect, the embodiment of the present application provides a terminal device, including: including a black and white camera and a color camera; one or more processors; memory; multiple application programs; and one or more computer programs, wherein one or more The computer program is stored in the memory, and one or more computer programs include instructions. When the above instructions are executed by the terminal device, the terminal device performs the following steps: For color RAW images, black and white RAW images are collected through a black and white camera; after obtaining the shooting instructions, the color RAW images collected during the preview process are obtained in response to the above shooting instructions, and RAW domain processing is performed on the color RAW images collected during the preview process to obtain color YUV images ; Process the black-and-white RAW image collected in the preview process through the second Bayer domain processing algorithm link to obtain a black-and-white YUV image; fuse the color YUV image and the black-and-white YUV image to obtain a target color image.

其中一种可能的实现方式中,当上述指令被终端设备执行时,使得终端设备执行响应于上述拍摄指令获取预览过程中采集的彩色RAW图像的步骤包括:响应于上述拍摄指令,从缓存中获取预览过程中采集的彩色RAW图像。In one possible implementation manner, when the above instruction is executed by the terminal device, making the terminal device execute the step of obtaining the color RAW image captured during the preview process in response to the above shooting instruction includes: in response to the above shooting instruction, obtaining from the cache Color RAW image captured during preview.

其中一种可能的实现方式中,当上述指令被终端设备执行时,使得终端设备执行对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像的步骤之前,还执行以下步骤:通过第一拜耳域处理算法链路对预览过程中采集的彩色RAW图像进行线性化和坏点校正处理。In one of the possible implementations, when the above instruction is executed by the terminal device, the terminal device performs RAW domain processing on the color RAW image collected during the preview process, and before the step of obtaining the color YUV image, the following steps are also performed: by The first Bayer domain processing algorithm link performs linearization and dead point correction processing on the color RAW images collected during the preview process.

其中一种可能的实现方式中,当上述指令被终端设备执行时,使得终端设备执行获取拍摄指令的步骤之前,还执行以下步骤:根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景。In one possible implementation manner, when the above instruction is executed by the terminal device, before the terminal device executes the step of obtaining the shooting instruction, the following step is also performed: according to the color RAW image collected during the preview process, determine that the current shooting scene is non-high dynamic scene.

其中一种可能的实现方式中,预览过程中采集的彩色RAW图像包括至少两帧彩色RAW图像;当上述指令被终端设备执行时,使得终端设备执行对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像的步骤可以包括:对上述至少两帧彩色RAW图像进行预处理;对预处理后的至少两帧彩色RAW图像进行降噪处理,以将至少两帧彩色RAW图像融合成一帧彩色RAW图像;将融合获得的彩色RAW图像转换成彩色RGB图像;调整彩色RGB图像的颜色和亮度;将调整颜色和亮度后的彩色RGB图像转换为彩色YUV图像。In one of the possible implementations, the color RAW image collected during the preview process includes at least two frames of color RAW images; when the above instruction is executed by the terminal device, the terminal device is made to execute the RAW domain image processing on the color RAW image collected during the preview process. Processing, the step of obtaining the color YUV image may include: preprocessing the above-mentioned at least two frames of color RAW images; performing noise reduction processing on the preprocessed at least two frames of color RAW images, so as to fuse at least two frames of color RAW images into one frame Color RAW image; convert the color RAW image obtained by fusion into a color RGB image; adjust the color and brightness of the color RGB image; convert the color RGB image after adjusting color and brightness into a color YUV image.

其中一种可能的实现方式中,当上述指令被终端设备执行时,使得终端设备执行对上述至少两帧彩色RAW图像进行预处理的步骤包括:将上述至少两帧彩色RAW图像的尺寸对齐;将上述至少两帧彩色RAW图像中每两帧图像中的像素进行映射,获得像素之间的对应关系;对上述对应关系进行错误检测,对发生错误的对应关系进行校正。In one possible implementation manner, when the above instruction is executed by the terminal device, the step of making the terminal device perform the preprocessing of the at least two frames of color RAW images includes: aligning the sizes of the at least two frames of color RAW images; Mapping pixels in every two frames of the at least two frames of color RAW images to obtain correspondences between pixels; performing error detection on the above correspondences, and correcting error correspondences.

其中一种可能的实现方式中,当上述指令被终端设备执行时,使得终端设备执行将彩色YUV图像和黑白YUV图像进行融合,获得目标彩色图像的步骤可以为:将彩色YUV图像和黑白YUV图像的尺寸对齐;从对齐尺寸后的彩色YUV图像和对齐尺寸后的黑白YUV图像中,获取彩色YUV图像中需要融合的区域和黑白YUV图像中需要融合的区域;将彩色YUV图像需要融合的区域中的像素与黑白YUV图像需要融合的区域中的像素进行映射,获得像素之间的对应关系;对上述对应关系进行错误检测,对发生错误的对应关系进行校正;将彩色YUV图像需要融合的区域和黑白YUV图像需要融合的区域中的清晰像素,融合到对应的模糊像素上。In one of the possible implementations, when the above instructions are executed by the terminal device, the terminal device is made to perform fusion of the color YUV image and the black and white YUV image, and the step of obtaining the target color image may be: combining the color YUV image and the black and white YUV image The size alignment; from the color YUV image after the size alignment and the black and white YUV image after the size alignment, obtain the area that needs to be fused in the color YUV image and the area that needs to be fused in the black and white YUV image; the area that needs to be fused in the color YUV image The pixels in the black-and-white YUV image need to be fused with the pixels in the region to obtain the corresponding relationship between the pixels; the above-mentioned corresponding relationship is detected incorrectly, and the wrong corresponding relationship is corrected; the color YUV image needs to be fused. The region and The clear pixels in the black-and-white YUV image that need to be fused are fused to the corresponding blurred pixels.

其中一种可能的实现方式中,预览过程中,确定当前的拍摄场景为非高动态场景之后,终端设备通过彩色摄像头采集的彩色RAW图像中包括短时曝光的彩色RAW图像和正常曝光的彩色RAW图像;当上述指令被终端设备执行时,使得终端设备还执行以下步骤:采用交叠曝光高动态技术将短时曝光的彩色RAW图像和正常曝光的彩色RAW图像进行融合;在预览过程中,显示融合获得的彩色图像。In one possible implementation, after the current shooting scene is determined to be a non-high dynamic scene during the preview process, the color RAW images collected by the terminal device through the color camera include short-time exposure color RAW images and normal exposure color RAW images. image; when the above instructions are executed by the terminal device, the terminal device will also perform the following steps: using overlapping exposure high dynamic technology to fuse the short-time exposure color RAW image and the normal exposure color RAW image; during the preview process, display Fused color images obtained.

其中一种可能的实现方式中,当上述指令被终端设备执行时,使得终端设备执行在预览过程中,通过彩色摄像头采集彩色RAW图像步骤之后,还执行以下步骤:缓存上述正常曝光的彩色RAW图像。In one of the possible implementations, when the above instruction is executed by the terminal device, the terminal device executes the step of capturing the color RAW image through the color camera during the preview process, and then performs the following step: cache the color RAW image of normal exposure .

应当理解的是,本申请实施例的第二方面和第三方面与本申请实施例的第一方面的技术方案一致,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the second aspect and the third aspect of the embodiment of the present application are consistent with the technical solution of the first aspect of the embodiment of the present application, and the beneficial effects obtained in each aspect and the corresponding feasible implementation manners are similar, so details are not repeated here.

第四方面,本申请实施例提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行第一方面提供的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the above-mentioned computer-readable storage medium, and when running on a computer, causes the computer to execute the method provided in the first aspect.

第五方面,本申请实施例提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第一方面提供的方法。In a fifth aspect, an embodiment of the present application provides a computer program, which is used to execute the method provided in the first aspect when the above computer program is executed by a computer.

在一种可能的设计中,第五方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上。In a possible design, all or part of the program in the fifth aspect may be stored on a storage medium packaged with the processor, or part or all may be stored on a memory not packaged with the processor.

附图说明Description of drawings

图1为本申请一个实施例提供的终端设备的结构示意图;FIG. 1 is a schematic structural diagram of a terminal device provided by an embodiment of the present application;

图2(a)为本申请一个实施例中提供的终端设备的显示界面的示意图;FIG. 2(a) is a schematic diagram of a display interface of a terminal device provided in an embodiment of the present application;

图2(b)为本申请另一个实施例中提供的终端设备的显示界面的示意图;FIG. 2(b) is a schematic diagram of a display interface of a terminal device provided in another embodiment of the present application;

图3为本申请一个实施例提供的终端的图像处理方法的示意图;FIG. 3 is a schematic diagram of a terminal image processing method provided by an embodiment of the present application;

图4为本申请另一个实施例提供的终端的图像处理方法的示意图;FIG. 4 is a schematic diagram of an image processing method of a terminal provided in another embodiment of the present application;

图5为本申请一个实施例提供的彩色和黑白图像融合的流程图;Fig. 5 is the flowchart of the fusion of color and black-and-white images provided by one embodiment of the present application;

图6为本申请另一个实施例提供的终端设备的结构示意图。Fig. 6 is a schematic structural diagram of a terminal device provided by another embodiment of the present application.

具体实施方式Detailed ways

本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the embodiments of the present application are only used to explain specific embodiments of the present application, and are not intended to limit the present application.

现有相关技术提供的一种图像融合方案中,将彩色摄像头和黑白摄像头采集的原始(RAW)图像分别转换成彩色的YUV图像和黑白的YUV图像,再将彩色的YUV图像与黑白的YUV图像进行融合,这种图像融合方案,损失了较多的图像细节,导致最后成像的色彩还原度较差。In an image fusion scheme provided by the existing related technology, the original (RAW) images collected by the color camera and the black and white camera are respectively converted into a color YUV image and a black and white YUV image, and then the color YUV image and the black and white YUV image are combined Fusion, this image fusion scheme loses more image details, resulting in poor color reproduction of the final image.

特别是在顺光场景下拍摄风光和/或静物等,由于单一摄像头器件能力以及算法的细节增强能力有限,部分细节尤其是高频细节无法完全恢复。Especially when shooting scenery and/or still life in a forward-lit scene, some details, especially high-frequency details, cannot be fully restored due to the limited capabilities of a single camera device and the ability to enhance details of an algorithm.

基于以上问题,本申请实施例提供一种终端的图像处理方法,可以实现终端设备先对彩色摄像头采集的彩色RAW图像进行RAW域处理之后,再转换成彩色YUV图像,与黑白YUV图像进行融合,从而保留较多的图像细节,提高最后成像的色彩还原度。Based on the above problems, the embodiment of the present application provides a terminal image processing method, which can realize that the terminal device first performs RAW domain processing on the color RAW image collected by the color camera, and then converts it into a color YUV image, and then fuses it with the black and white YUV image. Thereby retaining more image details and improving the color reproduction of the final image.

本申请实施例提供的终端的图像处理方法可以应用于终端设备,其中,上述终端设备可以为智能手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或个人数字助理(personal digitalassistant,PDA)等设备;本申请实施例对终端设备的具体类型不作任何限制。The terminal image processing method provided in the embodiment of the present application can be applied to a terminal device, wherein the above-mentioned terminal device can be a smart phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality, AR)/virtual reality (virtual reality) reality, VR) equipment, notebook computer, ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook or personal digital assistant (personal digital assistant, PDA) and other equipment; the embodiment of this application does not make any restrictions on the specific type of terminal equipment .

示例性的,图1为本申请一个实施例提供的终端设备的结构示意图,如图1所示,终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 1 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. As shown in FIG. 1 , the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus, USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, Earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本申请实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure shown in the embodiment of the present application does not constitute a specific limitation on the terminal device 100 . In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor ( image signal processor (ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.

控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction opcode and timing signal, and complete the control of fetching and executing the instruction.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thus improving the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or A universal serial bus (universal serial bus, USB) interface, etc.

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,DCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (serial data line, SDA) and a serial clock line (derail clock line, DCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to realize the touch function of the terminal device 100 .

I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 . In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.

PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding the analog signal. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160 . For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to realize the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.

MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(displayserial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (displayserial interface, DSI), and the like. In some embodiments, the processor 110 communicates with the camera 193 through a CSI interface to realize the shooting function of the terminal device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to realize the display function of the terminal device 100 .

GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193 , the display screen 194 , the wireless communication module 160 , the audio module 170 , the sensor module 180 and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.

可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the terminal device 100 . In other embodiments of the present application, the terminal device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.

充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备100供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 is charging the battery 142 , it can also supply power to the terminal device 100 through the power management module 141 .

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.

终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device 100 can be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the terminal device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like. The mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。A modem processor may include a modulator and a demodulator. Wherein, the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal is passed to the application processor after being processed by the baseband processor. The application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In some other embodiments, the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless local area network (wireless local area networks, WLAN) (such as wireless fidelity (wireless fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system, etc. applied on the terminal device 100. (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.

在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (codedivision multiple access, CDMA), wideband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou satellite navigation system (beidounavigation satellite system, BDS), a quasi-zenith satellite system (quasi- zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).

终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.

ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used for processing the data fed back by the camera 193 . For example, when taking a picture, open the shutter, the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be located in the camera 193 .

摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括N个摄像头193,N为大于1的正整数。本申请实施例中,N个摄像头193中包括黑白摄像头和彩色摄像头。Camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a complementary metal-oxide-semiconductor (complementary metal-oxide-semiconductor, CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other image signals. In some embodiments, the terminal device 100 may include N cameras 193, where N is a positive integer greater than 1. In the embodiment of the present application, the N cameras 193 include a black and white camera and a color camera.

具体地,在拍摄过程中,用户打开相机,光线通过镜头(可以对应于之前描述的摄像头193)被传递到感光元件上,换言之,镜头可以将环境光信号投射到感光元件的感光区域后,感光元件经过光电转换,将光信号转化为肉眼可见的图像。感光元件再将内部原始图像(Bayer格式,也称为拜尔格式或拜耳格式)传送给ISP模块,ISP模块经过算法处理,输出RGB空间域的图像给后端的采集单元,显示在终端设备100的图像预览区域或者终端设备100的显示屏上。在这个过程中,处理器通过运行在其上的固件程序对镜头、感光元件和ISP模块,进行相应控制,进而完成图像预览或者拍摄功能。Specifically, during the shooting process, the user turns on the camera, and the light is transmitted to the photosensitive element through the lens (which may correspond to the previously described camera 193). The element undergoes photoelectric conversion, which converts the light signal into an image visible to the naked eye. The photosensitive element then transmits the internal original image (Bayer format, also called Bayer format or Bayer format) to the ISP module, and the ISP module outputs the image in the RGB space domain to the back-end acquisition unit after algorithm processing, and displays it on the terminal device 100. The image preview area or the display screen of the terminal device 100. In this process, the processor controls the lens, photosensitive element and ISP module through the firmware program running on it, and then completes the image preview or shooting function.

数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.

视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.

NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By referring to the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process input information and continuously learn by itself. Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.

外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the terminal device 100 (such as audio data, phonebook, etc.) and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.

终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device 100 may implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.

音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .

扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "horn", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music through the speaker 170A, or listen to hands-free calls.

受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。Receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 100 receives a phone call or voice information, the receiver 170B can be placed close to the human ear to receive the voice.

麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In some other embodiments, the terminal device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the terminal device 100 can also be provided with three, four or more microphones 170C to realize sound signal collection, noise reduction, identify sound sources, and realize directional recording functions, etc.

耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone interface 170D is used for connecting wired earphones. The earphone interface 170D may be the USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测所述触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 180A may be disposed on display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may be comprised of at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view short messages is executed. When a touch operation whose intensity is greater than or equal to the first pressure threshold acts on the icon of the short message application, the instruction of creating a new short message is executed.

陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyroscope sensor 180B can be used to determine the motion posture of the terminal device 100 . In some embodiments, the angular velocity of the terminal device 100 around three axes (ie, x, y and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shaking of the terminal device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal device 100 may use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the terminal device 100 is a clamshell machine, the terminal device 100 may detect opening and closing of the clamshell according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic unlocking of the flip cover are set.

加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别电子设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the acceleration of the terminal device 100 in various directions (generally three axes). When the terminal device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.

距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。The distance sensor 180F is used to measure the distance. The terminal device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 may use the distance sensor 180F for distance measurement to achieve fast focusing.

接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The terminal device 100 emits infrared light through the light emitting diode. The terminal device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100 . When insufficient reflected light is detected, the terminal device 100 may determine that there is no object near the terminal device 100 . The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to make a call, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, automatic unlock and lock screen in pocket mode.

环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。The ambient light sensor 180L is used for sensing ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in the pocket to prevent accidental touch.

指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to the application lock, take pictures with fingerprints, answer incoming calls with fingerprints, and so on.

温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to implement a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds the threshold, the terminal device 100 may reduce the performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called "touch device". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position of the display screen 194 .

骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined into a bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vibrating bone mass of the vocal part acquired by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power key, a volume key and the like. The key 190 may be a mechanical key. It can also be a touch button. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .

马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。The motor 191 can generate a vibrating reminder. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as taking pictures, playing audio, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.

SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。The SIM card interface 195 is used for connecting a SIM card. The SIM card can be connected and separated from the terminal device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 . The terminal device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to implement functions such as calling and data communication. In some embodiments, the terminal device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .

为了便于理解,在此先对以下实施例中提到的拜耳域和RAW域进行说明。For ease of understanding, the Bayer domain and the RAW domain mentioned in the following embodiments are first described here.

1、拜耳域:数码相机上的每个镜头都带有一个光传感器,用以测量光线的明亮程度,但若要获得一幅全彩图像,一般需要有三个光传感器分别获得红、绿、蓝三基色信息,而为了降低数码相机的成本与体积,生产厂商通常会采用CCD或CMOS图像传感器,通常的,CMOS图像传感器输出的原始图像为拜尔域RGB格式,单个像素点只包含一种颜色值,要得到图像的灰度值,需要先插补完整各像素点的颜色信息,再计算各像素点的灰度值。也就是说,拜耳域是指数码相机内部的一种原始图片格式。1. Bayer field: Each lens on a digital camera has a light sensor to measure the brightness of the light, but to obtain a full-color image, generally three light sensors are required to obtain red, green, and blue images respectively. Three-color information, and in order to reduce the cost and volume of digital cameras, manufacturers usually use CCD or CMOS image sensors. Usually, the original image output by CMOS image sensors is in Bayer domain RGB format, and a single pixel contains only one color value, to get the gray value of the image, it is necessary to interpolate the complete color information of each pixel, and then calculate the gray value of each pixel. In other words, the Bayer field refers to a raw picture format inside a digital camera.

2、RAW域:RAW域图像,即原始图像包含从数码相机、扫描器或电影胶片扫描仪的图像传感器所处理的数据。之所以这样命名,是因为RAW域图像尚未被处理,未被打印或用于编辑。RAW域图像包含了图像最原始的信息,未经过ISP过程中的非线性处理。2. RAW domain: RAW domain image, that is, the original image contains data processed from the image sensor of a digital camera, scanner or film scanner. It is so named because RAW domain images have not been processed, printed or used for editing. The RAW domain image contains the most original information of the image without the nonlinear processing in the ISP process.

本申请以下实施例将以具有图1所示结构的终端设备为例,结合附图和应用场景,对本申请实施例提供的终端的图像处理方法进行具体阐述。The following embodiments of the present application will take the terminal device having the structure shown in FIG. 1 as an example, and describe the image processing method of the terminal provided in the embodiments of the present application in detail in combination with the accompanying drawings and application scenarios.

具体地,在用户点击终端设备的显示界面中的“相机”图标之后,响应于用户的操作,终端设备运行拍照功能,预览过程中,终端设备通过彩色摄像头采集彩色RAW图像,通过黑白摄像头采集黑白RAW图像,然后,终端设备根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景,其中,非高动态场景是指当前的拍摄场景中的光照充足,亮度跨度较小的场景,例如:建筑或风光等。在确定当前的拍摄场景为非高动态场景之后,终端设备可以在当前的显示界面中显示当前的拍摄场景为非高动态场景,如图2(a)所示,图2(a)为本申请一个实施例中提供的终端设备的显示界面的示意图,图2(a)中以非高动态场景为建筑为例示出。Specifically, after the user clicks the "camera" icon on the display interface of the terminal device, in response to the user's operation, the terminal device runs the camera function. During the preview process, the terminal device collects color RAW images through the color camera, and collects black and white RAW image, and then, according to the color RAW image collected in the preview process, the terminal device determines that the current shooting scene is a non-high dynamic scene, where the non-high dynamic scene refers to the current shooting scene with sufficient light and a small brightness span Scene, such as: architecture or scenery, etc. After determining that the current shooting scene is a non-high dynamic scene, the terminal device can display the current shooting scene as a non-high dynamic scene on the current display interface, as shown in Figure 2(a), which is the A schematic diagram of a display interface of a terminal device provided in an embodiment is shown in FIG. 2( a ) by taking a non-high dynamic scene as a building as an example.

具体地,终端设备根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景可以为:终端设备获取预览过程中采集的彩色RAW图像中的最大亮度和最小亮度,计算最大亮度与最小亮度的比值;如果上述比值小于预定的比例阈值,则可以确定当前的拍摄场景为非高动态场景。其中,上述预定的比例阈值的大小可以在具体实现时根据系统性能和/或实现需求等自行设定,本实施例对上述预定的比例阈值的大小不作限定。Specifically, the terminal device determines that the current shooting scene is a non-high dynamic scene according to the color RAW image collected during the preview process may be: the terminal device acquires the maximum brightness and minimum brightness in the color RAW image collected during the preview process, and calculates the maximum brightness A ratio to the minimum brightness; if the ratio is smaller than a predetermined ratio threshold, it can be determined that the current shooting scene is a non-high dynamic scene. Wherein, the size of the above-mentioned predetermined ratio threshold may be set according to system performance and/or implementation requirements during specific implementation, and the size of the above-mentioned predetermined ratio threshold is not limited in this embodiment.

另外,需要说明的是,当前的拍摄场景可以是终端设备按照上述方式确定的,也可以是用户在拍照功能的界面中自行选择的。In addition, it should be noted that the current shooting scene may be determined by the terminal device in the above manner, or may be selected by the user in the interface of the camera function.

另外,如果在预览过程中,终端设备检测到N个摄像头193中的黑白摄像头被遮挡之后,可以在当前的显示界面中显示“黑白摄像头被遮挡”的提示信息,如图2(b)所示,以提醒用户黑白摄像头被遮挡,这样用户就可以尽快移走黑白摄像头的遮挡物,保证拍摄获得的图像的质量。图2(b)为本申请另一个实施例中提供的终端设备的显示界面的示意图。In addition, if during the preview process, the terminal device detects that the black-and-white camera among the N cameras 193 is blocked, it can display a prompt message of "black-and-white camera is blocked" in the current display interface, as shown in FIG. 2(b) , to remind the user that the black and white camera is blocked, so that the user can remove the blocking object of the black and white camera as soon as possible to ensure the quality of the captured image. Fig. 2(b) is a schematic diagram of a display interface of a terminal device provided in another embodiment of the present application.

进一步地,参照图3,图3为本申请一个实施例提供的终端的图像处理方法的示意图,从图3可以看出,确定当前的拍摄场景为非高动态场景(35)之后,终端设备获取拍摄指令,响应于上述拍摄指令,终端设备获取预览过程中采集的彩色RAW图像。具体地,终端设备响应于上述拍摄指令,可以从缓存中获取预览过程中采集的彩色RAW图像;也就是说,预览过程中,终端设备通过彩色摄像头采集彩色RAW图像之后,可以将采集的彩色RAW图像存储到缓存中,在获取拍摄指令之后,再从缓存中获取预览过程中采集的彩色RAW图像。Further, referring to FIG. 3, FIG. 3 is a schematic diagram of a terminal image processing method provided by an embodiment of the present application. It can be seen from FIG. 3 that after determining that the current shooting scene is a non-high dynamic scene (35), the terminal device acquires A shooting instruction, in response to the above shooting instruction, the terminal device acquires the color RAW image captured during the preview process. Specifically, in response to the above shooting instruction, the terminal device can acquire the color RAW image captured during the preview process from the cache; The image is stored in the cache, and after obtaining the shooting instruction, the color RAW image captured during the preview process is obtained from the cache.

然后,终端设备通过拜耳域处理算法链路31对预览过程中采集的彩色RAW图像进行线性化和坏点校正处理。其中,拜耳域处理算法链路31即为第一拜耳域处理算法链路,用于对彩色RAW图像进行处理。Then, the terminal device performs linearization and dead point correction processing on the color RAW image collected during the preview process through the Bayer domain processing algorithm link 31 . Wherein, the Bayer domain processing algorithm link 31 is the first Bayer domain processing algorithm link, which is used to process the color RAW image.

进而,终端设备对预览过程中采集的彩色RAW图像进行RAW域处理32,获得彩色YUV图像。Furthermore, the terminal device performs RAW domain processing 32 on the color RAW image collected during the preview process to obtain a color YUV image.

对于预览过程中,终端设备通过黑白摄像头采集的黑白RAW图像,终端设备响应于上述拍摄指令,获取预览过程中采集的黑白RAW图像,通过拜耳域处理算法链路33对预览过程中采集的黑白RAW图像进行处理,获得黑白YUV图像。其中,拜耳域处理算法链路33即为第二拜耳域处理算法链路,用于对黑白RAW图像进行处理。For the black-and-white RAW image collected by the terminal device through the black-and-white camera during the preview process, the terminal device responds to the above shooting instructions to obtain the black-and-white RAW image collected during the preview process, and uses the Bayer domain processing algorithm link 33 to pair the black-and-white RAW image collected during the preview process. The image is processed to obtain a black and white YUV image. Wherein, the Bayer domain processing algorithm link 33 is the second Bayer domain processing algorithm link, which is used to process black and white RAW images.

最后,终端设备将上述彩色YUV图像和上述黑白YUV图像进行融合(34),获得目标彩色图像,展示上述目标彩色图像(即图3中的拍照出图)。Finally, the terminal device fuses the above-mentioned color YUV image and the above-mentioned black-and-white YUV image (34), obtains the target color image, and displays the above-mentioned target color image (that is, taking pictures in FIG. 3 ).

另外,参见图3,在预览过程中,确定当前的拍摄场景为非高动态场景之后,终端设备通过彩色摄像头采集的彩色RAW图像中可以包括短时曝光的彩色RAW图像和正常曝光的彩色RAW图像;这样,终端设备还可以采用交叠曝光高动态(stagger high dynamic range,Stagger HDR)技术将上述短时曝光的彩色RAW图像和正常曝光的彩色RAW图像进行融合(36);然后,在上述预览过程中,显示融合获得的彩色图像(37)。In addition, referring to Figure 3, in the preview process, after the current shooting scene is determined to be a non-high dynamic scene, the color RAW image collected by the terminal device through the color camera may include a short-time exposure color RAW image and a normal exposure color RAW image In this way, the terminal device can also use the overlapping exposure high dynamic range (stagger high dynamic range, Stagger HDR) technology to fuse the above-mentioned short-time exposure color RAW image and the normal exposure color RAW image (36); then, in the above-mentioned preview During the process, the color image (37) obtained by fusion is displayed.

具体实现时,终端设备可以通过图像处理前端0处理上述正常曝光的彩色RAW图像,通过图像处理前端1处理上述短时曝光的彩色RAW图像,然后,利用Stagger HDR将图像处理前端0和图像处理前端1处理后的彩色RAW图像进行融合(36),再将融合获得的彩色图像进行预览送显(37)。在利用Stagger HDR将图像处理前端0和图像处理前端1处理后的彩色RAW图像进行融合时,可以根据当前拍摄场景中的光照强度确定图像处理前端0与图像处理前端1处理后的彩色RAW图像的融合比例;举例来说,如果当前拍摄场景中光照充足,并且为顺光场景,那么可以确定图像处理前端0与图像处理前端1处理后的彩色RAW图像的融合比例分别为95%和5%,这样融合获得的彩色图像的效果与不做融合的图像效果相似。In specific implementation, the terminal device can process the color RAW image of normal exposure through the image processing front end 0, and process the color RAW image of the short-time exposure through the image processing front end 1, and then use the Stagger HDR to combine the image processing front end 0 and the image processing front end 1 The processed color RAW image is fused (36), and then the fused color image is previewed and displayed (37). When using Stagger HDR to fuse the color RAW images processed by image processing front-end 0 and image processing front-end 1, the difference between the color RAW images processed by image processing front-end 0 and image processing front-end 1 can be determined according to the light intensity in the current shooting scene. Fusion ratio; for example, if the current shooting scene has sufficient light and is a forward-lit scene, then it can be determined that the fusion ratios of the color RAW images processed by image processing front-end 0 and image processing front-end 1 are 95% and 5%, respectively, The effect of the color image obtained by such fusion is similar to that of the image without fusion.

另外,对于预览过程中黑白摄像头采集的黑白RAW图像,一路被送入拜耳域处理算法链路33进行处理,还有一路被送入图像处理前端2进行处理,图像处理前端2处理后的黑白RAW图像送入3A统计/语义理解模块38,3A统计/语义理解模块38主要根据黑白RAW图像实现自动颜色、亮度和/或对焦的功能,以及识别图像语义内容并用于决策。In addition, for the black-and-white RAW images collected by the black-and-white camera during the preview process, one path is sent to the Bayer domain processing algorithm link 33 for processing, and the other path is sent to the image processing front-end 2 for processing, and the black-and-white RAW image processed by the image processing front-end 2 The image is sent to the 3A statistical/semantic understanding module 38, which mainly realizes the functions of automatic color, brightness and/or focusing according to the black and white RAW image, and recognizes the semantic content of the image and uses it for decision-making.

下面结合图4,对本申请实施例提供的终端的图像处理方法进行详细说明,图4为本申请另一个实施例提供的终端的图像处理方法的示意图。The image processing method of the terminal provided in the embodiment of the present application will be described in detail below with reference to FIG. 4 . FIG. 4 is a schematic diagram of the image processing method of the terminal provided in another embodiment of the present application.

本实施例中,在预览过程中,终端设备通过彩色摄像头采集彩色RAW图像,然后,终端设备根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景,之后,终端设备通过彩色摄像头采集的图像中包括正常曝光的彩色RAW图像和短时曝光的彩色RAW图像,并将正常曝光的彩色RAW图像缓存到彩色图像缓存中。In this embodiment, during the preview process, the terminal device collects a color RAW image through a color camera, and then, according to the color RAW image collected during the preview process, the terminal device determines that the current shooting scene is a non-high dynamic scene, and then, the terminal device passes The images collected by the color camera include normal-exposure color RAW images and short-time-exposure color RAW images, and the normal-exposure color RAW images are cached in the color image cache.

对于终端设备通过黑白摄像头采集的黑白RAW图像,终端设备将黑白RAW图像缓存到黑白图像缓存中,上述黑白RAW图像为正常曝光的黑白RAW图像。For the black-and-white RAW image collected by the terminal device through the black-and-white camera, the terminal device caches the black-and-white RAW image in the black-and-white image cache, and the black-and-white RAW image is a normally exposed black-and-white RAW image.

接下来,终端设备获取拍摄指令,响应于上述拍摄指令,从彩色图像缓存中获取8帧正常曝光的彩色RAW图像。Next, the terminal device obtains a shooting instruction, and in response to the above shooting instruction, obtains 8 frames of normally exposed color RAW images from the color image cache.

然后,终端设备通过拜耳域处理算法链路41对预览过程中采集的8帧彩色RAW图像进行线性化和坏点校正处理。本实施例中,图4中的拜耳域处理算法链路41对应于图3中的拜耳域处理算法链路31,用于对彩色RAW图像进行处理。Then, the terminal device performs linearization and dead point correction processing on the 8 frames of color RAW images collected during the preview process through the Bayer domain processing algorithm link 41 . In this embodiment, the Bayer-domain processing algorithm link 41 in FIG. 4 corresponds to the Bayer-domain processing algorithm link 31 in FIG. 3 , and is used to process the color RAW image.

接下来,终端设备将进行线性化和坏点校正处理之后的8帧彩色RAW图像缓存到图像缓存池42,进而将图像缓存池42中的8帧彩色RAW图像进行RAW域处理(43),获得彩色YUV图像,将彩色YUV图像缓存到图像缓存44。从图4中可以看出,图像缓存44中缓存的彩色YUV图像的位数为10。Next, the terminal device buffers the 8 frames of color RAW images after linearization and dead point correction processing into the image buffer pool 42, and then performs RAW domain processing on the 8 frames of color RAW images in the image buffer pool 42 (43), to obtain Color YUV image, cache color YUV image to image buffer 44. It can be seen from FIG. 4 that the number of bits of the color YUV image buffered in the image buffer 44 is 10.

具体地,将图像缓存池42中的8帧彩色RAW图像进行RAW域处理(43),获得彩色YUV图像可以包括:Specifically, the 8 frames of color RAW images in the image buffer pool 42 are processed in the RAW domain (43), and obtaining the color YUV image may include:

步骤1,对上述8帧彩色RAW图像进行预处理;其中,对上述8帧彩色RAW图像进行预处理可以包括:将上述8帧彩色RAW图像的尺寸对齐,将上述8帧彩色RAW图像中每两帧图像中的像素进行映射,获得像素之间的对应关系,对上述对应关系进行错误检测,对发生错误的对应关系进行校正。Step 1, preprocessing the above-mentioned 8 frames of color RAW images; wherein, performing pre-processing on the above-mentioned 8 frames of color RAW images may include: aligning the sizes of the above-mentioned 8 frames of color RAW images, The pixels in the frame image are mapped to obtain the corresponding relationship between pixels, the error detection is performed on the above-mentioned corresponding relationship, and the error-prone corresponding relationship is corrected.

步骤2,对预处理后的8帧彩色RAW图像进行降噪处理,以将上述8帧彩色RAW图像融合成一帧彩色RAW图像。Step 2, performing noise reduction processing on the preprocessed 8 frames of color RAW images, so as to fuse the above 8 frames of color RAW images into one frame of color RAW images.

步骤3,将融合获得的彩色RAW图像转换成彩色RGB图像。Step 3, convert the color RAW image obtained by fusion into a color RGB image.

步骤4,调整上述彩色RGB图像的颜色和亮度;具体地,调整上述彩色RGB图像的颜色和亮度可以包括:对上述彩色RGB图像执行自动白平衡(automatic white balance,AWB)、渐晕(shading)和色彩校正(Gamma)等亮度和颜色的处理流程。Step 4, adjusting the color and brightness of the above-mentioned color RGB image; specifically, adjusting the color and brightness of the above-mentioned color RGB image may include: performing automatic white balance (automatic white balance, AWB) and vignetting (shading) on the above-mentioned color RGB image And color correction (Gamma) and other brightness and color processing flow.

步骤5,将调整颜色和亮度后的彩色RGB图像转换为彩色YUV图像。Step 5, converting the color RGB image after adjusting color and brightness into a color YUV image.

另外,继续参见图4,对于终端设备在预览过程中,通过黑白摄像头采集的黑白RAW图像,终端设备获取拍摄指令之后,响应于上述拍摄指令,终端设备从黑白图像缓存中获取1帧黑白RAW图像,通过拜耳域处理算法链路45对上述1帧黑白RAW图像依次进行线性化、坏点校正、拜耳处理、图变换匹配(graph transformation matching,GTM)和色彩校正(Gamma)处理,获得黑白YUV图像,获得的黑白YUV图像缓存到图像缓存46中。图像缓存46中缓存的黑白YUV图像的位数是10。本实施例中,拜耳域处理算法链路45对应于图3中的拜耳域处理算法链路33,用于对黑白RAW图像进行处理。In addition, continue to refer to Figure 4, for the black-and-white RAW image collected by the black-and-white camera during the preview process of the terminal device, after the terminal device obtains the shooting instruction, in response to the above-mentioned shooting instruction, the terminal device obtains 1 frame of black-and-white RAW image from the black-and-white image cache , through the Bayer domain processing algorithm link 45, sequentially perform linearization, bad pixel correction, Bayer processing, graph transformation matching (graph transformation matching, GTM) and color correction (Gamma) processing on the above-mentioned 1 frame of black and white RAW image to obtain a black and white YUV image , the obtained black and white YUV image is buffered into the image buffer 46. The number of bits of the black and white YUV image buffered in the image buffer 46 is 10. In this embodiment, the Bayer domain processing algorithm link 45 corresponds to the Bayer domain processing algorithm link 33 in FIG. 3 , and is used for processing black and white RAW images.

最后,终端设备将图像缓存44中的彩色YUV图像和图像缓存46中的黑白YUV图像进行融合(47),获得目标彩色图像,并展示上述目标彩色图像。Finally, the terminal device fuses (47) the color YUV image in the image buffer 44 and the black and white YUV image in the image buffer 46 to obtain the target color image, and displays the target color image.

具体地,图5为本申请一个实施例提供的彩色和黑白图像融合的流程图,如图5所示,将彩色YUV图像和黑白YUV图像进行融合,获得目标彩色图像可以包括:Specifically, Fig. 5 is a flow chart of color and black and white image fusion provided by one embodiment of the present application. As shown in Fig. 5, the fusion of the color YUV image and the black and white YUV image to obtain the target color image may include:

步骤501,将彩色YUV图像和黑白YUV图像的尺寸对齐。Step 501, aligning the sizes of the color YUV image and the black and white YUV image.

步骤502,从对齐尺寸后的彩色YUV图像和对齐尺寸后的黑白YUV图像中,获取彩色YUV图像中需要融合的区域和黑白YUV图像中需要融合的区域。Step 502, from the aligned color YUV image and the aligned black-and-white YUV image, obtain the region to be fused in the color YUV image and the region to be fused in the black-and-white YUV image.

步骤503,将彩色YUV图像需要融合的区域中的像素与黑白YUV图像需要融合的区域中的像素进行映射,获得像素之间的对应关系。Step 503 , mapping the pixels in the region to be fused of the color YUV image with the pixels in the region to be fused of the black and white YUV image to obtain a correspondence between pixels.

步骤504,对上述对应关系进行错误检测,对发生错误的对应关系进行校正。Step 504, performing error detection on the above-mentioned corresponding relationship, and correcting the wrong corresponding relationship.

步骤505,将上述彩色YUV图像需要融合的区域和上述黑白YUV图像需要融合的区域中的清晰像素,融合到对应的模糊像素上。举例来说,彩色YUV图像需要融合的区域中的像素A,与黑白YUV图像需要融合的区域中像素A’对应;一种情况中,假设像素A为像素A和像素A’中的清晰像素,像素A’为二者中的模糊像素,那么可以将像素A的色彩融合到像素A’上;另一种情况中,假设像素A为像素A和像素A’中的模糊像素,像素A’为二者中的清晰像素,那么可以将像素A’的细节融合到像素A上。Step 505, merging the clear pixels in the regions to be fused of the color YUV image and the regions to be fused of the black and white YUV images to corresponding blurred pixels. For example, the pixel A in the area where the color YUV image needs to be fused corresponds to the pixel A' in the area where the black and white YUV image needs to be fused; in one case, assume that the pixel A is a clear pixel in the pixel A and the pixel A', If pixel A' is a blurred pixel in the two, then the color of pixel A can be fused to pixel A'; in another case, assuming that pixel A is a blurred pixel in pixel A and pixel A', pixel A' is If there are clear pixels in the two, then the details of pixel A' can be blended to pixel A.

本申请实施例提供的终端的图像处理方法中,终端设备先对彩色RAW图像进行RAW域处理,将上述彩色RAW图像转成彩色YUV图像,然后再将彩色YUV图像与黑白YUV图像融合,从而可以保留较多的图像细节,特别是在顺光场景下拍摄风光和/或静物等时,可以更好地恢复图像细节,尤其是高频细节,提高目标彩色图像的色彩还原度。In the terminal image processing method provided in the embodiment of the present application, the terminal device first performs RAW domain processing on the color RAW image, converts the color RAW image into a color YUV image, and then fuses the color YUV image with the black and white YUV image, so that Preserve more image details, especially when shooting scenery and/or still life in front light scenes, it can better restore image details, especially high-frequency details, and improve the color reproduction of the target color image.

另外,在预览过程中,确定当前的拍摄场景为非高动态场景之后,终端设备通过彩色摄像头采集的彩色RAW图像中包括短时曝光的彩色RAW图像和正常曝光的彩色RAW图像,将上述短时曝光的彩色RAW图像和正常曝光的彩色RAW图像进行融合之后,将融合获得的图像进行预览送显,可以减小拍摄获得的图像与预览送显的图像之间的差异,提高用户体验。In addition, during the preview process, after determining that the current shooting scene is a non-high dynamic scene, the color RAW images collected by the terminal device through the color camera include short-time exposure color RAW images and normal exposure color RAW images, and the above short-time After the exposed color RAW image and the normally exposed color RAW image are fused, the fused image is previewed and displayed, which can reduce the difference between the image obtained by shooting and the image previewed and displayed, and improve user experience.

可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。It can be understood that some or all of the steps or operations in the foregoing embodiments are only examples, and other operations or modifications of various operations may also be performed in the embodiment of the present application. In addition, various steps may be performed in different orders presented in the above embodiments, and it may not be necessary to perform all operations in the above embodiments.

可以理解的是,终端设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本申请所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to realize the above functions, the terminal device includes hardware and/or software modules corresponding to each function. Combining the algorithm steps of each example described in the embodiments disclosed in the application, the application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions in combination with the embodiments for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

本实施例可以根据上述方法实施例对终端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the functional modules of the terminal device may be divided according to the foregoing method embodiments. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. The above integrated modules may be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and is only a logical function division, and there may be other division methods in actual implementation.

图6为本申请另一个实施例提供的终端设备的结构示意图,在采用对应各个功能划分各个功能模块的情况下,图6示出了上述实施例中涉及的终端设备600的一种可能的组成示意图,如图6所示,该终端设备600可以包括:接收单元601、处理单元602和发送单元603;Fig. 6 is a schematic structural diagram of a terminal device provided by another embodiment of the present application. In the case of dividing each functional module corresponding to each function, Fig. 6 shows a possible composition of the terminal device 600 involved in the above embodiment Schematic diagram, as shown in FIG. 6, the terminal device 600 may include: a receiving unit 601, a processing unit 602, and a sending unit 603;

其中,处理单元602可以用于支持终端设备600实现本申请图2(a)~图5所示实施例所描述的技术方案。Wherein, the processing unit 602 may be used to support the terminal device 600 to implement the technical solutions described in the embodiments shown in FIG. 2(a) to FIG. 5 of this application.

需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the above method embodiments can be referred to the function description of the corresponding function module, and will not be repeated here.

本实施例提供的终端设备600,用于执行上述终端的图像处理方法,因此可以达到与上述方法相同的效果。The terminal device 600 provided in this embodiment is used to execute the above terminal image processing method, so the same effect as the above method can be achieved.

应当理解的是,终端设备600可以对应于图1所示的终端设备100。其中,接收单元601和发送单元603的功能可以由图1所示的终端设备100中处理器110、天线1和移动通信模块60,和/或,由处理器110、天线2和无线通信模块160实现;处理单元602的功能可以由图1所示的终端设备100中的处理器110实现。It should be understood that the terminal device 600 may correspond to the terminal device 100 shown in FIG. 1 . Wherein, the functions of the receiving unit 601 and the sending unit 603 may be implemented by the processor 110, the antenna 1 and the mobile communication module 60 in the terminal device 100 shown in FIG. Implementation; the function of the processing unit 602 may be implemented by the processor 110 in the terminal device 100 shown in FIG. 1 .

在采用集成的单元的情况下,终端设备600可以包括处理模块、存储模块和通信模块。In the case of using an integrated unit, the terminal device 600 may include a processing module, a storage module and a communication module.

其中,处理模块可以用于对终端设备600的动作进行控制管理,例如,可以用于支持终端设备600执行上述接收单元601、处理单元602和发送单元603执行的步骤。存储模块可以用于支持终端设备600存储程序代码和数据等。通信模块,可以用于支持终端设备600与其他设备的通信。Wherein, the processing module may be used to control and manage the actions of the terminal device 600 , for example, may be used to support the terminal device 600 to execute the steps performed by the receiving unit 601 , the processing unit 602 and the sending unit 603 . The storage module can be used to support the terminal device 600 to store program codes and data. The communication module can be used to support the communication between the terminal device 600 and other devices.

其中,处理模块可以是处理器或控制器,其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框、模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片和/或Wi-Fi芯片等与其他电子设备交互的设备。Wherein, the processing module may be a processor or a controller, which may realize or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (digital signal processing, DSP) and a microprocessor, and the like. The storage module may be a memory. Specifically, the communication module may be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and/or a Wi-Fi chip.

在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的终端设备600可以为具有图1所示结构的设备。In an embodiment, when the processing module is a processor and the storage module is a memory, the terminal device 600 involved in this embodiment may be a device having the structure shown in FIG. 1 .

本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请图2(a)~图5所示实施例提供的方法。The embodiment of the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when it is run on a computer, the computer executes the implementation shown in Fig. 2(a) to Fig. 5 of the present application. The method provided by the example.

本申请实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请图2(a)~图5所示实施例提供的方法。The embodiment of the present application also provides a computer program product, the computer program product includes a computer program, and when it is run on a computer, the computer executes the method provided by the embodiment shown in Fig. 2(a) to Fig. 5 of the present application.

本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single, or Can be multiple.

本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that each unit and algorithm steps described in the embodiments disclosed herein can be realized by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In several embodiments provided in this application, if any function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other various media that can store program codes. .

以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The foregoing is only a specific implementation of the present application. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should be covered by the protection scope of the present application. The protection scope of the present application shall be based on the protection scope of the claims.

Claims (20)

1.一种终端的图像处理方法,其特征在于,所述终端包括黑白摄像头和彩色摄像头,所述方法包括:1. An image processing method for a terminal, wherein the terminal includes a black and white camera and a color camera, and the method comprises: 在所述终端的拍照功能运行之后,预览过程中,通过所述彩色摄像头采集彩色RAW图像,通过所述黑白摄像头采集黑白RAW图像;After the camera function of the terminal runs, during the preview process, the color RAW image is collected by the color camera, and the black and white RAW image is collected by the black and white camera; 获取拍摄指令之后,响应于所述拍摄指令获取预览过程中采集的彩色RAW图像,对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像;After obtaining the shooting instruction, obtain the color RAW image collected in the preview process in response to the shooting instruction, and perform RAW domain processing on the color RAW image collected in the preview process to obtain a color YUV image; 通过第二拜耳域处理算法链路对预览过程中采集的黑白RAW图像进行处理,获得黑白YUV图像;Process the black-and-white RAW image collected in the preview process through the second Bayer domain processing algorithm link to obtain a black-and-white YUV image; 将所述彩色YUV图像和所述黑白YUV图像进行融合,获得目标彩色图像。The color YUV image and the black-and-white YUV image are fused to obtain a target color image. 2.根据权利要求1所述的方法,其特征在于,所述响应于所述拍摄指令获取预览过程中采集的彩色RAW图像包括:2. The method according to claim 1, wherein the acquisition of the color RAW image captured in the preview process in response to the shooting instruction comprises: 响应于所述拍摄指令,从缓存中获取预览过程中采集的彩色RAW图像。In response to the shooting instruction, the color RAW image captured during the preview process is acquired from the cache. 3.根据权利要求1所述的方法,其特征在于,所述对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像之前,还包括:3. The method according to claim 1, characterized in that, before performing RAW domain processing on the color RAW image collected in the preview process, before obtaining the color YUV image, it also includes: 通过第一拜耳域处理算法链路对预览过程中采集的彩色RAW图像进行线性化和坏点校正处理。The color RAW image collected in the preview process is linearized and dead point corrected through the first Bayer domain processing algorithm link. 4.根据权利要求1所述的方法,其特征在于,所述获取拍摄指令之前,还包括:4. The method according to claim 1, further comprising: 根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景。According to the color RAW images collected during the preview process, it is determined that the current shooting scene is a non-high dynamic scene. 5.根据权利要求1所述的方法,其特征在于,所述预览过程中采集的彩色RAW图像包括至少两帧彩色RAW图像,所述对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像包括:5. The method according to claim 1, wherein the color RAW images collected during the preview process comprise at least two frames of color RAW images, and the color RAW images collected during the preview process are processed in the RAW domain to obtain Color YUV images include: 对所述至少两帧彩色RAW图像进行预处理;Preprocessing the at least two frames of color RAW images; 对预处理后的至少两帧彩色RAW图像进行降噪处理,以将至少两帧彩色RAW图像融合成一帧彩色RAW图像;Performing noise reduction processing on at least two frames of color RAW images after preprocessing, so as to fuse at least two frames of color RAW images into one frame of color RAW images; 将融合获得的彩色RAW图像转换成彩色RGB图像;Convert the color RAW image obtained by fusion into a color RGB image; 调整所述彩色RGB图像的颜色和亮度;adjust the color and brightness of the color RGB image; 将调整颜色和亮度后的彩色RGB图像转换为彩色YUV图像。Convert a color RGB image with adjusted color and brightness to a color YUV image. 6.根据权利要求5所述的方法,其特征在于,所述对所述至少两帧彩色RAW图像进行预处理包括:6. The method according to claim 5, wherein said preprocessing the at least two frames of color RAW images comprises: 将所述至少两帧彩色RAW图像的尺寸对齐;aligning the dimensions of the at least two frames of color RAW images; 将所述至少两帧彩色RAW图像中每两帧图像中的像素进行映射,获得像素之间的对应关系;Mapping pixels in every two frames of images in the at least two frames of color RAW images to obtain correspondence between pixels; 对所述对应关系进行错误检测,对发生错误的对应关系进行校正。An error detection is performed on the corresponding relationship, and an erroneous corresponding relationship is corrected. 7.根据权利要求1所述的方法,其特征在于,所述将所述彩色YUV图像和所述黑白YUV图像进行融合,获得目标彩色图像包括:7. The method according to claim 1, wherein said merging said color YUV image and said black-and-white YUV image to obtain a target color image comprises: 将所述彩色YUV图像和所述黑白YUV图像的尺寸对齐;Aligning the size of the color YUV image and the black and white YUV image; 从对齐尺寸后的彩色YUV图像和对齐尺寸后的黑白YUV图像中,获取彩色YUV图像中需要融合的区域和黑白YUV图像中需要融合的区域;From the color YUV image after the size alignment and the black-and-white YUV image after the size alignment, obtain the region that needs to be fused in the color YUV image and the region that needs to be fused in the black-and-white YUV image; 将所述彩色YUV图像需要融合的区域中的像素与所述黑白YUV图像需要融合的区域中的像素进行映射,获得像素之间的对应关系;Mapping the pixels in the region where the color YUV image needs to be fused with the pixels in the region where the black and white YUV image needs to be fused, to obtain the correspondence between the pixels; 对所述对应关系进行错误检测,对发生错误的对应关系进行校正;performing error detection on the corresponding relationship, and correcting the wrong corresponding relationship; 将所述彩色YUV图像需要融合的区域和所述黑白YUV图像需要融合的区域中的清晰像素,融合到对应的模糊像素上。The clear pixels in the area to be fused of the color YUV image and the area to be fused of the black and white YUV image are fused to corresponding blurred pixels. 8.根据权利要求4所述的方法,其特征在于,预览过程中,确定当前的拍摄场景为非高动态场景之后,终端设备通过所述彩色摄像头采集的彩色RAW图像中包括短时曝光的彩色RAW图像和正常曝光的彩色RAW图像;8. The method according to claim 4, wherein, during the preview process, after determining that the current shooting scene is a non-high dynamic scene, the color RAW image captured by the terminal device through the color camera includes short-time exposure color RAW images and normally exposed color RAW images; 所述方法还包括:The method also includes: 采用交叠曝光高动态技术将所述短时曝光的彩色RAW图像和所述正常曝光的彩色RAW图像进行融合;Fusing the short-time exposed color RAW image and the normally exposed color RAW image by using overlapping exposure high dynamic technology; 在所述预览过程中,显示融合获得的彩色图像。During the preview process, the fused color image is displayed. 9.根据权利要求8所述的方法,其特征在于,所述预览过程中,通过所述彩色摄像头采集彩色RAW图像之后,还包括:9. The method according to claim 8, wherein, in the preview process, after the color RAW image is collected by the color camera, further comprising: 缓存所述正常曝光的彩色RAW图像。Cache the normally exposed color RAW image. 10.一种终端的图像处理装置,其特征在于,用于执行如权利要求1至9任一所述的方法。10. An image processing device for a terminal, which is used to execute the method according to any one of claims 1 to 9. 11.一种终端设备,其特征在于,包括黑白摄像头和彩色摄像头;一个或多个处理器;存储器;多个应用程序;以及一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中,所述一个或多个计算机程序包括指令,当所述指令被所述终端设备执行时,使得所述终端设备执行以下步骤:11. A terminal device, characterized in that it includes a black-and-white camera and a color camera; one or more processors; memory; multiple application programs; and one or more computer programs, wherein the one or more computer programs are programmed Stored in said memory, said one or more computer programs comprising instructions which, when executed by said terminal device, cause said terminal device to perform the following steps: 在所述终端的拍照功能运行之后,预览过程中,通过所述彩色摄像头采集彩色RAW图像,通过所述黑白摄像头采集黑白RAW图像;After the camera function of the terminal runs, during the preview process, the color RAW image is collected by the color camera, and the black and white RAW image is collected by the black and white camera; 获取拍摄指令之后,响应于所述拍摄指令获取预览过程中采集的彩色RAW图像,对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像;After obtaining the shooting instruction, obtain the color RAW image collected in the preview process in response to the shooting instruction, and perform RAW domain processing on the color RAW image collected in the preview process to obtain a color YUV image; 通过第二拜耳域处理算法链路对预览过程中采集的黑白RAW图像进行处理,获得黑白YUV图像;Process the black-and-white RAW image collected in the preview process through the second Bayer domain processing algorithm link to obtain a black-and-white YUV image; 将所述彩色YUV图像和所述黑白YUV图像进行融合,获得目标彩色图像。The color YUV image and the black-and-white YUV image are fused to obtain a target color image. 12.根据权利要求11所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述响应于所述拍摄指令获取预览过程中采集的彩色RAW图像的步骤包括:12. The terminal device according to claim 11, characterized in that, when the instruction is executed by the terminal device, the terminal device is made to execute the color RAW captured in the preview process in response to the shooting instruction The image steps include: 响应于所述拍摄指令,从缓存中获取预览过程中采集的彩色RAW图像。In response to the shooting instruction, the color RAW image captured during the preview process is acquired from the cache. 13.根据权利要求11所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像的步骤之前,还执行以下步骤:13. The terminal device according to claim 11, wherein when the instruction is executed by the terminal device, the terminal device is made to perform RAW domain processing on the color RAW image collected during the preview process to obtain a color Before the step of YUV image, also perform the following steps: 通过第一拜耳域处理算法链路对预览过程中采集的彩色RAW图像进行线性化和坏点校正处理。The color RAW image collected in the preview process is linearized and dead point corrected through the first Bayer domain processing algorithm link. 14.根据权利要求11所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述获取拍摄指令的步骤之前,还执行以下步骤:14. The terminal device according to claim 11, wherein when the instruction is executed by the terminal device, before the terminal device executes the step of obtaining the shooting instruction, the following steps are further performed: 根据预览过程中采集的彩色RAW图像,确定当前的拍摄场景为非高动态场景。According to the color RAW images collected during the preview process, it is determined that the current shooting scene is a non-high dynamic scene. 15.根据权利要求11所述的终端设备,其特征在于,所述预览过程中采集的彩色RAW图像包括至少两帧彩色RAW图像;当所述指令被所述终端设备执行时,使得所述终端设备执行所述对预览过程中采集的彩色RAW图像进行RAW域处理,获得彩色YUV图像的步骤包括:15. The terminal device according to claim 11, wherein the color RAW image collected during the preview process includes at least two frames of color RAW images; when the instruction is executed by the terminal device, the terminal The device performs the RAW domain processing on the color RAW image collected in the preview process, and the steps of obtaining the color YUV image include: 对所述至少两帧彩色RAW图像进行预处理;Preprocessing the at least two frames of color RAW images; 对预处理后的至少两帧彩色RAW图像进行降噪处理,以将至少两帧彩色RAW图像融合成一帧彩色RAW图像;Performing noise reduction processing on at least two frames of color RAW images after preprocessing, so as to fuse at least two frames of color RAW images into one frame of color RAW images; 将融合获得的彩色RAW图像转换成彩色RGB图像;Convert the color RAW image obtained by fusion into a color RGB image; 调整所述彩色RGB图像的颜色和亮度;adjust the color and brightness of the color RGB image; 将调整颜色和亮度后的彩色RGB图像转换为彩色YUV图像。Convert a color RGB image with adjusted color and brightness to a color YUV image. 16.根据权利要求15所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述对所述至少两帧彩色RAW图像进行预处理的步骤包括:16. The terminal device according to claim 15, wherein when the instruction is executed by the terminal device, the terminal device is made to perform the step of preprocessing the at least two frames of color RAW images include: 将所述至少两帧彩色RAW图像的尺寸对齐;aligning the dimensions of the at least two frames of color RAW images; 将所述至少两帧彩色RAW图像中每两帧图像中的像素进行映射,获得像素之间的对应关系;Mapping pixels in every two frames of images in the at least two frames of color RAW images to obtain correspondence between pixels; 对所述对应关系进行错误检测,对发生错误的对应关系进行校正。An error detection is performed on the corresponding relationship, and an erroneous corresponding relationship is corrected. 17.根据权利要求11所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备执行所述将所述彩色YUV图像和所述黑白YUV图像进行融合,获得目标彩色图像的步骤包括:17. The terminal device according to claim 11, wherein when the instruction is executed by the terminal device, the terminal device is made to perform the fusing of the color YUV image and the black and white YUV image , the steps to obtain the target color image include: 将所述彩色YUV图像和所述黑白YUV图像的尺寸对齐;Aligning the size of the color YUV image and the black and white YUV image; 从对齐尺寸后的彩色YUV图像和对齐尺寸后的黑白YUV图像中,获取彩色YUV图像中需要融合的区域和黑白YUV图像中需要融合的区域;From the color YUV image after the size alignment and the black-and-white YUV image after the size alignment, obtain the region that needs to be fused in the color YUV image and the region that needs to be fused in the black-and-white YUV image; 将所述彩色YUV图像需要融合的区域中的像素与所述黑白YUV图像需要融合的区域中的像素进行映射,获得像素之间的对应关系;Mapping the pixels in the region where the color YUV image needs to be fused with the pixels in the region where the black and white YUV image needs to be fused, to obtain the correspondence between the pixels; 对所述对应关系进行错误检测,对发生错误的对应关系进行校正;performing error detection on the corresponding relationship, and correcting the wrong corresponding relationship; 将所述彩色YUV图像需要融合的区域和所述黑白YUV图像需要融合的区域中的清晰像素,融合到对应的模糊像素上。The clear pixels in the area to be fused of the color YUV image and the area to be fused of the black and white YUV image are fused to corresponding blurred pixels. 18.根据权利要求14所述的终端设备,其特征在于,预览过程中,确定当前的拍摄场景为非高动态场景之后,终端设备通过所述彩色摄像头采集的彩色RAW图像中包括短时曝光的彩色RAW图像和正常曝光的彩色RAW图像;18. The terminal device according to claim 14, wherein, during the preview process, after determining that the current shooting scene is a non-high dynamic scene, the color RAW image collected by the terminal device through the color camera includes short-time exposure Color RAW images and normally exposed color RAW images; 当所述指令被所述终端设备执行时,使得所述终端设备还执行以下步骤:When the instruction is executed by the terminal device, the terminal device is made to further perform the following steps: 采用交叠曝光高动态技术将所述短时曝光的彩色RAW图像和所述正常曝光的彩色RAW图像进行融合;Fusing the short-time exposed color RAW image and the normally exposed color RAW image by using overlapping exposure high dynamic technology; 在所述预览过程中,显示融合获得的彩色图像。During the preview process, the fused color image is displayed. 19.根据权利要求18所述的终端设备,其特征在于,当所述指令被所述终端设备执行时,使得所述终端设备在预览过程中,执行通过所述彩色摄像头采集彩色RAW图像的步骤之后,还执行以下步骤:19. The terminal device according to claim 18, characterized in that, when the instruction is executed by the terminal device, the terminal device executes the step of capturing a color RAW image through the color camera during the preview process Afterwards, the following steps are also performed: 缓存所述正常曝光的彩色RAW图像。The normal exposure color RAW image is cached. 20.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-9任一项所述的方法。20. A computer-readable storage medium, characterized in that, a computer program is stored in the computer-readable storage medium, and when it is run on a computer, the computer executes the program according to any one of claims 1-9. method.
CN202110923173.0A 2021-08-12 2021-08-12 Terminal image processing method and device and terminal equipment Pending CN115706869A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110923173.0A CN115706869A (en) 2021-08-12 2021-08-12 Terminal image processing method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110923173.0A CN115706869A (en) 2021-08-12 2021-08-12 Terminal image processing method and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN115706869A true CN115706869A (en) 2023-02-17

Family

ID=85180809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110923173.0A Pending CN115706869A (en) 2021-08-12 2021-08-12 Terminal image processing method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN115706869A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116156334A (en) * 2023-02-28 2023-05-23 维沃移动通信有限公司 Shooting method, device, electronic device and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395898A (en) * 2017-08-24 2017-11-24 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN110198417A (en) * 2019-06-28 2019-09-03 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395898A (en) * 2017-08-24 2017-11-24 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN110198417A (en) * 2019-06-28 2019-09-03 Oppo广东移动通信有限公司 Image processing method, image processing device, storage medium and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116156334A (en) * 2023-02-28 2023-05-23 维沃移动通信有限公司 Shooting method, device, electronic device and readable storage medium

Similar Documents

Publication Publication Date Title
CN113810600B (en) Image processing method, device and terminal device for terminal
CN113810601B (en) Terminal image processing method, device and terminal equipment
US11703960B2 (en) Air mouse mode implementation method and related device
EP3813352B1 (en) Photographing method and electronic device
CN111770282B (en) Image processing method and device, computer readable medium and terminal equipment
US20230230343A1 (en) Image Processing Method, Electronic Device, Image Processing System, and Chip System
CN113542613B (en) Device and method for photographing
WO2022156555A1 (en) Screen brightness adjustment method, apparatus, and terminal device
CN114466238B (en) Frame demultiplexing method, electronic device and storage medium
CN115706869A (en) Terminal image processing method and device and terminal equipment
CN115412678B (en) Exposure processing method and device and electronic equipment
CN117593236A (en) Image display method, device and terminal equipment
CN117496391B (en) Image processing method and electronic equipment
CN113364067B (en) Charging accuracy calibration method and electronic device
CN116048769A (en) Memory recycling method and device and terminal equipment
CN115696067B (en) Terminal image processing method, terminal equipment and computer-readable storage medium
CN113674258A (en) Image processing method and related equipment
CN114520870B (en) A display method and terminal
WO2023020420A1 (en) Volume display method, electronic device, and storage medium
CN116582743B (en) Shooting method, electronic equipment and medium
CN117119314B (en) Image processing method and related electronic equipment
WO2025011069A1 (en) Image processing method for camera application and related device
CN119299877A (en) Image processing method, electronic device and readable storage medium
CN116708317A (en) Data packet MTU adjustment method and device and terminal equipment
CN118474529A (en) Focusing method of camera, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Country or region after: China

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Applicant after: Honor Terminal Co.,Ltd.

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Applicant before: Honor Device Co.,Ltd.

Country or region before: China