CN110213502B - Image processing method, device, storage medium and electronic device - Google Patents
Image processing method, device, storage medium and electronic device Download PDFInfo
- Publication number
- CN110213502B CN110213502B CN201910579967.2A CN201910579967A CN110213502B CN 110213502 B CN110213502 B CN 110213502B CN 201910579967 A CN201910579967 A CN 201910579967A CN 110213502 B CN110213502 B CN 110213502B
- Authority
- CN
- China
- Prior art keywords
- image
- yuv
- target
- exposure value
- exposure
- 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.)
- Expired - Fee Related
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/741—Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
Abstract
本申请公开了一种图像处理方法、装置、存储介质及电子设备,其中图像处理方法包括:基于第一曝光值,持续获取目标场景的第一YUV图像;按照曝光的先后顺序将第一YUV图像存储至第一图像缓存队列;当需要进行预览或拍照或录像时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像;对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像;根据第一合成图像,对目标场景进行预览或拍照或录像操作。本方案中,在需要进行预览或拍照或录像时,直接调取现成的第一YUV图像进行合成处理,可以缩短预览或拍照或录像的操作时间,从而使得本实施例提供的图像处理方案得到的图像能够适用于图像的预览、拍照和录像。
The present application discloses an image processing method, device, storage medium and electronic device, wherein the image processing method includes: continuously acquiring a first YUV image of a target scene based on a first exposure value; Stored in the first image cache queue; when previewing or photographing or video recording is required, the newly stored multi-frame first YUV images are obtained from the first image cache queue; the multi-frame first YUV images are synthesized to obtain high-quality images. The first composite image of the dynamic range; according to the first composite image, the target scene is previewed or photographed or recorded. In this solution, when previewing, photographing or video recording is required, the ready-made first YUV image is directly called for synthesis processing, which can shorten the operation time of previewing, photographing or recording, so that the image processing solution provided by this embodiment can obtain the Images can be used for image preview, photography and video recording.
Description
技术领域technical field
本申请属于图像技术领域,尤其涉及一种图像处理方法、装置、存储介质及电子设备。The present application belongs to the field of image technology, and in particular, relates to an image processing method, device, storage medium and electronic device.
背景技术Background technique
相比于普通的图像,高动态范围图像(High-Dynamic Range,简称HDR)可以提供更多的动态范围和图像细节。比如,电子设备可以获取在同一场景下拍摄的多帧图像,将该多帧图像进行高动态范围合成,得到一帧HDR图像。然而,相关的HDR技术处理得到的图像难以同时适用于预览、拍照和录像。Compared with ordinary images, High-Dynamic Range (HDR) images can provide more dynamic range and image details. For example, the electronic device may acquire multiple frames of images shot in the same scene, and perform high dynamic range synthesis on the multiple frames of images to obtain one frame of HDR image. However, the images processed by the related HDR technology are difficult to be used for preview, photography and video recording at the same time.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种图像处理方法、装置、存储介质及电子设备,其处理得到的图像能够适用于预览、拍照和录像。Embodiments of the present application provide an image processing method, device, storage medium, and electronic device, and the image obtained by the processing can be suitable for previewing, photographing, and video recording.
第一方面,本申请实施例提供一种图像处理方法,包括:In a first aspect, the embodiments of the present application provide an image processing method, including:
基于第一曝光值,持续获取目标场景的第一YUV图像;Based on the first exposure value, continuously obtain the first YUV image of the target scene;
按照曝光的先后顺序将所述第一YUV图像存储至第一图像缓存队列;storing the first YUV image in the first image buffer queue according to the sequence of exposure;
当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像;When previewing or photographing or video recording is required, obtain the newly stored multi-frame first YUV images from the first image cache queue;
对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像;performing synthesis processing on the multiple frames of the first YUV images to obtain a first synthesized image with a high dynamic range;
根据所述第一合成图像,对所述目标场景进行预览或拍照或录像操作。According to the first composite image, a preview or photographing or video recording operation is performed on the target scene.
第二方面,本申请实施例提供一种图像处理装置,包括:In a second aspect, an embodiment of the present application provides an image processing apparatus, including:
第一获取模块,用于基于第一曝光值,持续获取目标场景的第一YUV图像;a first acquisition module, configured to continuously acquire the first YUV image of the target scene based on the first exposure value;
存储模块,用于按照曝光的先后顺序将所述第一YUV图像存储至第一图像缓存队列;a storage module, configured to store the first YUV image in the first image buffer queue according to the sequence of exposure;
第二获取模块,用于当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像;The second acquisition module is used to acquire the newly stored multi-frame first YUV images from the first image cache queue when previewing or taking pictures or videos is required;
合成模块,用于对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像;a synthesis module, configured to perform synthesis processing on the multiple frames of the first YUV images to obtain a first synthesized image with a high dynamic range;
处理模块,用于根据所述第一合成图像,对所述目标场景进行预览或拍照或录像操作。The processing module is configured to perform a preview or photographing or video recording operation on the target scene according to the first composite image.
第三方面,本申请实施例提供的存储介质,其上存储有计算机程序,当所述计算机程序在计算机上运行时,使得所述计算机执行如本申请任一实施例提供的图像处理方法。In a third aspect, a storage medium provided by an embodiment of the present application stores a computer program thereon, and when the computer program runs on a computer, the computer causes the computer to execute the image processing method provided by any embodiment of the present application.
第四方面,本申请实施例提供的电子设备,包括处理器和存储器,所述存储器有计算机程序,所述处理器通过调用所述计算机程序,用于执行如本申请任一实施例提供的图像处理方法。In a fourth aspect, an electronic device provided by an embodiment of the present application includes a processor and a memory, the memory has a computer program, and the processor is configured to execute the image provided by any embodiment of the present application by invoking the computer program. Approach.
本实施例中,在需要预览或拍照或录像时,电子设备可以直接从该第一图像缓存队列中获取最新存储的多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,然后利用第一合成图像,进行图像的预览或拍照或录像操作,从而缩短预览或拍照或录像的操作时间,使得生成的第一合成图像能够适用于预览、拍照和录像。In this embodiment, when previewing or photographing or video recording is required, the electronic device can directly obtain the newly stored multi-frame first YUV images from the first image buffer queue and perform composite processing to obtain a first composite image with a high dynamic range. , and then use the first composite image to perform image preview or photographing or video recording operations, thereby shortening the operation time of previewing, photographing or video recording, so that the generated first composite image can be suitable for previewing, photographing and video recording.
附图说明Description of drawings
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其有益效果显而易见。The technical solutions of the present application and the beneficial effects thereof will be apparent through the detailed description of the specific embodiments of the present application in conjunction with the accompanying drawings.
图1是本申请实施例提供的图像处理方法的第一流程示意图。FIG. 1 is a first schematic flowchart of an image processing method provided by an embodiment of the present application.
图2是本申请实施例提供的图像处理方法的第一场景示意图。FIG. 2 is a schematic diagram of a first scenario of an image processing method provided by an embodiment of the present application.
图3是本申请实施例提供的图像处理方法的第二场景示意图。FIG. 3 is a schematic diagram of a second scenario of the image processing method provided by the embodiment of the present application.
图4是本申请实施例提供的图像处理方法的第三场景示意图。FIG. 4 is a schematic diagram of a third scenario of an image processing method provided by an embodiment of the present application.
图5是本申请实施例提供的图像处理方法的第二流程示意图。FIG. 5 is a second schematic flowchart of the image processing method provided by the embodiment of the present application.
图6是本申请实施例提供的图像处理方法的第四场景示意图。FIG. 6 is a schematic diagram of a fourth scenario of the image processing method provided by the embodiment of the present application.
图7是本申请实施例提供的图像处理方法的合成处理示意图。FIG. 7 is a schematic diagram of a synthesis process of an image processing method provided by an embodiment of the present application.
图8是本申请实施例提供的图像处理方法的第三流程示意图。FIG. 8 is a third schematic flowchart of the image processing method provided by the embodiment of the present application.
图9是本申请实施例提供的图像处理方法的第四流程示意图。FIG. 9 is a fourth schematic flowchart of the image processing method provided by the embodiment of the present application.
图10是本申请实施例提供的图像处理方法的第五流程示意图。FIG. 10 is a fifth schematic flowchart of the image processing method provided by the embodiment of the present application.
图11是本申请实施例提供的图像处理装置的第一结构示意图。FIG. 11 is a schematic diagram of a first structure of an image processing apparatus provided by an embodiment of the present application.
图12是本申请实施例提供的图像处理装置的第二结构示意图。FIG. 12 is a schematic diagram of a second structure of an image processing apparatus provided by an embodiment of the present application.
图13是本申请实施例提供的图像处理装置的第三结构示意图。FIG. 13 is a schematic diagram of a third structure of an image processing apparatus provided by an embodiment of the present application.
图14是本申请实施例提供的电子设备的第一结构示意图。FIG. 14 is a schematic diagram of a first structure of an electronic device provided by an embodiment of the present application.
图15是本申请实施例提供的图像处理电路的结构示意图。FIG. 15 is a schematic structural diagram of an image processing circuit provided by an embodiment of the present application.
图16是本申请实施例提供的电子设备的第二结构示意图。FIG. 16 is a schematic diagram of a second structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。本文所使用的术语「模块」可看做为在该运算系统上执行的软件对象。本文不同模块、引擎及服务可看做为在该运算系统上的实施对象。The following description is based on illustrated specific embodiments of the present application and should not be construed as limiting other specific embodiments of the present application not detailed herein. As used herein, the term "module" can be thought of as a software object that executes on the computing system. The different modules, engines and services in this paper can be regarded as implementation objects on the computing system.
本申请实施例提供一种图像处理方法,该图像处理方法的执行主体可以是本申请实施例提供的图像处理装置,或者集成了该图像处理装置的电子设备。其中,电子设备包括摄像头、内存,该电子设备可以是智能手机、平板电脑、掌上电脑(PDA,Personal DigitalAssistant)等。The embodiment of the present application provides an image processing method, and the execution body of the image processing method may be the image processing apparatus provided by the embodiment of the present application, or an electronic device integrated with the image processing apparatus. Wherein, the electronic device includes a camera and a memory, and the electronic device may be a smart phone, a tablet computer, a PDA (Personal Digital Assistant), and the like.
以下进行具体分析说明。The specific analysis is described below.
本申请实施例提供一种图像处理方法,应用于电子设备,该电子设备包括摄像组件,请参阅图1,图1为本申请实施例提供的图像处理方法的第一流程示意图,该图像处理方法可以包括以下步骤:An embodiment of the present application provides an image processing method, which is applied to an electronic device. The electronic device includes a camera assembly. Please refer to FIG. 1 . FIG. 1 is a first schematic flowchart of the image processing method provided by the embodiment of the present application. The image processing method The following steps can be included:
101、基于第一曝光值,持续获取目标场景的第一YUV图像。101. Based on the first exposure value, continuously acquire a first YUV image of the target scene.
其中,曝光值,又称EV值,是反映进光量多少的一个计量值。一般场景太过暗沉,可通过增加曝光值以进行正补偿;场景太过明亮,可通过减小曝光值以进行负补偿。该曝光值同感光度、光圈、以及曝光时长相关联,电子设备可通过改变感光度、光圈、以及曝光时长中的至少一个参数来改变曝光值。无论感光度、光圈、以及曝光时长如何组合,只要EV值相同,最终都可以得到具有相同曝光量的图像。例如,在感光度不变的情况下,则曝光值是通过不同曝光时长和光圈的组合,此时如果想要减小EV值,可以采取减少曝光时长或者减小光圈系数的手段;此时如果想要增大EV值,可以采取增大曝光时长或者增大光圈系数的手段。Among them, the exposure value, also known as the EV value, is a measurement value that reflects the amount of incoming light. Generally, if the scene is too dark, you can make positive compensation by increasing the exposure value; if the scene is too bright, you can make negative compensation by reducing the exposure value. The exposure value is associated with the sensitivity, aperture, and exposure duration, and the electronic device can change the exposure value by changing at least one parameter of the sensitivity, aperture, and exposure duration. Regardless of the combination of sensitivity, aperture, and exposure duration, as long as the EV value is the same, an image with the same exposure can be obtained in the end. For example, when the sensitivity remains unchanged, the exposure value is obtained by combining different exposure durations and apertures. At this time, if you want to reduce the EV value, you can reduce the exposure duration or reduce the aperture coefficient. At this time, if If you want to increase the EV value, you can take measures to increase the exposure time or increase the aperture factor.
目标场景,是指用户通过摄像组件所要拍摄的场景,该目标场景可以在通过摄像组件获取的图像上呈现。此外,本申请实施例中对该目标场景的内容不作具体限定,如该目标场景可以是人物场景,该目标场景也可以是夜空场景,等等。The target scene refers to a scene to be photographed by the user through the camera assembly, and the target scene can be presented on the image obtained through the camera assembly. In addition, the content of the target scene is not specifically limited in the embodiments of the present application, for example, the target scene may be a character scene, the target scene may also be a night sky scene, and so on.
YUV图像,是指图像格式为YUV格式的图像。YUV格式,是一种常见的彩色图像记录格式,通常以Y:UV的格式呈现,其中Y代表图像的亮度,用Cr表示;UV代表图像的彩度,用Cb表示。Y的值越高,代表图像的亮度会更大;UV的值越高,代表该图像的颜色会更饱和。YUV images refer to images whose image format is YUV format. YUV format is a common color image recording format, usually presented in Y:UV format, where Y represents the brightness of the image, represented by Cr; UV represents the chroma of the image, represented by Cb. The higher the value of Y, the brighter the image; the higher the value of UV, the more saturated the color of the image.
本申请实施例中,电子设备在一定时间段内,曝光值始终保持在某个值不变,且在该时间段内通过摄像组件持续不断地对目标场景进行曝光,得到曝光量相同或相近的第一YUV图像。需要说明的是,因为要利用第一YUV图像进行高动态范围合成处理,所以本申请实施例中基于该第一曝光值得到的第一YUV图像至少包括两帧。In the embodiment of the present application, the electronic device keeps the exposure value constant at a certain value during a certain period of time, and continuously exposes the target scene through the camera component during the period of time, and obtains the same or similar exposure amount. The first YUV image. It should be noted that, because the first YUV image is to be used for high dynamic range synthesis processing, the first YUV image obtained based on the first exposure value in this embodiment of the present application includes at least two frames.
在一些实施例中,基于第一曝光值,持续获取目标场景的第一YUV图像,该第一YUV图像都是亮度较低的短曝图像。In some embodiments, based on the first exposure value, a first YUV image of the target scene is continuously acquired, and the first YUV image is a short-exposure image with low brightness.
102、按照曝光的先后顺序将第一YUV图像存储至第一图像缓存队列。102. Store the first YUV image in the first image buffer queue according to the exposure sequence.
本申请实施例中,按照曝光的先后顺序将第一YUV图像存储至第一图像缓存队列,具体可以指:每基于第一曝光值,获取到目标场景的一帧第一YUV图像,立即将该帧第一YUV图像存储至第一图像缓存队列。例如,如图2所示,在Ti时刻生成一帧第一YUV图像,则在Ti时刻立即将该帧第一YUV图像存储至第一图像缓存队列。In the embodiment of the present application, the first YUV image is stored in the first image buffer queue according to the sequence of exposure, which may specifically refer to: every time a frame of the first YUV image of the target scene is obtained based on the first exposure value, immediately The first YUV image of the frame is stored in the first image buffer queue. For example, as shown in FIG. 2 , if a frame of the first YUV image is generated at time T i , the frame of the first YUV image is immediately stored in the first image buffer queue at time T i .
其中,电子设备上装配有用于保存图像的专用内存,该专用内存可根据一定的策略划分缓存队列,以对图像进行分类保存。本申请的第一图像缓存队列,可以是定长队列,也可以是不定长队列,本实施例对此不做具体限定。The electronic device is equipped with a dedicated memory for storing images, and the dedicated memory can divide the cache queue according to a certain strategy to classify and store the images. The first image cache queue of the present application may be a queue of fixed length or a queue of indefinite length, which is not specifically limited in this embodiment.
因为在该电子设备上装配有用于保存图像的专用内存,所以该电子设备在需要预览或拍照或录像之前,能够持续对目标场景进行曝光,得到该目标场景的多帧第一YUV图像,并按照曝光的先后顺序将该多帧第一YUV图像存储在第一图像缓存队列,在需要预览或拍照或录像的时候,直接调用最新存储在该第一图像缓存队列的第一YUV图像即可,从而缩短预览或拍照或录像的操作时间,减缓画面延迟,以保证图像预览和录像的帧率。Because the electronic device is equipped with a dedicated memory for saving images, the electronic device can continuously expose the target scene before previewing or taking pictures or recordings, and obtain multiple frames of the first YUV image of the target scene. The sequence of exposure is to store the multiple frames of the first YUV images in the first image cache queue. When previewing or taking pictures or recordings is required, the first YUV image newly stored in the first image cache queue can be directly called, thereby Shorten the operation time of previewing or taking photos or videos, and slow down the screen delay to ensure the frame rate of image preview and recording.
103、当需要进行预览或拍照或录像时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像。103. When previewing, photographing or video recording is required, acquire the newly stored multi-frame first YUV images from the first image buffer queue.
104、对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像。104. Perform synthesis processing on the multiple frames of the first YUV images to obtain a first synthesized image with a high dynamic range.
105、根据第一合成图像,对目标场景进行预览或拍照或录像操作。105. Perform a preview or photographing or video recording operation on the target scene according to the first composite image.
当需要进行预览时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,根据第一合成图像,对目标场景进行预览操作。其中,多帧是指至少包括两帧,具体帧数不作具体限定,比如多帧可以是三帧、六帧、九帧等。When a preview needs to be performed, the newly stored multi-frame first YUV images are obtained from the first image buffer queue for synthesis processing to obtain a first synthesized image with a high dynamic range, and a preview operation is performed on the target scene according to the first synthesized image. . Wherein, the multi-frame refers to at least two frames, and the specific number of frames is not specifically limited, for example, the multi-frame may be three frames, six frames, nine frames, and the like.
例如,如图2所示,当Ti时刻需要进行预览时,从第一图像缓存队列中获取最新存储的3帧第一YUV图像,即Ti时刻存储的图像、Ti-1时刻存储的图像、以及Ti-2时刻存储的图像,对该3帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,根据该第一合成图像,对目标场景进行预览。其中,i为大于0的整数。For example, as shown in Fig. 2, when a preview needs to be performed at time T i , three newly stored first YUV images are obtained from the first image cache queue, that is, the image stored at time T i and the image stored at time T i-1 . The image and the image stored at time T i-2 are combined with the three frames of the first YUV images to obtain a first combined image with a high dynamic range, and a preview of the target scene is performed according to the first combined image. where i is an integer greater than 0.
在一些实施例中,对于具备实时预览功能的电子设备,如终端等电子设备,则需要不间断地进行预览,即故自电子设备第一次“从第一图像缓存队列中获取最新存储的多帧第一YUV图像,对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,根据第一合成图像,对目标场景进行预览操作”后,每当该第一图像缓存队列新存储一帧图像,电子设备就执行一次“从第一图像缓存队列中获取最新存储的多帧第一YUV图像,对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,根据第一合成图像,对目标场景进行预览操作”。In some embodiments, for an electronic device with a real-time preview function, such as an electronic device such as a terminal, the preview needs to be performed without interruption, that is, for the first time, the electronic device "obtains the latest stored image data from the first image cache queue for the first time." Frame the first YUV image, perform composite processing on multiple frames of the first YUV image to obtain a first composite image with high dynamic range, and perform a preview operation on the target scene according to the first composite image. A new frame of image is stored in the queue, and the electronic device executes once "obtain the newly stored multi-frame first YUV image from the first image cache queue, and perform composite processing on the multi-frame first YUV image to obtain the first YUV image with high dynamic range. Synthesize the image, and perform a preview operation on the target scene according to the first synthetic image.”
当需要进行拍照时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像,对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,根据第一合成图像,对目标场景进行拍照操作。When a photo needs to be taken, the newly stored multi-frame first YUV images are obtained from the first image buffer queue, and the multi-frame first YUV images are synthesized to obtain a first composite image with a high dynamic range. image to take pictures of the target scene.
例如,如图3所示,在Ti-1时刻后、在Ti时刻前电子设备接收到拍照指令,此时需要进行拍照,从第一图像缓存队列中获取最新存储的3帧第一YUV图像,即Ti-1时刻存储的图像、Ti-2时刻存储的图像、以及Ti-3时刻存储的图像,对该3帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,输出该第一合成图像以响应该拍照指令。其中,i为大于0的整数。For example, as shown in FIG. 3 , after the time T i-1 and before the time T i , the electronic device receives the photographing instruction, and at this time, it is necessary to take a picture, and obtain the newly stored 3 frames of the first YUV from the first image cache queue. Images, that is, the image stored at time T i-1 , the image stored at time T i-2 , and the image stored at time T i-3 , the three frames of the first YUV images are synthesized to obtain the first YUV image with high dynamic range. a composite image, outputting the first composite image in response to the photographing instruction. where i is an integer greater than 0.
当需要进行录像时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像,对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,根据第一合成图像,对目标场景进行录像操作。When video recording is required, the newly stored multi-frame first YUV images are obtained from the first image buffer queue, and the multi-frame first YUV images are synthesized to obtain a first composite image with high dynamic range. image to record the target scene.
例如,如图4所示,在T3时刻后、在T4时刻前电子设备接收到录像开始指令,在T7时刻后、在T8时刻前电子设备接收到录像结束指令,自接收到录像开始指令的时刻至接收到录像结束指令的时刻,需要不断获取图片进行合成。即i依次为4、5、6、7、或8,在Ti时刻需要进行录像时,从第一图像缓存队列中获取最新存储的3帧第一YUV图像,即Ti-3时刻存储的图像、Ti-2时刻存储的图像、以及Ti-1时刻存储的图像,对该3帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,对该第一合成图像进行视频编码处理,得到目标场景对应的视频。For example, as shown in FIG. 4 , after time T3 and before time T4 , the electronic device receives the recording start command, after time T7 and before time T8 , the electronic device receives the recording end command, and since receiving the video recording From the moment of the start instruction to the moment of receiving the recording end instruction, it is necessary to continuously acquire pictures for synthesis. That is, i is 4, 5, 6, 7, or 8 in sequence, and when video recording is required at time T i , the newly stored 3 frames of the first YUV images are obtained from the first image buffer queue, that is, the first YUV images stored at time T i-3 are obtained. The image, the image stored at time T i-2 , and the image stored at time T i-1 are combined with the three frames of the first YUV images to obtain a first combined image with a high dynamic range, and the first combined image Perform video encoding processing to obtain a video corresponding to the target scene.
其中,具有高动态范围的第一合成图像,相比于普通的图像,高动态范围图像可以提供更多的动态范围和图像细节。图像的动态范围是指图像的明暗差别。需要说明的是,得到的第一合成图像也是YUV格式的图像。Among them, the first composite image with high dynamic range can provide more dynamic range and image details than ordinary images. The dynamic range of an image refers to the difference between light and dark in the image. It should be noted that the obtained first composite image is also an image in YUV format.
在一些实施例中,电子设备可以采用多帧短曝的合成方式,对多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像。其中,多帧短曝的合成方式具体指:将N帧短曝图像进行合成处理得到一帧HDR图像,该帧HDR图像各位置的像素约等于每帧短曝图像对应各位置像素的N倍。比如,电子设备A拍摄的3帧短曝图像包括天空和建筑物,每帧短曝图像中天空像素值为10,建筑物像素值为3,将3帧短曝图像进行合成得到HDR图像,HDR图像中天空像素值约为10+10+10=30,建筑物像素值约为3+3+3=9,从而该HDR图像天空和建筑物间明暗差别更大,即动态范围更高。In some embodiments, the electronic device may use a multi-frame short-exposure synthesis method to perform synthesis processing on multiple frames of the first YUV image to obtain a first synthesized image with a high dynamic range. The method of synthesizing multiple frames of short exposure specifically refers to: synthesizing N frames of short exposure images to obtain a frame of HDR image, and the pixels of each position of the frame of HDR image are approximately equal to N times of pixels corresponding to each position of each frame of short exposure image. For example, 3 frames of short-exposure images captured by electronic device A include the sky and buildings. In each frame of short-exposure images, the sky pixel value is 10, and the building pixel value is 3. The 3 frames of short-exposure images are synthesized to obtain an HDR image. In the image, the sky pixel value is about 10+10+10=30, and the building pixel value is about 3+3+3=9, so the difference between the sky and the building in the HDR image is larger, that is, the dynamic range is higher.
具体实施时,本申请不受所描述的各个步骤的执行顺序的限制,在不产生冲突的情况下,某些步骤还可以采用其它顺序进行或者同时进行。例如,按照第一曝光值进行曝光并存储到第一图像缓存队列中和从缓存队列中获取多帧图像进行合成并显示可以是同步进行的。。During specific implementation, the present application is not limited by the execution order of the described steps, and certain steps may also be performed in other sequences or simultaneously under the condition of no conflict. For example, exposure according to the first exposure value and storage in the first image buffer queue and acquisition of multiple frames of images from the buffer queue for synthesis and display may be performed synchronously. .
由上述可知,本实施例提供的图像处理方法,由于第一图像缓存队列的存在,使得电子设备可以在需要进行预览或拍照或录像时,直接从该第一图像缓存队列中获取最新存储的多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,然后利用第一合成图像,进行图像的预览或拍照或录像操作,从而不用等待多帧第一YUV图像生成,可以缩短预览或拍照或录像的操作时间,减缓画面延迟,以保证图像预览和录像的帧率。因此,本实施例提供的图像处理方案得到的图像能够适用于预览、拍照和录像。It can be seen from the above that, in the image processing method provided in this embodiment, due to the existence of the first image cache queue, the electronic device can directly obtain the latest stored images from the first image cache queue when previewing, taking pictures or recordings is required. The first YUV image of the frame is synthesized to obtain a first synthesized image with a high dynamic range, and then the first synthesized image is used to perform image preview or photographing or video recording operations, so that there is no need to wait for the generation of multiple frames of the first YUV image, which can shorten the The operation time of previewing or taking pictures or recordings, slowing down the screen delay to ensure the frame rate of image previewing and recording. Therefore, the image obtained by the image processing solution provided in this embodiment can be suitable for previewing, photographing and video recording.
请参阅图5,图5为本申请实施例提供的图像处理方法的第二流程示意图,下面将进行详细说明。Please refer to FIG. 5 , which is a second schematic flowchart of the image processing method provided by the embodiment of the present application, which will be described in detail below.
在一些实施例中,在执行101之前,还包括:In some embodiments, before performing 101, it further includes:
通过图像传感器获取目标场景的一帧第二RAW图像;Obtaining a frame of a second RAW image of the target scene through the image sensor;
获取第二RAW图像的光比;Obtain the light ratio of the second RAW image;
根据光比确定基准曝光值;Determine the reference exposure value according to the light ratio;
根据基准曝光值,调整曝光时长、光圈、和感光度中的至少一个参数,确定第一曝光值。According to the reference exposure value, at least one parameter of exposure duration, aperture, and sensitivity is adjusted to determine the first exposure value.
其中,光比,是目标场景亮部与暗部的受光比例。曝光时长,是光线照射到底片或图像传感器的时间,通过调节曝光时长可以调整图像传感器的进光量,曝光时长越长,进光量越多;曝光时长越短,进光量越少,即影响曝光值的其他参数不变时,曝光时长与曝光值成正比。光圈是摄像组件的重要元件,通过调节光圈可以调整图像传感器的进光量,光圈越大,进光量越多;光圈越小,进光量越少,即影响曝光值的其他参数不变时,光圈与曝光值成正比。感光度是衡量“底片”对光敏感程度的一个参数,通过调节感光度可以调整图像传感器的进光量,感光度越高,摄像组件的感光能力越强,进光量越多;感光度越低,摄像组件的感光能力越弱,进光量越少,即影响曝光值的其他参数不变时,感光度与曝光值成正比。Among them, the light ratio is the ratio of light reception between the bright part and the dark part of the target scene. The exposure time is the time that the light shines on the film or the image sensor. By adjusting the exposure time, the light input of the image sensor can be adjusted. The longer the exposure time, the more light input; the shorter the exposure time, the less light input, which affects the exposure value. When the other parameters of , the exposure time is proportional to the exposure value. The aperture is an important component of the camera assembly. The amount of light entering the image sensor can be adjusted by adjusting the aperture. The larger the aperture, the greater the amount of light entering; the smaller the aperture, the less the amount of light entering. Exposure value is proportional. Sensitivity is a parameter that measures the sensitivity of the "film" to light. By adjusting the sensitivity, the amount of light entering the image sensor can be adjusted. The weaker the photosensitive ability of the camera assembly, the less the amount of light entering, that is, when other parameters affecting the exposure value remain unchanged, the sensitivity is proportional to the exposure value.
基准曝光值,是指电子设备在当前时刻(根据光比确定基准曝光值的时刻)的曝光值设置参数:基准曝光时长、基准光圈、和基准感光度。通过图像传感器获取目标场景的一帧第二RAW图像具体是指:基于该基础曝光值,通过图像传感器获取目标场景的一帧第二RAW图像。因此,第二RAW图像的光比与基准曝光值成反比。The reference exposure value refers to the exposure value setting parameters of the electronic device at the current moment (the moment when the reference exposure value is determined according to the light ratio): reference exposure duration, reference aperture, and reference sensitivity. Acquiring one frame of the second RAW image of the target scene by using the image sensor specifically refers to: acquiring one frame of the second RAW image of the target scene by using the image sensor based on the basic exposure value. Therefore, the light ratio of the second RAW image is inversely proportional to the reference exposure value.
需要说明的是,第一曝光值小于基准曝光值。根据基准曝光值,调整曝光时长、光圈、和感光度中的至少一个参数,确定第一曝光值具体是指:通过减小曝光时长、光圈、和感光度中的至少一个参数,使电子设备的曝光值从基准曝光值降到第一曝光值(如从基准曝光值-1EV降到第一曝光值-3EV)。It should be noted that the first exposure value is smaller than the reference exposure value. Adjusting at least one parameter of exposure duration, aperture, and sensitivity according to the reference exposure value, and determining the first exposure value specifically refers to: reducing at least one parameter of exposure duration, aperture, and sensitivity to make the electronic device's The exposure value is decreased from the reference exposure value to the first exposure value (eg, from the reference exposure value -1EV to the first exposure value -3EV).
具体地,该获取第二RAW图像的光比,可以包括:通过测光表检测第二RAW图像,得到第二RAW图像的亮部数值、以及第二RAW图像的暗部数值;根据亮部数值和暗部数值计算第二RAW图像的光比。Specifically, the acquiring the light ratio of the second RAW image may include: detecting the second RAW image by a light meter, and obtaining the value of the bright part of the second RAW image and the value of the dark part of the second RAW image; according to the value of the bright part and The dark part value calculates the light ratio of the second RAW image.
例如,电子设备基于0EV,通过图像传感器获取目标场景的一帧第二RAW图像;获取该第二RAW图像的光比;根据该光比确定基准曝光值0EV(基准曝光值0EV具体设置参数:基准曝光时长、基准光圈、和基准感光度),根据该基准曝光值0EV(基准曝光值0EV具体设置参数:基准曝光时长、基准光圈、和基准感光度),执行如下操作中的至少一项:在该基准曝光时长的基础上减小曝光时长、在该基准光圈的基础上减小光圈、和在该基准感光度的基础上减小感光度,使电子设备的曝光值从基准曝光值0EV降到第一曝光值-2EV。For example, based on 0EV, the electronic device obtains a frame of a second RAW image of the target scene through an image sensor; obtains the light ratio of the second RAW image; exposure duration, reference aperture, and reference sensitivity), and according to the reference exposure value 0EV (the reference exposure value 0EV specifically sets parameters: reference exposure duration, reference aperture, and reference sensitivity), perform at least one of the following operations: On the basis of the reference exposure time, reduce the exposure time, reduce the aperture on the basis of the reference aperture, and reduce the sensitivity on the basis of the reference sensitivity, so that the exposure value of the electronic device is reduced from the reference exposure value 0EV to 0EV. The first exposure value -2EV.
在一些实施例中,101具体包括:根据第一曝光值,通过图像传感器持续获取目标场景的第一RAW图像;对第一RAW图像进行格式转换,得到第一YUV图像。In some embodiments, 101 specifically includes: continuously acquiring the first RAW image of the target scene through the image sensor according to the first exposure value; and performing format conversion on the first RAW image to obtain the first YUV image.
需要说明的是,电子设备的摄像组件包括透镜和图像传感器,其中透镜用于采集外部的光源信号提供给图像传感器,图像传感器感应来自于透镜的光源信号,将其转换为数字化的原始图像数据,即RAW图像数据。RAW图像,是未经处理、也未经压缩的格式,可以将其形象地称为“数字底片”。It should be noted that the camera component of the electronic device includes a lens and an image sensor. The lens is used to collect external light source signals and provide them to the image sensor. The image sensor senses the light source signal from the lens and converts it into digitized raw image data. That is, RAW image data. RAW images, which are unprocessed and uncompressed formats, can be aptly referred to as "digital negatives".
在一些实施例中,101具体包括:根据第一曝光值,通过图像传感器持续获取目标场景的第一RAW图像;对第一RAW图像进行预设处理,其中,预设处理包括坏点矫正、黑电平矫正、降噪、镜头亮度矫正、以及自动白平衡中的至少一种;对处理后的第一RAW图像进行格式转换,得到第一YUV图像。此时,经过该预设处理得到的第一YUV图像占用内存较多,因此需要适量增大该专用内存,以供该第一YUV图像进行存储。In some embodiments, step 101 specifically includes: continuously acquiring the first RAW image of the target scene through the image sensor according to the first exposure value; performing preset processing on the first RAW image, wherein the preset processing includes dead pixel correction, black at least one of level correction, noise reduction, lens brightness correction, and automatic white balance; and performing format conversion on the processed first RAW image to obtain a first YUV image. At this time, the first YUV image obtained through the preset processing occupies a lot of memory, so it is necessary to appropriately increase the dedicated memory for storing the first YUV image.
在一些实施例中,对目标场景进行预览操作之后,还包括:In some embodiments, after performing the preview operation on the target scene, the method further includes:
若接收到拍照指令,则根据第一合成图像响应拍照指令。If a photographing instruction is received, the photographing instruction is responded to according to the first composite image.
在一些实施例中,对目标场景进行预览操作之后,还包括:In some embodiments, after performing the preview operation on the target scene, the method further includes:
若当前处于录像模式,则对第一合成图像进行视频编码处理,得到目标场景对应的视频。If it is currently in the video recording mode, video coding processing is performed on the first composite image to obtain a video corresponding to the target scene.
如图6所示,对于具备实时预览功能的电子设备,如终端等电子设备,该电子设备从第一图像缓存队列中获取最新存储的3帧第一YUV图像,即Ti-1时刻存储的图像、Ti-2时刻存储的图像、以及Ti-3时刻存储的图像,对该3帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像,i=4、5、6、7、8……,即自该电子设备第一次执行103、104、以及105(根据第一合成图像,对目标场景进行预览操作)后,每当该第一图像缓存队列新存储一帧第一YUV图像,该电子设备就执行一次103、104、以及105(根据第一合成图像,对目标场景进行预览操作)。因此,在Ti-1时刻至Ti时候间的某一时刻接收到拍照指令时,此时不用重复对同样的多帧第一YUV图像:Ti-1时刻存储的图像、Ti-2时刻存储的图像、以及Ti-3时刻存储的图像进行合成处理,可以直接调用进行预览操作的最新第一合成图像去响应该拍照指令;当某一时刻接收到录像开始指令时。As shown in FIG. 6 , for an electronic device with a real-time preview function, such as an electronic device such as a terminal, the electronic device obtains the newly stored 3 frames of the first YUV image from the first image buffer queue, that is, the first YUV image stored at time T i-1 The image, the image stored at the time T i-2 , and the image stored at the time T i-3 , the three frames of the first YUV images are synthesized to obtain a first synthesized image with a high dynamic range, i=4, 5, 6, 7, 8..., that is, since the electronic device performs 103, 104, and 105 for the first time (previewing the target scene according to the first composite image), every time the first image buffer queue stores a new image When the first YUV image is framed, the electronic device executes 103, 104, and 105 once (previewing the target scene according to the first composite image). Therefore, when a photographing instruction is received at a certain time from time T i-1 to time T i , it is not necessary to repeat the same multi-frame first YUV images: the image stored at time T i-1 , the image stored at time T i-2 The image stored at time and the image stored at time T i-3 are synthesized, and the latest first synthesized image for preview operation can be directly called to respond to the photographing instruction; when a video recording start instruction is received at a certain time.
同理,在Ti-1时刻至Ti时候间的某一时刻接收到录像开始指令时,此时也不用重复对同样的多帧第一YUV图像:Ti-1时刻存储的图像、Ti-2时刻存储的图像、以及Ti-3时刻存储的图像进行合成处理,可以直接调用进行预览操作的最新第一合成图像作为视频的首帧,接下来每当该第一图像缓存队列新存储一帧图像,电子设备可以执行103(当需要进行录像时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像)、104、105(根据第一合成图像,对目标场景进行录像操作)来获取该视频首帧以外的其他帧,直至接收到录像的结束指令。In the same way, when a video recording start command is received from time T i-1 to time T i , there is no need to repeat the same multi-frame first YUV images: the image stored at time T i-1 , the image stored at time T i The image stored at time i-2 and the image stored at time T i-3 are synthesized, and the latest first synthesized image for preview operation can be directly called as the first frame of the video. Next, whenever the first image cache queue is updated To store one frame of image, the electronic device can perform 103 (when video recording is required, obtain the newly stored multiple frames of the first YUV image from the first image cache queue), 104, 105 (according to the first composite image, perform a Recording operation) to obtain other frames other than the first frame of the video, until the end command of recording is received.
在一些实施例中,可参阅图5,104可以包括:1041和1042:In some embodiments, referring to FIG. 5, 104 may include: 1041 and 1042:
1041、将第一YUV图像划分为多个目标区域,并确定目标区域的区域信息。1041. Divide the first YUV image into multiple target areas, and determine area information of the target areas.
1042、根据目标区域的区域信息,对多帧第一YUV图像进行合成,得到具有高动态范围的第一合成图像。1042. Combine multiple frames of the first YUV images according to the area information of the target area to obtain a first combined image with a high dynamic range.
其中,区域信息包括区域位置信息、区域像素均值、以及目标像素均值。每帧第一YUV图像的目标区域相同,且每个目标区域对应有一个或多个区域位置信息。通过该区域位置信息,电子设备可以在每帧第一YUV图像上确定对应的目标区域。具体地,区域位置信息可以为区域坐标信息,比如,以每帧第一YUV图像的中心为原点建立坐标系,得到该目标区域对应的区域坐标信息。从第一图像缓存队列获取的多帧第一YUV图像,每帧第一YUV图像的目标区域有各自的像素平均值,有可能相同,有可能不相同,对所有该像素平均值进行平均值计算,得到的值为该目标区域的区域像素均值。每个目标区域对应一个目标像素均值,目标像素均值是合成处理后得到的第一合成图片对应目标区域的预计要达到的像素平均值。The region information includes region location information, region pixel mean, and target pixel mean. The target area of the first YUV image in each frame is the same, and each target area corresponds to one or more area location information. Through the area location information, the electronic device can determine the corresponding target area on each frame of the first YUV image. Specifically, the area location information may be area coordinate information. For example, a coordinate system is established with the center of the first YUV image of each frame as the origin, and the area coordinate information corresponding to the target area is obtained. For the multiple frames of the first YUV image obtained from the first image cache queue, the target area of each frame of the first YUV image has its own pixel average value, which may be the same or different. Calculate the average value of all the pixel average values. , the obtained value is the regional pixel mean of the target area. Each target area corresponds to an average value of target pixels, and the average value of target pixels is an expected average value of pixels corresponding to the target area of the first synthesized image obtained after the synthesis process.
在一些实施例中,电子设备可以预先存储第一映射关系,第一映射关系为目标像素均值与目标对象之间的对应关系。具体地,对第一YUV图像进行图像识别,得到第一YUV图像的识别对象;根据识别对象,将第一YUV图像划分为多个目标区域,其中,每个目标区域包括一个识别对象;根据目标区域获取区域位置信息,计算目标区域的区域像素均值,并根据识别对象,从第一映射关系中查找对应目标区域的目标像素均值,得到目标区域的区域信息。In some embodiments, the electronic device may pre-store a first mapping relationship, where the first mapping relationship is a corresponding relationship between the target pixel mean and the target object. Specifically, image recognition is performed on the first YUV image to obtain the recognition object of the first YUV image; according to the recognition object, the first YUV image is divided into a plurality of target areas, wherein each target area includes a recognition object; The area acquires the area location information, calculates the area pixel mean value of the target area, and searches the target pixel mean value corresponding to the target area from the first mapping relationship according to the identification object to obtain the area information of the target area.
本申请实施例中,在对多帧第一YUV图像进行相同的目标区域划分后,如将第一YUV图像划分成4个目标区域A、B、C、D,以目标区域A为例,根据目标区域A的区域信息,对多帧第一YUV图像的目标区域A进行合成,同理对多帧第一YUV图像的目标区域B、C、D进行合成,最终得到具有高动态范围的第一合成图像。In the embodiment of the present application, after the same target area division is performed on multiple frames of the first YUV image, for example, the first YUV image is divided into 4 target areas A, B, C, and D, taking the target area A as an example, according to The area information of the target area A, the target area A of the multiple frames of the first YUV image is synthesized, and the target areas B, C, and D of the multiple frames of the first YUV image are synthesized in the same way, and finally the first YUV image with high dynamic range is obtained. Composite image.
在一些实施例中,执行1042之前,还可以包括:对多帧第一YUV图像进行降噪处理。In some embodiments, before performing 1042, the method may further include: performing noise reduction processing on the multiple frames of the first YUV image.
具体地,1042可以包括:Specifically, 1042 may include:
根据区域像素均值和目标像素均值,确定目标区域对应的合成帧数;Determine the number of synthetic frames corresponding to the target area according to the average value of the area pixels and the average value of the target pixels;
基于目标区域的区域位置信息和合成帧数,对多帧第一YUV图像进行合成,得到具有高动态范围的第一合成图像。Based on the regional position information of the target area and the number of synthesized frames, multiple frames of the first YUV images are synthesized to obtain a first synthesized image with a high dynamic range.
其中,该合成帧数是该区域像素均值和该目标像素均值进行整数小波变换后的所得值,比如合成帧数3是区域像素均值2和目标像素均值5进行整数小波变换后的所得值。Wherein, the composite frame number is the value obtained by performing integer wavelet transformation on the average pixel value of the region and the target pixel average value. For example, the
需要说明的是,通过先将图像划分成多个目标区域,再对每个目标区域进行合成,相比于对整张图像进行合成,可以更好地控制该第一合成图像的动态范围。比如,电子设备从第一图像缓存队列获取了3帧第一YUV图像,如图7所示,将第一YUV图像划分为包括天空区域和建筑物区域,其中每帧短曝图像中天空区域的区域像素均值为10,建筑物区域的像素均值为3,且天空区域的目标像素均值为30,建筑物区域的目标像素均值为6。①如果是按照目标区域进行合成,如图7所示,根据天空区域的区域像素均值和目标像素均值,确定天空区域的合成帧数30/10=3,对3帧第一YUV图像中的天空区域进行合成,得到第一合成图像的天空区域,同样地,根据建筑物区域的区域像素均值和目标像素均值,确定建筑物区域的合成帧数6/3=2,对2帧第一YUV图像中的建筑物区域进行合成,得到第一合成图像的建筑物区域。此时,第一合成图像中天空区域的像素均值约为10+10+10=30,建筑物区域的像素均值约为3+3=6。其中,“得到第一合成图像的天空区域”的执行不受“得到第一合成图像的建筑物区域”的影响,两者可以同时进行。②如果不按照目标区域进行合成,如对3帧第一YUV图像的整个区域进行合成处理,得到第一合成图像,第一合成图像中天空区域的像素均值约为10+10+10=30,建筑物区域的像素均值约为3+3+3=9,如对2帧第一YUV图像的整个区域进行合成处理,得到第一合成图像,该第一合成图像中天空区域的像素均值约为10+10=20,建筑物区域的像素均值约为3+3=6。可见,通过先将图像划分成多个目标区域,再对每个目标区域进行合成,相比于对整张图像进行合成,得到的合成图像动态范围更好。It should be noted that, by first dividing the image into multiple target regions, and then synthesizing each target region, the dynamic range of the first composite image can be better controlled than that of synthesizing the entire image. For example, the electronic device acquires 3 frames of the first YUV image from the first image cache queue. As shown in FIG. 7 , the first YUV image is divided into a sky area and a building area, wherein the sky area in each frame of the short-exposure image is in the sky area. The area pixel mean is 10, the building area pixel mean is 3, and the sky area target pixel mean is 30, and the building area target pixel mean is 6. ①If it is synthesized according to the target area, as shown in Figure 7, according to the regional pixel average value of the sky area and the target pixel average value, determine the number of composite frames in the sky area 30/10=3, and for the sky in the first YUV image of the 3 frames The area is synthesized to obtain the sky area of the first synthesized image. Similarly, according to the regional pixel average value of the building area and the target pixel average value, the number of synthesized frames in the building area is determined to be 6/3=2. For the first YUV image of the two frames The building area in the image is synthesized to obtain the building area of the first synthesized image. At this time, the average pixel value of the sky region in the first composite image is about 10+10+10=30, and the pixel average value of the building region is about 3+3=6. The execution of "obtaining the sky area of the first composite image" is not affected by "obtaining the building area of the first composite image", and both can be performed simultaneously. ②If the synthesis is not performed according to the target area, for example, the entire area of the first YUV image of 3 frames is synthesized to obtain the first synthesized image. The average pixel value of the sky area in the first synthesized image is about 10+10+10=30, The average pixel value of the building area is about 3+3+3=9. For example, the entire area of the 2 frames of the first YUV image is synthesized to obtain a first composite image. The average pixel value of the sky area in the first composite image is approximately 10+10=20, the average pixel value of the building area is about 3+3=6. It can be seen that by first dividing the image into multiple target regions, and then synthesizing each target region, the dynamic range of the synthesized image is better than that of synthesizing the entire image.
由上述可知,先将图像划分成多个目标区域,再对每个目标区域进行合成,相比于对整张图像进行合成,得到的合成图像动态范围更好。It can be seen from the above that the dynamic range of the synthesized image obtained is better than that of synthesizing the entire image by first dividing the image into multiple target regions, and then synthesizing each target region.
请参阅图8,图8为本申请实施例提供的图像处理方法的第三流程示意图,下面将进行详细说明。Please refer to FIG. 8 , which is a third schematic flowchart of the image processing method provided by the embodiment of the present application, which will be described in detail below.
在一些实施例中,该图像处理方法,在104之后,在105之前,还包括:In some embodiments, the image processing method, after 104 and before 105, further includes:
106、若第一合成图像的亮度小于目标亮度,则对第一合成图像进行增亮处理,以获取具有目标亮度的第一合成图像。106. If the brightness of the first composite image is lower than the target brightness, perform a brightening process on the first composite image to obtain a first composite image with the target brightness.
其中,目标亮度为该第一合成图像所要达到的亮度,电子设备可根据该目标亮度对该第一合成图像的亮度进行调整。The target brightness is the brightness to be achieved by the first composite image, and the electronic device can adjust the brightness of the first composite image according to the target brightness.
在一些实施例中,电子设备可以预先设置第二映射关系,其中第二映射关系可以为目标亮度与其他要素间的对应关系,如其他要素可以为目标纹理,可以为目标色彩,目标对象等等,此处不作具体限定。电子设备可以根据该第一合成图像的纹理或者色彩或者对象,等等,在该第二映射关系中查找与该第一合成图像对应的目标亮度。具体地,目标亮度的值可以用像素值表示,若该第一合成图像的亮度小于目标亮度可以为:该第一合成图像的像素值小于目标亮度的值。需要说明的是,该映射关系可以进行更新和修改。In some embodiments, the electronic device may preset a second mapping relationship, where the second mapping relationship may be a correspondence between target brightness and other elements, for example, other elements may be target textures, target colors, target objects, etc. , which is not specifically limited here. The electronic device may search for the target brightness corresponding to the first composite image in the second mapping relationship according to the texture, color, or object of the first composite image, and so on. Specifically, the value of the target brightness may be represented by a pixel value, and if the brightness of the first composite image is lower than the target brightness, it may be: the pixel value of the first composite image is lower than the target brightness value. It should be noted that the mapping relationship can be updated and modified.
在对多帧第一YUV图像进行合成处理后,得到具有高动态范围的第一合成图像之后,可能存在第一合成图像的亮度没有达到目标亮度的情况,如将3帧第一YUV图像进行合成得到第一合成图像,但是第一合成图像的亮度可能没有达到目标亮度,此时可以对第一合成图像进行增量处理。After synthesizing multiple frames of first YUV images and obtaining a first composite image with a high dynamic range, there may be cases where the brightness of the first composite image does not reach the target brightness, for example, 3 frames of the first YUV images are composited The first composite image is obtained, but the brightness of the first composite image may not reach the target brightness. In this case, incremental processing may be performed on the first composite image.
在一些实施方式中,目标亮度可以对应于整帧第一合成图像,若第一合成图像的亮度小于目标亮度,则将整帧第一合成图像的亮度增大至目标亮度。In some embodiments, the target brightness may correspond to the entire frame of the first composite image, and if the brightness of the first composite image is lower than the target brightness, the brightness of the entire frame of the first composite image is increased to the target brightness.
或者,对第一合成图像进行分区域合成时,可能有部分区域的亮度没有达到目标亮度。例如,该第一合成图像中包括天空区域和建筑物区域,此时可能存在第一合成图像中天空区域亮度达到目标亮度,但是建筑物区域亮度没有达到目标亮度的情况。针对该种情况,本申请在得到具有高动态范围的第一合成图像之后,对第一合成图像亮度小于目标亮度的区域,进行增亮处理。Or, when the first composite image is composited in sub-regions, the brightness of some regions may not reach the target brightness. For example, the first composite image includes a sky area and a building area. In this case, the brightness of the sky area in the first composite image may reach the target brightness, but the brightness of the building area does not reach the target brightness. In view of this situation, after obtaining a first composite image with a high dynamic range, the present application performs a brightening process on an area where the brightness of the first composite image is lower than the target brightness.
在另外一些实施方式中,目标亮度也可以是第一合成图像中部分区域对应的目标亮度,此时目标亮度可以为多个,若第一合成图像的亮度小于目标亮度,则进行增亮处理的是第一合成图像中该目标亮度对应的部分区域。例如,对第一合成图像进行图像识别,得到第一合成图像包括天空和建筑物;获取该天空的目标亮度和该建筑物的目标亮度;将第一合成图像中天空亮度与天空的目标亮度进行比较,若第一合成图像中天空亮度小于天空的目标亮度,则对第一合成图像中天空进行增亮处理;将第一合成图像中建筑物亮度与建筑物的目标亮度进行比较,若第一合成图像中建筑物亮度小于建筑物的目标亮度,则对第一合成图像中建筑物进行增亮处理,以获取具有目标亮度的第一合成图像。In some other implementations, the target brightness may also be the target brightness corresponding to the partial area in the first composite image. In this case, there may be multiple target brightnesses. If the brightness of the first composite image is lower than the target brightness, the brightness enhancement process is performed. is the partial area corresponding to the target brightness in the first composite image. For example, image recognition is performed on the first composite image to obtain that the first composite image includes the sky and buildings; the target brightness of the sky and the target brightness of the building are obtained; the sky brightness in the first composite image and the target brightness of the sky are obtained By comparison, if the brightness of the sky in the first composite image is less than the target brightness of the sky, then brighten the sky in the first composite image; compare the brightness of the buildings in the first composite image with the target brightness of the buildings, if the first composite image is If the brightness of the buildings in the composite image is lower than the target brightness of the buildings, then the buildings in the first composite image are brightened to obtain a first composite image with the target brightness.
其中,增亮处理的方式多种多样,比如,增亮处理可以具体为:通过滤色处理以提高该第一合成图像的亮度,又比如,增亮处理可以具体为:通过色阶调整以提高该第一合成图像的亮度,等等。本申请对增亮处理的方式不作具体限定。There are various ways of brightening processing. For example, the brightening processing may be specifically: improving the brightness of the first composite image through color filtering processing, and for example, the highlighting processing may be specifically: adjusting the color level to improve the brightness of the first composite image. the brightness of the first composite image, and so on. The present application does not specifically limit the manner of brightening processing.
由上述可知,本实施例提供的图像处理方法,可以在第一合成图像的亮度小于目标亮度时,对第一合成图像进行增亮处理,从而提高第一合成图像的亮度。It can be seen from the above that the image processing method provided in this embodiment can perform brightening processing on the first composite image when the brightness of the first composite image is lower than the target brightness, thereby improving the brightness of the first composite image.
请参阅图9,图9为本申请实施例提供的图像处理方法的第四流程示意图,下面将进行详细说明。Please refer to FIG. 9 , which is a fourth schematic flowchart of the image processing method provided by the embodiment of the present application, which will be described in detail below.
在一些实施例中,101包括1011:In some embodiments, 101 includes 1011:
1011、基于第一曝光值和第二曝光值进行交替曝光,得到目标场景的第一YUV图像,其中,每基于第一曝光值进行连续m次曝光,基于第二曝光值进行一次曝光,且m大于1,第二曝光值大于第一曝光值。1011. Perform alternate exposures based on the first exposure value and the second exposure value to obtain a first YUV image of the target scene, wherein for every m consecutive exposures based on the first exposure value, one exposure is performed based on the second exposure value, and m Greater than 1, the second exposure value is greater than the first exposure value.
需要说明的是,本申请实施例适用于包括一个摄像头的电子设备。因为第二曝光值大于第一曝光值,所以基于第二曝光值得到的第一YUV图像,相比于基于第一曝光值得到的第一YUV图像,拥有更多的亮部细节。其中,m可以为大于1的任意整数值,如m可以为3,m可以为7,等等。It should be noted that the embodiments of the present application are applicable to an electronic device including a camera. Because the second exposure value is greater than the first exposure value, the first YUV image obtained based on the second exposure value has more highlight details than the first YUV image obtained based on the first exposure value. Wherein, m can be any integer value greater than 1, for example, m can be 3, m can be 7, and so on.
例如,第一曝光值为-2EV,第二曝光值为1EV,以“-2EV、-2EV、-2EV、1EV、-2EV、-2EV、-2EV、1EV……”形式对该目标场景进行曝光,得到第一YUV图像。For example, the first exposure value is -2EV, the second exposure value is 1EV, and the target scene is exposed in the form of "-2EV, -2EV, -2EV, 1EV, -2EV, -2EV, -2EV, 1EV..." , get the first YUV image.
在一些实施例中,103包括1031:In some embodiments, 103 includes 1031:
1031、当需要进行预览或拍照或录像时,从第一图像缓存队列中获取最新存储的m+1帧第一YUV图像。1031. When previewing or taking pictures or videos is required, acquire the newly stored m+1 frames of the first YUV image from the first image buffer queue.
需要说明的是,从第一图像缓存队列中获取最新存储的第一YUV图像,因为原理上必须保证有至少两帧基于第一曝光值得到的第一YUV图像,以及一帧基于第二曝光值得到的第一YUV图像,所以每次从第一图像缓存队列获取的第一YUV图像帧数与每轮交替曝光得到的第一YUV图像帧数相同。It should be noted that the newly stored first YUV image is obtained from the first image cache queue, because in principle it must be guaranteed that there are at least two frames of the first YUV image obtained based on the first exposure value, and one frame based on the second exposure value. Therefore, the number of frames of the first YUV image obtained from the first image buffer queue each time is the same as the number of frames of the first YUV image obtained from each round of alternate exposure.
为了保证每次从第一图像缓存队列获取的多帧第一YUV图像中至少包含一帧基于第二曝光值得到的第一YUV图像,本申请每次从第一图像缓存队列获取的第一YUV图像帧数可以大于或等于每轮交替曝光得到的第一YUV图像帧数。例如,假设m等于3,第一图像缓存队列先后存储有基于曝光值“-2EV、-2EV、-2EV、1EV、-2EV、-2EV、-2EV、1EV……”得到的第一YUV图像。如果按照从该第一图像缓存队列中获取最新存储的m+1帧第一YUV图像执行,如获取基于曝光值“-2EV、-2EV、-2EV、1EV”得到的4帧第一YUV图像,获取基于曝光值“-2EV、-2EV、1EV、-2EV”得到的4帧第一YUV图像,获取基于曝光值“-2EV、1EV、-2EV、-2EV”得到的4帧第一YUV图像,获取得“1EV、-2EV、-2EV、-2EV”的4帧第一YUV图像,等等。从而保证每次都能获取三帧基于第一曝光值得到的第一YUV图像,以及一帧基于第二曝光值得到的第一YUV图像。In order to ensure that the multi-frame first YUV images obtained from the first image cache queue each time include at least one frame of the first YUV image obtained based on the second exposure value, the first YUV image obtained from the first image cache queue of the present application each time The number of image frames may be greater than or equal to the number of first YUV image frames obtained in each round of alternate exposure. For example, assuming that m is equal to 3, the first image buffer queue successively stores the first YUV images obtained based on the exposure values "-2EV, -2EV, -2EV, 1EV, -2EV, -2EV, -2EV, 1EV...". If it is performed according to the acquisition of the newly stored m+1 frames of the first YUV image from the first image buffer queue, such as the acquisition of 4 frames of the first YUV image based on the exposure values "-2EV, -2EV, -2EV, 1EV", Acquire 4 frames of first YUV images based on exposure values "-2EV, -2EV, 1EV, -2EV", and obtain 4 frames of first YUV images based on exposure values "-2EV, 1EV, -2EV, -2EV", Four first YUV images of "1EV, -2EV, -2EV, -2EV" are acquired, and so on. This ensures that three frames of the first YUV image obtained based on the first exposure value and one frame of the first YUV image obtained based on the second exposure value can be acquired each time.
在一些实施例中,104包括:In some embodiments, 104 includes:
1043、对基于第一曝光值得到的m帧第一YUV图像进行合成处理,得到具有高动态范围的第二合成图像。1043. Perform synthesis processing on the m frames of the first YUV images obtained based on the first exposure value to obtain a second synthesized image with a high dynamic range.
1044、对基于第二曝光值得到的一帧第一YUV图像,和第二合成图像进行合成处理,得到具有高动态范围的第一合成图像。1044. Perform synthesis processing on a frame of the first YUV image obtained based on the second exposure value and the second composite image to obtain a first composite image with a high dynamic range.
本申请实施例中,在从第一图像缓存队列中获取最新存储的m+1帧第一YUV图像后,从获取的m+1帧第一YUV图像中提取基于第一曝光值得到的m帧第一YUV图像,对该m帧第一YUV图像进行合成处理,得到具有高动态范围的第二合成图像。在得到具有高动态范围的第二合成图像后,还可以从获取的m+1帧第一YUV图像中提取基于第二曝光值得到的1帧第一YUV图像,通过对该第二合成图像和该1帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像。In this embodiment of the present application, after the newly stored m+1 frames of the first YUV image are acquired from the first image cache queue, m frames obtained based on the first exposure value are extracted from the acquired m+1 frames of the first YUV image. For the first YUV image, the m frames of the first YUV image are synthesized to obtain a second synthesized image with a high dynamic range. After the second composite image with high dynamic range is obtained, 1 frame of the first YUV image obtained based on the second exposure value can also be extracted from the acquired m+1 frames of the first YUV image, and the second composite image and the
比如,从第一图像缓存队列中获取最新存储的3+1帧基于曝光值“-2EV、-2EV、1EV、-2EV”得到的第一YUV图像;从基于曝光值“-2EV、-2EV、1EV、-2EV”得到的第一YUV图像中,提取基于第一曝光值“-2EV”得到的3帧第一YUV图像,提取基于第二曝光值“1EV”得到的1帧第一YUV图像;对该3帧第一YUV图像进行合成处理,得到具有高动态范围的第二合成图像,将该第二合成图像与该1帧第一YUV图像进行合成处理,得到具体高动态范围的第一合成图像。For example, obtain the first YUV image based on the exposure values "-2EV, -2EV, 1EV, -2EV" of the newly stored 3+1 frames from the first image buffer queue; In the first YUV image obtained by 1EV, -2EV", extract 3 frames of first YUV images obtained based on the first exposure value "-2EV", and
在一些实施例中,1044可以具体包括:确定第二合成图像的第一像素权重比;确定基于第二曝光值得到的一帧第一YUV图像的第二像素权重比;根据第一像素权重比和第二像素权重比,对第二合成图像和一帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像。In some embodiments, 1044 may specifically include: determining a first pixel weight ratio of the second composite image; determining a second pixel weight ratio of a frame of the first YUV image obtained based on the second exposure value; according to the first pixel weight ratio The second composite image and a frame of the first YUV image are composited according to the second pixel weight ratio to obtain a first composite image with a high dynamic range.
在一些实施例中,1044可以具体包括:确定第二合成图像的第一替换区域;根据第一替换区域,获取基于第二曝光值得到的一帧第一YUV图像对应的第二替换区域;利用第二替换区域,替换第二合成图像的第一替换区域,得到具有高动态范围的第一合成图像。In some embodiments, 1044 may specifically include: determining a first replacement area of the second composite image; obtaining, according to the first replacement area, a second replacement area corresponding to a frame of the first YUV image obtained based on the second exposure value; using The second replacement area replaces the first replacement area of the second composite image to obtain a first composite image with a high dynamic range.
由上述可知,本实施例提供的图像处理方法,还可以通过m帧短曝图像合成处理得到一帧第二合成图像,再将该帧第二合成图像与1帧长曝图像进行合成处理,以此增加第二合成图像的亮部细节,得到效果更佳的第一合成图像。It can be seen from the above that the image processing method provided in this embodiment can also obtain a second composite image by synthesizing m frames of short-exposure images, and then synthesizing the second composite image with a long-exposure image to obtain a second composite image. This increases the details of the highlights of the second composite image to obtain a better first composite image.
请参阅图10,图10为本申请实施例提供的图像处理方法的第五流程示意图,下面将进行详细说明。Please refer to FIG. 10. FIG. 10 is a fifth schematic flowchart of the image processing method provided by the embodiment of the present application, which will be described in detail below.
在一些实施例中,请参阅图10,101包括1012:In some embodiments, referring to Figure 10, 101 includes 1012:
1012、基于第一曝光值,通过第一摄像头持续获取目标场景的第一YUV图像,且基于第三曝光值,通过第二摄像头持续获取目标场景的第二YUV图像,其中,第三曝光值大于第一曝光值。1012. Based on the first exposure value, continuously obtain the first YUV image of the target scene through the first camera, and continuously obtain the second YUV image of the target scene through the second camera based on the third exposure value, wherein the third exposure value is greater than first exposure value.
本申请实施例中,该电子设备至少包括第一摄像头和第二摄像头。在获取目标场景的图像时,基于第一曝光值,通过第一摄像头持续获取目标场景的第一YUV图像;以及基于第三曝光值,通过第二摄像头持续获取目标场景的第二YUV图像,其中,第三曝光值大于第一曝光值。In the embodiment of the present application, the electronic device includes at least a first camera and a second camera. When acquiring the image of the target scene, based on the first exposure value, the first YUV image of the target scene is continuously acquired by the first camera; and based on the third exposure value, the second YUV image of the target scene is continuously acquired by the second camera, wherein , the third exposure value is greater than the first exposure value.
在一些实施例中,该电子设备可以同时通过第一摄像头和第二摄像头对目标场景不断进行曝光,得到基于第一曝光值获取的第一YUV图像和基于第三曝光值获取的第二YUV图像。In some embodiments, the electronic device may continuously expose the target scene through the first camera and the second camera simultaneously, to obtain a first YUV image obtained based on the first exposure value and a second YUV image obtained based on the third exposure value .
例如,电子设备同时利用第一摄像头和第二摄像头对目标场景不断进行曝光,通过第一摄像头得到曝光值依次为“-2EV、-2EV、-2EV、-2EV……”的第一RAW图像,并对该第一RAW图像进行格式转换,得到曝光值依次为“-2EV、-2EV、-2EV、-2EV……”的第一YUV图像,通过第二摄像头得到曝光值依次为“1EV、1EV、1EV、1EV……”的第三RAW图像,并对该第三RAW图像进行格式转换,得到曝光值依次为“1EV、1EV、1EV、1EV……”的第二YUV图像。For example, the electronic device uses the first camera and the second camera to continuously expose the target scene, and obtains the first RAW image with exposure values of "-2EV, -2EV, -2EV, -2EV..." through the first camera. And perform format conversion on the first RAW image to obtain a first YUV image with exposure values of "-2EV, -2EV, -2EV, -2EV...", and obtain exposure values of "1EV, 1EV" through the second camera , 1EV, 1EV, .
在一些实施例中,请参阅10,102包括1021:In some embodiments, see 10, 102 includes 1021:
1021、按照第一摄像头曝光的先后顺序将第二YUV图像存储至第二图像缓存队列,以及按照第二摄像头曝光的先后顺序将第二YUV图像存储至第二图像缓存队列。1021. Store the second YUV image in the second image buffer queue according to the exposure order of the first camera, and store the second YUV image in the second image buffer queue according to the exposure order of the second camera.
本申请实施例中,在基于第一曝光值,通过第一摄像头持续获取目标场景的第一YUV图像之后,需要按照曝光的先后顺序将获取的第一YUV图像存储至第一图像缓存队列;以及在基于第三曝光值,通过第二摄像头持续获取目标场景的第二YUV图像之后,需要按照曝光的先后顺序将第二YUV图像存储至第二图像缓存队列。In the embodiment of the present application, after continuously acquiring the first YUV image of the target scene through the first camera based on the first exposure value, the acquired first YUV image needs to be stored in the first image cache queue in the order of exposure; and After the second YUV image of the target scene is continuously acquired by the second camera based on the third exposure value, the second YUV image needs to be stored in the second image buffer queue according to the exposure sequence.
需要说明的是,本申请实施例中,将第一YUV图像和第二YUV图像分开存储,但在某些实施例中,也可以将第一YUV图像和第二YUV图像一起存储。It should be noted that, in the embodiments of the present application, the first YUV image and the second YUV image are stored separately, but in some embodiments, the first YUV image and the second YUV image may also be stored together.
在一些实施例中,请参阅10,103包括1032:In some embodiments, see 10, 103 includes 1032:
1032、当需要进行预览或拍照或录像时,从第一图像缓存队列中获取最新存储的多帧第一YUV图像,并从第二图像缓存队列中获取最新存储的一帧第二YUV图像。1032. When previewing, photographing or video recording is required, acquire the newly stored multiple frames of the first YUV image from the first image cache queue, and acquire the newly stored one frame of the second YUV image from the second image cache queue.
本申请实施例中,当需要进行预览或拍照或录像时,需要从该第一图像缓存队列中获取最新存储的多帧第一YUV图像,并从该第二图像缓存队列中获取最新存储的一帧第二YUV图像。需要说明的是,从该第一图像缓存队列中获取最新存储的多帧第一YUV图像可以和从该第二图像缓存队列中获取最新存储的一帧第二YUV图像同时进行,也可以不同时进行:先从该第一图像缓存队列中获取最新存储的多帧第一YUV图像,再从该第二图像缓存队列中获取最新存储的一帧第二YUV图像。In the embodiment of the present application, when previewing or taking pictures or video recording is required, it is necessary to obtain newly stored multiple frames of first YUV images from the first image cache queue, and obtain a newly stored one-frame image from the second image cache queue. Frame the second YUV image. It should be noted that the acquisition of the newly stored multiple frames of the first YUV image from the first image cache queue may be performed at the same time as the acquisition of the latest stored one frame of the second YUV image from the second image cache queue, or may not be performed simultaneously. Carry out: firstly acquire the newly stored multiple frames of the first YUV image from the first image cache queue, and then acquire the newly stored one frame of the second YUV image from the second image cache queue.
在一些实施例中,请参阅10,104包括1045和1046:In some embodiments, see 10, 104 includes 1045 and 1046:
1045、对多帧第一YUV图像进行合成处理,得到具有高动态范围的第三合成图像。1045. Perform synthesis processing on the multiple frames of the first YUV images to obtain a third synthesized image with a high dynamic range.
本申请实施例中,在从该第一图像缓存队列中获取最新存储的多帧第一YUV图像之后,需要对多帧第一YUV图像进行合成处理,得到具有高动态范围的第三合成图像。其中,1045,具体实施可以参照上述实施例,此处不再赘述。In the embodiment of the present application, after the newly stored multiple frames of the first YUV images are acquired from the first image buffer queue, it is necessary to perform synthesis processing on the multiple frames of the first YUV images to obtain a third synthesized image with a high dynamic range. Among them, 1045, the specific implementation can refer to the above-mentioned embodiment, and details are not repeated here.
1046、对第三合成图像和一帧第二YUV图像进行合成处理,得到具有高动态范围的第一合成图像。1046. Perform a composite process on the third composite image and a frame of the second YUV image to obtain a first composite image with a high dynamic range.
本申请实施例中,在从该第二图像缓存队列中获取最新存储的一帧第二YUV图像、且得到具有高动态范围的第三合成图像之后,通过对该第三合成图像和该1帧第二YUV合成图像进行合成处理,得到具有高动态范围的第一合成图像。In this embodiment of the present application, after acquiring a newly stored frame of a second YUV image from the second image buffer queue and obtaining a third composite image with a high dynamic range, the third composite image and the 1 frame The second YUV composite image is subjected to composite processing to obtain a first composite image with a high dynamic range.
在一些实施例中,1046可以具体包括:确定第三合成图像的第三像素权重比;确定一帧第二YUV图像的第四像素权重比;根据第三像素权重比和第四像素权重比,对一帧第二YUV图像和第三合成图像进行合成处理,得到具有高动态范围的第一合成图像。In some embodiments, 1046 may specifically include: determining a third pixel weight ratio of the third composite image; determining a fourth pixel weight ratio of a frame of the second YUV image; according to the third pixel weight ratio and the fourth pixel weight ratio, A first composite image with a high dynamic range is obtained by performing composite processing on a frame of the second YUV image and the third composite image.
在一些实施例中,1046可以具体包括:确定第三合成图像的第三替换区域;根据第三替换区域,获取一帧第二YUV图像对应的第四替换区域;利用第四替换区域,替换第三合成图像的第三替换区域,得到具有高动态范围的第一合成图像。In some embodiments, 1046 may specifically include: determining a third replacement area of the third composite image; obtaining a fourth replacement area corresponding to a frame of the second YUV image according to the third replacement area; using the fourth replacement area to replace the Three alternate regions of the composite image, resulting in a first composite image with high dynamic range.
由上述可知,本实施例提供的图像处理方法,可以通过对多帧短曝图像进行合成处理,得到一帧第三合成图像,再将该帧第三合成图像与一帧长曝图像进行合成处理,以此增加第三合成图像的亮部细节,得到效果更佳的第一合成图像。It can be seen from the above that the image processing method provided in this embodiment can obtain a third composite image by synthesizing multiple frames of short exposure images, and then synthesizing the third composite image with a long exposure image. , so as to increase the details of the bright part of the third composite image, and obtain the first composite image with better effect.
为便于更好的实施本申请实施例提供的图像处理方法,本申请实施例还提供一种基于上述图像处理方法的图像处理装置。其中名词的含义与上述图像处理方法中相同,具体实现细节可以参考方法实施例中的说明。In order to facilitate better implementation of the image processing method provided by the embodiment of the present application, the embodiment of the present application further provides an image processing apparatus based on the above-mentioned image processing method. The meanings of the nouns are the same as those in the above image processing method, and the specific implementation details can refer to the description in the method embodiment.
请参阅图11,图11为本申请实施例提供的图像处理装置的第一结构示意图。具体而言,该图像处理装置200,包括:第一获取模块201、存储模块202、第二获取模块203、合成模块204、以及处理模块205。Please refer to FIG. 11 , which is a schematic diagram of a first structure of an image processing apparatus provided by an embodiment of the present application. Specifically, the
第一获取模块201,用于基于第一曝光值,持续获取目标场景的第一YUV图像;The
存储模块202,用于按照曝光的先后顺序将所述第一YUV图像存储至第一图像缓存队列;The
第二获取模块203,用于当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像;The
合成模块204,用于对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像;A
处理模块205,用于根据所述第一合成图像,对所述目标场景进行预览或拍照或录像操作。The
在一些实施例中,第一获取模块201,具体用于:根据第一曝光值,通过图像传感器持续获取目标场景的第一RAW图像;对所述第一RAW图像进行格式转换,得到所述第一YUV图像。In some embodiments, the
在一些实施例中,处理模块205,在对所述目标场景进行预览操作之后,还包括:若接收到拍照指令,则根据所述第一合成图像响应所述拍照指令。In some embodiments, the
在一些实施例中,处理模块205,在对所述目标场景进行预览操作之后,还包括:若当前处于录像模式,则对所述第一合成图像进行视频编码处理,得到所述目标场景对应的视频。In some embodiments, the
在一些实施例中:In some embodiments:
第一获取模块201,还可以用于基于所述第一曝光值和第二曝光值进行交替曝光,得到目标场景的第一YUV图像,其中,每基于所述第一曝光值进行连续m次曝光,基于所述第二曝光值进行一次曝光,且m大于1,所述第二曝光值大于所述第一曝光值。The
第二获取模块203,还可以用于当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的m+1帧第一YUV图像。The second obtaining
合成模块204,还可以用于对基于所述第一曝光值得到的m帧第一YUV图像进行合成处理,得到具有高动态范围的第二合成图像;对基于所述第二曝光值得到的一帧第一YUV图像,和所述第二合成图像进行合成处理,得到具有高动态范围的第一合成图像。The
在一些实施例中:In some embodiments:
第一获取模块201,还可以用于基于第一曝光值,通过第一摄像头持续获取目标场景的第一YUV图像,以及基于第三曝光值,通过第二摄像头持续获取所述目标场景的第二YUV图像,其中,所述第三曝光值大于所述第一曝光值。The
存储模块202,还可以用于按照曝光的先后顺序将所述第一YUV图像存储至第一图像缓存队列,以及按照曝光的先后顺序将所述第二YUV图像存储至第二图像缓存队列。The
第二获取模块203,还可以用于当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像,以及从所述第二图像缓存队列中获取最新存储的一帧第二YUV图像。The second obtaining
合成模块204,还可以用于对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第三合成图像;对所述第三合成图像和所述一帧第二YUV图像进行合成处理,得到具有高动态范围的第一合成图像。The
请参阅图12,图12为本申请实施例提供的图像处理装置的第二结构示意图。Please refer to FIG. 12. FIG. 12 is a schematic diagram of a second structure of an image processing apparatus provided by an embodiment of the present application.
在一些实施例中,可参阅图12,合成模块204,可以包括:In some embodiments, referring to FIG. 12 , the
划分子模块2041,用于将所述第一YUV图像划分为多个目标区域,并确定所述目标区域的区域信息;A dividing
合成子模块2042,用于根据所述目标区域的区域信息,对所述多帧第一YUV图像进行合成,得到具有高动态范围的第一合成图像。The
在一些实施例中,所述区域信息包括区域位置信息、区域像素均值、以及目标像素均值,合成子模块2042,可以具体用于根据所述区域像素均值和所述目标像素均值,确定所述目标区域对应的合成帧数;基于所述目标区域的所述区域位置信息和所述合成帧数,对所述多帧第一YUV图像进行合成,得到具有高动态范围的第一合成图像。In some embodiments, the area information includes area position information, area pixel mean value, and target pixel mean value, and the
请参阅图13,图13为本申请实施例提供的图像处理装置的第三结构示意图。Please refer to FIG. 13 . FIG. 13 is a schematic diagram of a third structure of an image processing apparatus provided by an embodiment of the present application.
在一些实施例中,可参阅图13,图像处理装置200,还可以包括:In some embodiments, referring to FIG. 13 , the
第三获取模块206,用于通过图像传感器获取目标场景的一帧第二RAW图像;A
第四获取模块207,用于获取所述第二RAW图像的光比;a fourth acquisition module 207, configured to acquire the light ratio of the second RAW image;
第一确定模块208,用于根据所述光比确定基准曝光值;a first determining
第二确定模块209,用于根据所述基准曝光值,调整曝光时长、光圈、和感光度中的至少一个参数,确定所述第一曝光值。The
在一些实施例中,可参阅图13,图像处理装置200,还可以包括:In some embodiments, referring to FIG. 13 , the
增亮处理模块210,用于若所述第一合成图像的亮度小于目标亮度,则对所述第一合成图像进行增亮处理,以获取具有目标亮度的所述第一合成图像。The brightening
由上述可知,本申请实施例提供的图像处理装置,在需要预览或拍照或录像时,第二获取模块直接从第一图像缓存队列中获取最新存储的多帧第一YUV图像,合成模块对该多帧第一YUV图像进行合成处理,可以缩短预览或拍照或录像的操作时间,从而使得本实施例提供的图像处理方案得到的图像能够适用于图像的预览、拍照和录像。此外,在通过多帧短曝的合成方式得到HDR图像后,可以在HDR图像亮度小于目标亮度时对HDR图像进行增亮处理,或者可以将该HDR图像与一帧长曝图像进行合成处理,从而得到亮度效果更佳的图像。It can be seen from the above that, in the image processing device provided by the embodiment of the present application, when previewing or taking pictures or videos is required, the second obtaining module directly obtains the newly stored multi-frame first YUV images from the first image buffer queue, and the synthesizing module directly obtains the first YUV images of multiple frames from the first image cache queue. Combining multiple frames of the first YUV image can shorten the operation time of previewing, photographing, or recording, so that the image obtained by the image processing solution provided in this embodiment can be suitable for previewing, photographing, and recording images. In addition, after the HDR image is obtained by synthesizing multiple frames of short exposure, the HDR image can be brightened when the brightness of the HDR image is lower than the target brightness, or the HDR image can be synthesized with a long-exposure image, thereby Get a brighter image.
本申请实施例还提供一种电子设备,请参阅图14,图14为本申请实施例提供的电子设备的第一结构示意图。电子设备300包括处理器301、存储器302、以及摄像组件303。其中,处理器301与存储器302、摄像组件303电性连接。An embodiment of the present application further provides an electronic device. Please refer to FIG. 14 , which is a schematic diagram of a first structure of the electronic device provided by the embodiment of the present application. The
处理器300是电子设备300的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或加载存储在存储器302内的计算机程序,以及调用存储在存储器302内的数据,执行电子设备300的各种功能并处理数据,从而对电子设备300进行整体监控。The
存储器302可用于存储软件程序以及模块,处理器301通过运行存储在存储器302的计算机程序以及模块,从而执行各种功能应用以及数据处理。存储器302可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的计算机程序等;存储数据区可存储根据电子设备的使用所创建的数据等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器302还可以包括存储器控制器,以提供处理器301对存储器302的访问。The
摄像组件303可以包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义图像信号处理(Image Signal Processing)管线的各种处理单元。图像处理电路至少可以包括:摄像头、图像信号处理器(Image Signal Processor,ISP处理器)、控制逻辑器、图像存储器以及显示器等。其中摄像头至少可以包括一个或多个透镜和图像传感器。图像传感器可包括色彩滤镜阵列(如Bayer滤镜)。图像传感器可获取用图像传感器的每个成像像素捕捉的光强度和波长信息,并提供可由图像信号处理器处理的一组原始图像数据。The
图像信号处理器可以按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,图像信号处理器可对原始图像数据进行一个或多个图像处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。原始图像数据经过图像信号处理器处理后可存储至图像存储器中。图像信号处理器还可从图像存储器处接收图像数据。Image signal processors can process raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the image signal processor may perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Among them, the image processing operations can be performed with the same or different bit depth precision. The raw image data can be stored in the image memory after being processed by the image signal processor. The image signal processor may also receive image data from the image memory.
图像存储器可为存储器装置的一部分、存储设备、或电子设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。The image memory may be a part of a memory device, a storage device, or an independent dedicated memory in an electronic device, and may include a DMA (Direct Memory Access, Direct Memory Access) feature.
当接收到来自图像存储器的图像数据时,图像信号处理器可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给图像存储器,以便在被显示之前进行另外的处理。图像信号处理器还可从图像存储器接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,图像信号处理器的输出还可发送给图像存储器,且显示器可从图像存储器读取图像数据。在一种实施方式中,图像存储器可被配置为实现一个或多个帧缓冲器。When receiving image data from the image memory, the image signal processor may perform one or more image processing operations, such as temporal filtering. The processed image data can be sent to the image memory for additional processing before being displayed. The image signal processor may also receive processed data from the image memory and process the processed data as image data in the raw domain and in the RGB and YCbCr color spaces. The processed image data may be output to a display for viewing by a user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit, graphics processor). In addition, the output of the image signal processor can also be sent to an image memory, and the display can read image data from the image memory. In one embodiment, the image memory may be configured to implement one or more frame buffers.
图像信号处理器确定的统计数据可发送给控制逻辑器。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜阴影校正等图像传感器的统计信息。Statistics determined by the image signal processor may be sent to the control logic. For example, the statistics may include statistics of the image sensor for auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens shading correction, etc.
控制逻辑器可包括执行一个或多个例程(如固件)的处理器和/或微控制器。一个或多个例程可根据接收的统计数据,确定摄像头的控制参数以及ISP控制参数。例如,摄像头的控制参数可包括照相机闪光控制参数、透镜的控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵等。Control logic may include a processor and/or microcontroller executing one or more routines (eg, firmware). One or more routines may determine camera control parameters and ISP control parameters based on the received statistics. For example, camera control parameters may include camera flash control parameters, lens control parameters (eg, focal length for focusing or zooming), or a combination of these parameters. ISP control parameters may include gain levels and color correction matrices, etc. for automatic white balance and color adjustment (eg, during RGB processing).
请参阅图15,图15为本实施例中图像处理电路的结构示意图。如图15所示,为便于说明,仅示出与本发明实施例相关的图像处理技术的各个方面。Please refer to FIG. 15 , which is a schematic structural diagram of an image processing circuit in this embodiment. As shown in FIG. 15 , for the convenience of description, only various aspects of the image processing technology related to the embodiments of the present invention are shown.
例如图像处理电路可以包括:摄像头、图像信号处理器、控制逻辑器、图像存储器、显示器。其中,摄像头可以包括一个或多个透镜和图像传感器。在一些实施例中,摄像头可为长焦摄像头或广角摄像头中的任一者。For example, the image processing circuit may include a camera, an image signal processor, a control logic, an image memory, and a display. Among them, the camera may include one or more lenses and image sensors. In some embodiments, the camera can be either a telephoto camera or a wide-angle camera.
摄像头采集的第一图像传输给图像信号处理器进行处理。图像信号处理器处理第一图像后,可将第一图像的统计数据(如图像的亮度、图像的反差值、图像的颜色等)发送给控制逻辑器。控制逻辑器可根据统计数据确定摄像头的控制参数,从而摄像头可根据控制参数进行自动对焦、自动曝光等操作。第一图像经过图像信号处理器进行处理后可存储至图像存储器中。图像信号处理器也可以读取图像存储器中存储的图像以进行处理。另外,第一图像经过图像信号处理器进行处理后可直接发送至显示器进行显示。显示器也可以读取图像存储器中的图像以进行显示。The first image collected by the camera is transmitted to the image signal processor for processing. After the image signal processor processes the first image, the statistical data of the first image (such as the brightness of the image, the contrast value of the image, the color of the image, etc.) can be sent to the control logic. The control logic can determine the control parameters of the camera according to the statistical data, so that the camera can perform automatic focusing, automatic exposure and other operations according to the control parameters. The first image can be stored in the image memory after being processed by the image signal processor. The image signal processor can also read the image stored in the image memory for processing. In addition, the first image can be directly sent to the display for display after being processed by the image signal processor. The display can also read the image in the image memory for display.
此外,图中没有展示的,电子设备还可以包括CPU和供电模块。CPU和逻辑控制器、图像信号处理器、图像存储器和显示器均连接,CPU用于实现全局控制。供电模块用于为各个模块供电。In addition, not shown in the figures, the electronic device may further include a CPU and a power supply module. The CPU is connected to the logic controller, the image signal processor, the image memory and the display, and the CPU is used for global control. The power supply module is used to supply power to each module.
在本申请实施例中,电子设备300中的处理器301会按照如下的步骤,将一个或一个以上的计算机程序的进程对应的指令加载到存储器302中,并由处理器301运行存储在存储器302中的计算机程序,从而实现各种功能,如下:In this embodiment of the present application, the
基于第一曝光值,持续获取目标场景的第一YUV图像;Based on the first exposure value, continuously obtain the first YUV image of the target scene;
按照曝光的先后顺序将所述第一YUV图像存储至第一图像缓存队列;storing the first YUV image in the first image buffer queue according to the sequence of exposure;
当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像;When previewing or photographing or video recording is required, obtain the newly stored multi-frame first YUV images from the first image cache queue;
对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像;performing synthesis processing on the multiple frames of the first YUV images to obtain a first synthesized image with a high dynamic range;
根据所述第一合成图像,对所述目标场景进行预览或拍照或录像操作。According to the first composite image, a preview or photographing or video recording operation is performed on the target scene.
在某些实施例中,执行基于第一曝光值,持续获取目标场景的第一YUV图像时,处理器301具体执行:In some embodiments, when continuously acquiring the first YUV image of the target scene based on the first exposure value, the
根据第一曝光值,通过图像传感器持续获取目标场景的第一RAW图像;According to the first exposure value, the image sensor continuously acquires the first RAW image of the target scene;
对所述第一RAW图像进行格式转换,得到所述第一YUV图像。Perform format conversion on the first RAW image to obtain the first YUV image.
在某些实施例中,执行对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像时,处理器301具体执行:In some embodiments, when performing composite processing on the multiple frames of the first YUV images to obtain a first composite image with a high dynamic range, the
将所述第一YUV图像划分为多个目标区域,并确定所述目标区域的区域信息;dividing the first YUV image into a plurality of target areas, and determining the area information of the target area;
根据所述目标区域的区域信息,对所述多帧第一YUV图像进行合成,得到具有高动态范围的第一合成图像。According to the area information of the target area, the multiple frames of the first YUV images are synthesized to obtain a first synthesized image with a high dynamic range.
在某些实施例中,执行基于第一曝光值,持续获取目标场景的第一YUV图像时,处理器301执行:In some embodiments, when continuously acquiring the first YUV image of the target scene based on the first exposure value, the
基于所述第一曝光值和第二曝光值进行交替曝光,得到目标场景的第一YUV图像,其中,每基于所述第一曝光值进行连续m次曝光,基于所述第二曝光值进行一次曝光,且m大于1,所述第二曝光值大于所述第一曝光值;Alternate exposure is performed based on the first exposure value and the second exposure value to obtain a first YUV image of the target scene, wherein for every m consecutive exposures based on the first exposure value, one exposure is performed based on the second exposure value exposure, and m is greater than 1, and the second exposure value is greater than the first exposure value;
执行从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像时,处理器301执行:When executing the acquisition of the newly stored multi-frame first YUV image from the first image cache queue, the
从所述第一图像缓存队列中获取最新存储的m+1帧第一YUV图像;Obtain the newly stored m+1 frames of the first YUV image from the first image cache queue;
执行对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像时,处理器301执行:When performing synthesis processing on the first YUV images of the multiple frames to obtain a first synthesized image with a high dynamic range, the
对基于所述第一曝光值得到的m帧第一YUV图像进行合成处理,得到具有高动态范围的第二合成图像;performing synthesis processing on the m frames of the first YUV images obtained based on the first exposure value to obtain a second composite image with a high dynamic range;
对基于所述第二曝光值得到的一帧第一YUV图像,和所述第二合成图像进行合成处理,得到具有高动态范围的第一合成图像。A frame of the first YUV image obtained based on the second exposure value and the second composite image are composited to obtain a first composite image with a high dynamic range.
在某些实施例中,执行基于第一曝光值,持续获取目标场景的第一YUV图像时,处理器301执行:In some embodiments, when continuously acquiring the first YUV image of the target scene based on the first exposure value, the
基于第一曝光值,通过第一摄像头持续获取目标场景的第一YUV图像;Based on the first exposure value, the first YUV image of the target scene is continuously acquired by the first camera;
执行对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像之前,处理器301执行:Before performing synthesis processing on the multiple frames of the first YUV images to obtain a first synthesized image with a high dynamic range, the
基于第三曝光值,通过第二摄像头持续获取所述目标场景的第二YUV图像,其中,所述第三曝光值大于所述第一曝光值;continuously acquiring a second YUV image of the target scene through a second camera based on a third exposure value, wherein the third exposure value is greater than the first exposure value;
按照曝光的先后顺序将所述第二YUV图像存储至第二图像缓存队列;storing the second YUV image in the second image buffer queue according to the sequence of exposure;
当需要进行预览或拍照或录像时,从所述第二图像缓存队列中获取最新存储的一帧第二YUV图像;When it is necessary to preview or take a picture or record a video, obtain a newly stored second frame of the second YUV image from the second image cache queue;
执行对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像时,处理器301执行:When performing synthesis processing on the first YUV images of the multiple frames to obtain a first synthesized image with a high dynamic range, the
对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第三合成图像;performing synthesis processing on the multiple frames of the first YUV images to obtain a third synthesized image with a high dynamic range;
对所述第三合成图像和所述一帧第二YUV图像进行合成处理,得到具有高动态范围的第一合成图像。The third composite image and the one frame of the second YUV image are composited to obtain a first composite image with a high dynamic range.
请一并参阅图16,图16为本申请实施例提供的电子设备的第二结构示意图。在某些实施方式中,电子设备300还可以包括:显示器304、射频电路305、音频电路306以及电源307。其中,其中,显示器304、射频电路305、音频电路306以及电源307分别与处理器301电性连接。Please also refer to FIG. 16 . FIG. 16 is a schematic diagram of a second structure of an electronic device provided by an embodiment of the present application. In some embodiments, the
显示器304可以用于显示由用户输入的信息或提供给用户的信息以及各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。
射频电路305可以用于收发射频信号,以通过无线通信与网络设备或其他电子设备建立无线通讯,与网络设备或其他电子设备之间收发信号。The
音频电路306可以用于通过扬声器、传声器提供用户与电子设备之间的音频接口。
电源307可以用于给电子设备300的各个部件供电。在一些实施例中,电源307可以通过电源管理系统与处理器301逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管图16中未示出,电子设备300还可以包括蓝牙模块等,在此不再赘述。Although not shown in FIG. 16 , the
由上述可知,本实施例提供的电子设备,在需要预览或拍照或录像时,电子设备直接从第一图像缓存队列中获取最新存储的多帧第一YUV图像以进行合成处理,可以缩短预览或拍照或录像的操作时间,从而使得本实施例提供的图像处理方案得到的图像能够适用于图像的预览、拍照和录像。此外,在通过多帧短曝的合成方式得到HDR图像后,可以在HDR图像亮度小于目标亮度时对HDR图像进行增亮处理,或者可以将该HDR图像与一帧长曝图像进行合成处理,从而得到亮度效果更佳的图像。It can be seen from the above that when the electronic device provided in this embodiment needs to preview or take pictures or videos, the electronic device directly obtains the newly stored multi-frame first YUV images from the first image buffer queue for synthesis processing, which can shorten the preview or The operation time of photographing or video recording, so that the image obtained by the image processing solution provided in this embodiment can be suitable for image preview, photographing and video recording. In addition, after the HDR image is obtained by synthesizing multiple frames of short exposure, the HDR image can be brightened when the brightness of the HDR image is lower than the target brightness, or the HDR image can be synthesized with a long-exposure image, thereby Get a brighter image.
本申请实施例还提供一种存储介质,该存储介质存储有计算机程序,当该计算机程序在计算机上运行时,使得该计算机执行上述任一实施例中的图像处理方法,比如:基于第一曝光值,持续获取目标场景的第一YUV图像;按照曝光的先后顺序将所述第一YUV图像存储至第一图像缓存队列;当需要进行预览或拍照或录像时,从所述第一图像缓存队列中获取最新存储的多帧第一YUV图像;对所述多帧第一YUV图像进行合成处理,得到具有高动态范围的第一合成图像;根据所述第一合成图像,对所述目标场景进行预览或拍照或录像操作。An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer is made to execute the image processing method in any of the foregoing embodiments, for example: based on the first exposure value, continuously obtain the first YUV image of the target scene; store the first YUV image in the first image cache queue according to the exposure sequence; Obtain the newly stored first YUV images of multiple frames; perform synthesis processing on the first YUV images of the multiple frames to obtain a first synthesized image with a high dynamic range; Preview or take pictures or video operations.
在本申请实施例中,存储介质可以是磁碟、光盘、只读存储器(Read Only Memory,ROM)、或者随机存取记忆体(Random Access Memory,RAM)等。In this embodiment of the present application, the storage medium may be a magnetic disk, an optical disk, a read only memory (Read Only Memory, ROM), or a random access memory (Random Access Memory, RAM), or the like.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
需要说明的是,对本申请实施例的图像处理方法而言,本领域普通测试人员可以理解实现本申请实施例的图像处理方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,如存储在电子设备的存储器中,并被该电子设备内的至少一个处理器执行,在执行过程中可包括如图像处理方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储器、随机存取记忆体等。It should be noted that, for the image processing method of the embodiment of the present application, ordinary testers in the art can understand that all or part of the process of realizing the image processing method of the embodiment of the present application can be completed by controlling the relevant hardware through a computer program , the computer program can be stored in a computer-readable storage medium, such as a memory of an electronic device, and executed by at least one processor in the electronic device, and the execution process can include, for example, the implementation of an image processing method example process. The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, or the like.
对本申请实施例的图像处理装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。该集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,该存储介质譬如为只读存储器,磁盘或光盘等。For the image processing apparatus of the embodiment of the present application, each functional module thereof may be integrated in one processing chip, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disk.
以上对本申请实施例所提供的一种图像处理方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The image processing method, device, storage medium, and electronic device provided by the embodiments of the present application have been described in detail above. The principles and implementations of the present application are described with specific examples. The descriptions of the above embodiments are only It is used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there will be changes in the specific embodiments and application scope. In summary, this specification The content should not be construed as a limitation on this application.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910579967.2A CN110213502B (en) | 2019-06-28 | 2019-06-28 | Image processing method, device, storage medium and electronic device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910579967.2A CN110213502B (en) | 2019-06-28 | 2019-06-28 | Image processing method, device, storage medium and electronic device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110213502A CN110213502A (en) | 2019-09-06 |
| CN110213502B true CN110213502B (en) | 2022-07-15 |
Family
ID=67795537
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910579967.2A Expired - Fee Related CN110213502B (en) | 2019-06-28 | 2019-06-28 | Image processing method, device, storage medium and electronic device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110213502B (en) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111028190A (en) * | 2019-12-09 | 2020-04-17 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic device |
| CN113840108A (en) * | 2020-06-23 | 2021-12-24 | 深圳市万普拉斯科技有限公司 | Video image processing method and device, camera equipment and readable storage medium |
| CN113473014B (en) * | 2021-06-30 | 2022-11-18 | 北京紫光展锐通信技术有限公司 | Image data processing method and electronic equipment |
| CN119299814A (en) * | 2021-10-09 | 2025-01-10 | 荣耀终端有限公司 | Image processing method and electronic device |
| CN115967846B (en) * | 2021-10-09 | 2024-09-17 | 荣耀终端有限公司 | Image processing method and electronic equipment |
| CN116701675B (en) * | 2022-02-25 | 2024-09-24 | 荣耀终端有限公司 | Image data processing method and electronic equipment |
| CN116723383B (en) * | 2022-02-28 | 2024-04-19 | 荣耀终端有限公司 | A shooting method and related equipment |
| WO2023178588A1 (en) * | 2022-03-24 | 2023-09-28 | Qualcomm Incorporated | Capturing images using variable aperture imaging devices |
| CN117479000B (en) * | 2022-08-08 | 2024-08-27 | 荣耀终端有限公司 | Video recording method and related device |
| CN116389898B (en) * | 2023-02-27 | 2024-03-19 | 荣耀终端有限公司 | Image processing methods, equipment and storage media |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109672819A (en) * | 2018-12-10 | 2019-04-23 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| DE102009055269B4 (en) * | 2009-12-23 | 2012-12-06 | Robert Bosch Gmbh | Method for determining the relative movement by means of an HDR camera |
| JP5136664B2 (en) * | 2010-07-09 | 2013-02-06 | カシオ計算機株式会社 | Image processing apparatus and program |
| JP5713752B2 (en) * | 2011-03-28 | 2015-05-07 | キヤノン株式会社 | Image processing apparatus and control method thereof |
| EP3046319A1 (en) * | 2015-01-19 | 2016-07-20 | Thomson Licensing | Method for generating an HDR image of a scene based on a tradeoff between brightness distribution and motion |
| JP6744711B2 (en) * | 2015-12-15 | 2020-08-19 | キヤノン株式会社 | Imaging device, control method thereof, program, and storage medium |
| JP6675194B2 (en) * | 2015-12-15 | 2020-04-01 | キヤノン株式会社 | Imaging device, control method therefor, program, and storage medium |
| CN106679676B (en) * | 2017-01-10 | 2019-08-27 | 北京航空航天大学 | A single-field multifunctional optical sensor and its implementation method |
-
2019
- 2019-06-28 CN CN201910579967.2A patent/CN110213502B/en not_active Expired - Fee Related
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109672819A (en) * | 2018-12-10 | 2019-04-23 | Oppo广东移动通信有限公司 | Image processing method, image processing device, electronic equipment and computer readable storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110213502A (en) | 2019-09-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110213502B (en) | Image processing method, device, storage medium and electronic device | |
| CN110445988B (en) | Image processing method, device, storage medium and electronic device | |
| CN109040609B (en) | Exposure control method, exposure control device, electronic equipment and computer-readable storage medium | |
| CN110381263B (en) | Image processing method, device, storage medium and electronic device | |
| CN108833804A (en) | Imaging method, device and electronic equipment | |
| CN110198417A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| WO2020034737A1 (en) | Imaging control method, apparatus, electronic device, and computer-readable storage medium | |
| CN109005364A (en) | Image formation control method, device, electronic equipment and computer readable storage medium | |
| CN108833802B (en) | Exposure control method and device and electronic equipment | |
| CN108322669A (en) | The acquisition methods and device of image, imaging device, computer readable storage medium and computer equipment | |
| CN109005342A (en) | Panoramic shooting method and device and imaging equipment | |
| CN110012227B (en) | Image processing method, device, storage medium and electronic device | |
| CN109993722B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| CN110198418B (en) | Image processing method, device, storage medium and electronic device | |
| CN110445989A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| CN110430370B (en) | Image processing method, device, storage medium and electronic device | |
| CN110290325B (en) | Image processing method, device, storage medium and electronic device | |
| US20210168273A1 (en) | Control Method and Electronic Device | |
| CN110266954A (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| CN110198419A (en) | Image processing method, device, storage medium and electronic device | |
| CN108900785A (en) | Exposure control method and device and electronic equipment | |
| CN108833803A (en) | Imaging method, device and electronic equipment | |
| CN110278375B (en) | Image processing method, device, storage medium and electronic device | |
| CN110572585B (en) | Image processing method, image processing device, storage medium and electronic equipment | |
| CN110266967B (en) | Image processing method, device, storage medium and electronic device |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20220715 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |