WO2019011147A1 - Human face region processing method and apparatus in backlight scene - Google Patents

Human face region processing method and apparatus in backlight scene Download PDF

Info

Publication number
WO2019011147A1
WO2019011147A1 PCT/CN2018/094083 CN2018094083W WO2019011147A1 WO 2019011147 A1 WO2019011147 A1 WO 2019011147A1 CN 2018094083 W CN2018094083 W CN 2018094083W WO 2019011147 A1 WO2019011147 A1 WO 2019011147A1
Authority
WO
WIPO (PCT)
Prior art keywords
backlight
foreground
scene
face region
saturation
Prior art date
Application number
PCT/CN2018/094083
Other languages
French (fr)
Chinese (zh)
Inventor
袁全
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2019011147A1 publication Critical patent/WO2019011147A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • H04N23/611Control of cameras or camera modules based on recognised objects where the recognised objects include parts of the human body
    • G06T5/90
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Definitions

  • the present application relates to the field of image processing technologies, and in particular, to a method and apparatus for processing a face region of a backlight scene.
  • the exposed face of the user is insufficiently exposed, and the backlight is effective.
  • the brightness is very low, the user's face is dark, and the interview details are blurred.
  • the sensitivity ISO is pulled high to increase the brightness of the face region by enhancing the sensitivity to light.
  • the present invention provides a face area processing method and apparatus for backlit scenes, which solves the problem that in the prior art, in the backlight scene, only the brightness of the face area is increased, and the noise reduction intensity is increased, and the skin color of the face area is pale. technical problem.
  • An embodiment of the present disclosure provides a method for processing a face region of a backlight scene, including: when a backlight scene is detected, separating a foreground and a backlight background from the current captured image; performing brightness enhancement processing on the foreground, and determining the foreground a face area; adjusting a preset CCM model parameter corresponding to the backlight scene to increase the saturation of the face area.
  • a face region processing apparatus for a backlight scene comprising: a separation module, configured to separate a foreground and a backlight background from a current shooting image when a backlight scene is detected; and a brightness enhancement module for The foreground is subjected to a brightness enhancement process; the determining module is configured to determine a face area in the foreground; and an adjustment module is configured to adjust a preset CCM model parameter corresponding to the backlight scene to improve saturation of the face area .
  • a further embodiment of the present application provides a terminal device including one or more components: a housing and a processor and a memory located in the housing, wherein the processor reads the memory stored in the memory by reading
  • the program code is executed to execute a program corresponding to the executable program code for performing a face region processing method of the backlighting scene as described in the first aspect of the present application.
  • a further embodiment of the present application provides a non-transitory computer readable storage medium having stored thereon a computer program, which is executed by a processor to implement a face of a backlight scene as described in the first aspect of the present application.
  • Regional processing method
  • the foreground and the backlight background are separated from the current shooting image, the foreground is brightness-raised, and the face region in the foreground is determined, and the preset CCM model parameters corresponding to the backlight scene are adjusted to improve the face.
  • the saturation of the area Therefore, when the image of the face region in the case of backlighting is raised, the problem that the skin color of the face is faded without blood color is avoided, and the image quality is ensured while avoiding the negative influence on the smooth region while ensuring the image display. Visual effects.
  • FIG. 1 is a flowchart of a face area processing method for a backlight scene according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a backlight shooting scene according to an embodiment of the present application.
  • FIG. 3( a ) is a schematic diagram of an effect before processing an image of a current shooting screen according to an embodiment of the present application
  • FIG. 3(b) is a schematic diagram showing the effect of improving the brightness of the face region of the current shooting picture according to an embodiment of the present application
  • FIG. 3(c) is a schematic diagram showing an effect of increasing saturation of a current photographing screen according to an embodiment of the present application
  • FIG. 4 is a flowchart of a face area processing method for a backlight scene according to another embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a face region processing apparatus for a backlight scene according to an embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of a face region processing apparatus for a backlight scene according to another embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a face region processing apparatus for a backlight scene according to still another embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of an image processing circuit according to an embodiment of the present application.
  • the present application proposes a face region processing method for the backlight scene, which can improve the brightness of the face region while improving the backlight scene, and avoid Sacrificing the details of the face makes the visual display of the image stronger.
  • FIG. 1 is a flowchart of a method for processing a face region of a backlight scene according to an embodiment of the present application. As shown in FIG. 1 , the method includes:
  • step 101 when the backlight scene is detected, the foreground and backlight backgrounds are separated from the current shooting image.
  • the position of the face region can be separated.
  • the range of clear imaging before the focus area is the foreground.
  • Depth of field the location of the face area is in the foreground depth of field.
  • the range of clear imaging after the focus area is the background depth of field, and the backlight background is in the background depth of field. Therefore, in this example, the foreground and backlight background are separated from the current shot according to the depth information. .
  • the first example is a first example:
  • the relevant parameters of the shooting can be acquired to calculate the depth information of the image area outside the focus area in the preview image according to the formula of the shooting camera.
  • the two rear cameras have a certain angular difference and a distance difference with respect to the captured target object, so the preview image data acquired by the two cameras is also There is a certain phase difference.
  • the pixel point coordinates corresponding to the point A are (30, 50), and in the preview image data of the camera 2, the point A corresponds.
  • the relationship between the depth information and the phase difference may be established in advance according to the experimental data or the camera parameters, and then the corresponding depth information may be searched according to the phase difference in the preview image data acquired by the two cameras in the preview image. .
  • the depth information corresponding to the point A in the preview screen is 5 meters.
  • the depth of field information of each pixel in the current preview picture that is, the depth of field map of the image area outside the focus area is obtained.
  • the foreground depth information of the image area before the focus area and the background depth information after the focus area may be further determined, thereby determining the foreground before the focus area according to the depth map Depth of field and background depth of focus after the focus area, and separate foreground and backlit backgrounds based on foreground depth and background depth.
  • Step 102 Perform brightness enhancement processing on the foreground and determine a face area in the foreground.
  • the brightness of the face area and other areas in the foreground in the backlight scene are relatively low, and the boundary of the face area is blurred compared with other areas. Therefore, the brightness of the foreground is improved at this time.
  • the brightness of the face area is improved, the face is clearly visible, and the boundary of the face area is clearer than other areas, so that the face area can be extracted to further process the face area.
  • the first example is a first example:
  • the face area is the color of the human body such as the skin color
  • the other areas are the colors of other scenes different from the color of the face area. Therefore, the color channel detection algorithm can be adopted.
  • the area where the skin color is located is identified to determine the contour edge of the face area in the foreground according to the area covered by the skin color.
  • the image edge detection algorithm such as CANNY algorithm and wavelet transform algorithm is used to determine the contour edge of the face region in the foreground.
  • Step 103 Adjust a preset CCM model parameter corresponding to the backlight scene to improve the saturation of the face region.
  • saturation Degree refers to the degree of vividness of color, also known as the purity of color.
  • the saturation of face area depends on the proportion of the color component and the achromatic component (gray) in the face area. The larger the color component, the greater the saturation. The larger the color component, the smaller the saturation.
  • the saturation of the face is increased, the color component of the face region is increased, so that the face region is rosy and shiny.
  • the adjustment of the saturation is implemented based on the adjustment of the CCM model parameters.
  • the implementation of CCM is based on a simple linear matrix, adjusting the coefficients of RG and BG in the G path, adjusting the coefficients of GR and BR in the R path, and adjusting the coefficients of GB and RB in the B way to perform color. Correct to change the hue of the picture.
  • the relationship of each coefficient in the above formula (1) is as follows: Therefore, the pixels after the CCM are It can be expressed as:
  • the adjustment of the RGB color distribution can be realized by changing the values of the parameters C00, C11, and C22 on the diagonal in the CCM model matrix, thereby achieving the adjustment of the saturation.
  • the saturation of the captured object in the backlight scene and the forward scene is detected respectively, and the CCM model parameters corresponding to the backlight scene are set according to the detection result, and the CCM model parameters corresponding to the preset backlight scene are adjusted to be improved.
  • the saturation of the face area in backlighting is detected respectively, and the CCM model parameters corresponding to the backlight scene are set according to the detection result, and the CCM model parameters corresponding to the preset backlight scene are adjusted to be improved.
  • the CCM model parameters are set for the backlight scene, so that the saturation of the forward region does not change during the actual adjustment process, and the implementation of the CCM model parameters can only be performed in the backlight region.
  • the function of the face region because the setting of the CCM model parameters is strongly correlated with the color temperature and brightness of the picture color, therefore, in order to avoid the adjustment of the CCM model parameters during the implementation process, the CCM model parameters corresponding to the backlight scene are set. , is set based on the backlight scene and the forward scene with the same color temperature and brightness.
  • the face region is extracted by using the depth information-based method, and the extraction accuracy of the face region is higher than that of the direct face recognition. Since the brightness of the face area is low and the features are not obvious in the backlight scene, it is very likely that the face recognition directly causes the recognition to fail.
  • the face region processing method of the backlight scene in the embodiment of the present invention adjusts the saturation of the face region based on the adjustment of the CCM model parameters after improving the brightness of the face face, and improves the color component of the face region. Makes the face rosy and shiny.
  • the saturation adjustment is performed based on the CCM model parameters, since the CCM model parameters are set based on the backlight scene, the saturation is adjusted only for the face region in the backlight scene during the adjustment process. That is, the backlighting scene is set separately, and a set of CCM model parameters are set to separate the CCM model parameters of the backlight scene from the normal scene, thereby avoiding the negative influence on the smoothing area in the picture due to the increase of the backlight scene saturation during the debugging process.
  • the following example illustrates that when the backlight scene as shown in FIG. 3( a ) is detected, the foreground and the backlight background are separated from the current shot image, and then, the foreground is performed.
  • the brightness enhancement processing as shown in FIG. 3(b), increases the brightness of the processed face, but the facial details are lost.
  • adjusting the preset CCM model parameters corresponding to the backlight scene improves the saturation of the face region, As shown in Fig. 3(c), the face of the face is rosy and shiny, and the brightness is improved, while the saturation of the smooth area does not receive a negative influence.
  • the face region processing method of the backlight scene in the embodiment of the present application detects the backlight scene, separates the foreground and the backlight background from the current captured image, performs brightness enhancement processing on the foreground, and determines the face in the foreground.
  • the region adjusts a preset CCM model parameter corresponding to the backlight scene to increase the saturation of the face region. Therefore, when the image of the face region in the case of backlighting is raised, the problem that the skin color of the face is faded without blood color is avoided, and the image quality is ensured while avoiding the negative influence on the smooth region while ensuring the image display. Visual effects.
  • the degree of darkening of the face region is different due to the difference in the intensity of the ambient light of the backlight, the stronger the ambient light, the darker the face region, and the more the ambient light is. Not strong, the brighter the face area, the darker the face area, the more facial details that are lost, the higher the saturation needs to be lifted. Therefore, in order to improve the processing effect on the saturation of the face area, according to the current environment The backlight intensity is adjusted for saturation.
  • the above step 103 includes:
  • Step 201 Detect the backlight intensity of the current scene.
  • the manner of detecting the backlight intensity of the current scene may be different according to the specific application scenario, for example, obtaining the backlight intensity sensed by the photosensitive element in the camera module, for example, calculating the backlight intensity according to the brightness of the foreground.
  • Step 202 Acquire an enhancement range corresponding to the backlight intensity.
  • the enhancement range corresponds to the saturation increase, and the higher the enhancement, the greater the increase of saturation. Conversely, the lower the enhancement, the smaller the increase of saturation.
  • a plurality of different implementation manners may be used to obtain an enhancement range corresponding to the backlight intensity.
  • the correspondence between the backlight intensity and the enhancement amplitude is pre-stored, thereby After obtaining the backlight intensity, query the corresponding relationship to obtain the corresponding enhancement range.
  • the conversion function is generated according to the relationship between the backlight intensity and the enhancement amplitude, so that after the backlight intensity is acquired, the corresponding enhancement amplitude is obtained by the conversion function.
  • Step 203 Adjust the preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude to improve the saturation of the face region.
  • the CCM model parameters are adjusted to achieve an increase in saturation corresponding to the face region, so that the face region does not over-saturate or under-saturate.
  • the processing effect is good.
  • the CCM model parameters only improve the saturation of the face region in the backlight scene, and avoid the negative influence on the smooth region.
  • the skin color of each part of the face is also different.
  • the face cheek is more rosy than the forehead, and thus, in order to further improve the processing effect, the face area may be different.
  • the locations determine different saturation coefficients to adjust different degrees of saturation for different parts of the face region according to different saturation coefficients.
  • a saturation adjustment coefficient corresponding to a different part of the face region is obtained, wherein the saturation coefficient of the more rosy part is higher in reality, and further, the calculation and the difference are performed according to the saturation adjustment coefficient and the enhancement range corresponding to different parts.
  • the lifting range corresponding to the part is adjusted according to the lifting range corresponding to the different parts, and the preset CCM model parameter corresponding to the backlight scene is used to improve the saturation of the corresponding position of the face area.
  • the face region processing method of the backlight scene in the embodiment of the present application determines the enhancement range according to the backlight intensity of the current scene, and adjusts the CCM model parameters corresponding to the backlight scene according to the enhancement range to improve the saturation of the face region. degree. Therefore, an appropriate enhancement range is selected for the face area to be processed to improve the saturation, and the supersaturation or undersaturation of the face area is avoided, thereby further improving the visual effect of the image display.
  • FIG. 5 is a schematic structural diagram of a face area processing apparatus for a backlight scene according to an embodiment of the present application, as shown in FIG.
  • the face region processing device of the backlighting scene includes: a separation module 100, a brightness enhancement module 200, a determination module 300, and an adjustment module 400.
  • the separation module 100 is configured to separate the foreground and the backlight background from the current shooting image when the backlight scene is detected.
  • the separation module 100 includes a first acquisition unit 110, a determination unit 120, and a separation unit 130.
  • the first obtaining unit 110 is configured to determine a depth map of the image area outside the focus area according to the current captured picture data respectively acquired by the dual cameras.
  • the determining unit 120 is configured to determine a foreground depth of field before the focus area and a background depth of field after the focus area according to the depth of field map.
  • the separating unit 130 is configured to separate the foreground and the backlight background according to the foreground depth of field and the background depth of field.
  • the brightness enhancement module 200 is configured to perform brightness enhancement processing on the foreground.
  • the determining module 300 is configured to determine a face area in the foreground.
  • the adjustment module 400 is configured to adjust a preset CCM model parameter corresponding to the backlight scene to improve the saturation of the face region.
  • the face region processing device of the backlight scene of the embodiment of the present invention detects the backlight scene, separates the foreground and the backlight background from the current captured image, performs brightness enhancement processing on the foreground, and determines the face in the foreground.
  • the region adjusts a preset CCM model parameter corresponding to the backlight scene to increase the saturation of the face region. Therefore, when the image of the face region in the case of backlighting is raised, the problem that the skin color of the face is faded without blood color is avoided, and the image quality is ensured while avoiding the negative influence on the smooth region while ensuring the image display. Visual effects.
  • FIG. 7 is a schematic structural diagram of a face region processing of a backlighting scene according to still another embodiment of the present application.
  • the adjustment module 400 includes a detecting unit 410 and a second acquiring unit, as shown in FIG. 420 and adjustment unit 430.
  • the detecting unit 410 is configured to detect the backlight intensity of the current scene.
  • the second obtaining unit 420 is configured to acquire an enhancement range corresponding to the backlight intensity.
  • the adjusting unit 430 is configured to adjust the saturation of the face region by adjusting a preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude.
  • the face region processing device of the backlight scene in the embodiment of the present application determines the enhancement range according to the backlight intensity of the current scene, and adjusts the CCM model parameters corresponding to the backlight scene according to the enhancement range to improve the saturation of the face region. degree. Therefore, an appropriate enhancement range is selected for the face region to be processed to improve the saturation, and the supersaturation or undersaturation of the face region is avoided, thereby further improving the visual effect of the image display.
  • FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 1000 includes a housing 1100 and a processor 1110 and a memory 1120 located in the housing 1100.
  • the processor 1110 is operable by reading executable program code stored in the memory 1120.
  • a program corresponding to the program code is executed for performing the face region processing method of the backlight scene described in the above embodiment.
  • FIG. 99 is a schematic diagram of an image processing circuit as a possible implementation. For ease of explanation, only the various aspects related to the embodiments of the present application are shown.
  • the image processing circuit specifically includes: a photographing unit 11 and a processing unit 12, wherein
  • the photographing unit 11 is configured to output a photographing screen.
  • the processing unit 12 is configured to: when the backlight scene is detected, separate the foreground and the backlight background from the current captured image, perform brightness enhancement processing on the foreground, determine a face region in the foreground, and adjust a preset
  • the CCM model parameter corresponding to the backlight scene increases the saturation of the face region.
  • the photographing unit 11 includes an electrically connected dual camera 111
  • the processor 12 includes an image signal processing ISP processor 121, wherein
  • the dual camera 111 is configured to output a current shooting picture respectively acquired by the two cameras.
  • the ISP processor 121 is configured to determine a depth map of an image area outside the focus area according to the current captured picture data respectively acquired by the dual camera, and determine a foreground depth and the focus area before the focus area according to the depth map. Subsequent background depth of field separates the foreground and backlit background from the foreground depth of field and the background depth of field.
  • the processor 12 includes an electrically connected CPU 122, wherein the CPU 122 is configured to detect a backlight intensity of a current scene, and obtain an enhancement range corresponding to the backlight intensity. And adjusting a preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude to improve saturation of the face region.
  • the CPU 122 is further configured to acquire a saturation adjustment coefficient corresponding to a different portion of the face region, and calculate and describe the saturation adjustment coefficient and the enhancement amplitude according to the different portions.
  • the lifting range corresponding to the different parts is adjusted according to the lifting range corresponding to the different parts, and the preset CCM model parameter corresponding to the backlighting scene is adjusted to improve the saturation of the corresponding position of the face area.
  • the present application also proposes a non-transitory computer readable storage medium having stored thereon a computer program capable of realizing a backlighting scene as described in the foregoing embodiments when the computer program is executed by the processor Face area processing method.
  • first and second are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated.
  • features defining “first” and “second” may include at least one of the features, either explicitly or implicitly.
  • the meaning of "a plurality” is at least two, such as two, three, etc., unless specifically defined otherwise.
  • a "computer-readable medium” can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device.
  • computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM).
  • the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
  • portions of the application can be implemented in hardware, software, firmware, or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware and in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: discrete with logic gates for implementing logic functions on data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. While the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the present application. The embodiments are subject to variations, modifications, substitutions and variations.

