CN107197169A - A kind of high dynamic range images image pickup method and mobile terminal - Google Patents
A kind of high dynamic range images image pickup method and mobile terminal Download PDFInfo
- Publication number
- CN107197169A CN107197169A CN201710480243.3A CN201710480243A CN107197169A CN 107197169 A CN107197169 A CN 107197169A CN 201710480243 A CN201710480243 A CN 201710480243A CN 107197169 A CN107197169 A CN 107197169A
- Authority
- CN
- China
- Prior art keywords
- image
- preview image
- preview
- foreground
- mobile terminal
- 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.)
- Granted
Links
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
本发明提供一种高动态范围图像拍摄方法及移动终端,方法包括:获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。本发明实施例提供的高动态范围图像拍摄方法,移动终端可以避免用于合成HDR图像的照片之间存在时间差,从而减少重影或者残影的发生,提高移动终端拍摄的照片质量。
The present invention provides a high dynamic range image shooting method and a mobile terminal. The method includes: acquiring a first preview image collected by a first camera; determining a foreground image area and a background image area in the first preview image; instruction, respectively acquire the second preview image collected by the first camera and the third preview image collected by the second camera; perform image synthesis processing on the second preview image and the third preview image, and output a high A dynamic range image; wherein, the second preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area. According to the high dynamic range image shooting method provided by the embodiment of the present invention, the mobile terminal can avoid the time difference between the photos used to synthesize the HDR image, thereby reducing the occurrence of ghosting or afterimage, and improving the quality of the photos taken by the mobile terminal.
Description
技术领域technical field
本发明涉及通信技术领域,尤其涉及一种高动态范围图像拍摄方法及移动终端。The invention relates to the field of communication technology, in particular to a high dynamic range image shooting method and a mobile terminal.
背景技术Background technique
随着通信技术的发展,手机和平板电脑等移动终端已经成为人们日常生活中不可或缺的工具。为了对移动终端的拍照功能的要求,高动态范围(High-Dynamic Range,HDR)图像拍摄技术逐渐被应用到移动终端中,移动终端可以通过摄像头分别抓取长曝光、短曝光以及正常曝光的照片,并对抓取的多张照片进行合成得到HDR图像,合成的HDR图像具有更均衡的曝光效果,从而提升移动终端拍照的照片质量。With the development of communication technology, mobile terminals such as mobile phones and tablet computers have become indispensable tools in people's daily life. In order to meet the requirements of the camera function of mobile terminals, high-dynamic range (High-Dynamic Range, HDR) image capture technology is gradually applied to mobile terminals, and mobile terminals can capture long-exposure, short-exposure and normal-exposure photos respectively through the camera. , and synthesize multiple captured photos to obtain an HDR image, and the synthesized HDR image has a more balanced exposure effect, thereby improving the quality of photos taken by the mobile terminal.
但是,移动终端在采用HDR技术拍照过程中,由于移动终端在连续抓取两张照片时会存在两帧或者三帧的时间差,若移动终端处于运动或者被拍照物体处于运动,连续抓取的两张照片的图像有变化,使合成后的HDR图像存在重影或者残影的现象,从而导致移动终端拍摄的照片质量降低。可见,目前的移动终端在拍照过程中,存在因重影或者残影严重而导致照片质量低问题。However, when the mobile terminal adopts the HDR technology to take pictures, since there will be a time difference of two or three frames when the mobile terminal continuously captures two pictures, if the mobile terminal is in motion or the object to be photographed is in motion, the two pictures captured continuously The image of the photo changes, causing ghosting or afterimage phenomenon in the synthesized HDR image, which reduces the quality of the photo taken by the mobile terminal. It can be seen that the current mobile terminal has the problem of low photo quality due to heavy ghosting or afterimage during the photo taking process.
发明内容Contents of the invention
本发明实施例提供一种高动态范围图像拍摄方法及移动终端,以解决移动终端在拍照过程中,存在因重影或者残影严重而导致照片质量低问题。Embodiments of the present invention provide a high dynamic range image shooting method and a mobile terminal, so as to solve the problem of low quality of photos caused by ghosting or severe residual images during the shooting process of the mobile terminal.
第一方面,本发明实施例提供了一种高动态范围图像拍摄方法,应用于单侧设置有第一摄像头和第二摄像头的移动终端,所述方法包括:In the first aspect, an embodiment of the present invention provides a high dynamic range image shooting method, which is applied to a mobile terminal with a first camera and a second camera arranged on one side, and the method includes:
获取第一摄像头采集的第一预览图像;Obtain the first preview image collected by the first camera;
确定所述第一预览图像中的前景图像区域和背景图像区域;determining a foreground image area and a background image area in the first preview image;
若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;If a photographing instruction is received, respectively acquire a second preview image collected by the first camera and a third preview image collected by the second camera;
对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;performing image synthesis processing on the second preview image and the third preview image, and outputting a high dynamic range image;
其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。Wherein, the second preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area.
第二方面,本发明实施例还提供一种移动终端,所述移动终端的单侧设置有第一摄像头和第二摄像头,所述移动终端还包括:In the second aspect, an embodiment of the present invention further provides a mobile terminal, where a first camera and a second camera are arranged on one side of the mobile terminal, and the mobile terminal further includes:
第一图像获取模块,用于获取第一摄像头采集的第一预览图像;The first image acquisition module is used to acquire the first preview image collected by the first camera;
区域确定模块,用于确定所述第一图像获取模块获取的第一预览图像中的前景图像区域和背景图像区域;an area determination module, configured to determine a foreground image area and a background image area in the first preview image acquired by the first image acquisition module;
第二图像获取模块,用于若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;The second image acquisition module is configured to acquire the second preview image collected by the first camera and the third preview image collected by the second camera respectively if a photographing instruction is received;
合成模块,用于对所述第二图像获取模块获取的第二预览图像和第三预览图像进行图像合成处理,输出高动态范围图像;A synthesis module, configured to perform image synthesis processing on the second preview image and the third preview image acquired by the second image acquisition module, and output a high dynamic range image;
其中,所述第二预览图像为对所述区域确定模块确定的前景图像区域曝光的图像,所述第三预览图像为对所述区域确定模块确定的背景图像区域曝光的图像。Wherein, the second preview image is an image exposed to the foreground image area determined by the area determination module, and the third preview image is an image exposed to the background image area determined by the area determination module.
第三方面,本发明实施例还提供一种移动终端,所述移动终端的单侧设置有第一摄像头和第二摄像头,所述移动终端还包括处理器,存储器,存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述高动态范围图像拍摄方法的步骤。In the third aspect, the embodiment of the present invention also provides a mobile terminal, a first camera and a second camera are arranged on one side of the mobile terminal, and the mobile terminal further includes a processor, a memory, stored in the memory and A computer program that can run on the processor, when the computer program is executed by the processor, the steps of the above-mentioned high dynamic range image shooting method are realized.
第四方面,本发明实施例还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述高动态范围图像拍摄方法的步骤。In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned high dynamic range image capture method are implemented .
这样,本发明实施例中,获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。移动终端可以避免用于合成HDR图像的照片之间存在时间差,从而减少重影或者残影的发生,提高移动终端拍摄的照片质量。In this way, in the embodiment of the present invention, the first preview image captured by the first camera is acquired; the foreground image area and the background image area in the first preview image are determined; The second preview image collected and the third preview image collected by the second camera; image synthesis processing is performed on the second preview image and the third preview image, and a high dynamic range image is output; wherein, the second The preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area. The mobile terminal can avoid the time difference between photos used for synthesizing the HDR image, thereby reducing the occurrence of ghosting or afterimage, and improving the quality of photos taken by the mobile terminal.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the description of the embodiments of the present invention. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本发明实施例提供的高动态范围图像拍摄方法的流程图之一;Fig. 1 is one of the flow charts of the high dynamic range image shooting method provided by the embodiment of the present invention;
图2是本发明实施例提供的高动态范围图像拍摄方法的流程图之二;Fig. 2 is the second flowchart of the high dynamic range image shooting method provided by the embodiment of the present invention;
图3是本发明实施例提供的高动态范围图像拍摄方法的流程图之三;Fig. 3 is the third flowchart of the high dynamic range image shooting method provided by the embodiment of the present invention;
图4是本发明实施例提供的移动终端的结构图之一;Fig. 4 is one of the structural diagrams of the mobile terminal provided by the embodiment of the present invention;
图5是本发明实施例提供的移动终端中区域确定模块的结构图之一;Fig. 5 is one of the structural diagrams of the area determination module in the mobile terminal provided by the embodiment of the present invention;
图6是本发明实施例提供的移动终端中区域确定模块的结构图之二;Fig. 6 is the second structural diagram of the area determination module in the mobile terminal provided by the embodiment of the present invention;
图7是本发明实施例提供的移动终端中背景区域确定单元的结构图;7 is a structural diagram of a background area determination unit in a mobile terminal provided by an embodiment of the present invention;
图8是本发明实施例提供的移动终端的结构图之二;FIG. 8 is the second structural diagram of the mobile terminal provided by the embodiment of the present invention;
图9是本发明实施例提供的移动终端的结构图之三;FIG. 9 is the third structural diagram of the mobile terminal provided by the embodiment of the present invention;
图10是本发明实施例提供的移动终端的结构图之四。FIG. 10 is a fourth structural diagram of a mobile terminal provided by an embodiment of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
参见图1,图1是本发明实施例提供的高动态范围图像拍摄方法的流程图之一,应用于单侧设置有第一摄像头和第二摄像头的移动终端,如图1所示,所述方法包括:Referring to Fig. 1, Fig. 1 is one of the flow charts of the high dynamic range image capturing method provided by the embodiment of the present invention, which is applied to a mobile terminal with a first camera and a second camera on one side, as shown in Fig. 1 , the Methods include:
步骤101、获取第一摄像头采集的第一预览图像。Step 101. Acquire a first preview image captured by a first camera.
本发明实施例中,若移动终端的相机应用程序处于开启,且移动终端的第一摄像头处于图像预览状态,移动终端可以获取第一摄像头采集的图像作为上述第一预览图像。In the embodiment of the present invention, if the camera application program of the mobile terminal is started, and the first camera of the mobile terminal is in the image preview state, the mobile terminal can acquire the image captured by the first camera as the first preview image.
步骤102、确定所述第一预览图像中的前景图像区域和背景图像区域。Step 102. Determine a foreground image area and a background image area in the first preview image.
本发明实施例中,在上述步骤101获取到第一预览图像时,移动终端可以确定第一预览图像中的前景图像区域和背景图像区域。In the embodiment of the present invention, when the first preview image is acquired in step 101 above, the mobile terminal may determine the foreground image area and the background image area in the first preview image.
其中,上述确定第一预览图像中的前景图像区域和背景图像区域,可以是将第一预览图像中预先指定的两个不同图像区域,分别作为前景图像区域和背景图像区域,例如:可以预先指定第一预览图像中某一固定图像区域作为前景图像区域,且除前景图像区域以外的图像区域作为背景图像区域;或者也可以是将除前景图像区域以外的部分图像区域作为背景图像区域等。Wherein, the above-mentioned determination of the foreground image area and the background image area in the first preview image may be to use two different pre-designated image areas in the first preview image as the foreground image area and the background image area respectively, for example: it may be pre-designated A certain fixed image area in the first preview image is used as the foreground image area, and the image area other than the foreground image area is used as the background image area; or part of the image area except the foreground image area is used as the background image area, etc.
步骤103、若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。Step 103. If a photographing instruction is received, respectively acquire a second preview image captured by the first camera and a third preview image captured by the second camera.
本发明实施例中,若上述步骤102确定第一预览图像中的前景图像区域和背景图像区域,当移动终端接收到拍照指令时,移动终端可以同时控制第一摄像头采集第二预览图像,且第二摄像头采集第三预览图像,使获取的第二预览图像和第三预览图像为同一帧图像,从而可以减少甚至避免合成HDR图像发生重影或者残影。In the embodiment of the present invention, if the above-mentioned step 102 determines the foreground image area and the background image area in the first preview image, when the mobile terminal receives a photographing instruction, the mobile terminal can simultaneously control the first camera to capture the second preview image, and the second The second camera captures the third preview image, so that the acquired second preview image and the third preview image are the same frame image, thereby reducing or even avoiding ghosting or afterimage of the synthesized HDR image.
其中,上述第二预览图像为对前景图像区域曝光的图像,上述第三预览图像为对背景图像区域曝光的图像,即在第一摄像头采集第二预览图像,且第二摄像头采集第三预览图像时,移动终端可以控制第一摄像头对其采集的图像以前景图像区域为基准曝光点进行曝光,并控制第一摄像头抓取曝光后的图像作为第二预览图像;移动终端控制第二摄像头对其采集的图像以背景图像区域为基准曝光点进行曝光,并控制第二摄像头抓取曝光后的图像作为第三预览图像,从而使第二预览图像和第三预览图像的曝光基准点不同,提高合成的HDR图像的质量。上述第一摄像头和第二摄像头均可以采用自动曝光(AutomaticExposure,AE)技术分别对前景图像区域和背景图像区域进行曝光。Wherein, the above-mentioned second preview image is an image exposed to the foreground image area, and the above-mentioned third preview image is an image exposed to the background image area, that is, the second preview image is collected by the first camera, and the third preview image is collected by the second camera. , the mobile terminal can control the first camera to expose the captured image with the foreground image area as the reference exposure point, and control the first camera to capture the exposed image as the second preview image; the mobile terminal controls the second camera to The collected image is exposed with the background image area as the reference exposure point, and the second camera is controlled to capture the exposed image as the third preview image, so that the exposure reference points of the second preview image and the third preview image are different, and the synthesis is improved. The quality of the HDR image. Both the above-mentioned first camera and the second camera may use automatic exposure (Automatic Exposure, AE) technology to respectively expose the foreground image area and the background image area.
需要说明的是,上述第一摄像头和上述第二摄像头设置于移动终端同一侧,例如:第一摄像头和第二摄像头可以组成移动终端的前置双摄像头或者后置双摄像头。另外,为了保证合成的HDR图像不失真,第一摄像头和第二摄像头的焦距以及视场角等设置趋于一致,可以使第一摄像头采集的图像和第二摄像头采集的图像的大小以及拍摄对象保持一致。It should be noted that the above-mentioned first camera and the above-mentioned second camera are arranged on the same side of the mobile terminal. For example, the first camera and the second camera may form a front dual camera or a rear dual camera of the mobile terminal. In addition, in order to ensure that the synthesized HDR image is not distorted, the focal length and field of view of the first camera and the second camera are set to be consistent, so that the size of the image captured by the first camera and the image captured by the second camera and the size of the subject can be adjusted. be consistent.
步骤104、对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像。Step 104: Perform image composition processing on the second preview image and the third preview image to output a high dynamic range image.
本发明实施例中,若上述步骤103获取到第二预览图像和第三预览图像,移动终端可以对第二预览图像和第三预览图像进行合成,移动终端在合成图像过程中,可以对第二预览图像和第三预览图像进行图像配准、曝光合成以及色调映射等,从而合成高质量的HDR图像。In the embodiment of the present invention, if the second preview image and the third preview image are obtained in step 103 above, the mobile terminal can synthesize the second preview image and the third preview image, and the mobile terminal can synthesize the second preview image and the third preview image during the image synthesis process. The preview image and the third preview image are subjected to image registration, exposure synthesis, tone mapping, etc., so as to synthesize a high-quality HDR image.
本发明实施例中,所述移动终端可以是任何单侧设置有第一摄像头和第二摄像头的移动终端,例如:手机、平板电脑(Tablet Personal Computer)、膝上型电脑(LaptopComputer)、个人数字助理(personal digital assistant,简称PDA)、移动上网装置(Mobile Internet Device,MID)或可穿戴式设备(Wearable Device)等移动终端。In the embodiment of the present invention, the mobile terminal can be any mobile terminal with a first camera and a second camera on one side, such as a mobile phone, a tablet computer (Tablet Personal Computer), a laptop computer (LaptopComputer), a personal digital Assistant (personal digital assistant, PDA for short), mobile Internet device (Mobile Internet Device, MID) or wearable device (Wearable Device) and other mobile terminals.
本发明实施例中,获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。移动终端可以避免用于合成HDR图像的照片之间存在时间差,从而减少重影或者残影的发生,提高移动终端拍摄的照片质量。In the embodiment of the present invention, the first preview image collected by the first camera is obtained; the foreground image area and the background image area in the first preview image are determined; The second preview image and the third preview image collected by the second camera; performing image synthesis processing on the second preview image and the third preview image, and outputting a high dynamic range image; wherein, the second preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area. The mobile terminal can avoid the time difference between photos used for synthesizing the HDR image, thereby reducing the occurrence of ghosting or afterimage, and improving the quality of photos taken by the mobile terminal.
参见图2,图2是本发明实施例提供的一种高动态范围图像拍摄方法的流程图,如图2所示,所述方法包括:Referring to FIG. 2, FIG. 2 is a flowchart of a high dynamic range image capturing method provided by an embodiment of the present invention. As shown in FIG. 2, the method includes:
步骤201、获取第一摄像头采集的第一预览图像。Step 201. Acquire a first preview image captured by a first camera.
步骤202、对所述第一预览图像进行人脸识别,得到人脸图像区域。Step 202: Perform face recognition on the first preview image to obtain a face image area.
本发明实施例中,若上述步骤201获取到第一预览图像,移动终端可以通过人脸识别技术,识别第一预览图像中的人脸图像,从而得到人脸图像区域,即第一预览图像中人脸图像所在的区域。其中,上述人脸识别技术为本领域技术人员熟知,在此不再进行赘述。In the embodiment of the present invention, if the first preview image is obtained in the above step 201, the mobile terminal can identify the face image in the first preview image through face recognition technology, so as to obtain the face image area, that is, the face image area in the first preview image. The area where the face image is located. Wherein, the aforementioned face recognition technology is well known to those skilled in the art, and will not be repeated here.
步骤203、将所述人脸图像区域确定为前景图像区域。Step 203. Determine the face image area as a foreground image area.
本发明实施例中,若上述步骤202得到人脸图像区域,移动终端可以确定上述人脸图像区域为前景图像区域。In the embodiment of the present invention, if the face image area is obtained in step 202, the mobile terminal may determine the face image area as the foreground image area.
步骤204、基于所述前景图像区域,确定背景图像区域。Step 204: Determine a background image area based on the foreground image area.
本发明实施例中,若上述步骤203确定前景图像区域,移动终端可以按照预设规则,确定第一预览图像中除人脸图像区域以外的任一区域作为背景图像区域。例如:可以是将第一预览图像中,除人脸图像区域以外的区域作为背景图像区域;或者在第一预览图像的除人脸图像区域以外的图像区域中,随机确定部分区域作为上述背景图像区域。In the embodiment of the present invention, if the foreground image area is determined in step 203 above, the mobile terminal may determine any area in the first preview image except the face image area as the background image area according to preset rules. For example: in the first preview image, the area other than the face image area can be used as the background image area; or in the image area other than the face image area of the first preview image, a part of the area is randomly determined as the background image area.
可选的,上述步骤204可以包括:获取所述第一预览图像的Y通道图像;以m*n的像素块为单位像素块,对所述Y通道图像中除所述前景图像区域之外的所有图像区域进行图像分割,得到T个像素块;对于所述T个像素块中每个像素块,计算每个像素块中所有像素点的亮度和值;将所有亮度和值中的最大亮度和值对应的像素块所在图像区域确定为背景图像区域。Optionally, the above step 204 may include: acquiring a Y-channel image of the first preview image; taking m*n pixel blocks as a unit pixel block, for the Y-channel image except for the foreground image area Image segmentation is performed on all image regions to obtain T pixel blocks; for each pixel block in the T pixel blocks, the brightness and value of all pixels in each pixel block are calculated; the maximum brightness of all brightness and values is summed The image area where the pixel block corresponding to the value is located is determined as the background image area.
该实施方式中,移动终端可以对第一预览图像中除前景图像区域之外的图像区域分割成预设大小的多个像素块,并在多个像素块中确定最大亮度和值的像素块所在图像区域为背景图像区域,从而使移动终端在控制第二摄像头以背景图像区域进行曝光以获取第三预设图像时,以最大亮度和值的像素块所在图像区域为曝光基准点,可以使合成的HDR图像的曝光效果更佳,进一步提高HDR图像的质量。In this embodiment, the mobile terminal can divide the image area in the first preview image except the foreground image area into multiple pixel blocks of preset size, and determine the location of the pixel block with the maximum brightness and value among the multiple pixel blocks. The image area is the background image area, so that when the mobile terminal controls the second camera to expose the background image area to obtain the third preset image, the image area where the pixel block with the maximum brightness and value is located is used as the exposure reference point, and the synthetic The exposure effect of the HDR image is better, further improving the quality of the HDR image.
其中,上述Y通道图像为包括YUV(“Y”表示灰度值;“U”和“V”表示色度)格式的图像数据的图像。当然,上述第一预览图像也可以是包括其他格式的图像数据的图像,移动终端可以对第一预览图像的图像数据的格式进行转换,以获取第一预览图像的Y通道图像,例如:若第一预览图像为包括RGB(红,即Red;绿,即Green;蓝,即Blue)格式的图像数据的图像,移动终端可以将其图像数据由RGB格式转换为YUV格式,从而得到第一预览图像的Y通道图像。Wherein, the above-mentioned Y-channel image is an image including image data in YUV (“Y” indicates gray value; “U” and “V” indicate chroma) format. Certainly, the above-mentioned first preview image may also be an image including image data in other formats, and the mobile terminal may convert the format of the image data of the first preview image to obtain the Y-channel image of the first preview image, for example: if A preview image is an image including image data in RGB (red, ie Red; green, ie Green; blue, ie Blue) format, and the mobile terminal can convert its image data from RGB format to YUV format, thereby obtaining the first preview image The Y channel image.
步骤205、若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。Step 205. If a photographing instruction is received, respectively acquire a second preview image captured by the first camera and a third preview image captured by the second camera.
本发明实施例中,若上述步骤204确定第一预览图像中的前景图像区域和背景图像区域,当移动终端接收到拍照指令时,移动终端可以同时控制第一摄像头采集第二预览图像,且第二摄像头采集第三预览图像,使获取的第二预览图像和第三预览图像为同一帧图像,从而可以减少甚至避免合成HDR图像发生重影或者残影。In the embodiment of the present invention, if the above-mentioned step 204 determines the foreground image area and the background image area in the first preview image, when the mobile terminal receives a photographing instruction, the mobile terminal can simultaneously control the first camera to capture the second preview image, and the second The second camera captures the third preview image, so that the acquired second preview image and the third preview image are the same frame image, thereby reducing or even avoiding ghosting or afterimage of the synthesized HDR image.
可选的,上述步骤205之前,还可以包括:对所述前景图像区域和所述背景图像区域分别进行测光,分别得到所述前景图像区域的第一曝光值和所述背景图像区域的第二曝光值;上述步骤205可以包括:若所述第一曝光值和所述第二曝光值不相同,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。Optionally, before the above step 205, it may also include: respectively performing light metering on the foreground image area and the background image area to obtain the first exposure value of the foreground image area and the first exposure value of the background image area respectively. Two exposure values; the above step 205 may include: if the first exposure value and the second exposure value are not the same, respectively acquiring the second preview image collected by the first camera and the first preview image collected by the second camera Three preview images.
该实施方式中,在移动终端的相机应用处于开启下,且若上述步骤204确定前景图像区域和背景图像区域,移动终端可以对第一预设图像的前景图像区域和背景图像区域进行测光,若前景图像区域和背景图像区域的曝光值不同,则确定移动终端拍照时需要开启HDR功能,当接收到拍照指令,则移动终端可以控制第一摄像头采集第二预览图像和第二摄像头采集第三预览图像,并通过第二预览图像和第三预览图像合成HDR图像,提高移动终端拍摄的照片质量。In this embodiment, when the camera application of the mobile terminal is turned on, and if the foreground image area and the background image area are determined in step 204 above, the mobile terminal can perform light metering on the foreground image area and the background image area of the first preset image, If the exposure values of the foreground image area and the background image area are different, it is determined that the mobile terminal needs to turn on the HDR function when taking pictures. preview the image, and combine the HDR image with the second preview image and the third preview image to improve the quality of the photo taken by the mobile terminal.
需要说明的是,上述若前景图像区域和背景图像区域的曝光值相同,定移动终端通过单一摄像头拍摄的照片也可以具有较高的图像质量,移动终端可以控制第一摄像头采集图像,并将第一摄像头采集的图像输出作为照片,从而可以节约移动终端的电池电量以及存储资源。It should be noted that if the above-mentioned exposure values of the foreground image area and the background image area are the same, the photos taken by the mobile terminal through a single camera can also have higher image quality, and the mobile terminal can control the first camera to collect images, and the second An image collected by a camera is output as a photo, thereby saving battery power and storage resources of the mobile terminal.
步骤206、对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像。Step 206: Perform image composition processing on the second preview image and the third preview image to output a high dynamic range image.
本发明实施例中,通过对所述第一预览图像进行人脸识别,得到人脸图像区域;将所述人脸图像区域确定为前景图像区域;基于所述前景图像区域,确定背景图像区域。这样,当拍摄的照片中包括人脸图像时,移动终端可以通过人脸图像区域确定前景图像区域和背景图像区域,可以提高合成的HDR图像的曝光效果,从而提升HDR图像的图像质量。In the embodiment of the present invention, the face image area is obtained by performing face recognition on the first preview image; the face image area is determined as the foreground image area; and the background image area is determined based on the foreground image area. In this way, when the captured photo includes a face image, the mobile terminal can determine the foreground image area and the background image area through the face image area, which can improve the exposure effect of the synthesized HDR image, thereby improving the image quality of the HDR image.
参见图3,图3是本发明实施例提供的一种高动态范围图像拍摄方法的流程图,如图3所示,所述方法包括:Referring to FIG. 3, FIG. 3 is a flowchart of a high dynamic range image capturing method provided by an embodiment of the present invention. As shown in FIG. 3, the method includes:
步骤301、获取第一摄像头采集的第一预览图像。Step 301. Acquire a first preview image captured by a first camera.
步骤302、获取所述第一预览图像的深度数据,所述深度数据包括每个像素点的深度值。Step 302. Obtain depth data of the first preview image, where the depth data includes a depth value of each pixel.
本发明实施例中,若上述步骤301获取到第一预览图像时,移动终端可以获取第一预览图像的深度数据。其中,上述第一预览图像的深度数据,可以是第一摄像头采集第一预览图像时,移动终端通过其上的距离检测组件,如红外发射器等,检测的第一预览图像中每个像素点的深度值。In the embodiment of the present invention, if the first preview image is acquired in step 301 above, the mobile terminal may acquire the depth data of the first preview image. Wherein, the depth data of the above-mentioned first preview image may be each pixel in the first preview image detected by the mobile terminal through a distance detection component on it, such as an infrared emitter, when the first camera captures the first preview image the depth value.
步骤303、获取所述深度数据中的最小深度值v0。Step 303. Obtain the minimum depth value v 0 in the depth data.
本发明实施例中,若上述步骤302获取到第一预览图像的景深数据,移动终端可以对第一预览图像中每一像素点的深度值进行比较,从而获取到景深数据中的最小深度值v0。In the embodiment of the present invention, if the above step 302 obtains the depth data of the first preview image, the mobile terminal can compare the depth values of each pixel in the first preview image, so as to obtain the minimum depth value v in the depth data 0 .
步骤304、基于所述最小深度值v0,将深度值取值在v0~(v0+v1)范围内的像素点的集合确定为前景图像区域。Step 304. Based on the minimum depth value v 0 , determine a set of pixel points with a depth value in the range of v 0 -(v 0 +v 1 ) as the foreground image area.
本发明实施例中,由于第一摄像头采集第一预览图像时,被拍摄对象距离第一摄像头的距离越近,被拍摄对象在第一预览图像中对应的图像所在的像素点具有越小的深度值,且同一拍摄对象对应的图像中各像素点的深度值通常比较接近,移动终端将深度值取值在v0~(v0+v1)范围内的像素点的集合确定为前景图像区域,从而可以将距离第一摄像头近的拍摄对象对应的图像在第一预览图像中的图像区域,作为前景图像区域,实现移动终端选择合适的前景图像区域,从而可以使合成的HDR图像曝光效果更佳。In the embodiment of the present invention, when the first camera captures the first preview image, the closer the subject is to the first camera, the smaller the depth of the pixel corresponding to the subject in the first preview image is. value, and the depth values of each pixel in the image corresponding to the same subject are usually relatively close, the mobile terminal determines the set of pixels with depth values in the range of v 0 ~ (v 0 +v 1 ) as the foreground image area , so that the image area of the image corresponding to the subject close to the first camera in the first preview image can be used as the foreground image area, so that the mobile terminal can select an appropriate foreground image area, so that the exposure effect of the synthesized HDR image can be made better good.
步骤305、基于所述前景图像区域,确定背景图像区域。Step 305. Determine a background image area based on the foreground image area.
本发明实施例中,上述步骤304确定前景图像区域,移动终端可以按照预设规则,确定第一预览图像中除前景图像区域以外的任一区域作为背景图像区域。In the embodiment of the present invention, the above step 304 determines the foreground image area, and the mobile terminal may determine any area in the first preview image except the foreground image area as the background image area according to preset rules.
可选的,上述步骤305可以包括:获取所述第一预览图像的Y通道图像;以m*n的像素块为单位像素块,对所述Y通道图像中除所述前景图像区域之外的所有图像区域进行图像分割,得到T个像素块;对于所述T个像素块中每个像素块,计算每个像素块中所有像素点的亮度和值;将所有亮度和值中的最大亮度和值对应的像素块所在图像区域确定为背景图像区域。Optionally, the above step 305 may include: acquiring a Y-channel image of the first preview image; taking m*n pixel blocks as unit pixel blocks, for the Y-channel image except for the foreground image area Image segmentation is performed on all image regions to obtain T pixel blocks; for each pixel block in the T pixel blocks, the brightness and value of all pixels in each pixel block are calculated; the maximum brightness of all brightness and values is summed The image area where the pixel block corresponding to the value is located is determined as the background image area.
该实施方式中,移动终端可以对第一预览图像中除人脸图像区域之外的图像区域分割成预设大小的多个像素块,并在多个像素块中确定最大亮度和值的像素块所在图像区域为背景图像区域,从而使移动终端在控制第二摄像头以背景图像区域进行曝光以获取第三预设图像时,以最大亮度和值的像素块所在图像区域为曝光基准点,可以使合成的HDR图像的曝光效果更佳,进一步提高HDR图像的质量。In this embodiment, the mobile terminal can divide the image area in the first preview image except the face image area into a plurality of pixel blocks of a preset size, and determine the pixel block with the maximum brightness and value among the plurality of pixel blocks The image area is the background image area, so that when the mobile terminal controls the second camera to expose the background image area to obtain the third preset image, the image area where the pixel block with the maximum brightness and value is located is used as the exposure reference point, which can make The composited HDR image has a better exposure, further improving the quality of the HDR image.
步骤306、若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。Step 306: If a photographing instruction is received, respectively acquire a second preview image captured by the first camera and a third preview image captured by the second camera.
本发明实施例中,若上述步骤305确定第一预览图像中的前景图像区域和背景图像区域,当移动终端接收到拍照指令时,移动终端可以同时控制第一摄像头采集第二预览图像,且第二摄像头采集第三预览图像,使获取的第二预览图像和第三预览图像为同一帧图像,从而可以减少甚至避免合成HDR图像发生重影或者残影。In the embodiment of the present invention, if the above-mentioned step 305 determines the foreground image area and the background image area in the first preview image, when the mobile terminal receives a photographing instruction, the mobile terminal can simultaneously control the first camera to capture the second preview image, and the second The second camera captures the third preview image, so that the acquired second preview image and the third preview image are the same frame image, thereby reducing or even avoiding ghosting or afterimage of the synthesized HDR image.
可选的,上述步骤306之前,还可以包括:对所述前景图像区域和所述背景图像区域分别进行测光,分别得到所述前景图像区域的第一曝光值和所述背景图像区域的第二曝光值;上述步骤306可以包括:若所述第一曝光值和所述第二曝光值不相同,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像,从而使移动终端可以自动及时开启HDR功能,提高移动终端拍摄的照片质量,同时避免浪费电池电量以及存储资源。Optionally, before the above step 306, it may also include: respectively performing light metering on the foreground image area and the background image area to obtain the first exposure value of the foreground image area and the first exposure value of the background image area respectively. Two exposure values; the above step 306 may include: if the first exposure value and the second exposure value are not the same, respectively acquiring the second preview image collected by the first camera and the first preview image collected by the second camera Three preview images, so that the mobile terminal can automatically turn on the HDR function in time, improve the quality of photos taken by the mobile terminal, and avoid wasting battery power and storage resources.
步骤307、对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像。Step 307: Perform image composition processing on the second preview image and the third preview image to output a high dynamic range image.
本发明实施例中,通过获取所述第一预览图像的深度数据,所述深度数据包括每个像素点的深度值;获取所述深度数据中的最小深度值v0;基于所述最小深度值v0,将深度值取值在v0~(v0+v1)范围内的像素点的集合确定为前景图像区域;基于所述前景图像区域,确定背景图像区域。这样,移动终端可以根据图像的深度数据,确定前景图像区域和背景图像区域,以根据前景图像区域和背景图像区域,分别对第一摄像头和第二摄像头采集的图像曝光,提高合成的HDR图像的曝光效果,从而提升HDR图像的图像质量。In the embodiment of the present invention, by acquiring the depth data of the first preview image, the depth data includes the depth value of each pixel; acquiring the minimum depth value v 0 in the depth data; based on the minimum depth value v 0 , determining a set of pixel points whose depth values are in the range of v 0 to (v 0 +v 1 ) as a foreground image area; based on the foreground image area, determining a background image area. In this way, the mobile terminal can determine the foreground image area and the background image area according to the depth data of the image, so as to respectively expose the images collected by the first camera and the second camera according to the foreground image area and the background image area, and improve the quality of the synthesized HDR image. Exposure effect to enhance the image quality of HDR images.
参见图4,图4是本发明实施提供的一种移动终端的结构图,所述移动终端400的单侧设置有第一摄像头和第二摄像头,如图4所示,移动终端400包括依次连接的第一图像获取模块401、区域确定模块402、第二图像获取模块403以及合成模块404:Referring to FIG. 4, FIG. 4 is a structural diagram of a mobile terminal provided by the implementation of the present invention. A first camera and a second camera are arranged on one side of the mobile terminal 400. As shown in FIG. 4, the mobile terminal 400 includes sequentially connected The first image acquisition module 401, the region determination module 402, the second image acquisition module 403, and the synthesis module 404 of:
第一图像获取模块401,用于获取第一摄像头采集的第一预览图像;The first image acquisition module 401 is configured to acquire a first preview image captured by the first camera;
区域确定模块402,用于确定所述第一图像获取模块401获取的第一预览图像中的前景图像区域和背景图像区域;an area determination module 402, configured to determine the foreground image area and the background image area in the first preview image acquired by the first image acquisition module 401;
第二图像获取模块403,用于若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;The second image acquiring module 403 is configured to acquire a second preview image captured by the first camera and a third preview image captured by the second camera respectively if a photographing instruction is received;
合成模块404,用于对所述第二图像获取模块获取的第二预览图像和第三预览图像进行图像合成处理,输出高动态范围图像;A synthesis module 404, configured to perform image synthesis processing on the second preview image and the third preview image acquired by the second image acquisition module, and output a high dynamic range image;
其中,所述第二预览图像为对所述区域确定模块402确定的前景图像区域曝光的图像,所述第三预览图像为对所述区域确定模块402确定的背景图像区域曝光的图像。Wherein, the second preview image is an image exposed to the foreground image area determined by the area determining module 402 , and the third preview image is an image exposed to the background image area determined by the area determining module 402 .
可选的,如图5所示,所述区域确定模块402可以包括:Optionally, as shown in FIG. 5, the area determining module 402 may include:
人脸识别单元4021,用于对所述第一图像获取模块401获取的第一预览图像进行人脸识别,得到人脸图像区域;A face recognition unit 4021, configured to perform face recognition on the first preview image acquired by the first image acquisition module 401, to obtain a face image area;
第一前景区域确定单元4022,用于将所述人脸识别单元4021识别的人脸图像区域确定为前景图像区域;The first foreground area determination unit 4022 is configured to determine the face image area identified by the face recognition unit 4021 as the foreground image area;
背景区域确定单元4023,用于基于所述第一前景区域确定单元4022确定的前景图像区域,确定背景图像区域。A background area determining unit 4023, configured to determine a background image area based on the foreground image area determined by the first foreground area determining unit 4022.
可选的,如图6所示,所述区域确定模块402可以包括:Optionally, as shown in FIG. 6, the area determining module 402 may include:
深度数据获取单元4024,用于获取所述第一图像获取模块401获取的第一预览图像的深度数据,所述深度数据包括每个像素点的深度值;A depth data acquisition unit 4024, configured to acquire the depth data of the first preview image acquired by the first image acquisition module 401, the depth data including the depth value of each pixel;
最小深度值获取单元4025,用于获取所述深度数据获取单元4024获取的深度数据中的最小深度值v0;A minimum depth value acquisition unit 4025, configured to acquire the minimum depth value v0 in the depth data acquired by the depth data acquisition unit 4024;
第二前景区域确定单元4026,用于基于所述最小深度值获取单元4025获取的最小深度值v0,将深度值取值在v0~(v0+v1)范围内的像素点的集合确定为前景图像区域;The second foreground area determination unit 4026 is configured to, based on the minimum depth value v 0 acquired by the minimum depth value acquisition unit 4025, set a set of pixel points whose depth values are within the range of v 0 -(v 0 +v 1 ) Determined as the foreground image area;
背景区域确定单元4027,用于基于所述第二前景区域确定单元4026确定的前景图像区域,确定背景图像区域;A background area determining unit 4027, configured to determine a background image area based on the foreground image area determined by the second foreground area determining unit 4026;
其中,v1为预设的阈值。Wherein, v1 is a preset threshold.
可选的,如图7所示,所述背景区域确定单元4027可以包括:Optionally, as shown in FIG. 7, the background area determining unit 4027 may include:
Y通道图像获取子单元40271,用于获取所述第一图像获取模块401获取的第一预览图像的Y通道图像;The Y-channel image acquisition subunit 40271 is configured to acquire the Y-channel image of the first preview image acquired by the first image acquisition module 401;
像素块分割子单元40272,用于以m*n的像素块为单位像素块,对所述Y通道图像获取子单元40271获取的Y通道图像中除所述前景图像区域之外的所有图像区域进行图像分割,得到T个像素块;The pixel block segmentation sub-unit 40272 is used to use m*n pixel blocks as unit pixel blocks to perform all image regions in the Y-channel image obtained by the Y-channel image acquisition sub-unit 40271 except the foreground image region Segment the image to obtain T pixel blocks;
亮度和值计算子单元40273,用于对于所述像素块分割子单元40272得到的T个像素块中每个像素块,计算每个像素块中所有像素点的亮度和值;Brightness and value calculation subunit 40273, for calculating the brightness and value of all pixel points in each pixel block for each pixel block in the T pixel blocks obtained by the pixel block division subunit 40272;
背景区域确定子单元40274,用于将所述亮度和值计算子单元40273计算得到的所有亮度和值中的最大亮度和值对应的像素块所在图像区域确定为背景图像区域。The background area determination subunit 40274 is configured to determine the image area where the pixel block corresponding to the maximum brightness sum value among all the brightness sum values calculated by the brightness sum value calculation subunit 40273 is located as the background image area.
可选的,如图8所示,所述移动终端400还可以包括:Optionally, as shown in FIG. 8, the mobile terminal 400 may further include:
测光模块405,用于对所述区域确定模块402确定的前景图像区域和背景图像区域分别进行测光,分别得到所述前景图像区域的第一曝光值和所述背景图像区域的第二曝光值;A light metering module 405, configured to perform light metering on the foreground image area and the background image area determined by the area determining module 402, respectively to obtain a first exposure value of the foreground image area and a second exposure value of the background image area value;
所述第二图像获取模块403还用于若所述测光模块405测量得到的第一曝光值和第二曝光值不相同,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。The second image acquiring module 403 is further configured to acquire the second preview image captured by the first camera and the The third preview image captured by the second camera.
移动终端400能够实现图1至图3中实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 400 can implement various processes implemented by the mobile terminal in the embodiments in FIG. 1 to FIG. 3 , and details are not repeated here to avoid repetition.
本发明实施例的移动终端400,获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。移动终端可以避免用于合成HDR图像的照片之间存在时间差,从而减少重影或者残影的发生,提高移动终端拍摄的照片质量。The mobile terminal 400 of the embodiment of the present invention acquires the first preview image collected by the first camera; determines the foreground image area and the background image area in the first preview image; The second preview image collected by the camera and the third preview image collected by the second camera; performing image synthesis processing on the second preview image and the third preview image, and outputting a high dynamic range image; wherein, the first The second preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area. The mobile terminal can avoid the time difference between photos used for synthesizing the HDR image, thereby reducing the occurrence of ghosting or afterimage, and improving the quality of photos taken by the mobile terminal.
本发明实施例还提供一种移动终端,包括处理器,存储器,存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现上述高动态范围图像拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present invention also provides a mobile terminal, including a processor, a memory, and a computer program stored in the memory and operable on the processor. When the computer program is executed by the processor, the above-mentioned advanced The various processes of the embodiments of the dynamic range image capture method can achieve the same technical effect, so in order to avoid repetition, details will not be repeated here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述高动态范围图像拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random AccessMemory,简称RAM)、磁碟或者光盘等。An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned high dynamic range image capture method embodiment is implemented, and can To achieve the same technical effect, in order to avoid repetition, no more details are given here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like.
参见图9,图9是本发明实施提供的一种移动终端的结构图,如图9所示,移动终端900包括:至少一个处理器901、存储器902、至少一个网络接口904和用户接口903。移动终端900中的各个组件通过总线系统905耦合在一起。可理解,总线系统905用于实现这些组件之间的连接通信。总线系统905除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图9中将各种总线都标为总线系统905,移动终端900还包括设置在单侧的第一摄像头906和第二摄像头907,第一摄像头906和第二摄像头907通过总线系统905与移动终端的各个组件连接。Referring to FIG. 9, FIG. 9 is a structural diagram of a mobile terminal provided by the present invention. As shown in FIG. Various components in the mobile terminal 900 are coupled together through a bus system 905 . It can be understood that the bus system 905 is used to realize connection and communication between these components. In addition to the data bus, the bus system 905 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as bus system 905 in FIG. It is connected with various components of the mobile terminal through the bus system 905 .
其中,用户接口903可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Wherein, the user interface 903 may include a display, a keyboard, or a pointing device (for example, a mouse, a trackball (trackball), a touch panel, or a touch screen, and the like.
可以理解,本发明实施例中的存储器902可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data RateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambus RAM,DRRAM)。本文描述的系统和方法的存储器902旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 902 in this embodiment of the present invention may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. The volatile memory can be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data RateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct memory bus random access memory (DirectRambus RAM, DRRAM). Memory 902 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
在一些实施方式中,存储器902存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统9021和应用程序9022。In some implementations, the memory 902 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 9021 and an application program 9022 .
其中,操作系统9021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序9022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序9022中。Among them, the operating system 9021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 9022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 9022 .
在本发明实施例中,移动终端900还包括:存储在存储器902上并可在处理器901上运行的计算机程序,具体地,可以是应用程序9022中的计算机程序,计算机程序被处理器901执行时实现如下步骤:获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。In the embodiment of the present invention, the mobile terminal 900 further includes: a computer program stored in the memory 902 and operable on the processor 901, specifically, it may be a computer program in the application program 9022, and the computer program is executed by the processor 901 When implementing the following steps: obtain the first preview image collected by the first camera; determine the foreground image area and the background image area in the first preview image; if a photographing instruction is received, obtain the first preview image collected by the first camera Two preview images and the third preview image collected by the second camera; performing image synthesis processing on the second preview image and the third preview image, and outputting a high dynamic range image; wherein the second preview image is An image exposed to the foreground image area, and the third preview image is an image exposed to the background image area.
上述本发明实施例揭示的方法可以应用于处理器901中,或者由处理器901实现。处理器901可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器901中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器901可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的计算机可读存储介质中。该计算机可读存储介质位于存储器902,处理器901读取存储器902中的信息,结合其硬件完成上述方法的步骤。具体地,该计算机可读存储介质上存储有计算机程序,计算机程序被处理器901执行时实现如上述高动态范围图像拍摄方法实施例的各步骤。The methods disclosed in the foregoing embodiments of the present invention may be applied to the processor 901 or implemented by the processor 901 . The processor 901 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 901 or instructions in the form of software. The aforementioned processor 901 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Program logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a computer-readable storage medium mature in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, and the like. The computer-readable storage medium is located in the memory 902, and the processor 901 reads the information in the memory 902, and completes the steps of the above method in combination with its hardware. Specifically, a computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor 901, various steps in the above-mentioned embodiments of the high dynamic range image capturing method are implemented.
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable LogicDevice,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It should be understood that the embodiments described herein may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof.
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
可选的,计算机程序被处理器901执行时还可实现如下步骤:对所述第一预览图像进行人脸识别,得到人脸图像区域;将所述人脸图像区域确定为前景图像区域;基于所述前景图像区域,确定背景图像区域。Optionally, when the computer program is executed by the processor 901, the following steps can also be implemented: performing face recognition on the first preview image to obtain a face image area; determining the face image area as a foreground image area; The foreground image area determines the background image area.
可选的,计算机程序被处理器901执行时还可实现如下步骤:获取所述第一预览图像的深度数据,所述深度数据包括每个像素点的深度值;获取所述深度数据中的最小深度值v0;基于所述最小深度值v0,将深度值取值在v0~(v0+v1)范围内的像素点的集合确定为前景图像区域;基于所述前景图像区域,确定背景图像区域;其中,v1为预设的阈值。Optionally, when the computer program is executed by the processor 901, the following steps may also be implemented: acquiring the depth data of the first preview image, the depth data including the depth value of each pixel; acquiring the minimum depth value in the depth data. Depth value v 0 ; based on the minimum depth value v 0 , determining a set of pixels whose depth values are in the range of v 0 ~ (v 0 +v 1 ) as the foreground image area; based on the foreground image area, Determine the background image area; wherein, v 1 is a preset threshold.
可选的,计算机程序被处理器901执行时还可实现如下步骤:获取所述第一预览图像的Y通道图像;以m*n的像素块为单位像素块,对所述Y通道图像中除所述前景图像区域之外的所有图像区域进行图像分割,得到T个像素块;对于所述T个像素块中每个像素块,计算每个像素块中所有像素点的亮度和值;将所有亮度和值中的最大亮度和值对应的像素块所在图像区域确定为背景图像区域。Optionally, when the computer program is executed by the processor 901, the following steps can also be implemented: acquiring the Y channel image of the first preview image; taking m*n pixel blocks as unit pixel blocks, dividing the Y channel image from All image areas outside the foreground image area are image-segmented to obtain T pixel blocks; for each pixel block in the T pixel blocks, the brightness and value of all pixels in each pixel block are calculated; all The image region where the pixel block corresponding to the maximum brightness and value in the brightness and value is located is determined as the background image region.
可选的,计算机程序被处理器901执行时还可实现如下步骤:对所述前景图像区域和所述背景图像区域分别进行测光,分别得到所述前景图像区域的第一曝光值和所述背景图像区域的第二曝光值;若所述第一曝光值和所述第二曝光值不相同,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。Optionally, when the computer program is executed by the processor 901, the following steps can also be implemented: separately measure the light of the foreground image area and the background image area, and respectively obtain the first exposure value of the foreground image area and the first exposure value of the foreground image area. The second exposure value of the background image area; if the first exposure value and the second exposure value are not the same, obtain the second preview image collected by the first camera and the third preview image collected by the second camera respectively. Preview image.
移动终端900能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 900 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here.
本发明实施例的移动终端900,获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。移动终端可以避免用于合成HDR图像的照片之间存在时间差,从而减少重影或者残影的发生,提高移动终端拍摄的照片质量。The mobile terminal 900 in the embodiment of the present invention acquires the first preview image collected by the first camera; determines the foreground image area and the background image area in the first preview image; The second preview image collected by the camera and the third preview image collected by the second camera; performing image synthesis processing on the second preview image and the third preview image, and outputting a high dynamic range image; wherein, the first The second preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area. The mobile terminal can avoid the time difference between photos used for synthesizing the HDR image, thereby reducing the occurrence of ghosting or afterimage, and improving the quality of photos taken by the mobile terminal.
请参阅图10,图10是本发明实施提供的一种移动终端的结构图,能够实现图1至图3中实施例中高动态范围图像拍摄方法的细节,并达到相同的效果。如图10所示,移动终端1000包括射频(Radio Frequency,RF)电路1010、存储器1020、输入单元1030、显示单元1040、处理器1050、音频电路1060、通信模块1070、电源1080、第一摄像头1090和第二摄像头1100,第一摄像头1090和第二摄像头1100设置在移动终端1000的同一侧。Please refer to FIG. 10 . FIG. 10 is a structural diagram of a mobile terminal provided by the implementation of the present invention, which can realize the details of the high dynamic range image capturing method in the embodiment in FIG. 1 to FIG. 3 and achieve the same effect. As shown in Figure 10, the mobile terminal 1000 includes a radio frequency (Radio Frequency, RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a processor 1050, an audio circuit 1060, a communication module 1070, a power supply 1080, and a first camera 1090 The first camera 1090 and the second camera 1100 are disposed on the same side of the mobile terminal 1000 as the second camera 1100 .
其中,输入单元1030可用于接收用户输入的数字或字符信息,以及产生与移动终端1000的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元1030可以包括触控面板1031。触控面板1031,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板1031上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板1031可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器1050,并能接收处理器1050发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板1031。除了触控面板1031,输入单元1030还可以包括其他输入设备1032,其他输入设备1032可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 1030 can be used for receiving number or character information input by the user, and generating signal input related to the user setting and function control of the mobile terminal 1000 . Specifically, in the embodiment of the present invention, the input unit 1030 may include a touch panel 1031 . The touch panel 1031, also referred to as a touch screen, can collect user's touch operations on or near it (such as the user's operation on the touch panel 1031 using any suitable object or accessory such as a finger, a stylus), and The specified program drives the corresponding connected device. Optionally, the touch panel 1031 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 1050, and can receive and execute commands sent by the processor 1050. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032, which may include but not limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, etc. one or more of.
其中,显示单元1040可用于显示由用户输入的信息或提供给用户的信息以及移动终端1000的各种菜单界面。显示单元1040可包括显示面板1041,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板1041。Wherein, the display unit 1040 can be used to display information input by the user or information provided to the user and various menu interfaces of the mobile terminal 1000 . The display unit 1040 may include a display panel 1041, and optionally, the display panel 1041 may be configured in the form of an LCD or an organic light-emitting diode (Organic Light-Emitting Diode, OLED).
应注意,触控面板1031可以覆盖显示面板1041,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器1050以确定触摸事件的类型,随后处理器1050根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 1031 can cover the display panel 1041 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 1050 to determine the type of the touch event, and then the processor 1050 provides corresponding visual output on the touch display screen according to the type of the touch event.
触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。本发明实施例的触摸屏为柔性屏,柔性屏的两个面均贴有碳纳米管的有机透明导电膜。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons. The touch screen in the embodiment of the present invention is a flexible screen, and both sides of the flexible screen are pasted with an organic transparent conductive film of carbon nanotubes.
其中处理器1050是移动终端1000的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器1021内的软件程序和/或模块,以及调用存储在第二存储器1022内的数据,执行移动终端1000的各种功能和处理数据,从而对移动终端1000进行整体监控。可选的,处理器1050可包括一个或多个处理单元。Wherein the processor 1050 is the control center of the mobile terminal 1000, utilizes various interfaces and lines to connect various parts of the whole mobile phone, runs or executes the software programs and/or modules stored in the first memory 1021, and calls the software programs and/or modules stored in the second memory 1021. The data in the memory 1022 executes various functions of the mobile terminal 1000 and processes data, so as to monitor the mobile terminal 1000 as a whole. Optionally, the processor 1050 may include one or more processing units.
在本发明实施例中,移动终端还包括:存储于第一存储器1021并可在处理器1050上运行的计算机程序,计算机程序被处理器1050执行时实现如下步骤:获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。In the embodiment of the present invention, the mobile terminal further includes: a computer program stored in the first memory 1021 and operable on the processor 1050. When the computer program is executed by the processor 1050, the following steps are implemented: acquiring the first preview image; determine the foreground image area and the background image area in the first preview image; if a photographing instruction is received, obtain the second preview image captured by the first camera and the third image captured by the second camera respectively preview image; perform image synthesis processing on the second preview image and the third preview image, and output a high dynamic range image; wherein, the second preview image is an image exposed to the foreground image area, and the first preview image is The three preview images are images exposed to the background image area.
可选的,计算机程序被处理器1050执行时还可实现如下步骤:对所述第一预览图像进行人脸识别,得到人脸图像区域;将所述人脸图像区域确定为前景图像区域;基于所述前景图像区域,确定背景图像区域。Optionally, when the computer program is executed by the processor 1050, the following steps can also be implemented: performing face recognition on the first preview image to obtain a face image area; determining the face image area as a foreground image area; The foreground image area determines the background image area.
可选的,计算机程序被处理器1050执行时还可实现如下步骤:获取所述第一预览图像的深度数据,所述深度数据包括每个像素点的深度值;获取所述深度数据中的最小深度值v0;基于所述最小深度值v0,将深度值取值在v0~(v0+v1)范围内的像素点的集合确定为前景图像区域;基于所述前景图像区域,确定背景图像区域;其中,v1为预设的阈值。Optionally, when the computer program is executed by the processor 1050, the following steps may also be implemented: acquiring the depth data of the first preview image, the depth data including the depth value of each pixel; acquiring the minimum depth value in the depth data. Depth value v 0 ; based on the minimum depth value v 0 , determining a set of pixels whose depth values are in the range of v 0 ~ (v 0 +v 1 ) as the foreground image area; based on the foreground image area, Determine the background image area; wherein, v1 is a preset threshold.
可选的,计算机程序被处理器1050执行时还可实现如下步骤:获取所述第一预览图像的Y通道图像;以m*n的像素块为单位像素块,对所述Y通道图像中除所述前景图像区域之外的所有图像区域进行图像分割,得到T个像素块;对于所述T个像素块中每个像素块,计算每个像素块中所有像素点的亮度和值;将所有亮度和值中的最大亮度和值对应的像素块所在图像区域确定为背景图像区域。Optionally, when the computer program is executed by the processor 1050, the following steps can also be implemented: acquiring the Y-channel image of the first preview image; taking m*n pixel blocks as unit pixel blocks, dividing the Y-channel image All image areas outside the foreground image area are image-segmented to obtain T pixel blocks; for each pixel block in the T pixel blocks, the brightness and value of all pixels in each pixel block are calculated; all The image region where the pixel block corresponding to the maximum brightness and value in the brightness and value is located is determined as the background image region.
可选的,计算机程序被处理器1050执行时还可实现如下步骤:对所述前景图像区域和所述背景图像区域分别进行测光,分别得到所述前景图像区域的第一曝光值和所述背景图像区域的第二曝光值;若所述第一曝光值和所述第二曝光值不相同,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像。Optionally, when the computer program is executed by the processor 1050, the following steps can also be implemented: separately measure the light of the foreground image area and the background image area, and respectively obtain the first exposure value of the foreground image area and the first exposure value of the foreground image area. The second exposure value of the background image area; if the first exposure value and the second exposure value are not the same, obtain the second preview image collected by the first camera and the third preview image collected by the second camera respectively. Preview image.
移动终端1000能够实现前述实施例中移动终端实现的各个过程,为避免重复,这里不再赘述。The mobile terminal 1000 can implement various processes implemented by the mobile terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here.
本发明实施例的移动终端1000,获取第一摄像头采集的第一预览图像;确定所述第一预览图像中的前景图像区域和背景图像区域;若接收到拍照指令,则分别获取所述第一摄像头采集的第二预览图像和所述第二摄像头采集的第三预览图像;对所述第二预览图像和所述第三预览图像进行图像合成处理,输出高动态范围图像;其中,所述第二预览图像为对所述前景图像区域曝光的图像,所述第三预览图像为对所述背景图像区域曝光的图像。移动终端可以避免用于合成HDR图像的照片之间存在时间差,从而减少重影或者残影的发生,提高移动终端拍摄的照片质量。The mobile terminal 1000 of the embodiment of the present invention acquires the first preview image captured by the first camera; determines the foreground image area and the background image area in the first preview image; The second preview image collected by the camera and the third preview image collected by the second camera; performing image synthesis processing on the second preview image and the third preview image, and outputting a high dynamic range image; wherein, the first The second preview image is an image exposed to the foreground image area, and the third preview image is an image exposed to the background image area. The mobile terminal can avoid the time difference between photos used for synthesizing the HDR image, thereby reducing the occurrence of ghosting or afterimage, and improving the quality of photos taken by the mobile terminal.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、移动终端和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, mobile terminal and unit can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的实施例中,应该理解到,所揭露的移动终端和方法,可以通过其它的方式实现。例如,以上所描述的移动终端实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,移动终端或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed mobile terminal and method can be implemented in other ways. For example, the mobile terminal embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or can be Integrate into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of mobile terminals or units may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例方案的目的。A unit described as a separate component may or may not be physically separated, and a component displayed as a unit may or may not be a physical unit, that is, it may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment of the present invention.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present invention, and should cover all Within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710480243.3A CN107197169B (en) | 2017-06-22 | 2017-06-22 | high dynamic range image shooting method and mobile terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710480243.3A CN107197169B (en) | 2017-06-22 | 2017-06-22 | high dynamic range image shooting method and mobile terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN107197169A true CN107197169A (en) | 2017-09-22 |
| CN107197169B CN107197169B (en) | 2019-12-06 |
Family
ID=59878327
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710480243.3A Active CN107197169B (en) | 2017-06-22 | 2017-06-22 | high dynamic range image shooting method and mobile terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN107197169B (en) |
Cited By (26)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107623818A (en) * | 2017-10-30 | 2018-01-23 | 维沃移动通信有限公司 | A kind of image exposure method and mobile terminal |
| CN108156366A (en) * | 2017-11-30 | 2018-06-12 | 维沃移动通信有限公司 | A kind of image capturing method and mobile device based on dual camera |
| CN108377341A (en) * | 2018-05-14 | 2018-08-07 | Oppo广东移动通信有限公司 | photographing method, device, terminal and storage medium |
| CN108564558A (en) * | 2018-01-05 | 2018-09-21 | 广州广电运通金融电子股份有限公司 | Wide dynamic images processing method, device, equipment and storage medium |
| CN108616687A (en) * | 2018-03-23 | 2018-10-02 | 维沃移动通信有限公司 | A photographing method, device and mobile terminal |
| CN108718388A (en) * | 2018-08-29 | 2018-10-30 | 维沃移动通信有限公司 | A kind of photographic method and mobile terminal |
| CN108833804A (en) * | 2018-09-20 | 2018-11-16 | Oppo广东移动通信有限公司 | Imaging method, device and electronic equipment |
| CN108848321A (en) * | 2018-09-28 | 2018-11-20 | 努比亚技术有限公司 | Expose optimization method, device and computer readable storage medium |
| CN109005367A (en) * | 2018-10-15 | 2018-12-14 | Oppo广东移动通信有限公司 | High dynamic range image generation method, mobile terminal and storage medium |
| CN109194855A (en) * | 2018-09-20 | 2019-01-11 | Oppo广东移动通信有限公司 | Imaging method and device and electronic equipment |
| CN109447031A (en) * | 2018-11-12 | 2019-03-08 | 北京旷视科技有限公司 | Image processing method, device, equipment and storage medium |
| CN110012229A (en) * | 2019-04-12 | 2019-07-12 | 维沃移动通信有限公司 | A kind of image processing method and terminal |
| CN110177221A (en) * | 2019-06-25 | 2019-08-27 | 维沃移动通信有限公司 | The image pickup method and device of high dynamic range images |
| CN110458860A (en) * | 2018-05-08 | 2019-11-15 | 华晶科技股份有限公司 | Image processing method and image processing device |
| CN110493538A (en) * | 2019-08-16 | 2019-11-22 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
| CN110677558A (en) * | 2018-07-02 | 2020-01-10 | 华晶科技股份有限公司 | Image processing method and electronic device |
| CN111083389A (en) * | 2019-12-27 | 2020-04-28 | 维沃移动通信有限公司 | Method and device for shooting image |
| CN111340731A (en) * | 2020-02-27 | 2020-06-26 | 深圳市商汤科技有限公司 | Image processing method and device, electronic equipment and storage medium |
| CN111766606A (en) * | 2020-06-19 | 2020-10-13 | Oppo广东移动通信有限公司 | Image processing method, device, device and storage medium for TOF depth image |
| CN112822404A (en) * | 2021-01-12 | 2021-05-18 | Oppo广东移动通信有限公司 | Image processing method and device and storage medium |
| CN112887624A (en) * | 2021-01-26 | 2021-06-01 | 维沃移动通信有限公司 | Shooting method and device and electronic equipment |
| CN113382169A (en) * | 2021-06-18 | 2021-09-10 | 荣耀终端有限公司 | Photographing method and electronic equipment |
| CN113794829A (en) * | 2021-08-02 | 2021-12-14 | 维沃移动通信(杭州)有限公司 | Shooting method and device and electronic equipment |
| CN113923367A (en) * | 2021-11-24 | 2022-01-11 | 维沃移动通信有限公司 | Shooting method and shooting device |
| WO2023015981A1 (en) * | 2021-08-12 | 2023-02-16 | 荣耀终端有限公司 | Image processing method and related device therefor |
| WO2024221411A1 (en) * | 2023-04-28 | 2024-10-31 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Image processing device, method, and program |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105049726A (en) * | 2015-08-05 | 2015-11-11 | 广东欧珀移动通信有限公司 | Mobile terminal shooting method and mobile terminal |
| US20150379740A1 (en) * | 2014-06-26 | 2015-12-31 | Qualcomm Incorporated | Exposure metering based on background pixels |
| CN105847694A (en) * | 2016-04-27 | 2016-08-10 | 乐视控股(北京)有限公司 | Multiple exposure shooting method and system based on picture synthesis |
| CN106161980A (en) * | 2016-07-29 | 2016-11-23 | 宇龙计算机通信科技(深圳)有限公司 | Photographic method and system based on dual camera |
| CN106851123A (en) * | 2017-03-09 | 2017-06-13 | 广东欧珀移动通信有限公司 | Exposal control method, exposure-control device and electronic installation |
| CN106851124A (en) * | 2017-03-09 | 2017-06-13 | 广东欧珀移动通信有限公司 | Image processing method, processing unit and electronic installation based on the depth of field |
| CN106851063A (en) * | 2017-02-27 | 2017-06-13 | 努比亚技术有限公司 | A kind of exposure regulation terminal and method based on dual camera |
-
2017
- 2017-06-22 CN CN201710480243.3A patent/CN107197169B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20150379740A1 (en) * | 2014-06-26 | 2015-12-31 | Qualcomm Incorporated | Exposure metering based on background pixels |
| CN105049726A (en) * | 2015-08-05 | 2015-11-11 | 广东欧珀移动通信有限公司 | Mobile terminal shooting method and mobile terminal |
| CN105847694A (en) * | 2016-04-27 | 2016-08-10 | 乐视控股(北京)有限公司 | Multiple exposure shooting method and system based on picture synthesis |
| CN106161980A (en) * | 2016-07-29 | 2016-11-23 | 宇龙计算机通信科技(深圳)有限公司 | Photographic method and system based on dual camera |
| CN106851063A (en) * | 2017-02-27 | 2017-06-13 | 努比亚技术有限公司 | A kind of exposure regulation terminal and method based on dual camera |
| CN106851123A (en) * | 2017-03-09 | 2017-06-13 | 广东欧珀移动通信有限公司 | Exposal control method, exposure-control device and electronic installation |
| CN106851124A (en) * | 2017-03-09 | 2017-06-13 | 广东欧珀移动通信有限公司 | Image processing method, processing unit and electronic installation based on the depth of field |
Cited By (37)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107623818A (en) * | 2017-10-30 | 2018-01-23 | 维沃移动通信有限公司 | A kind of image exposure method and mobile terminal |
| CN108156366A (en) * | 2017-11-30 | 2018-06-12 | 维沃移动通信有限公司 | A kind of image capturing method and mobile device based on dual camera |
| CN108564558A (en) * | 2018-01-05 | 2018-09-21 | 广州广电运通金融电子股份有限公司 | Wide dynamic images processing method, device, equipment and storage medium |
| CN108616687A (en) * | 2018-03-23 | 2018-10-02 | 维沃移动通信有限公司 | A photographing method, device and mobile terminal |
| CN110458860A (en) * | 2018-05-08 | 2019-11-15 | 华晶科技股份有限公司 | Image processing method and image processing device |
| CN108377341A (en) * | 2018-05-14 | 2018-08-07 | Oppo广东移动通信有限公司 | photographing method, device, terminal and storage medium |
| CN110677558B (en) * | 2018-07-02 | 2021-11-02 | 华晶科技股份有限公司 | Image processing method and electronic device |
| CN110677558A (en) * | 2018-07-02 | 2020-01-10 | 华晶科技股份有限公司 | Image processing method and electronic device |
| CN108718388A (en) * | 2018-08-29 | 2018-10-30 | 维沃移动通信有限公司 | A kind of photographic method and mobile terminal |
| CN109194855A (en) * | 2018-09-20 | 2019-01-11 | Oppo广东移动通信有限公司 | Imaging method and device and electronic equipment |
| WO2020057199A1 (en) * | 2018-09-20 | 2020-03-26 | Oppo广东移动通信有限公司 | Imaging method and device, and electronic device |
| CN108833804A (en) * | 2018-09-20 | 2018-11-16 | Oppo广东移动通信有限公司 | Imaging method, device and electronic equipment |
| CN108848321B (en) * | 2018-09-28 | 2021-03-19 | 南昌努比亚技术有限公司 | Exposure optimization method, apparatus, and computer-readable storage medium |
| CN108848321A (en) * | 2018-09-28 | 2018-11-20 | 努比亚技术有限公司 | Expose optimization method, device and computer readable storage medium |
| CN109005367A (en) * | 2018-10-15 | 2018-12-14 | Oppo广东移动通信有限公司 | High dynamic range image generation method, mobile terminal and storage medium |
| CN109005367B (en) * | 2018-10-15 | 2020-10-13 | Oppo广东移动通信有限公司 | High dynamic range image generation method, mobile terminal and storage medium |
| CN109447031B (en) * | 2018-11-12 | 2022-02-18 | 北京旷视科技有限公司 | Image processing method, device, equipment and storage medium |
| CN109447031A (en) * | 2018-11-12 | 2019-03-08 | 北京旷视科技有限公司 | Image processing method, device, equipment and storage medium |
| CN110012229B (en) * | 2019-04-12 | 2021-01-08 | 维沃移动通信有限公司 | Image processing method and terminal |
| CN110012229A (en) * | 2019-04-12 | 2019-07-12 | 维沃移动通信有限公司 | A kind of image processing method and terminal |
| CN110177221A (en) * | 2019-06-25 | 2019-08-27 | 维沃移动通信有限公司 | The image pickup method and device of high dynamic range images |
| CN110493538A (en) * | 2019-08-16 | 2019-11-22 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic equipment |
| CN110493538B (en) * | 2019-08-16 | 2021-08-24 | Oppo广东移动通信有限公司 | Image processing method, device, storage medium and electronic device |
| CN111083389A (en) * | 2019-12-27 | 2020-04-28 | 维沃移动通信有限公司 | Method and device for shooting image |
| CN111340731B (en) * | 2020-02-27 | 2023-09-12 | 深圳市商汤科技有限公司 | Image processing method and device, electronic equipment and storage medium |
| CN111340731A (en) * | 2020-02-27 | 2020-06-26 | 深圳市商汤科技有限公司 | Image processing method and device, electronic equipment and storage medium |
| CN111766606A (en) * | 2020-06-19 | 2020-10-13 | Oppo广东移动通信有限公司 | Image processing method, device, device and storage medium for TOF depth image |
| CN112822404A (en) * | 2021-01-12 | 2021-05-18 | Oppo广东移动通信有限公司 | Image processing method and device and storage medium |
| CN112822404B (en) * | 2021-01-12 | 2022-08-09 | Oppo广东移动通信有限公司 | Image processing method and device and storage medium |
| CN112887624A (en) * | 2021-01-26 | 2021-06-01 | 维沃移动通信有限公司 | Shooting method and device and electronic equipment |
| CN113382169A (en) * | 2021-06-18 | 2021-09-10 | 荣耀终端有限公司 | Photographing method and electronic equipment |
| CN113794829A (en) * | 2021-08-02 | 2021-12-14 | 维沃移动通信(杭州)有限公司 | Shooting method and device and electronic equipment |
| CN113794829B (en) * | 2021-08-02 | 2023-11-10 | 维沃移动通信(杭州)有限公司 | Shooting method and device and electronic equipment |
| WO2023015981A1 (en) * | 2021-08-12 | 2023-02-16 | 荣耀终端有限公司 | Image processing method and related device therefor |
| CN113923367A (en) * | 2021-11-24 | 2022-01-11 | 维沃移动通信有限公司 | Shooting method and shooting device |
| CN113923367B (en) * | 2021-11-24 | 2024-04-12 | 维沃移动通信有限公司 | Shooting method and shooting device |
| WO2024221411A1 (en) * | 2023-04-28 | 2024-10-31 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Image processing device, method, and program |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107197169B (en) | 2019-12-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107197169B (en) | high dynamic range image shooting method and mobile terminal | |
| CN106331510B (en) | A backlight photographing method and mobile terminal | |
| CN107395898B (en) | Shooting method and mobile terminal | |
| CN106161967B (en) | Backlight scene panoramic shooting method and mobile terminal | |
| CN105872148A (en) | Method and mobile terminal for generating high dynamic range images | |
| CN107172296A (en) | A kind of image capturing method and mobile terminal | |
| CN107395976B (en) | A shooting parameter setting method and mobile terminal | |
| CN107395998A (en) | A kind of image capturing method and mobile terminal | |
| CN105827971A (en) | Image processing method and mobile terminal | |
| CN107302664A (en) | A kind of image pickup method and mobile terminal | |
| CN106101569A (en) | A kind of method of light filling of taking pictures and mobile terminal | |
| CN105827965A (en) | Image processing method based on mobile terminal and mobile terminal | |
| CN106506962A (en) | A kind of image processing method and mobile terminal | |
| CN105847674A (en) | Preview image processing method based on mobile terminal, and mobile terminal therein | |
| CN106131449A (en) | A kind of photographic method and mobile terminal | |
| CN106060406A (en) | Photographing method and mobile terminal | |
| CN107147837A (en) | The method to set up and mobile terminal of a kind of acquisition parameters | |
| CN107197170A (en) | A kind of exposal control method and mobile terminal | |
| CN107395997A (en) | A kind of image pickup method and mobile terminal | |
| CN106060419A (en) | Photographing method and mobile terminal | |
| CN107181913A (en) | A kind of photographic method and mobile terminal | |
| CN106170058A (en) | A kind of exposure method and mobile terminal | |
| CN105827754A (en) | High dynamic-range image generation method and mobile terminal | |
| CN106454085B (en) | Image processing method and mobile terminal | |
| CN107509040A (en) | A kind of photographic method and mobile terminal |
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 |