WO2016074414A1 - 一种图像的处理方法和装置 - Google Patents
一种图像的处理方法和装置 Download PDFInfo
- Publication number
- WO2016074414A1 WO2016074414A1 PCT/CN2015/075260 CN2015075260W WO2016074414A1 WO 2016074414 A1 WO2016074414 A1 WO 2016074414A1 CN 2015075260 W CN2015075260 W CN 2015075260W WO 2016074414 A1 WO2016074414 A1 WO 2016074414A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ambient brightness
- image
- brightness value
- acquired
- value obtained
- Prior art date
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
Definitions
- Embodiments of the present invention relate to the field of imaging, and in particular, to an image processing method and apparatus.
- the photo taken is particularly dark and the details of the image are hardly visible.
- the existing mobile terminal such as a mobile phone
- the default is the automatic camera mode
- the effect of the automatic camera mode is not ideal, or the sky is correctly exposed and the face is black, or the person The face was properly exposed and the sky was overexposed and unable to take a satisfactory picture.
- the reason is mainly due to the fact that in the backlight scene, the difference between the foreground and the background is too large, which is beyond the performance range of the camera sensor, resulting in high light overflow or dark shadow.
- the camera effect in the backlight scene can be significantly improved.
- HDR High Dynamic Range Rendering
- the mode is valid.
- HDR mode is not supported by every mobile phone, but for most mobile phone users or those who have little knowledge of photography, it is not clear what the meaning of HDR mode is, and it will not be in the moment of taking pictures.
- Selecting the camera mode on the other hand, in some cases, the user needs to capture the scene in the backlight scene. At this time, if you manually select the HDR mode and take a photo, you may have missed the best camera timing. Therefore, in the backlight environment, the problem of poor photo taking is still common on mobile phones, and the user's photographing experience is also reduced.
- an embodiment of the present invention provides an image processing method and apparatus, which can automatically recognize a backlight shooting scene and improve the shooting effect in the scene, thereby improving the user's photographing experience.
- an image processing method provided by an embodiment of the present invention is applied to a terminal device including an image capturing component, including:
- the terminal device determines, according to the acquired ambient brightness information, whether it is in a backlight environment
- the image acquired by the own image pickup unit is processed as an image of normal brightness.
- the imaging component includes a front imaging component and a rear imaging component;
- determining whether to be in a backlight environment according to the acquired ambient brightness information includes:
- the ambient brightness value obtained by the rear camera component is greater than the ambient brightness value obtained by the front camera component; 2) the ambient brightness value obtained by the rear camera component and the ambient brightness value obtained by the front camera component If the difference is greater than a preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the imaging component includes a rear imaging component
- the terminal device further includes a light sensing device
- determining whether to be in a backlight environment according to the acquired ambient brightness information includes:
- the ambient brightness value obtained by the rear camera component is greater than the ambient brightness value obtained by the light sensor device; 2) the difference between the ambient brightness value obtained by the rear camera component and the ambient brightness value obtained by the light sensing device If the brightness difference threshold is greater than the preset value, it is determined that the terminal device is in a backlight environment.
- the imaging component includes a front imaging component and a rear imaging component;
- determining whether to be in a backlight environment according to the acquired ambient brightness information includes:
- the ambient brightness value obtained by the front camera component is greater than the ambient brightness value obtained by the rear camera component; 2) the ambient brightness value obtained by the front camera component and the ambient brightness value obtained by the rear camera component If the difference is greater than a preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the image processed by the imaging component is processed into an image of normal brightness, including:
- the imaging component acquires N images according to preset N exposure levels, N is a positive integer greater than 1; and synthesizes the N images into a normal brightness image.
- the present invention also provides an image processing apparatus, which is disposed in a terminal device including a camera module, the device comprising at least:
- the detecting module is configured to determine, according to the obtained ambient brightness information, whether the terminal device is in a backlight environment;
- control module configured to process the image acquired by the camera module into an image of normal brightness when the detecting module determines that the terminal device is in a backlight environment.
- the camera module includes a front camera unit and a rear camera unit;
- the detection module is specifically configured to:
- the ambient brightness value acquired by the rear camera unit is greater than the ambient brightness value obtained by the front camera unit; 2) the ambient brightness value acquired by the rear camera unit and the ambient brightness value obtained by the front camera unit If the difference is greater than a preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the camera module includes a rear camera unit, and the terminal device further includes a light sensing module;
- the detection module is specifically configured to:
- the ambient brightness value acquired by the rear camera unit is greater than the ambient brightness value obtained by the light sensor module; 2) the difference between the ambient brightness value obtained by the rear camera unit and the ambient brightness value obtained by the light sensor module If the value is greater than a preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the camera module includes a front camera unit and a rear camera unit;
- the specific device of the detecting module is:
- the ambient brightness value acquired by the front camera unit is greater than the ambient brightness value obtained by the rear camera unit; 2) the ambient brightness value acquired by the front camera unit and the ambient brightness value obtained by the rear camera unit If the difference is greater than a preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- control module is specifically configured to: control the camera module to acquire N images according to preset N exposure levels, where N is a positive integer greater than 1; and synthesize the N images into a normal brightness Image.
- the embodiment of the present invention at least includes the terminal device determining whether the device is in a backlight environment according to the acquired ambient brightness information; and when determining that the device is in a backlight environment, processing the image acquired by the camera component as an image of normal brightness.
- the technical solution provided by the embodiment of the present invention automatically recognizes whether the terminal device is photographed in a backlight environment according to the acquired ambient brightness information, and processes the image captured in the backlight environment into an image of normal brightness, and solves the shooting under the backlight scene.
- the problem of high-gloss whitish white or dark details is improved, which improves the shooting effect in the backlight environment, thus improving the user experience.
- FIG. 1 is a flowchart of a method for processing an image in an embodiment of the present invention
- FIG. 2 is a schematic structural diagram of an image processing apparatus according to an embodiment of the present invention.
- FIG. 3 is a schematic diagram of a processing procedure of a specific embodiment of an image processing method according to an embodiment of the present invention.
- the present invention provides a method for processing an image, which is applied to a terminal device including an image capturing component, including:
- Step 101 The terminal device determines, according to the acquired ambient brightness information, whether it is in a backlight environment;
- Step 102 When it is determined that it is in a backlight environment, the image acquired by the self-imaging component is processed into an image of normal brightness.
- the imaging component may include a front imaging component and a rear imaging component, or may only include Rear camera unit.
- the terminal device may also include a light sensing device.
- the front brightness information can be acquired by the light sensing device, or the front brightness information can be obtained by the front camera unit.
- the terminal device in step 101 determines whether it is in a backlight environment according to the acquired ambient brightness information, including:
- the ambient brightness value obtained by the rear camera component is greater than the ambient brightness value obtained by the front camera component; 2) the ambient brightness value obtained by the rear camera component and the ambient brightness value obtained by the front camera component If the difference is greater than the preset brightness difference threshold, it is judged to be in a backlight environment.
- the brightness difference threshold directly determines whether the backlight environment is correct. Therefore, it is necessary to separately obtain the respective ambient brightness values by using the front and rear imaging components in different backlight scenes, and then select the minimum of the brightness differences in each backlight scene. The value is used as the brightness difference threshold to ensure that the backlight scene when photographing can be correctly recognized.
- the ambient brightness value obtained by the rear camera component is greater than the ambient brightness value obtained by the light sensing device; 2) the ambient brightness value obtained by the rear camera component and the ambient brightness value obtained by the light sensing device If the difference is greater than the preset brightness difference threshold, it is judged to be in a backlight environment.
- the terminal device in step 101 determines whether it is in the backlight environment according to the acquired ambient brightness information, including:
- the ambient brightness value obtained by the front camera component is greater than the ambient brightness value obtained by the rear camera component; 2) the ambient brightness value obtained by the front camera component and the ambient brightness value obtained by the rear camera component If the difference is greater than the preset brightness difference threshold, it is judged to be in a backlight environment.
- the image processed in the step 102 to process the image acquired by the imaging component to the normal brightness includes:
- the imaging component acquires N images according to preset N exposure levels, N is a positive integer greater than 1; and synthesizes N images into one image of normal brightness.
- the present invention further provides an apparatus for image processing, which is provided in a terminal device including a camera module, and the apparatus for image processing provided by the embodiment of the present invention at least includes:
- the detecting module is configured to determine, according to the obtained ambient brightness information, whether the terminal device is in a backlight environment;
- the control module is configured to process the image acquired by the camera module into an image of normal brightness when the detecting module determines that the terminal device is in a backlight environment.
- the camera module includes a front camera unit and a rear camera unit;
- the detection module is specifically set to:
- the ambient brightness value acquired by the rear camera unit is greater than the ambient brightness value obtained by the front camera unit; 2) the ambient brightness value acquired by the rear camera unit and the ambient brightness value obtained by the front camera unit If the difference is greater than the preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the detection module is specifically set to:
- the ambient brightness value acquired by the front camera unit is greater than the ambient brightness value obtained by the rear camera unit; 2) the ambient brightness value acquired by the front camera unit and the ambient brightness value obtained by the rear camera unit If the difference is greater than the preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the camera module includes a rear camera unit, and the terminal device further includes a light sensing module;
- the detection module is specifically set to:
- the ambient brightness value acquired by the rear camera unit is greater than the ambient brightness value obtained by the light sensor module; 2) the difference between the ambient brightness value obtained by the rear camera unit and the ambient brightness value obtained by the light sensor module If the value is greater than the preset brightness difference threshold, it is determined that the terminal device is in a backlight environment.
- the control module is specifically configured to: control the camera module to acquire N images according to preset N exposure levels, where N is a positive integer greater than 1; and synthesize N images into a normal brightness image.
- FIG. 3 is a schematic diagram of a processing procedure of a specific embodiment of an image processing method according to an embodiment of the present invention. The figure, as shown in FIG. 3, further introduces the image processing method of the present invention in combination with a specific scenario.
- the current ambient brightness value is first obtained by the front and rear cameras respectively, wherein the current ambient brightness value can be obtained by reading the value of the current ambient brightness in the camera register, or reading the platform image processing end to indicate the current environment. The value of the brightness. Then, compare the two brightness values obtained by the front and rear cameras.
- the current environment from the darkest to the brightest range is 0 to 255
- the current ambient brightness value obtained by the rear camera is recorded as Y r
- the current ambient brightness value obtained by the front camera is recorded as Y f
- the threshold of the difference is denoted as Y t
- Y t 225
- the current photographing environment is a backlight shooting scene.
- the current photographing environment is a backlight shooting scene.
- the front panel of the terminal device can also be configured with a light sensing device. If the user selects to use the camera to take a photo, the current ambient brightness value obtained by the light sensing device can be recorded as Y f .
- the light sensing device is disposed on the rear panel of the terminal device, and the user selects to take a picture using the front camera, the current ambient brightness value obtained by the light sensing device can be recorded as Y r .
- the terminal device such as a mobile phone, a camera or a tablet device, sends a command to the camera, and generates N photos according to the preset N exposure levels, and then acquires N photos. Exposing the image data of the normal part, these images Synthesize a photo to achieve the purpose of improving the photo effect in the backlight scene
- three different exposure levels can be set, namely an underexposed level, an exposure default level, and an overexposure level.
- the resulting photo may be partially overexposed or partially underexposed.
- the terminal device If the user's current shooting is in a backlighting scene, when the user presses the shooting button, the terminal device generates three images in the background according to the preset three exposure levels, and the three image data are stored in the memory space allocated in advance. Then, by judging the brightness component values of the three photos, the image area with very small brightness and the image area with very high brightness are further adjusted according to the algorithm, thereby improving the brightness of the image area with very small brightness and reducing the image area with very large brightness. Brightness, and finally a photo with uniform overall brightness, the specific implementation of photo synthesis can be achieved by HDR algorithm.
- the method and device for processing an image according to the embodiment of the present invention are applied to a terminal device including an image capturing component, including: the terminal device determines whether it is in a backlight environment according to the acquired ambient brightness information; and when it is determined that the backlighting environment is in a backlight environment, the image capturing component is acquired.
- the image is processed as an image of normal brightness.
- the technical solution provided by the embodiment of the present invention automatically recognizes whether the terminal device is photographed in a backlight environment according to the acquired ambient brightness information, and processes the image captured in the backlight environment into an image of normal brightness, and solves the image captured in the backlight scene.
- the problem of high white light overflow or lack of detail in the dark part improves the shooting effect in the backlight environment, thus improving the user's photographing experience.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
Abstract
一种图像的处理方法和装置,应用于包括摄像部件的终端设备,终端设备,所述方法包括:所述终端设备根据获取的环境亮度信息判断是否处于逆光环境;当判断出处于逆光环境时,将摄像部件获取的图像处理为正常亮度的图像。本发明实施例提供给的技术方案根据获取的环境亮度信息自动识别出终端设备是否处于逆光环境下拍摄,并将逆光环境下拍摄的图像处理成正常亮度的图像,解决了逆光场景下拍摄的图像高光溢出发白或者暗部细节缺失的问题,改善了逆光环境场景下的拍摄效果,从而提升了用户的拍照体验。
Description
本发明实施例涉及摄像领域,尤指一种图像的处理方法和装置。
用户在逆光场景下使用相机拍照时,会发现拍摄的照片特别黑,几乎看不清楚图像的细节。现有的移动终端如手机,其相机应用打开后,默认都是自动拍照模式,而在逆光场景下,自动拍照模式的效果很不理想,要么是天空得到正确曝光而人脸发黑,要么人脸得到正确曝光而天空曝光过度发白,无法拍出满意的照片。究其原因,主要是由于逆光场景下,前景和背景的亮暗差别太大,已经超出了相机传感器的表现能力范围,从而导致了高光溢出或者暗部缺失的现象。
目前,通过选择高动态光照渲染(HDR,High-Dynamic Range)拍照模式,可以显著提升逆光场景下的拍照效果,但是,必须要保证相机支持HDR模式,并且用户判断在逆光场景下时手动选中HDR模式才有效。然而,一方面,HDR模式并不是每款手机都支持,而对于大多数的手机使用者或者对摄影知识了解很少的人来说,并不清楚HDR模式的含义,也不会在拍照时刻意选择该拍照模式;另一方面,在有些情况下,用户需要在逆光场景抓拍瞬间的画面,此时,如果再手动选择HDR模式后拍照,可能已经错过了最佳拍照时机。所以在逆光环境下,拍照效果差的问题在手机上仍然普遍存在,也降低了用户的拍照体验。
发明内容
为了解决上述技术问题,本发明实施例提供一种图像的处理方法和装置,能够自动识别逆光拍摄场景,并提升该场景下的拍摄效果,从而提升用户的拍照体验。
为了实现上述技术目的,本发明实施例提供的一种图像的处理方法,应用于包括摄像部件的终端设备,包括:
终端设备根据获取的环境亮度信息判断是否处于逆光环境;
当判断出处于逆光环境时,将自身摄像部件获取的图像处理为正常亮度的图像。
可选地,所述摄像部件包括前置摄像部件和后置摄像部件;
当使用后置摄像部件获取图像时,所述根据获取的环境亮度信息判断是否处于逆光环境包括:
如果同时满足以下条件:1)后置摄像部件获取的环境亮度值大于前置摄像部件获取的环境亮度值;2)后置摄像部件获取的环境亮度值与前置摄像部件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
可选地,所述摄像部件包括后置摄像部件,所述终端设备还包括光感器件;
当使用后置摄像部件获取图像时,所述根据获取的环境亮度信息判断是否处于逆光环境包括:
如果同时满足以下条件:1)后置摄像部件获取的环境亮度值大于光感器件获取的环境亮度值;2)后置摄像部件获取的环境亮度值与光感器件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
可选地,所述摄像部件包括前置摄像部件和后置摄像部件;
当使用前置摄像部件获取图像时,所述根据获取的环境亮度信息判断是否处于逆光环境包括:
如果同时满足以下条件:1)前置摄像部件获取的环境亮度值大于后置摄像部件获取的环境亮度值;2)前置摄像部件获取的环境亮度值与后置摄像部件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
可选地,所述摄像部件获取的图像处理为正常亮度的图像包括:
所述摄像部件根据预设的N个曝光等级获取N幅图像,N为大于1的正整数;将所述N幅图像合成为一幅正常亮度的图像。
本发明还提供一种图像的处理装置,设置于包括有摄像模块的终端设备中,所述装置至少包括:
检测模块,设置为根据获取的环境亮度信息判断所述终端设备是否处于逆光环境;
控制模块,设置为当所述检测模块判断出所述终端设备处于逆光环境时,将所述摄像模块获取的图像处理为正常亮度的图像。
可选地,所述摄像模块包括前置摄像单元和后置摄像单元;
当使用后置摄像单元获取图像时,所述检测模块具体设置为:
在同时满足以下条件时:1)后置摄像单元获取的环境亮度值大于前置摄像单元获取的环境亮度值;2)后置摄像单元获取的环境亮度值与前置摄像单元获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
可选地,所述摄像模块包括后置摄像单元,所述终端设备还包括光感模块;
当使用后置摄像单元获取图像时,所述检测模块具体设置为:
在同时满足以下条件时:1)后置摄像单元获取的环境亮度值大于光感模块获取的环境亮度值;2)后置摄像单元获取的环境亮度值与光感模块获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
可选地,所述摄像模块包括前置摄像单元和后置摄像单元;
当使用前置摄像单元获取图像时,所述检测模块具体设备为:
在同时满足以下条件时:1)前置摄像单元获取的环境亮度值大于后置摄像单元获取的环境亮度值;2)前置摄像单元获取的环境亮度值与后置摄像单元获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
可选地,所述控制模块具体设置为:控制所述摄像模块根据预设的N个曝光等级获取N幅图像,N为大于1的正整数;将所述N幅图像合成为一幅正常亮度的图像。
与现有技术相比,本发明实施例至少包括终端设备根据获取的环境亮度信息判断是否处于逆光环境;当判断出处于逆光环境时,将自身摄像部件获取的图像处理为正常亮度的图像。本发明实施例提供的技术方案,根据获取的环境亮度信息自动识别出了终端设备是否处于逆光环境下拍摄,并将逆光环境下拍摄的图像处理成正常亮度的图像,解决了逆光场景下拍摄的图像高光溢出发白或者暗部细节缺失的问题,改善了逆光环境场景下的拍摄效果,从而提升了用户体验。
附图概述
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是本发明实施例中图像的处理方法的流程图;
图2是本发明实施例中图像的处理装置的结构示意图;
图3是本发明实施例中图像的处理方法的具体实施例的处理过程示意图。
本发明的较佳实施方式
为使本发明实施例的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
如图1所示,本发明提供一种图像的处理方法,应用于包括摄像部件的终端设备,包括:
步骤101:终端设备根据获取的环境亮度信息判断是否处于逆光环境;
步骤102:当判断出处于逆光环境时,将自身摄像部件获取的图像处理为正常亮度的图像。
其中,摄像部件可以包括前置摄像部件和后置摄像部件,也可以只包括
后置摄像部件。终端设备还可以包括光感器件。
当使用后置摄像部件拍照时,可以通过光感器件获取前方亮度信息,也可以通过前置摄像部件获取前方亮度信息。
具体的,
当使用后置摄像部件获取图像时,步骤101中的终端设备根据获取的环境亮度信息判断是否处于逆光环境包括:
如果同时满足以下条件:1)后置摄像部件获取的环境亮度值大于前置摄像部件获取的环境亮度值;2)后置摄像部件获取的环境亮度值与前置摄像部件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断处于逆光环境。其中,亮度差阈值直接决定了逆光环境判断是否正确,所以需要预先在不同的逆光场景下,使用前后置摄像部件分别获取各自的环境亮度值,然后选择各逆光场景下的亮度差值中的最小值,作为亮度差阈值,以保证拍照时的逆光场景能够被正确的识别到。
或者,如果同时满足以下条件:1)后置摄像部件获取的环境亮度值大于光感器件获取的环境亮度值;2)后置摄像部件获取的环境亮度值与光感器件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断处于逆光环境。
当使用前置摄像部件获取图像时,步骤101中的终端设备根据获取的环境亮度信息判断是否处于逆光环境包括:
如果同时满足以下条件:1)前置摄像部件获取的环境亮度值大于后置摄像部件获取的环境亮度值;2)前置摄像部件获取的环境亮度值与后置摄像部件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断处于逆光环境。
当终端设备处于逆光环境时,步骤102中的将摄像部件获取的图像处理为正常亮度的图像包括:
摄像部件根据预设的N个曝光等级获取N幅图像,N为大于1的正整数;将N幅图像合成为一幅正常亮度的图像。
如图2所示,本发明还提供一种图像处理的装置,设置于包括摄像模块的终端设备中,本发明实施例提供的图像处理的装置至少包括:
检测模块,设置为根据获取的环境亮度信息判断终端设备是否处于逆光环境;
控制模块,设置为当检测模块判断出终端设备处于逆光环境时,将摄像模块获取的图像处理为正常亮度的图像。
较佳地,
摄像模块包括前置摄像单元和后置摄像单元;
当使用后置摄像单元获取图像时,检测模块具体设置为:
在同时满足以下条件时:1)后置摄像单元获取的环境亮度值大于前置摄像单元获取的环境亮度值;2)后置摄像单元获取的环境亮度值与前置摄像单元获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出终端设备处于逆光环境。
或者,当使用前置摄像单元获取图像时,检测模块具体设置为:
在同时满足以下条件时:1)前置摄像单元获取的环境亮度值大于后置摄像单元获取的环境亮度值;2)前置摄像单元获取的环境亮度值与后置摄像单元获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出终端设备处于逆光环境。
较佳地,
摄像模块包括后置摄像单元,所述终端设备还包括光感模块;
当使用后置摄像单元获取图像时,检测模块具体设置为:
在同时满足以下条件时:1)后置摄像单元获取的环境亮度值大于光感模块获取的环境亮度值;2)后置摄像单元获取的环境亮度值与光感模块获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出终端设备处于逆光环境。
较佳地,
控制模块具体设置为:控制摄像模块根据预设的N个曝光等级获取N幅图像,N为大于1的正整数;将N幅图像合成为一幅正常亮度的图像。
图3是本发明实施例中图像的处理方法的具体实施例的处理过程示意
图,如图3所示,结合具体的场景进一步介绍本发明图像处理的方法。
在进行拍摄时,首先调用前后两个摄像头的初始化操作,使摄像头工作在正常工作模式。同时分配存储图像数据所需要的空间大小。
在具体拍摄时,选择当前要使用的摄像头,即用户选择使用前摄像头模块或者使用后摄像头拍照。
当用户按下拍照键时,首先由前后摄像头分别获取当前的环境亮度值,其中,当前环境亮度值可以通过读取摄像头寄存器中表示当前环境亮度的值,或者读取平台图像处理端表示当前环境亮度的值。然后,对前后摄像头获取的两个亮度值做比较。
例如当前环境从最暗到最亮的范围是0至255,将后摄像头获取的当前环境亮度值记作Yr,将前摄像头获取的当前环境亮度值记作Yf,将前后两个摄像头亮度差的阈值记作Yt,可以设定Yt=225。
假设用户选择使用后摄像头拍照,如果同时满足以下两个条件:
1)Yr>Yf;
2)(Yr-Yf)>Yt;
则判定当前拍照环境为逆光拍摄场景。
同样的,假设用户选择使用前摄像头拍照,如果同时满足下面两个条件:
1)Yf>Yr;
2)(Yf-Yr)>Yt;
则同样判定当前拍照环境为逆光拍摄场景。
此外,终端设备的前面板还可以配置光感器件,如果用户选择使用后摄像头拍照,可以将光感器件获取的当前环境亮度值记作Yf。
当然,如果光感器件配置在终端设备的后面板,并且用户选择使用前置摄像头拍照时,可以将光感器件获取的当前环境亮度值记作Yr。
当判断在逆光场景下拍照时,终端设备,例如手机、相机或者平板设备等具有拍照功能的设备发送命令给摄像头,根据预先设定的N个曝光等级分别产生N张照片,然后获取N张照片中曝光正常部分的图像数据,这些图像
数据合成一张照片,从而达到提升逆光场景下拍照效果的目的
例如,可以设定三个不同的曝光等级,即曝光不足等级、曝光默认等级、曝光过度等级。使用该预设曝光等级,最后生成的照片可能部分区域曝光过度发白,或者部分区域曝光不足发黑。
如果用户的当前拍摄处于逆光场景下,当用户按下拍摄按钮后,终端设备会根据预设的三个曝光等级在后台产生三张图像,三张图像数据存储在提前分配好的内存空间里。然后通过判断这三张照片的亮度分量值,将亮度非常小的图像区域和亮度非常大的图像区域,根据算法做进一步调整,提升亮度非常小的图像区域亮度,同时降低亮度非常大的图像区域亮度,最后生成一张整体亮度均匀的照片,照片合成的具体实现可以采用HDR算法实现。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现,相应地,上述实施例中的各模块/模块可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请不限制于任何特定形式的硬件和软件的结合。
本发明实施例提出的图像的处理方法和装置,应用于包括摄像部件的终端设备,包括:终端设备根据获取的环境亮度信息判断是否处于逆光环境;当判断出处于逆光环境时,将摄像部件获取的图像处理为正常亮度的图像。本发明实施例提供给的技术方案根据获取的环境亮度信息自动识别出终端设备是否处于逆光环境下拍摄,并将逆光环境下拍摄的图像处理成正常亮度的图像,解决了逆光场景下拍摄的图像高光溢出发白或者暗部细节缺失的问题,改善了逆光环境场景下的拍摄效果,从而提升了用户的拍照体验。
Claims (10)
- 一种图像的处理方法,应用于包括有摄像部件的终端设备,其特征在于,包括:终端设备根据获取的环境亮度信息判断是否处于逆光环境;当判断出处于逆光环境时,将自身摄像部件获取的图像处理为正常亮度的图像。
- 如权利要求1所述的处理方法,其特征在于:所述摄像部件包括前置摄像部件和后置摄像部件;当使用后置摄像部件获取图像时,所述根据获取的环境亮度信息判断是否处于逆光环境包括:如果同时满足以下条件:1)后置摄像部件获取的环境亮度值大于前置摄像部件获取的环境亮度值;2)后置摄像部件获取的环境亮度值与前置摄像部件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
- 如权利要求1所述的处理方法,其特征在于:所述摄像部件包括后置摄像部件,所述终端设备还包括光感器件;当使用后置摄像部件获取图像时,所述根据获取的环境亮度信息判断是否处于逆光环境包括:如果同时满足以下条件:1)后置摄像部件获取的环境亮度值大于光感器件获取的环境亮度值;2)后置摄像部件获取的环境亮度值与光感器件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
- 如权利要求1所述的处理方法,其特征在于:所述摄像部件包括前置摄像部件和后置摄像部件;当使用前置摄像部件获取图像时,所述根据获取的环境亮度信息判断是否处于逆光环境包括:如果同时满足以下条件:1)前置摄像部件获取的环境亮度值大于后置摄 像部件获取的环境亮度值;2)前置摄像部件获取的环境亮度值与后置摄像部件获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出所述终端设备处于逆光环境。
- 如权利要求1至4任一项所述的处理方法,其特征在于:所述摄像部件获取的图像处理为正常亮度的图像包括:所述摄像部件根据预设的N个曝光等级获取N幅图像,N为大于1的正整数;将所述N幅图像合成为一幅正常亮度的图像。
- 一种图像的处理装置,设置于包括有摄像模块的终端设备中,其特征在于,所述装置至少包括:检测模块,设置为根据获取的环境亮度信息判断所述终端设备是否处于逆光环境;控制模块,设置为当所述检测模块判断出所述终端设备处于逆光环境时,将所述摄像模块获取的图像处理为正常亮度的图像。
- 如权利要求6所述的处理装置,其特征在于:所述摄像模块包括前置摄像单元和后置摄像单元;当使用后置摄像单元获取图像时,所述检测模块具体设置为:在同时满足以下条件时:1)后置摄像单元获取的环境亮度值大于前置摄像单元获取的环境亮度值;2)后置摄像单元获取的环境亮度值与前置摄像单元获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出终端设备处于逆光环境。
- 如权利要求6所述的处理装置,其特征在于:所述摄像模块包括后置摄像单元,所述终端设备还包括光感模块;当使用后置摄像单元获取图像时,所述检测模块具体设置为:在同时满足以下条件时:1)后置摄像单元获取的环境亮度值大于光感模块获取的环境亮度值;2)后置摄像单元获取的环境亮度值与光感模块获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出终端设备处于逆光环境。
- 如权利要求6所述的处理装置,其特征在于:所述摄像模块包括前置 摄像单元和后置摄像单元;当使用前置摄像单元获取图像时,所述检测模块具体设置为:在同时满足以下条件时:1)前置摄像单元获取的环境亮度值大于后置摄像单元获取的环境亮度值;2)前置摄像单元获取的环境亮度值与后置摄像单元获取的环境亮度值的差值大于预先设置的亮度差阈值,则判断出终端设备处于逆光环境。
- 如权利要求6至9任一项所述的处理装置,其特征在于:所述控制模块具体设置为:控制所述摄像模块根据预设的N个曝光等级获取N幅图像,N为大于1的正整数;将所述N幅图像合成为一幅正常亮度的图像。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410639861.4 | 2014-11-13 | ||
CN201410639861.4A CN105657236A (zh) | 2014-11-13 | 2014-11-13 | 一种图像的处理方法和装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016074414A1 true WO2016074414A1 (zh) | 2016-05-19 |
Family
ID=55953670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/075260 WO2016074414A1 (zh) | 2014-11-13 | 2015-03-27 | 一种图像的处理方法和装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105657236A (zh) |
WO (1) | WO2016074414A1 (zh) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108156381B (zh) * | 2017-12-28 | 2021-01-05 | 北京小米移动软件有限公司 | 拍照方法及装置 |
CN110913123B (zh) * | 2019-08-15 | 2021-06-04 | 厦门亿联网络技术股份有限公司 | 基于图像分块滤波的抗逆光自动曝光方法、装置及电子设备 |
CN110891145B (zh) * | 2019-12-02 | 2021-08-17 | 联想(北京)有限公司 | 一种拍照获得图像的方法及电子设备 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101008762A (zh) * | 2007-01-30 | 2007-08-01 | 北京中星微电子有限公司 | 一种逆光检测方法、逆光补偿终止检测方法及相应装置 |
CN102238339A (zh) * | 2011-06-21 | 2011-11-09 | 深圳市先河系统技术有限公司 | 一种逆光补偿方法 |
CN102811315A (zh) * | 2011-05-31 | 2012-12-05 | 索尼公司 | 图像处理装置、图像处理方法和程序 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4543674B2 (ja) * | 2003-12-18 | 2010-09-15 | 日本電気株式会社 | ツインカメラ付き携帯端末 |
CN1753459B (zh) * | 2004-09-22 | 2010-06-23 | 富士施乐株式会社 | 对象拍摄条件判定装置、图像质量调节装置和图像拍摄设备 |
US20140063288A1 (en) * | 2012-08-30 | 2014-03-06 | Pantech Co., Ltd. | Imaging apparatus, electronic device and method providing exposure compensation |
CN103327148B (zh) * | 2013-06-28 | 2016-02-10 | 惠州Tcl移动通信有限公司 | 基于移动终端调整屏幕背光亮度的实现方法及移动终端 |
-
2014
- 2014-11-13 CN CN201410639861.4A patent/CN105657236A/zh active Pending
-
2015
- 2015-03-27 WO PCT/CN2015/075260 patent/WO2016074414A1/zh active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101008762A (zh) * | 2007-01-30 | 2007-08-01 | 北京中星微电子有限公司 | 一种逆光检测方法、逆光补偿终止检测方法及相应装置 |
CN102811315A (zh) * | 2011-05-31 | 2012-12-05 | 索尼公司 | 图像处理装置、图像处理方法和程序 |
CN102238339A (zh) * | 2011-06-21 | 2011-11-09 | 深圳市先河系统技术有限公司 | 一种逆光补偿方法 |
Also Published As
Publication number | Publication date |
---|---|
CN105657236A (zh) | 2016-06-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9912875B2 (en) | Imaging device and imaging method capable of generating a bulb exposure image derived from relatively bright image combination#data and relatively dark image combination data | |
WO2020034737A1 (zh) | 成像控制方法、装置、电子设备以及计算机可读存储介质 | |
WO2020038072A1 (zh) | 曝光控制方法、装置和电子设备 | |
KR101710971B1 (ko) | 촬영 방법, 장치 및 단말기 | |
US8937677B2 (en) | Digital photographing apparatus, method of controlling the same, and computer-readable medium | |
WO2017096866A1 (zh) | 高动态范围图像的生成方法和装置 | |
WO2020057199A1 (zh) | 成像方法、装置和电子设备 | |
WO2020034701A1 (zh) | 成像控制方法、装置、电子设备以及可读存储介质 | |
US20150271405A1 (en) | System for auto-hdr capture decision making | |
US20220094838A1 (en) | Method, Electronic Device and Computer-Readable Storage Medium for Generating a High Dynamic Range Image | |
US8576320B2 (en) | Digital photographing apparatus and method of controlling the same | |
CN104184956A (zh) | 一种移动通信终端拍照的方法、系统及移动通信终端 | |
TWI543615B (zh) | 影像處理方法及其電子裝置 | |
KR102207633B1 (ko) | 촬영 장치 및 그 제어 방법 | |
WO2020029679A1 (zh) | 控制方法、装置、成像设备、电子设备及可读存储介质 | |
GB2558393A (en) | Backlift face detection | |
US10972676B2 (en) | Image processing method and electronic device capable of optimizing hdr image by using depth information | |
CN116055897B (zh) | 拍照方法及其相关设备 | |
CN106791451A (zh) | 一种智能终端的拍照方法 | |
JP2008092071A (ja) | 撮影装置 | |
WO2016074414A1 (zh) | 一种图像的处理方法和装置 | |
WO2015049990A1 (ja) | 撮像装置および撮像方法 | |
TWI640200B (zh) | 電子裝置及攝像控制方法 | |
WO2015192545A1 (zh) | 拍照的方法、装置及计算机存储介质 | |
WO2023131028A1 (zh) | 图像处理方法及其相关设备 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15859358 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15859358 Country of ref document: EP Kind code of ref document: A1 |