Abstract

Disclosed in the present application are a human face region processing method and apparatus in a backlight scene. The method comprises: separating a foreground and a backlight background from a currently captured image when a backlight scene is detected; performing brightness increase processing on the foreground, and determining a human face region in the foreground; and adjusting preset CCM model parameters corresponding to the backlight scene so as to improve the saturation of the human face region. Therefore, when the brightness of the human face region image under the backlight condition is increased, the problem that the human face skin color is faded and is complexionless is avoided, the negative impact on a frontlight region is avoided and the image display visual effect is ensured while the image quality is improved.

Description

逆光场景的人脸区域处理方法和装置Face area processing method and device for backlight scene
相关申请的交叉引用Cross-reference to related applications
本申请要求广东欧拍移动通信有限公司于2017年07月10日提交的、申请名称为“逆光场景的人脸区域处理方法和装置”的、中国专利申请号“201710558357.5”的优先权。The present application claims the priority of the Chinese Patent Application No. "201710558357.5" filed on July 10, 2017 by Guangdong Ou Pai Mobile Communication Co., Ltd., which is entitled "Surface Area Processing Method and Apparatus for Backlighting Scenes".
技术领域Technical field
本申请涉及图像处理技术领域,尤其涉及一种逆光场景的人脸区域处理方法和装置。The present application relates to the field of image processing technologies, and in particular, to a method and apparatus for processing a face region of a backlight scene.
背景技术Background technique
通常,在拍照时,如果用户人脸位于光源和摄像头之间,会导致被摄用户人脸曝光不充分,出现逆光的效果。而在该逆光场景下拍摄的用户的人脸图像中,亮度非常低,用户人脸较黑暗,面试细节较为模糊。Generally, when the user is photographed, if the user's face is located between the light source and the camera, the exposed face of the user is insufficiently exposed, and the backlight is effective. In the face image of the user photographed in the backlight scene, the brightness is very low, the user's face is dark, and the interview details are blurred.
相关技术中,为了提高逆光场景下的人脸亮度,把感光度ISO拉得很高,以通过增强对光灵敏度来提高人脸区域亮度。In the related art, in order to improve the brightness of a face in a backlight scene, the sensitivity ISO is pulled high to increase the brightness of the face region by enhancing the sensitivity to light.
申请内容Application content
本申请提供一种逆光场景的人脸区域处理方法和装置,以解决现有技术中,在逆光场景下,仅仅提高人脸区域的亮度,导致降噪强度增加而造成的人脸区域肤色惨白的技术问题。The present invention provides a face area processing method and apparatus for backlit scenes, which solves the problem that in the prior art, in the backlight scene, only the brightness of the face area is increased, and the noise reduction intensity is increased, and the skin color of the face area is pale. technical problem.
本申请实施例提供一种逆光场景的人脸区域处理方法,包括:当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景;对所述前景进行亮度提升处理,并确定所述前景中的人脸区域;调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。An embodiment of the present disclosure provides a method for processing a face region of a backlight scene, including: when a backlight scene is detected, separating a foreground and a backlight background from the current captured image; performing brightness enhancement processing on the foreground, and determining the foreground a face area; adjusting a preset CCM model parameter corresponding to the backlight scene to increase the saturation of the face area.
本申请另一实施例提供一种逆光场景的人脸区域处理装置,包括:分离模块,用于当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景;亮度提升模块,用于对所述前景进行亮度提升处理;确定模块,用于确定所述前景中的人脸区域;调整模块,用于调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。Another embodiment of the present invention provides a face region processing apparatus for a backlight scene, comprising: a separation module, configured to separate a foreground and a backlight background from a current shooting image when a backlight scene is detected; and a brightness enhancement module for The foreground is subjected to a brightness enhancement process; the determining module is configured to determine a face area in the foreground; and an adjustment module is configured to adjust a preset CCM model parameter corresponding to the backlight scene to improve saturation of the face area .
本申请又一实施例提供一种终端设备,包括以下一个或多个组件:壳体和位于所述壳体内的处理器、存储器,其中,所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如本申请第一方面实施例所述的逆光场景的人脸区域处理方法。A further embodiment of the present application provides a terminal device including one or more components: a housing and a processor and a memory located in the housing, wherein the processor reads the memory stored in the memory by reading The program code is executed to execute a program corresponding to the executable program code for performing a face region processing method of the backlighting scene as described in the first aspect of the present application.
本申请还一实施例提供一种非临时性计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如本申请第一方面实施例所述的逆光场景的人脸区域处理方法。A further embodiment of the present application provides a non-transitory computer readable storage medium having stored thereon a computer program, which is executed by a processor to implement a face of a backlight scene as described in the first aspect of the present application. Regional processing method.
本申请实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present application may include the following beneficial effects:
当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景,对前景进行亮度提升处理,并确定前景中的人脸区域,调整预设的与逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。由此,在调高处于逆光情况下的人脸区域图像时,避免了人脸肤色变淡而没有血色的问题,在提升图像质量的同时,避免对顺光区域的负面影响,保证了图像显示的视觉效果。When the backlight scene is detected, the foreground and the backlight background are separated from the current shooting image, the foreground is brightness-raised, and the face region in the foreground is determined, and the preset CCM model parameters corresponding to the backlight scene are adjusted to improve the face. The saturation of the area. Therefore, when the image of the face region in the case of backlighting is raised, the problem that the skin color of the face is faded without blood color is avoided, and the image quality is ensured while avoiding the negative influence on the smooth region while ensuring the image display. Visual effects.
本申请附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。The aspects and advantages of the present invention will be set forth in part in the description which follows.
附图说明DRAWINGS
容易理解,其中,Easy to understand, among them,
图1是根据本申请一个实施例的逆光场景的人脸区域处理方法的流程图;1 is a flowchart of a face area processing method for a backlight scene according to an embodiment of the present application;
图2是根据本申请一个实施例的逆光拍摄场景示意图;2 is a schematic diagram of a backlight shooting scene according to an embodiment of the present application;
图3(a)是根据本申请一个实施例的对当前拍摄画面图像处理前效果示意图;FIG. 3( a ) is a schematic diagram of an effect before processing an image of a current shooting screen according to an embodiment of the present application;
图3(b)是根据本申请一个实施例的对当前拍摄画面人脸区域亮度提升后效果示意图;FIG. 3(b) is a schematic diagram showing the effect of improving the brightness of the face region of the current shooting picture according to an embodiment of the present application;
图3(c)是根据本申请一个实施例的对当前拍摄画面饱和度提高后的效果示意图;FIG. 3(c) is a schematic diagram showing an effect of increasing saturation of a current photographing screen according to an embodiment of the present application;
图4是根据本申请另一个实施例的逆光场景的人脸区域处理方法的流程图;4 is a flowchart of a face area processing method for a backlight scene according to another embodiment of the present application;
图5是根据本申请一个实施例的逆光场景的人脸区域处理装置的结构示意图;FIG. 5 is a schematic structural diagram of a face region processing apparatus for a backlight scene according to an embodiment of the present application; FIG.
图6是根据本申请另一个实施例的逆光场景的人脸区域处理装置的结构示意图;6 is a schematic structural diagram of a face region processing apparatus for a backlight scene according to another embodiment of the present application;
图7是根据本申请又一个实施例的逆光场景的人脸区域处理装置的结构示意图;FIG. 7 is a schematic structural diagram of a face region processing apparatus for a backlight scene according to still another embodiment of the present application; FIG.
图8是根据本申请一个实施例的终端设备的结构示意图;以及FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
图9是根据本申请一个实施例的图像处理电路的结构示意图。FIG. 9 is a schematic structural diagram of an image processing circuit according to an embodiment of the present application.
具体实施方式Detailed ways
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本申请,而不能理解为对本申请的限制。The embodiments of the present application are described in detail below, and the examples of the embodiments are illustrated in the drawings, wherein the same or similar reference numerals are used to refer to the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are intended to be illustrative, and are not to be construed as limiting.
基于以上分析,可以理解的是,相关技术中,如果提高ISO感光度,则图像传感器对光线的敏感度得到提高,在对光线的敏感度一旦提高,那么受到环境干扰而产生 的噪声也会增大,为了减小图像中由于噪声而产生的一些无关像素点,针对图像的降噪力度会增加,但是随着降噪力度的增加,会导致图像的一些细节丢失,使得人脸区域面部颜色变淡、没有血色,视觉效果较差。Based on the above analysis, it can be understood that in the related art, if the ISO sensitivity is increased, the sensitivity of the image sensor to light is improved, and once the sensitivity to light is increased, the noise generated by environmental interference is also increased. Large, in order to reduce some unrelated pixel points in the image due to noise, the intensity of noise reduction for the image will increase, but as the intensity of noise reduction increases, some details of the image will be lost, and the color of the face area will be changed. Light, no blood, poor visual effect.
为了解决提高人脸亮度与失去面部细节之间的矛盾的技术问题,本申请提出了一种逆光场景的人脸区域处理方法,可以在提高逆光场景下,提升人脸区域的亮度的同时,避免牺牲脸部的细节,使得图像的视觉显示效果较强。In order to solve the technical problem of improving the contradiction between the brightness of the face and the loss of the facial details, the present application proposes a face region processing method for the backlight scene, which can improve the brightness of the face region while improving the backlight scene, and avoid Sacrificing the details of the face makes the visual display of the image stronger.
下面参考附图描述本申请实施例的逆光场景的人脸区域处理方法和装置。A method and apparatus for processing a face region of a backlight scene according to an embodiment of the present application will be described below with reference to the accompanying drawings.
图1是根据本申请一个实施例的逆光场景的人脸区域处理方法的流程图,如图1所示,该方法包括:FIG. 1 is a flowchart of a method for processing a face region of a backlight scene according to an embodiment of the present application. As shown in FIG. 1 , the method includes:
步骤101,当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景。In step 101, when the backlight scene is detected, the foreground and backlight backgrounds are separated from the current shooting image.
可以理解的是,如图2所示,当被摄人物处于光源和摄像头之间时,由于光是沿直线传播的,因此,被摄人物的背面有较强的光线照射而正面光线不足,用户人脸区域较为模糊,用户对画面呈现效果并不满意。It can be understood that, as shown in FIG. 2, when the subject is between the light source and the camera, since the light is transmitted along a straight line, the back of the subject has strong light and the front light is insufficient, and the user The face area is blurred, and the user is not satisfied with the effect of the picture.
因而,在本实施例中,如果用户不希望改变拍摄方向,则为了针对性的提高人脸区域亮度,可以分离出人脸区域所在位置。Therefore, in the present embodiment, if the user does not wish to change the shooting direction, in order to specifically increase the brightness of the face region, the position of the face region can be separated.
具体而言,由于在对拍摄的目标物体聚焦后,在目标物体所在的焦点区域之前和之后一段人眼容许的清晰成像的空间深度范围为景深,其中,在焦点区域之前清晰成像的范围为前景景深,人脸区域所在位置处于前景景深中,在焦点区域之后清晰成像的范围为背景景深,逆光背景处于背景景深中,因而在本实例中,根据景深信息对当前拍摄画面分离出前景和逆光背景。Specifically, since the depth of the spatial depth of the sharp imaging allowed by the human eye before and after the focus area of the target object is the depth of field after focusing on the captured target object, the range of clear imaging before the focus area is the foreground. Depth of field, the location of the face area is in the foreground depth of field. The range of clear imaging after the focus area is the background depth of field, and the backlight background is in the background depth of field. Therefore, in this example, the foreground and backlight background are separated from the current shot according to the depth information. .
需要说明的是,根据具体应用场景的不同,对当前拍摄画面分离出前景和逆光背景的方式不同,举例说明如下:It should be noted that, according to different application scenarios, the manner in which the foreground and the backlight background are separated from the current shooting screen is different, and the examples are as follows:
第一种示例:The first example:
可获取拍摄的相关参数,以根据拍摄摄像头的公式计算预览画面中焦点区域之外的图像区域的景深信息。The relevant parameters of the shooting can be acquired to calculate the depth information of the image area outside the focus area in the preview image according to the formula of the shooting camera.
在本示例中,可获取拍摄摄像头的容许弥散圆直径、光圈值、焦距、对焦距离等参数,从而根据公式:前景景深=(光圈值*容许弥散圆直径*对焦距离的平方)/(焦距的平方+光圈值*容许弥散圆直径*对焦距离)计算出前景景深,已根据前景景深分离出前景,并根据公式背景景深=(光圈值*容许弥散圆直径*对焦距离的平方)/(焦距的平方-光圈值*容许弥散圆直径*对焦距离)计算出逆光背景的景深,进而根据逆光背景的景深分离出逆光背景。In this example, parameters such as the allowable circle diameter, aperture value, focal length, and focus distance of the camera can be obtained, according to the formula: foreground depth of field = (aperture value * allowable circle diameter * square of focus distance) / (focal length Square + aperture value * Allowable circle diameter * focus distance) Calculate the foreground depth of field, separated the foreground according to the foreground depth of field, and according to the formula background depth of field = (aperture value * allowable circle diameter * square of focus distance) / (focal length Square-aperture value* Allowable circle diameter* Focus distance) Calculate the depth of field of the backlight background, and then separate the backlight background according to the depth of field of the backlight background.
第二种示例:The second example:
根据双摄像头分别获取的当前拍摄画面数据确定焦点区域之外的图像区域的景深地图, 根据景深地图确定焦点区域之前的前景景深和焦点区域之后的背景景深,并根据前景景深和背景景深分离出前景和逆光背景。Determining the depth of field map of the image area outside the focus area according to the current captured picture data respectively acquired by the dual camera, determining the foreground depth of field before the focus area and the background depth of the focus area according to the depth of field map, and separating the foreground according to the foreground depth of field and the background depth of field And backlighting background.
具体而言,在本示例中,由于两个摄像头的位置并不相同,因而,两个后置摄像头相对与拍摄的目标物体具有一定的角度差和距离差,因此二者获取的预览图像数据也存在一定的相位差。Specifically, in this example, since the positions of the two cameras are not the same, the two rear cameras have a certain angular difference and a distance difference with respect to the captured target object, so the preview image data acquired by the two cameras is also There is a certain phase difference.
举例而言,对于拍摄目标物体上的A点,在摄像头1的预览图像数据中,A点对应的像素点坐标为(30,50),而在摄像头2的预览图像数据中,A点对应的像素点坐标为(30,48),A点在两个预览图像数据中对应的像素点的相位差为50-48=2。For example, for the point A on the shooting target object, in the preview image data of the camera 1, the pixel point coordinates corresponding to the point A are (30, 50), and in the preview image data of the camera 2, the point A corresponds. The pixel point coordinates are (30, 48), and the phase difference of the corresponding pixel point of point A in the two preview image data is 50-48=2.
在本示例中,可预先根据实验数据或者摄像头参数建立景深信息与相位差的关系,进而,可根据预览图像中各图像点在两个摄像头获取的预览图像数据中的相位差查找对应的景深信息。In this example, the relationship between the depth information and the phase difference may be established in advance according to the experimental data or the camera parameters, and then the corresponding depth information may be searched according to the phase difference in the preview image data acquired by the two cameras in the preview image. .
举例来说,对于上述A点对应的相位差2,如果根据预设的对应关系查询到对应的景深为5米,则预览画面中A点对应的景深信息为5米。由此,可得到当前预览画面中每个像素点的景深信息,即获取焦点区域之外的图像区域的景深地图。For example, for the phase difference 2 corresponding to the point A, if the corresponding depth of field is 5 meters according to the preset correspondence, the depth information corresponding to the point A in the preview screen is 5 meters. Thereby, the depth of field information of each pixel in the current preview picture, that is, the depth of field map of the image area outside the focus area is obtained.
进而,在得到焦点区域之外的图像区域的景深地图后,可进一步确定焦点区域之前的图像区域的前景景深信息,以及焦点区域之后的背景景深信息,从而,根据景深地图确定焦点区域之前的前景景深和焦点区域之后的背景景深,并根据前景景深和背景景深分离出前景和逆光背景。Further, after obtaining the depth map of the image area outside the focus area, the foreground depth information of the image area before the focus area and the background depth information after the focus area may be further determined, thereby determining the foreground before the focus area according to the depth map Depth of field and background depth of focus after the focus area, and separate foreground and backlit backgrounds based on foreground depth and background depth.
步骤102,对前景进行亮度提升处理,并确定前景中的人脸区域。Step 102: Perform brightness enhancement processing on the foreground and determine a face area in the foreground.
可以理解的是,逆光场景下的人脸区域和前景中的其他区域亮度均较低,人脸区域相比于其他区域的界限较为模糊,因而,此时对前景进行亮度提升处理,此时不但提高了人脸区域的亮度,使得人脸清晰可见,而且使得人脸区域相比于其他区域的界限较为清晰,便于提取出人脸区域,以针对人脸区域进行进一步处理。It can be understood that the brightness of the face area and other areas in the foreground in the backlight scene are relatively low, and the boundary of the face area is blurred compared with other areas. Therefore, the brightness of the foreground is improved at this time. The brightness of the face area is improved, the face is clearly visible, and the boundary of the face area is clearer than other areas, so that the face area can be extracted to further process the face area.
其中,在不同的应用场景下,可采用不同的实现方式实现对前景中的人脸区域的确定,举例说明如下:In different application scenarios, different implementation manners may be used to determine the face region in the foreground. The examples are as follows:
第一种示例:The first example:
前景中人脸区域和其他区域的颜色是不一样的,人脸区域为肤色等人体颜色,而其他区域为其他与人脸区域的颜色不同的其他景物的颜色,因此,可以通过颜色通道检测算法,识别出肤色所在区域以根据肤色所涵盖的区域确定前景中人脸区域的轮廓边缘。In the foreground, the color of the face area and other areas are different. The face area is the color of the human body such as the skin color, and the other areas are the colors of other scenes different from the color of the face area. Therefore, the color channel detection algorithm can be adopted. The area where the skin color is located is identified to determine the contour edge of the face area in the foreground according to the area covered by the skin color.
第二种示例:The second example:
由于图像边缘具有不连续性,比如灰度级的突变,颜色的突变以及纹理结构的突变等,这种边缘存在于物体与背景之间,因此,在本示例中,利用图像边缘的这种特性,通过 CANNY算法、小波变换算法等图像边缘检测算法确定前景中人脸区域的轮廓边缘。Due to discontinuities in the edges of the image, such as sudden changes in gray levels, sudden changes in color, and sudden changes in texture, such edges exist between the object and the background. Therefore, in this example, the characteristics of the edges of the image are utilized. The image edge detection algorithm such as CANNY algorithm and wavelet transform algorithm is used to determine the contour edge of the face region in the foreground.
步骤103,调整预设的与逆光场景对应的CCM模型参数提高人脸区域的饱和度。Step 103: Adjust a preset CCM model parameter corresponding to the backlight scene to improve the saturation of the face region.
正如以上分析的,当提高人脸区域的亮度时,人脸区域的面部细会丢失从而使得面部苍白失去血色,而面部苍白丢失血色实际上体现在人脸区域饱和度不高上,其中,饱和度是指色彩的鲜艳程度,也称色彩的纯度,人脸区域饱和度取决于人脸区域中含色成分和消色成分(灰色)的比例,含色成分越大,饱和度越大,消色成分越大,饱和度越小。As analyzed above, when the brightness of the face area is increased, the facial area of the face area is lost and the paleness of the face is lost, and the pale color of the face is actually reflected in the saturation of the face area, wherein, saturation Degree refers to the degree of vividness of color, also known as the purity of color. The saturation of face area depends on the proportion of the color component and the achromatic component (gray) in the face area. The larger the color component, the greater the saturation. The larger the color component, the smaller the saturation.
由此,如果提高面部的饱和度则会提高人脸区域的含色成分,从而使得人脸区域红润有光泽。Thus, if the saturation of the face is increased, the color component of the face region is increased, so that the face region is rosy and shiny.
具体而言,在本申请的实施例中,基于CCM模型参数的调整实现饱和度的调整。Specifically, in the embodiment of the present application, the adjustment of the saturation is implemented based on the adjustment of the CCM model parameters.
其中,CCM模型(Color Color Matrix,色彩校正矩阵)的计算公式为以下公式(1)所示:Among them, the calculation formula of the CCM model (Color Color Matrix) is as shown in the following formula (1):
Figure PCTCN2018094083-appb-000001
Figure PCTCN2018094083-appb-000001
其中,CCM之前的像素为
Figure PCTCN2018094083-appb-000002
CCM之后的像素为
Figure PCTCN2018094083-appb-000003
Where the pixels before the CCM are
Figure PCTCN2018094083-appb-000002
The pixels after CCM are
Figure PCTCN2018094083-appb-000003
也就是说,CCM的实现基于一个简单的线性矩阵,在G路中调节R-G、B-G的系数,在R路中调节G-R、B-R的系数,在B路中调节G-B、R-B的系数就可以进行彩色校正以改变画面的色调。其中,CCM模型在进行颜色校正时不应该影响白平衡,由于摄像设备各路增益是按白色平衡条件来调整的,即当摄取白色景物时,三路输出R、G、B的幅度应相等,也就是说校正后的三基色应该保持R=G=B,根据该关系,上述公式(1)中的各个系数的关系如下:
Figure PCTCN2018094083-appb-000004
因此,CCM之后的像素为
Figure PCTCN2018094083-appb-000005
可以表示为:
Figure PCTCN2018094083-appb-000006
That is to say, the implementation of CCM is based on a simple linear matrix, adjusting the coefficients of RG and BG in the G path, adjusting the coefficients of GR and BR in the R path, and adjusting the coefficients of GB and RB in the B way to perform color. Correct to change the hue of the picture. Among them, the CCM model should not affect the white balance when performing color correction, because the gain of each channel of the imaging device is adjusted according to the white balance condition, that is, when the white scene is ingested, the amplitudes of the three outputs R, G, and B should be equal. That is to say, the corrected three primary colors should maintain R=G=B. According to the relationship, the relationship of each coefficient in the above formula (1) is as follows:
Figure PCTCN2018094083-appb-000004
Therefore, the pixels after the CCM are
Figure PCTCN2018094083-appb-000005
It can be expressed as:
Figure PCTCN2018094083-appb-000006
基于以上对应关系可知,可以通过改变CCM模型矩阵中对角线上的参数C00、C11、C22的值实现对RGB颜色分配的调整,从而实现对饱和度的调整。Based on the above correspondence, it can be understood that the adjustment of the RGB color distribution can be realized by changing the values of the parameters C00, C11, and C22 on the diagonal in the CCM model matrix, thereby achieving the adjustment of the saturation.
然而,在实际应用中,通过CCM模型参数提高整张画面的饱和度的时候,画面中顺光区域的饱和度也得到了提升,从而可能会导致顺光区域的颜色失真等,影响顺光区域的显示效果。However, in practical applications, when the saturation of the entire picture is improved by the CCM model parameters, the saturation of the smooth area in the picture is also improved, which may cause color distortion in the forward area, etc., affecting the smooth area. The display effect.
因此,在本申请的实施例中,分别检测逆光场景和顺光场景下拍摄物体的饱和度,根据检测结果设置与逆光场景对应的CCM模型参数,调整预设的与逆光场景对应的CCM模型参数提高处于逆光中的人脸区域的饱和度。Therefore, in the embodiment of the present application, the saturation of the captured object in the backlight scene and the forward scene is detected respectively, and the CCM model parameters corresponding to the backlight scene are set according to the detection result, and the CCM model parameters corresponding to the preset backlight scene are adjusted to be improved. The saturation of the face area in backlighting.
其中,应当理解的是,上述CCM模型参数针对逆光场景进行设置,因而在实际调整过程中,顺光区域的饱和度是不发生改变的,该CCM模型参数的实施,只能对逆光区域中的人脸区域作用,由于CCM模型参数的设置与色温和亮度对画面颜色强相关,因此,为了避免CCM模型参数在实施过程中,对顺光区域发生调整,上述设置与逆光场景对应的CCM模型参数,是基于相同的色温和亮度的逆光场景和顺光场景进行设置的。It should be understood that the CCM model parameters are set for the backlight scene, so that the saturation of the forward region does not change during the actual adjustment process, and the implementation of the CCM model parameters can only be performed in the backlight region. The function of the face region, because the setting of the CCM model parameters is strongly correlated with the color temperature and brightness of the picture color, therefore, in order to avoid the adjustment of the CCM model parameters during the implementation process, the CCM model parameters corresponding to the backlight scene are set. , is set based on the backlight scene and the forward scene with the same color temperature and brightness.
需要强调的是,在本申请的实例中,在逆光场景下,采用基于深度信息的方式进行人脸区域的提取,相对于直接人脸识别以获取人脸区域的提取精确度更高,这是由于在逆光场景下,人脸区域的亮度较低,特征不明显,很有可能直接进行面部识别导致识别失败。It should be emphasized that in the example of the present application, in the backlight scene, the face region is extracted by using the depth information-based method, and the extraction accuracy of the face region is higher than that of the direct face recognition. Since the brightness of the face area is low and the features are not obvious in the backlight scene, it is very likely that the face recognition directly causes the recognition to fail.
由此,本申请实施例的逆光场景的人脸区域处理方法,在提高人脸面部亮度后,基于CCM模型参数的调节实现对人脸区域饱和度的调整,提高人脸区域的含色成分,使得人脸红润有光泽。且基于CCM模型参数进行饱和度调节时,由于CCM模型参数是基于逆光场景设置的,因而,在调整过程中,仅仅针对逆光场景中的人脸区域进行饱和度的调整。即单独为逆光场景,设置一组CCM模型参数,使逆光场景的CCM模型参数与正常场景分开,避免在调试过程中,因增加逆光场景饱和度,对画面中顺光区域的负面影响。Therefore, the face region processing method of the backlight scene in the embodiment of the present invention adjusts the saturation of the face region based on the adjustment of the CCM model parameters after improving the brightness of the face face, and improves the color component of the face region. Makes the face rosy and shiny. When the saturation adjustment is performed based on the CCM model parameters, since the CCM model parameters are set based on the backlight scene, the saturation is adjusted only for the face region in the backlight scene during the adjustment process. That is, the backlighting scene is set separately, and a set of CCM model parameters are set to separate the CCM model parameters of the backlight scene from the normal scene, thereby avoiding the negative influence on the smoothing area in the picture due to the increase of the backlight scene saturation during the debugging process.
为了更加清楚的体现逆光场景的人脸区域处理流程,下面举例说明,当检测到如图3(a)所示的逆光场景时,对当前拍摄画面分离出前景和逆光背景,进而,对前景进行亮度提升处理,如图3(b)所示,处理后的人脸面部亮度提高,但是面部细节丢失,进而,调整预设的与逆光场景对应的CCM模型参数提高人脸区域的饱和度,则如图3(c)所示,人脸的面部红润后光泽,且亮度得到了提升,同时顺光区域的饱和度没有收到负面影响。In order to more clearly reflect the face area processing flow of the backlight scene, the following example illustrates that when the backlight scene as shown in FIG. 3( a ) is detected, the foreground and the backlight background are separated from the current shot image, and then, the foreground is performed. The brightness enhancement processing, as shown in FIG. 3(b), increases the brightness of the processed face, but the facial details are lost. Further, adjusting the preset CCM model parameters corresponding to the backlight scene improves the saturation of the face region, As shown in Fig. 3(c), the face of the face is rosy and shiny, and the brightness is improved, while the saturation of the smooth area does not receive a negative influence.
综上所述,本申请实施例的逆光场景的人脸区域处理方法,当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景,对前景进行亮度提升处理,并确定前景中的人脸区域,调整预设的与逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。由此,在调高处于逆光情况下的人脸区域图像时,避免了人脸肤色变淡而没有血色的问题,在提升图像质量的同时,避免对顺光区域的负面影响,保证了图像显示的视觉效果。In summary, the face region processing method of the backlight scene in the embodiment of the present application detects the backlight scene, separates the foreground and the backlight background from the current captured image, performs brightness enhancement processing on the foreground, and determines the face in the foreground. The region adjusts a preset CCM model parameter corresponding to the backlight scene to increase the saturation of the face region. Therefore, when the image of the face region in the case of backlighting is raised, the problem that the skin color of the face is faded without blood color is avoided, and the image quality is ensured while avoiding the negative influence on the smooth region while ensuring the image display. Visual effects.
基于以上实施例,应当理解的是,在不同的应用场景下,由于逆光的环境光线的强度的不同,人脸区域的暗化程度不同,环境光线越强烈,人脸区域越暗,环境光线越不强烈,人脸区域越明亮,人脸区域越暗,失去的面部细节越多,需要提升饱和度程度更高,因此,为了提升提高对人脸区域的饱和度时的处理效果,根据当前环境的 逆光强度进行饱和度的调整。Based on the above embodiments, it should be understood that, in different application scenarios, the degree of darkening of the face region is different due to the difference in the intensity of the ambient light of the backlight, the stronger the ambient light, the darker the face region, and the more the ambient light is. Not strong, the brighter the face area, the darker the face area, the more facial details that are lost, the higher the saturation needs to be lifted. Therefore, in order to improve the processing effect on the saturation of the face area, according to the current environment The backlight intensity is adjusted for saturation.
如图4所示,上述步骤103包括:As shown in FIG. 4, the above step 103 includes:
步骤201,检测当前场景的逆光强度。Step 201: Detect the backlight intensity of the current scene.
应当理解的是,在拍照时用户背部的光线强度越高,当前场景的逆光强度越高,用户的面部区域所在前景越暗。It should be understood that the higher the light intensity of the back of the user when taking a picture, the higher the backlight intensity of the current scene, and the darker the foreground of the user's face area.
检测当前场景的逆光强度的方式,可根据具体应用场景的不同而不同,比如,获取摄像头模组中感光元件感应到的逆光强度,比如,根据前景的亮度计算逆光强度等。The manner of detecting the backlight intensity of the current scene may be different according to the specific application scenario, for example, obtaining the backlight intensity sensed by the photosensitive element in the camera module, for example, calculating the backlight intensity according to the brightness of the foreground.
步骤202,获取与逆光强度对应的增强幅度。Step 202: Acquire an enhancement range corresponding to the backlight intensity.
其中,增强幅度对应与饱和度提高幅度,增强幅度越高,饱和度的提高幅度越大,反之,增强幅度越低,饱和度的提高幅度越小。Among them, the enhancement range corresponds to the saturation increase, and the higher the enhancement, the greater the increase of saturation. Conversely, the lower the enhancement, the smaller the increase of saturation.
需要说明的是,根据应用场景的不同,可采用多种不同的实现方式获取与逆光强度对应的增强幅度,作为一种可能的实现方式,预先存储逆光强度与增强幅度的对应关系,从而,在获取逆光强度后,查询上述对应关系,获取对应的增强幅度。作为另一种可能的实现方式,根据逆光强度与增强幅度的关系生成转换函数,从而,在获取逆光强度后,通过该转换函数获取对应的增强幅度。It should be noted that, according to different application scenarios, a plurality of different implementation manners may be used to obtain an enhancement range corresponding to the backlight intensity. As a possible implementation manner, the correspondence between the backlight intensity and the enhancement amplitude is pre-stored, thereby After obtaining the backlight intensity, query the corresponding relationship to obtain the corresponding enhancement range. As another possible implementation manner, the conversion function is generated according to the relationship between the backlight intensity and the enhancement amplitude, so that after the backlight intensity is acquired, the corresponding enhancement amplitude is obtained by the conversion function.
步骤203,根据增强幅度调整预设的与逆光场景对应的CCM模型参数提高人脸区域的饱和度。Step 203: Adjust the preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude to improve the saturation of the face region.
具体地,根据与当前场景下的逆光强度相一致的增强幅度,调整CCM模型参数以实现对人脸区域对应的饱和度的提高,使得人脸区域的不会出现过饱和或者欠饱和的情况,处理效果较好,该CCM模型参数且仅仅对逆光场景下的人脸区域进行饱和度的提高,避免了对顺光区域的负面影响。Specifically, according to the enhancement range consistent with the backlight intensity in the current scene, the CCM model parameters are adjusted to achieve an increase in saturation corresponding to the face region, so that the face region does not over-saturate or under-saturate. The processing effect is good. The CCM model parameters only improve the saturation of the face region in the backlight scene, and avoid the negative influence on the smooth region.
当然,在实际应用中,人脸每个部位的肤色也是不同的,比如,通常情况下,人脸脸颊相对于额头较为红润一些等,因而,为了进一步提高处理效果,还可以对人脸区域不同部位确定不同的饱和度系数,以根据不同的饱和系数对人脸区域不同部位实施不同程度的饱和度的调整。Of course, in practical applications, the skin color of each part of the face is also different. For example, in general, the face cheek is more rosy than the forehead, and thus, in order to further improve the processing effect, the face area may be different. The locations determine different saturation coefficients to adjust different degrees of saturation for different parts of the face region according to different saturation coefficients.
具体而言,获取与人脸区域不同部位对应的饱和度调整系数,其中,现实中越红润的部位的饱和度系数越高,进而,根据不同部位对应的饱和度调整系数和增强幅度,计算与不同部位对应的提升幅度,根据与不同部位对应的提升幅度,调整预设的与逆光场景对应的CCM模型参数提高人脸区域对应位置的饱和度。Specifically, a saturation adjustment coefficient corresponding to a different part of the face region is obtained, wherein the saturation coefficient of the more rosy part is higher in reality, and further, the calculation and the difference are performed according to the saturation adjustment coefficient and the enhancement range corresponding to different parts. The lifting range corresponding to the part is adjusted according to the lifting range corresponding to the different parts, and the preset CCM model parameter corresponding to the backlight scene is used to improve the saturation of the corresponding position of the face area.
综上所述,本申请实施例的逆光场景的人脸区域处理方法,根据当前场景的逆光强度确定增强幅度,根据增强幅度调整预设的与逆光场景对应的CCM模型参数提高人脸区域的饱和度。由此,为待处理的人脸区域选择合适的增强幅度进行饱和度的提高,避免人脸 区域的过饱和或欠饱和,进一步提升了图像显示的视觉效果。In summary, the face region processing method of the backlight scene in the embodiment of the present application determines the enhancement range according to the backlight intensity of the current scene, and adjusts the CCM model parameters corresponding to the backlight scene according to the enhancement range to improve the saturation of the face region. degree. Therefore, an appropriate enhancement range is selected for the face area to be processed to improve the saturation, and the supersaturation or undersaturation of the face area is avoided, thereby further improving the visual effect of the image display.
为了实现上述实施例,本申请还提出了一种逆光场景的人脸区域处理装置,图5是根据本申请一个实施例的逆光场景的人脸区域处理装置的结构示意图,如图5所示,该逆光场景的人脸区域处理装置包括:分离模块100、亮度提升模块200、确定模块300和调整模块400。In order to implement the foregoing embodiment, the present application also provides a face area processing apparatus for a backlight scene, and FIG. 5 is a schematic structural diagram of a face area processing apparatus for a backlight scene according to an embodiment of the present application, as shown in FIG. The face region processing device of the backlighting scene includes: a separation module 100, a brightness enhancement module 200, a determination module 300, and an adjustment module 400.
其中,分离模块100,用于当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景。The separation module 100 is configured to separate the foreground and the backlight background from the current shooting image when the backlight scene is detected.
在本申请的一个实施例中,如图6所示,分离模块100包括第一获取单元110、确定单元120和分离单元130。In an embodiment of the present application, as shown in FIG. 6, the separation module 100 includes a first acquisition unit 110, a determination unit 120, and a separation unit 130.
其中,第一获取单元110,用于根据双摄像头分别获取的当前拍摄画面数据确定焦点区域之外的图像区域的景深地图。The first obtaining unit 110 is configured to determine a depth map of the image area outside the focus area according to the current captured picture data respectively acquired by the dual cameras.
确定单元120,用于根据所述景深地图确定所述焦点区域之前的前景景深和所述焦点区域之后的背景景深。The determining unit 120 is configured to determine a foreground depth of field before the focus area and a background depth of field after the focus area according to the depth of field map.
分离单元130,用于根据所述前景景深和所述背景景深分离出前景和逆光背景。The separating unit 130 is configured to separate the foreground and the backlight background according to the foreground depth of field and the background depth of field.
亮度提升模块200,用于对前景进行亮度提升处理。The brightness enhancement module 200 is configured to perform brightness enhancement processing on the foreground.
确定模块300,用于确定前景中的人脸区域。The determining module 300 is configured to determine a face area in the foreground.
调整模块400,用于调整预设的与逆光场景对应的CCM模型参数提高人脸区域的饱和度。The adjustment module 400 is configured to adjust a preset CCM model parameter corresponding to the backlight scene to improve the saturation of the face region.
需要说明的是,前述对逆光场景的人脸区域处理方法的解释说明,也适用于本申请实施例的逆光场景的人脸区域处理装置,其实现原理类似,在此不再赘述。It should be noted that the foregoing description of the face region processing method for the backlight scene is also applicable to the face region processing device of the backlight scene in the embodiment of the present application, and the implementation principle thereof is similar, and details are not described herein again.
综上所述,本申请实施例的逆光场景的人脸区域处理装置,当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景,对前景进行亮度提升处理,并确定前景中的人脸区域,调整预设的与逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。由此,在调高处于逆光情况下的人脸区域图像时,避免了人脸肤色变淡而没有血色的问题,在提升图像质量的同时,避免对顺光区域的负面影响,保证了图像显示的视觉效果。In summary, the face region processing device of the backlight scene of the embodiment of the present invention detects the backlight scene, separates the foreground and the backlight background from the current captured image, performs brightness enhancement processing on the foreground, and determines the face in the foreground. The region adjusts a preset CCM model parameter corresponding to the backlight scene to increase the saturation of the face region. Therefore, when the image of the face region in the case of backlighting is raised, the problem that the skin color of the face is faded without blood color is avoided, and the image quality is ensured while avoiding the negative influence on the smooth region while ensuring the image display. Visual effects.
图7是根据本申请又一个实施例的逆光场景的人脸区域处理的结构示意图,如图7所示,在如图5所示的基础上,调整模块400包括检测单元410、第二获取单元420和调整单元430。FIG. 7 is a schematic structural diagram of a face region processing of a backlighting scene according to still another embodiment of the present application. As shown in FIG. 7, the adjustment module 400 includes a detecting unit 410 and a second acquiring unit, as shown in FIG. 420 and adjustment unit 430.
其中,检测单元410,用于检测当前场景的逆光强度。The detecting unit 410 is configured to detect the backlight intensity of the current scene.
第二获取单元420,用于获取与逆光强度对应的增强幅度。The second obtaining unit 420 is configured to acquire an enhancement range corresponding to the backlight intensity.
调整单元430,用于根据增强幅度调整预设的与逆光场景对应的CCM模型参数提高人 脸区域的饱和度。The adjusting unit 430 is configured to adjust the saturation of the face region by adjusting a preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude.
需要说明的是,前述对逆光场景的人脸区域处理方法的解释说明,也适用于本申请实施例的逆光场景的人脸区域处理装置,其实现原理类似,在此不再赘述。It should be noted that the foregoing description of the face region processing method for the backlight scene is also applicable to the face region processing device of the backlight scene in the embodiment of the present application, and the implementation principle thereof is similar, and details are not described herein again.
综上所述,本申请实施例的逆光场景的人脸区域处理装置,根据当前场景的逆光强度确定增强幅度,根据增强幅度调整预设的与逆光场景对应的CCM模型参数提高人脸区域的饱和度。由此,为待处理的人脸区域选择合适的增强幅度进行饱和度的提高,避免人脸区域的过饱和或欠饱和,进一步提升了图像显示的视觉效果。In summary, the face region processing device of the backlight scene in the embodiment of the present application determines the enhancement range according to the backlight intensity of the current scene, and adjusts the CCM model parameters corresponding to the backlight scene according to the enhancement range to improve the saturation of the face region. degree. Therefore, an appropriate enhancement range is selected for the face region to be processed to improve the saturation, and the supersaturation or undersaturation of the face region is avoided, thereby further improving the visual effect of the image display.
为了实现上述实施例,本申请还提出了一种终端设备,图8是根据本申请一个实施例的终端设备的结构示意图。如图8所示,该终端设备1000包括:壳体1100和位于壳体1100内的处理器1110、存储器1120,其中,处理器1110通过读取存储器1120中存储的可执行程序代码来运行与可执行程序代码对应的程序,以用于执行上述实施例描述的逆光场景的人脸区域处理方法。In order to implement the foregoing embodiments, the present application further provides a terminal device, and FIG. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in FIG. 8, the terminal device 1000 includes a housing 1100 and a processor 1110 and a memory 1120 located in the housing 1100. The processor 1110 is operable by reading executable program code stored in the memory 1120. A program corresponding to the program code is executed for performing the face region processing method of the backlight scene described in the above embodiment.
为了更加清楚地说明本申请实施例的终端设备,图99为作为一种可能的实现方式的图像处理电路的示意图。为便于说明,仅示出与本申请实施例相关的各个方面。In order to more clearly illustrate the terminal device of the embodiment of the present application, FIG. 99 is a schematic diagram of an image processing circuit as a possible implementation. For ease of explanation, only the various aspects related to the embodiments of the present application are shown.
如图9所示,该图像处理电路具体包括:拍摄单元11和处理单元12,其中,As shown in FIG. 9, the image processing circuit specifically includes: a photographing unit 11 and a processing unit 12, wherein
拍摄单元11,用于输出拍摄画面。The photographing unit 11 is configured to output a photographing screen.
所述处理单元12,用于当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景,对所述前景进行亮度提升处理,并确定所述前景中的人脸区域,调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。The processing unit 12 is configured to: when the backlight scene is detected, separate the foreground and the backlight background from the current captured image, perform brightness enhancement processing on the foreground, determine a face region in the foreground, and adjust a preset The CCM model parameter corresponding to the backlight scene increases the saturation of the face region.
继续参照图9,在本申请的一个实施例中,拍摄单元11包括电性连接的双摄像头111,所述处理器12包括图像信号处理ISP处理器121,其中,With continued reference to FIG. 9, in one embodiment of the present application, the photographing unit 11 includes an electrically connected dual camera 111, and the processor 12 includes an image signal processing ISP processor 121, wherein
双摄像头111,用于输出两个摄像头分别获取的当前拍摄画面。The dual camera 111 is configured to output a current shooting picture respectively acquired by the two cameras.
所述ISP处理器121,用于根据双摄像头分别获取的当前拍摄画面数据确定焦点区域之外的图像区域的景深地图,根据所述景深地图确定所述焦点区域之前的前景景深和所述焦点区域之后的背景景深,根据所述前景景深和所述背景景深分离出前景和逆光背景。The ISP processor 121 is configured to determine a depth map of an image area outside the focus area according to the current captured picture data respectively acquired by the dual camera, and determine a foreground depth and the focus area before the focus area according to the depth map. Subsequent background depth of field separates the foreground and backlit background from the foreground depth of field and the background depth of field.
继续参照图9,在本申请的一个实施例中,处理器12包括电性连接的CPU122,其中,所述CPU122,用于检测当前场景的逆光强度,获取与所述逆光强度对应的增强幅度,根据所述增强幅度调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。With reference to FIG. 9, in one embodiment of the present application, the processor 12 includes an electrically connected CPU 122, wherein the CPU 122 is configured to detect a backlight intensity of a current scene, and obtain an enhancement range corresponding to the backlight intensity. And adjusting a preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude to improve saturation of the face region.
在本申请的一个实施例中,所述CPU122还用于获取与人脸区域不同部位对应的饱和 度调整系数;根据所述不同部位对应的饱和度调整系数和所述增强幅度,计算与所述不同部位对应的提升幅度;根据与所述不同部位对应的提升幅度,调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域对应位置的饱和度。In an embodiment of the present application, the CPU 122 is further configured to acquire a saturation adjustment coefficient corresponding to a different portion of the face region, and calculate and describe the saturation adjustment coefficient and the enhancement amplitude according to the different portions. The lifting range corresponding to the different parts is adjusted according to the lifting range corresponding to the different parts, and the preset CCM model parameter corresponding to the backlighting scene is adjusted to improve the saturation of the corresponding position of the face area.
为了实现上述实施例,本申请还提出一种非临时性计算机可读存储介质,其上存储有计算机程序,当该计算机程序被处理器执行时能够实现如前述实施例所述的逆光场景的人脸区域处理方法。In order to implement the above embodiments, the present application also proposes a non-transitory computer readable storage medium having stored thereon a computer program capable of realizing a backlighting scene as described in the foregoing embodiments when the computer program is executed by the processor Face area processing method.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of the present specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means a specific feature described in connection with the embodiment or example. A structure, material or feature is included in at least one embodiment or example of the application. In the present specification, the schematic representation of the above terms is not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples. In addition, various embodiments or examples described in the specification and features of various embodiments or examples may be combined and combined without departing from the scope of the invention.
此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。Moreover, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, features defining "first" and "second" may include at least one of the features, either explicitly or implicitly. In the description of the present application, the meaning of "a plurality" is at least two, such as two, three, etc., unless specifically defined otherwise.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。Any process or method description in the flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a custom logic function or process. And the scope of the preferred embodiments of the present application includes additional implementations, in which the functions may be performed in a substantially simultaneous manner or in the reverse order depending on the functions involved, in accordance with the illustrated or discussed order. It will be understood by those skilled in the art to which the embodiments of the present application pertain.
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只 读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer readable medium, Used in conjunction with, or in conjunction with, an instruction execution system, apparatus, or device (eg, a computer-based system, a system including a processor, or other system that can fetch instructions and execute instructions from an instruction execution system, apparatus, or device) Or use with equipment. For the purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport a program for use in an instruction execution system, apparatus, or device, or in conjunction with the instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer readable media include the following: electrical connections (electronic devices) having one or more wires, portable computer disk cartridges (magnetic devices), random access memory (RAM), Read only memory (ROM), erasable editable read only memory (EPROM or flash memory), fiber optic devices, and portable compact disk read only memory (CDROM). In addition, the computer readable medium may even be a paper or other suitable medium on which the program can be printed, as it may be optically scanned, for example by paper or other medium, followed by editing, interpretation or, if appropriate, other suitable The method is processed to obtain the program electronically and then stored in computer memory.
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that portions of the application can be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware and in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: discrete with logic gates for implementing logic functions on data signals Logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), and the like.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art can understand that all or part of the steps carried by the method of implementing the above embodiments can be completed by a program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, one or a combination of the steps of the method embodiments is included.
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. The integrated modules, if implemented in the form of software functional modules and sold or used as stand-alone products, may also be stored in a computer readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。The above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like. While the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are illustrative and are not to be construed as limiting the scope of the present application. The embodiments are subject to variations, modifications, substitutions and variations.

Claims (14)

  1. 一种逆光场景的人脸区域处理方法,其特征在于,包括:A face region processing method for backlit scenes, comprising:
    当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景;When the backlight scene is detected, the foreground and backlight background are separated from the current shooting image;
    对所述前景进行亮度提升处理,并确定所述前景中的人脸区域;Performing a brightness enhancement process on the foreground and determining a face area in the foreground;
    调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。Adjusting a preset CCM model parameter corresponding to the backlight scene improves the saturation of the face region.
  2. 如权利要求所述的方法,其特征在于,所述对当前拍摄画面分离出前景和逆光背景,包括:The method of claim, wherein the separating the foreground and the backlight background from the current captured image comprises:
    根据双摄像头分别获取的当前拍摄画面数据确定焦点区域之外的图像区域的景深地图;Determining a depth map of the image area outside the focus area according to the current captured picture data respectively acquired by the dual camera;
    根据所述景深地图确定所述焦点区域之前的前景景深和所述焦点区域之后的背景景深;Determining a foreground depth of field before the focus area and a background depth of field after the focus area according to the depth of field map;
    根据所述前景景深和所述背景景深分离出前景和逆光背景。A foreground and a backlight background are separated according to the foreground depth of field and the background depth of field.
  3. 如权利要求1或2所述的方法,其特征在于,还包括:The method of claim 1 or 2, further comprising:
    对于相同的色温和亮度,分别检测逆光场景和顺光场景下拍摄物体的饱和度;For the same color temperature and brightness, detecting the saturation of the object in the backlight scene and the scene in the forward scene;
    根据检测结果设置与所述逆光场景对应的CCM模型参数。And setting a CCM model parameter corresponding to the backlight scene according to the detection result.
  4. 如权利要求1-3任一所述的方法,其特征在于,所述调整与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度,包括:The method according to any one of claims 1-3, wherein the adjusting the CCM model parameter corresponding to the backlight scene to improve the saturation of the face region comprises:
    检测当前场景的逆光强度;Detecting the backlight intensity of the current scene;
    获取与所述逆光强度对应的增强幅度;Obtaining an enhancement range corresponding to the backlight intensity;
    根据所述增强幅度调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。And adjusting a preset CCM model parameter corresponding to the backlight scene according to the enhancement amplitude to improve saturation of the face region.
  5. 如权利要求4所述的方法,其特征在于,所述根据所述增强幅度调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度,包括:The method according to claim 4, wherein the adjusting the CCM model parameters corresponding to the backlight scene according to the enhancement amplitude to improve the saturation of the face region comprises:
    获取与人脸区域不同部位对应的饱和度调整系数;Obtaining a saturation adjustment coefficient corresponding to a different part of the face region;
    根据所述不同部位对应的饱和度调整系数和所述增强幅度,计算与所述不同部位对应的提升幅度;Calculating a lifting range corresponding to the different parts according to the saturation adjustment coefficient and the enhancement range corresponding to the different parts;
    根据与所述不同部位对应的提升幅度,调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域对应位置的饱和度。Adjusting, according to the lifting range corresponding to the different parts, the preset CCM model parameter corresponding to the backlight scene to improve the saturation of the corresponding position of the face area.
  6. 一种逆光场景的人脸区域处理装置,其特征在于,包括:A face region processing device for backlit scenes, comprising:
    分离模块,用于当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景;a separation module, configured to separate a foreground and a backlight background from the current shooting image when the backlight scene is detected;
    亮度提升模块,用于对所述前景进行亮度提升处理;a brightness enhancement module, configured to perform brightness enhancement processing on the foreground;
    确定模块,用于确定所述前景中的人脸区域;a determining module, configured to determine a face area in the foreground;
    调整模块,用于调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。And an adjustment module, configured to adjust a preset CCM model parameter corresponding to the backlight scene to improve saturation of the face region.
  7. 如权利要求6所述的装置,其特征在于,所述分离模块包括:The apparatus of claim 6 wherein said separation module comprises:
    第一获取单元,用于根据双摄像头分别获取的当前拍摄画面数据确定焦点区域之外的图像区域的景深地图;a first acquiring unit, configured to determine a depth map of the image area outside the focus area according to the current captured picture data respectively acquired by the dual camera;
    确定单元,用于根据所述景深地图确定所述焦点区域之前的前景景深和所述焦点区域之后的背景景深;a determining unit, configured to determine a foreground depth of field before the focus area and a background depth of field after the focus area according to the depth of field map;
    分离单元,用于根据所述前景景深和所述背景景深分离出前景和逆光背景。a separating unit, configured to separate the foreground and the backlight background according to the foreground depth of field and the background depth of field.
  8. 如权利要求6或7所述的装置,其特征在于,所述调整模块包括:The apparatus according to claim 6 or 7, wherein the adjustment module comprises:
    检测单元,用于检测当前场景的逆光强度;a detecting unit, configured to detect a backlight intensity of the current scene;
    第二获取单元,用于获取与所述逆光强度对应的增强幅度;a second acquiring unit, configured to acquire an enhancement range corresponding to the backlight intensity;
    调整单元,用于根据所述增强幅度调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。And an adjusting unit, configured to adjust, according to the enhancement amplitude, a preset CCM model parameter corresponding to the backlight scene to improve saturation of the face region.
  9. 一种终端设备,其特征在于,包括以下一个或多个组件:壳体和位于所述壳体内的处理器、存储器,其中,所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于执行如权利要求1-5任一所述的逆光场景的人脸区域处理方法。A terminal device, comprising: one or more components: a housing and a processor, a memory located in the housing, wherein the processor reads the executable program code stored in the memory by reading A program corresponding to the executable program code is executed for performing a face region processing method of the backlighting scene according to any one of claims 1-5.
  10. 一种非临时性计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1-5任一所述的逆光场景的人脸区域处理方法。A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program is executed by a processor, and the face region processing method for implementing the backlight scene according to any one of claims 1-5 .
  11. 一种图像处理电路,其特征在于,所述的图像处理电路包括:拍摄单元和处理单元,其中,An image processing circuit, comprising: a photographing unit and a processing unit, wherein
    所述拍摄单元,用于输出拍摄画面;The photographing unit is configured to output a photographing screen;
    所述处理单元,用于当检测到逆光场景,对当前拍摄画面分离出前景和逆光背景,对所述前景进行亮度提升处理,并确定所述前景中的人脸区域,调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。The processing unit is configured to: when the backlight scene is detected, separate the foreground and the backlight background from the current shooting image, perform brightness enhancement processing on the foreground, determine a face region in the foreground, and adjust the preset and the scene The CCM model parameters corresponding to the backlight scene increase the saturation of the face region.
  12. 如权利要求11所述的图像处理电路,其特征在于,所述拍摄单元包括电性连接的双摄像头,所述处理器包括图像信号处理ISP处理器,其中,The image processing circuit according to claim 11, wherein said photographing unit comprises an electrically connected dual camera, said processor comprising an image signal processing ISP processor, wherein
    所述双摄像头,用于输出两个摄像头分别获取的当前拍摄画面;The dual camera is configured to output a current captured image obtained by two cameras respectively;
    所述ISP处理器,用于根据双摄像头分别获取的当前拍摄画面数据确定焦点区域之外的图像区域的景深地图,根据所述景深地图确定所述焦点区域之前的前景景深和所述焦点区域之后的背景景深,根据所述前景景深和所述背景景深分离出前景和逆光背景。The ISP processor is configured to determine a depth map of an image area outside the focus area according to the current captured picture data respectively acquired by the dual camera, and determine a foreground depth of the focus area and the focus area according to the depth map The background depth of field separates the foreground and backlight background based on the foreground depth of field and the background depth of field.
  13. 如权利要求11或12所述的图像处理电路,其特征在于,The image processing circuit according to claim 11 or 12, wherein
    所述处理单元,包括电性连接的CPU;The processing unit includes an electrically connected CPU;
    其中,所述CPU,用于检测当前场景的逆光强度,获取与所述逆光强度对应的增强幅度,根据所述增强幅度调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域的饱和度。The CPU is configured to detect a backlight intensity of the current scene, obtain an enhancement range corresponding to the backlight intensity, and adjust a preset CCM model parameter corresponding to the backlight scene according to the enhancement range to improve the face. The saturation of the area.
  14. 如权利要求13所述的图像处理电路,其特征在于,所述CPU还用于:The image processing circuit according to claim 13, wherein said CPU is further configured to:
    获取与人脸区域不同部位对应的饱和度调整系数;Obtaining a saturation adjustment coefficient corresponding to a different part of the face region;
    根据所述不同部位对应的饱和度调整系数和所述增强幅度,计算与所述不同部位对应的提升幅度;Calculating a lifting range corresponding to the different parts according to the saturation adjustment coefficient and the enhancement range corresponding to the different parts;
    根据与所述不同部位对应的提升幅度,调整预设的与所述逆光场景对应的CCM模型参数提高所述人脸区域对应位置的饱和度。Adjusting, according to the lifting range corresponding to the different parts, the preset CCM model parameter corresponding to the backlight scene to improve the saturation of the corresponding position of the face area.
PCT/CN2018/094083 2017-07-10 2018-07-02 Human face region processing method and apparatus in backlight scene WO2019011147A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710558357.5 2017-07-10
CN201710558357.5A CN107277356B (en) 2017-07-10 2017-07-10 Method and device for processing human face area of backlight scene

Publications (1)

Publication Number Publication Date
WO2019011147A1 true WO2019011147A1 (en) 2019-01-17

Family

ID=60071759

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/094083 WO2019011147A1 (en) 2017-07-10 2018-07-02 Human face region processing method and apparatus in backlight scene

Country Status (2)

Country Link
CN (1) CN107277356B (en)
WO (1) WO2019011147A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085686A (en) * 2020-08-21 2020-12-15 北京迈格威科技有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107454315B (en) * 2017-07-10 2019-08-02 Oppo广东移动通信有限公司 The human face region treating method and apparatus of backlight scene
CN107277356B (en) * 2017-07-10 2020-02-14 Oppo广东移动通信有限公司 Method and device for processing human face area of backlight scene
CN107995418B (en) * 2017-11-21 2020-07-21 维沃移动通信有限公司 Shooting method and device and mobile terminal
CN107948519B (en) * 2017-11-30 2020-03-27 Oppo广东移动通信有限公司 Image processing method, device and equipment
CN108259754B (en) * 2018-03-06 2021-02-02 Oppo广东移动通信有限公司 Image processing method and device, computer readable storage medium and computer device
CN111368596B (en) * 2018-12-26 2023-08-04 北京眼神智能科技有限公司 Face recognition backlight compensation method and device, readable storage medium and equipment
CN109815905B (en) * 2019-01-24 2022-12-23 深圳市梦网视讯有限公司 Method and system for detecting face image by backlight source
CN111526277A (en) * 2019-02-01 2020-08-11 神讯电脑(昆山)有限公司 Processing method and system for adjusting image according to environmental conditions
CN110751607A (en) * 2019-10-21 2020-02-04 浙江大华技术股份有限公司 Skin color correction method and device, storage medium and electronic device
CN110891145B (en) * 2019-12-02 2021-08-17 联想(北京)有限公司 Method for obtaining image by photographing and electronic equipment
CN112261307B (en) * 2020-09-27 2022-08-19 厦门亿联网络技术股份有限公司 Image exposure method, device and storage medium
CN112606402A (en) * 2020-11-03 2021-04-06 泰州芯源半导体科技有限公司 Product manufacturing platform applying multi-parameter analysis
CN112819714A (en) * 2021-01-29 2021-05-18 深圳市商汤科技有限公司 Target object exposure method, device, storage medium and equipment
CN113674230B (en) * 2021-08-10 2023-12-19 深圳市捷顺科技实业股份有限公司 Method and device for detecting key points of indoor backlight face
CN117152819A (en) * 2023-09-04 2023-12-01 广州市鹏驰信息科技有限公司 Face recognition method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102044056A (en) * 2009-10-23 2011-05-04 索尼公司 Image processing apparatus and image processing method
CN105303543A (en) * 2015-10-23 2016-02-03 努比亚技术有限公司 Image enhancement method and mobile terminal
JP6003133B2 (en) * 2012-03-21 2016-10-05 カシオ計算機株式会社 Imaging apparatus, imaging control method, and program
CN106454014A (en) * 2016-11-04 2017-02-22 安徽超远信息技术有限公司 Method and device for improving quality of vehicle image captured in backlighting scene
CN106791471A (en) * 2016-12-29 2017-05-31 宇龙计算机通信科技(深圳)有限公司 Image optimization method, image optimization device and terminal
CN107277356A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 The human face region treating method and apparatus of backlight scene

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447815B (en) * 2010-10-09 2014-01-01 中兴通讯股份有限公司 Video image processing method and device
CN105025283A (en) * 2015-08-07 2015-11-04 广东欧珀移动通信有限公司 Novel color saturation adjusting method and system and mobile terminal
CN106937049B (en) * 2017-03-09 2020-11-27 Oppo广东移动通信有限公司 Depth-of-field-based portrait color processing method and device and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102044056A (en) * 2009-10-23 2011-05-04 索尼公司 Image processing apparatus and image processing method
JP6003133B2 (en) * 2012-03-21 2016-10-05 カシオ計算機株式会社 Imaging apparatus, imaging control method, and program
CN105303543A (en) * 2015-10-23 2016-02-03 努比亚技术有限公司 Image enhancement method and mobile terminal
CN106454014A (en) * 2016-11-04 2017-02-22 安徽超远信息技术有限公司 Method and device for improving quality of vehicle image captured in backlighting scene
CN106791471A (en) * 2016-12-29 2017-05-31 宇龙计算机通信科技(深圳)有限公司 Image optimization method, image optimization device and terminal
CN107277356A (en) * 2017-07-10 2017-10-20 广东欧珀移动通信有限公司 The human face region treating method and apparatus of backlight scene

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112085686A (en) * 2020-08-21 2020-12-15 北京迈格威科技有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN107277356B (en) 2020-02-14
CN107277356A (en) 2017-10-20

Similar Documents

Publication Publication Date Title
WO2019011147A1 (en) Human face region processing method and apparatus in backlight scene
WO2019105262A1 (en) Background blur processing method, apparatus, and device
US10997696B2 (en) Image processing method, apparatus and device
US20200043225A1 (en) Image processing apparatus and control method thereof
WO2018228467A1 (en) Image exposure method and device, photographing device, and storage medium
US10805508B2 (en) Image processing method, and device
KR20200041382A (en) Dual camera-based imaging method, mobile terminal and storage medium
WO2019085618A1 (en) Image-processing method, apparatus and device
WO2020259271A1 (en) Image distortion correction method and apparatus
WO2019011110A1 (en) Human face region processing method and apparatus in backlight scene
WO2019105254A1 (en) Background blur processing method, apparatus and device
WO2019105297A1 (en) Image blurring method and apparatus, mobile device, and storage medium
KR20200023651A (en) Preview photo blurring method and apparatus and storage medium
WO2019011148A1 (en) White balance processing method and apparatus
US10382671B2 (en) Image processing apparatus, image processing method, and recording medium
US9674427B2 (en) Image processing method and apparatus
WO2019105298A1 (en) Image blurring processing method, device, mobile device and storage medium
JP6412386B2 (en) Image processing apparatus, control method therefor, program, and recording medium
US11710343B2 (en) Image processing device, image processing method, and storage medium for correcting brightness
CN108289170B (en) Photographing apparatus, method and computer readable medium capable of detecting measurement area
JP4208563B2 (en) Automatic focus adjustment device
US11509797B2 (en) Image processing apparatus, image processing method, and storage medium
JP4946913B2 (en) Imaging apparatus and image processing program
US11842467B2 (en) Image processing apparatus, image processing method and storage medium
WO2019041493A1 (en) White balance adjustment method and device

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: 18831881

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: 18831881

Country of ref document: EP

Kind code of ref document: A1