Movatterモバイル変換


[0]ホーム

URL:


CN115589526A - Shooting method and device - Google Patents

Shooting method and device
Download PDF

Info

Publication number
CN115589526A
CN115589526ACN202211214000.2ACN202211214000ACN115589526ACN 115589526 ACN115589526 ACN 115589526ACN 202211214000 ACN202211214000 ACN 202211214000ACN 115589526 ACN115589526 ACN 115589526A
Authority
CN
China
Prior art keywords
skin color
sub
shooting
region
person
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211214000.2A
Other languages
Chinese (zh)
Other versions
CN115589526B (en
Inventor
张磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co LtdfiledCriticalVivo Mobile Communication Co Ltd
Priority to CN202211214000.2ApriorityCriticalpatent/CN115589526B/en
Publication of CN115589526ApublicationCriticalpatent/CN115589526A/en
Application grantedgrantedCritical
Publication of CN115589526BpublicationCriticalpatent/CN115589526B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本申请公开了一种拍摄方法及装置,属于拍摄设备领域。拍摄方法包括:获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域;获取子区域的色相;根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;根据子区域的危险系数,对子区域进行图像处理,得到处理后的拍摄图像;获取拍摄界面内的人物肤色;基于目标肤色,对人物肤色进行调整;根据调整后的人物肤色和处理后的拍摄图像,拍摄目标视频。

Figure 202211214000

The application discloses a shooting method and device, which belong to the field of shooting equipment. The shooting method includes: acquiring a shooting image in the shooting interface, and the shooting image includes multiple sub-regions; obtaining the hue of the sub-region; determining the risk coefficient of the sub-region according to the hue of the sub-region, and the risk coefficient is used to represent the distance between the sub-region and the background. Color difference; according to the risk factor of the sub-region, perform image processing on the sub-region to obtain the processed image; obtain the person's skin color in the shooting interface; adjust the person's skin color based on the target skin color; according to the adjusted person's skin color and The processed captured image is used to capture the target video.

Figure 202211214000

Description

Translated fromChinese
拍摄方法及装置Shooting method and device

技术领域technical field

本申请属于拍摄设备技术领域,具体涉及一种拍摄方法和拍摄装置。The present application belongs to the technical field of photographing equipment, and in particular relates to a photographing method and a photographing device.

背景技术Background technique

目前,用户通过拍摄视频的方式记录生活,所以用户对电子设备的拍摄质量的要求也在逐渐提高。At present, users record life by shooting videos, so users' requirements for shooting quality of electronic devices are gradually increasing.

夜景拍摄模式下,在对图像进行自动调整过程中,部分图像会被非预期的进行调整,导致图像产生不自然的颜色,导致难以满足用户对视频拍摄效果的预期。In the night scene shooting mode, during the automatic image adjustment process, some images will be adjusted unexpectedly, resulting in unnatural colors in the image, making it difficult to meet the user's expectations for video shooting effects.

发明内容Contents of the invention

本申请实施例的目的是提供一种拍摄方法及装置,能够解决用户难以在夜景下拍摄得到预期拍摄效果视频的问题。The purpose of the embodiment of the present application is to provide a shooting method and device, which can solve the problem that it is difficult for a user to obtain a video with an expected shooting effect in a night scene.

第一方面,本申请实施例提供了一种拍摄方法,用于拍摄装置,该拍摄方法包括:In the first aspect, the embodiment of the present application provides a shooting method for a shooting device, the shooting method includes:

获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域;Obtain the captured image in the shooting interface, where the captured image includes multiple sub-regions;

获取子区域的色相;Get the hue of the subregion;

根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;Determine the risk coefficient of the sub-region according to the hue of the sub-region, and the risk coefficient is used to represent the color difference between the sub-region and the background;

根据子区域的危险系数,对子区域进行图像处理,得到处理后的拍摄图像;Perform image processing on the sub-region according to the risk factor of the sub-region to obtain a processed captured image;

获取拍摄界面内的人物肤色;Obtain the skin color of the person in the shooting interface;

基于目标肤色,对人物肤色进行调整;Adjust the person's skin color based on the target skin color;

根据调整后的人物肤色和处理后的拍摄图像,拍摄目标视频。Shoot the target video according to the adjusted person's skin color and the processed captured image.

第二方面,本申请实施例提供了一种拍摄装置,包括:In a second aspect, an embodiment of the present application provides a photographing device, including:

获取模块,获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域和获取子区域的色相;The acquiring module acquires the captured image in the shooting interface, the captured image includes multiple sub-regions and obtains the hue of the sub-regions;

确定模块,根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;The determination module determines the risk coefficient of the sub-region according to the hue of the sub-region, and the risk coefficient is used to represent the color difference between the sub-region and the background;

处理模块,根据子区域的危险系数,对子区域进行图像处理,得到处理后的拍摄图像;The processing module performs image processing on the sub-region according to the risk factor of the sub-region to obtain the processed captured image;

获取模块还用于:获取拍摄界面内的人物肤色;The obtaining module is also used to: obtain the skin color of the person in the shooting interface;

调整模块,基于目标肤色,对人物肤色进行调整;Adjustment module, based on the target skin color, adjusts the person's skin color;

拍摄模块,根据调整后的人物肤色和处理后的拍摄图像,拍摄目标视频。The shooting module shoots the target video according to the adjusted person's skin color and the processed captured image.

第三方面,本申请实施例提供了一种拍摄装置,包括处理器和存储器,存储器存储可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如第一方面中的拍摄方法的步骤。In the third aspect, the embodiment of the present application provides a photographing device, including a processor and a memory, and the memory stores programs or instructions that can run on the processor. When the programs or instructions are executed by the processor, the photographing as in the first aspect is realized. method steps.

第四方面,本申请实施例提供了一种可读存储介质,可读存储介质上存储程序或指令,程序或指令被处理器执行时实现如第一方面的方法的步骤。In a fourth aspect, the embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method in the first aspect are implemented.

第五方面,本申请实施例提供了一种芯片,芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如第一方面的方法。In the fifth aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the method in the first aspect.

第六方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面的方法。In a sixth aspect, an embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the method in the first aspect.

在本申请实施例中,为了提高对危险色的判别准确性,将拍摄界面内的拍摄图像分为多个子区域,通过子区域的色相,确定子区域的危险系数。根据危险系数对子区域的图像进行优化调整,危险系数越高,需要调整的幅度相应也会提高。在对每个子区域的图像进行优化调整之后,可以改善人眼看到的主观画质对比度表现,根据优化后的拍摄图像和调整后的人物肤色进行视频拍摄,有利于提高拍摄效果。In the embodiment of the present application, in order to improve the accuracy of judging dangerous colors, the captured image in the shooting interface is divided into multiple sub-regions, and the danger coefficient of the sub-regions is determined according to the hue of the sub-regions. The image of the sub-area is optimized and adjusted according to the risk factor. The higher the risk factor, the greater the range of adjustment required. After optimizing and adjusting the image of each sub-region, the subjective image quality contrast performance seen by the human eye can be improved, and video shooting based on the optimized shooting image and the adjusted skin color of the person is conducive to improving the shooting effect.

需要对人物肤色进行调整的情况下,需要确定目标肤色,以目标肤色为标准,对人物肤色进行调整,使得人物肤色趋近于目标肤色。目标肤色是用户普遍在视觉上觉得舒适和具有美感的肤色,因此,以目标肤色作为调整目标,使得拍摄视频中的人物肤色能够被预期的调整。When the skin color of a person needs to be adjusted, the target skin color needs to be determined, and the target skin color is used as a standard to adjust the person's skin color so that the person's skin color approaches the target skin color. The target skin color is the skin color that users generally feel visually comfortable and aesthetically pleasing. Therefore, the target skin color is used as the adjustment target, so that the skin color of the person in the video can be adjusted as expected.

通过目标肤色对人物肤色进行调整,能够提高对人物肤色的调整效果,可以满足用户对视频中对肤色的预期,用户可以拍摄得到满意的人像效果,因此,通过调整后的拍摄图像和人物肤色进行视频拍摄,避免拍摄视频过程中产生不自然的颜色,能够满足用户对视频拍摄效果的预期。Adjusting the person's skin color through the target skin color can improve the adjustment effect of the person's skin color, which can meet the user's expectations for the skin color in the video, and the user can get a satisfactory portrait effect. Therefore, the adjusted image and the person's skin color Video shooting, avoiding unnatural colors in the process of shooting video, can meet users' expectations for video shooting effects.

附图说明Description of drawings

图1是本申请实施例中的拍摄方法的流程图;Fig. 1 is the flowchart of the photographing method in the embodiment of the present application;

图2是本申请实施例中确定危险色的危险程度的处理过程示意图;Fig. 2 is a schematic diagram of the process of determining the degree of danger of the dangerous color in the embodiment of the present application;

图3是本申请实施例中调整人物肤色的处理过程示意图;Fig. 3 is a schematic diagram of the process of adjusting the skin color of a person in the embodiment of the present application;

图4是本申请实施例中对拍摄图像进行处理的处理过程示意图;FIG. 4 is a schematic diagram of a processing process for processing captured images in an embodiment of the present application;

图5是本申请实施例中拍摄装置的示意框图之一;Fig. 5 is one of the schematic block diagrams of the photographing device in the embodiment of the present application;

图6是本申请实施例中拍摄装置的示意框图之二;Fig. 6 is the second schematic block diagram of the photographing device in the embodiment of the present application;

图7是本申请实施例的电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will clearly describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application belong to the protection scope of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein and that references to "first", "second", etc. to distinguish Objects are generally of one type, and the number of objects is not limited. For example, there may be one or more first objects. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的拍摄方法及装置进行详细地说明。The photographing method and device provided in the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.

如图1所示,在本申请的一些实施例中,提供了一种拍摄方法,用于拍摄装置,拍摄方法包括:As shown in Figure 1, in some embodiments of the present application, a shooting method is provided for a shooting device, and the shooting method includes:

步骤102,获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域;Step 102, acquiring a photographed image in the photographing interface, where the photographed image includes a plurality of sub-regions;

步骤104,获取子区域的色相;Step 104, obtaining the hue of the sub-region;

步骤106,根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;Step 106, according to the hue of the sub-region, determine the risk coefficient of the sub-region, and the risk coefficient is used to represent the degree of color difference between the sub-region and the background;

步骤108,根据子区域的危险系数,对子区域进行图像处理,得到处理后的拍摄图像;Step 108, performing image processing on the sub-region according to the risk coefficient of the sub-region to obtain a processed captured image;

步骤110,获取拍摄界面内的人物肤色;Step 110, acquiring the skin color of the person in the shooting interface;

步骤112,基于目标肤色,对人物肤色进行调整;Step 112, adjust the person's skin color based on the target skin color;

步骤114,根据调整后的人物肤色和处理后的拍摄图像,拍摄目标视频。Step 114, shoot the target video according to the adjusted person's skin color and the processed captured image.

在拍摄视频的情况下,需要确定拍摄界面内的图像是否存在危险色,容易发生色彩暗淡的重灾区的色彩被称为危险色,危险系数用于表示危险色的危险程度,危险系数越高,色彩呈现的越暗淡。In the case of shooting video, it is necessary to determine whether there is a dangerous color in the image in the shooting interface. The color of the hardest-hit area that is prone to dark colors is called a dangerous color. The risk coefficient is used to indicate the degree of danger of the dangerous color. The higher the risk factor, the higher the risk factor. The darker the color appears.

为了提高对危险色的判别准确性,将拍摄界面内的拍摄图像分为多个子区域,通过子区域的色相,确定子区域的危险系数。根据危险系数对子区域的图像进行优化调整,危险系数越高,需要调整的幅度相应也会提高。在对每个子区域的图像进行优化调整之后,可以改善人眼看到的主观画质对比度表现,根据优化后的拍摄图像和调整后的人物肤色进行视频拍摄,有利于进一步提高拍摄效果。In order to improve the accuracy of discriminating dangerous colors, the captured image in the shooting interface is divided into multiple sub-regions, and the danger coefficient of the sub-regions is determined by the hue of the sub-regions. The image of the sub-area is optimized and adjusted according to the risk factor. The higher the risk factor, the greater the range of adjustment required. After optimizing and adjusting the image of each sub-region, the subjective image quality contrast performance seen by the human eye can be improved, and video shooting based on the optimized shooting image and the adjusted skin color of the person is conducive to further improving the shooting effect.

示例性地,当高饱和度的黄色周围被白色环绕时,此时会认为黄色很暗,人眼所接收到的信息会认为该部分画面的鲜艳度极低,从而造成该部位整体较为暗淡,色彩对比度不高的错觉,即使从数值来看,该部分的黄色RG两通道的阶数可能已经达到了最大值。在此情况下,黄色可以被认定为危险色,需要对具有危险色的区域进行优化调整。For example, when the high-saturation yellow is surrounded by white, the yellow is considered to be very dark at this time, and the information received by the human eye will consider the vividness of this part of the picture to be extremely low, resulting in a relatively dark part of the whole. The illusion of low color contrast, even from a numerical point of view, the order of the yellow RG two channels in this part may have reached the maximum. In this case, yellow can be identified as a dangerous color, and the areas with dangerous colors need to be optimized and adjusted.

在拍摄视频过程中,如果拍摄界面内存在人物图像,就对人物图像的人物肤色进行获取,拍摄装置可以对获取的人物肤色进行单独优化调整,有利于提高对人物肤色的调整效果。In the process of shooting a video, if there is a person image in the shooting interface, the skin color of the person image is acquired, and the shooting device can individually optimize and adjust the acquired skin color of the person, which is beneficial to improve the adjustment effect of the person's skin color.

需要对人物肤色进行调整的情况下,需要确定目标肤色,以目标肤色为标准,对人物肤色进行调整,使得人物肤色趋近于目标肤色。目标肤色是用户普遍在视觉上觉得舒适和具有美感的肤色,因此,以目标肤色作为调整目标,使得拍摄视频中的人物肤色能够被预期的调整。When the skin color of a person needs to be adjusted, the target skin color needs to be determined, and the target skin color is used as a standard to adjust the person's skin color so that the person's skin color approaches the target skin color. The target skin color is the skin color that users generally feel visually comfortable and aesthetically pleasing. Therefore, the target skin color is used as the adjustment target, so that the skin color of the person in the video can be adjusted as expected.

在确定目标肤色的情况下,可以根据人物肤色确定目标肤色。在获取到人物肤色的情况下,可以在数据库中调取与人物肤色相匹配的目标肤色,因此,即使人物肤色被优化调整,也不会与用户的原始肤色偏差较大,有利于提高对人物肤色的调整效果。In the case of determining the target skin color, the target skin color may be determined according to the person's skin color. When the skin color of the person is obtained, the target skin color matching the skin color of the person can be retrieved from the database. Therefore, even if the skin color of the person is optimized and adjusted, it will not deviate greatly from the original skin color of the user, which is conducive to improving the accuracy of the user's skin color. Skin tone adjustment effect.

在确定目标肤色的情况下,也可以根据拍摄装置的拍摄模式确定目标肤色,在不同的拍摄模式下,拍摄界面内的整体色调也会发生变化,因此需要将目标肤色与拍摄模式相关联,避免人物肤色的调整过程脱离背景色,在拍摄模式切换的情况下,目标肤色也相应进行调整,有利于提高对人物肤色的调整效果。In the case of determining the target skin color, the target skin color can also be determined according to the shooting mode of the shooting device. In different shooting modes, the overall tone of the shooting interface will also change. Therefore, it is necessary to associate the target skin color with the shooting mode to avoid The adjustment process of the person's skin color is separated from the background color. When the shooting mode is switched, the target skin color is also adjusted accordingly, which is conducive to improving the adjustment effect of the person's skin color.

在一种可能的应用中,拍摄模式可以由用户主动切换,或者拍摄装置通过采集到的图像自动对拍摄模式进行切换,使得拍摄模式与当前拍摄环境相适配。In a possible application, the shooting mode can be switched actively by the user, or the shooting device can automatically switch the shooting mode through the collected images, so that the shooting mode is suitable for the current shooting environment.

在确定目标肤色的情况下,也可以根据肤色选取输入确定目标肤色,用户可以自己的需要对目标肤色进行选取,用户可以主观选取适合自己且拍摄效果较好的目标肤色,从而可以满足用户的拍摄需求,有利于提高对人物肤色的调整效果。In the case of determining the target skin color, the target skin color can also be determined according to the skin color selection input. Users can select the target skin color according to their own needs. It is beneficial to improve the adjustment effect of the character's skin color.

通过目标肤色对人物肤色进行调整,能够提高对人物肤色的调整效果,可以满足用户对视频中对肤色的预期,用户可以拍摄得到满意的人像效果,因此,通过调整后的拍摄图像和人物肤色进行视频拍摄,避免拍摄视频过程中产生不自然的颜色,能够满足用户对视频拍摄效果的预期。Adjusting the person's skin color through the target skin color can improve the adjustment effect of the person's skin color, which can meet the user's expectations for the skin color in the video, and the user can get a satisfactory portrait effect. Therefore, the adjusted image and the person's skin color Video shooting, avoiding unnatural colors in the process of shooting video, can meet users' expectations for video shooting effects.

在一种可能的实施例中,获取拍摄界面内的人物肤色之后,还包括:根据人物肤色,确定人物肤色的肤色类别;根据肤色类别,确定目标肤色,其中,不同肤色类别中的目标肤色不同。In a possible embodiment, after obtaining the skin color of the person in the shooting interface, it also includes: determining the skin color category of the person's skin color according to the skin color of the person; determining the target skin color according to the skin color category, wherein the target skin color in different skin color categories is different .

在获取到拍摄界面内的人物肤色的情况下,需要确定人物肤色的肤色类别,不同肤色类别的差异较大,因此不同肤色类别设置不同的目标肤色。根据肤色类别确定目标肤色,使得人物肤色与目标肤色不会差异过大,从而避免对人物肤色进行过度调整,确保人物肤色的调整效果。In the case of obtaining the skin color of the person in the shooting interface, it is necessary to determine the skin color category of the person's skin color. Different skin color categories are quite different, so different target skin colors are set for different skin color categories. Determine the target skin color according to the skin color category, so that the difference between the person's skin color and the target skin color will not be too large, thereby avoiding excessive adjustment of the person's skin color and ensuring the adjustment effect of the person's skin color.

示例性地,在拍摄界面内的人物肤色为偏黄肤色的情况下,如果目标肤色为黑色肤色,就会将人物肤色调整至趋近于黑色肤色,造成过度调整的问题。For example, when the skin color of the person in the shooting interface is yellowish, if the target skin color is black, the skin color of the person will be adjusted to be close to the black skin color, causing the problem of over-adjustment.

在一种可能的应用中,需要将不同肤色类别确定目标肤色过程中,选取的肤色数据来源可以为网络共享的肤色数据库,也可以是自行采集的不同国家或地区的肤色数据集,然后将采集的肤色数据集分为深度肤色、中等肤色和浅度肤色三组类别,肤色类别的区分依据可以为肤色的亮度,各组肤色数据差距较大,但基本都位于一个既定的范围内。分别对不同肤色类别中的肤色数据均值进行计算,并统计各自人中的肤色范围,通过计算得到调整后的目标肤色。In one possible application, in the process of determining the target skin color for different skin color categories, the selected skin color data source can be a skin color database shared by the network, or it can be a skin color data set from different countries or regions collected by itself, and then the collected The skin color data set is divided into three groups: deep skin color, medium skin color and light skin color. The skin color category can be distinguished based on the brightness of the skin color. The skin color data of each group varies greatly, but they are basically within a predetermined range. The average value of the skin color data in different skin color categories is calculated separately, and the skin color range of each person is counted, and the adjusted target skin color is obtained through calculation.

在一种可能的实施例中,获取拍摄界面内的人物肤色之后,还包括:根据人物肤色,确定人物肤色的肤色类别;获取拍摄装置的拍摄模式;根据肤色类别和拍摄模式,确定目标肤色,其中,不同肤色类别中的目标肤色不同,不同拍摄模式下的目标肤色不同。In a possible embodiment, after obtaining the skin color of the person in the shooting interface, it also includes: determining the skin color category of the person's skin color according to the skin color of the person; acquiring the shooting mode of the shooting device; determining the target skin color according to the skin color category and shooting mode, Wherein, target skin colors are different in different skin color categories, and target skin colors are different in different shooting modes.

在获取到拍摄界面内的人物肤色的情况下,需要确定人物肤色的肤色类别,不同肤色类别的差异较大,因此需要将人物肤色与相应的肤色类别相匹配。在确定肤色类别之后,需要获取拍摄装置当前的拍摄模式,不同拍摄模式对应的目标肤色不同,因此需要结合人物肤色和拍摄模式确定目标肤色。In the case of obtaining the skin color of the person in the shooting interface, it is necessary to determine the skin color category of the person's skin color. Different skin color categories are quite different, so it is necessary to match the person's skin color with the corresponding skin color category. After the skin color category is determined, the current shooting mode of the camera needs to be acquired. Different shooting modes correspond to different target skin colors, so it is necessary to combine the person's skin color and shooting mode to determine the target skin color.

例如,拍摄装置具有极夜模式和普通模式两种模式,在不同的拍摄模式下,视频拍摄的背景色不同,如果在不同拍摄模式下均使用相同的目标肤色,就会导致调整后的人物肤色可能与视频拍摄的背景色不协调,从而导致视频拍摄效果较差的问题。在本实施例中,可以为不同拍摄模式设置不同的目标肤色,因此,在同一肤色类别中,目标肤色的数量可以与拍摄模式的数量相同。For example, the shooting device has two modes: extreme night mode and normal mode. In different shooting modes, the background color of video shooting is different. If the same target skin color is used in different shooting modes, it will result in adjusted human skin color It may be inconsistent with the background color of video shooting, resulting in poor video shooting effect. In this embodiment, different target skin colors can be set for different shooting modes. Therefore, in the same skin color category, the number of target skin colors can be the same as the number of shooting modes.

在一种可能的应用中,在获取不同肤色类别的目标肤色之后,针对同一类别下目标肤色的调整,可通过为色度增加偏移量参数,为饱和度和亮度增加增益参数,来增加调试弹性,并根据调试经验得到各人种肤色中可使视觉感觉舒适的色彩数据。In one possible application, after obtaining the target skin color of different skin color categories, the adjustment of the target skin color under the same category can be increased by adding offset parameters for chroma and gain parameters for saturation and brightness. It is flexible, and according to the debugging experience, the color data that can make the visual sense comfortable in the skin color of each race is obtained.

在一种可能的实施例中,获取拍摄界面内的人物肤色之后,还包括:接收肤色选取输入;根据肤色选取输入,确定目标肤色;基于接收到关闭肤色选取的输入,根据人物肤色和/或拍摄装置的拍摄模式确定目标肤色。In a possible embodiment, after obtaining the skin color of the person in the shooting interface, it also includes: receiving a skin color selection input; determining the target skin color according to the skin color selection input; The shooting mode of the camera determines the target skin tone.

在拍摄模式下,用户可以手动切换目标肤色,用户可以查看不同选择不同目标肤色后视频拍摄效果,从而可以选用适合自己且拍摄效果较高的目标肤色,从而有利于满足用户拍摄视频的满意度和拍摄需求。In the shooting mode, the user can manually switch the target skin color, and the user can check the video shooting effect after selecting different target skin colors, so that he can choose the target skin color that suits him and has a high shooting effect, which is conducive to satisfying the satisfaction and satisfaction of the user when shooting videos. Shooting needs.

可以在拍摄界面内设置“肤色选取”的选项,用户通过对“肤色选取”进行点击,就开启了手动选取目标肤色的功能,此时拍摄装置不会根据人物肤色和拍摄模式自动选取目标肤色,在“肤色选取”的下拉菜单中,具有不同目标肤色的选项,用户可以自主对目标肤色进行选取。当用户再次点击“肤色选取”选项时,就关闭了手动选取目标肤色的功能,此时拍摄装置根据人物肤色和/或拍摄模式自动选取目标肤色。You can set the option of "Skin Color Selection" in the shooting interface. By clicking "Skin Color Selection", the user will start the function of manually selecting the target skin color. At this time, the shooting device will not automatically select the target skin color according to the person's skin color and shooting mode. In the drop-down menu of "Skin Color Selection", there are options for different target skin colors, and the user can choose the target skin color independently. When the user clicks the "skin color selection" option again, the function of manually selecting the target skin color is turned off, and the camera automatically selects the target skin color according to the person's skin color and/or shooting mode.

在一种可能的应用中,不同的目标肤色可以穿入DSW模块进行动态选择配置,根据拍摄装置传递的系统设置信息来自动选择机主适用的肤色范围和喜好色。In one possible application, different target skin colors can be dynamically selected and configured through the DSW module, and the applicable skin color range and favorite color of the owner can be automatically selected according to the system setting information transmitted by the shooting device.

在其它实施例中,可以结合人物肤色、拍摄装置的拍摄模式和肤色选取输入中的任意两种确定目标肤色,例如,在用户主动选择目标肤色的情况下,也可以通过人物肤色或拍摄模式辅助用户选择目标肤色。In other embodiments, the target skin color can be determined by combining any two of the person's skin color, the shooting mode of the camera, and the skin color selection input. For example, when the user actively selects the target skin color, it can also be assisted by the person's skin color or shooting mode. User selects target skin tone.

如图3所示,HSV(Hue,Saturation,Value)即色相、饱和度、明度。其中,色相(H)代表色彩的基本属性,即颜色的名称,如红色、绿色等。饱和度(H)是指色彩的纯度,越高,色彩越纯,越低则色彩越灰。明度(V)是指一组色彩基色的亮度。将获取到的图像数据YUV转换为HSV,并将图像数据中的所有点呈现在HSV的三维空间内,然后取高密度区域的边界值,需要对一些边界的干扰数据进行删除,得到HSV三个维度上的最大值和最小值,从而得到肤色立方体,输入当前待改善肤色数据,判断前待改善肤色数据落入深色、中度、浅色共计三组肤色立方体中的哪个立方体中,如果均不落入,则不进行处理。As shown in Figure 3, HSV (Hue, Saturation, Value) refers to hue, saturation, and lightness. Among them, hue (H) represents the basic attribute of color, that is, the name of color, such as red, green, etc. Saturation (H) refers to the purity of the color, the higher the color, the purer the color, and the lower the color, the grayer the color. Value (V) refers to the brightness of a set of color primaries. Convert the acquired image data YUV to HSV, and present all the points in the image data in the three-dimensional space of HSV, and then take the boundary value of the high-density area. It is necessary to delete some boundary interference data to obtain three HSV The maximum and minimum values on the dimension, so as to obtain the skin color cube, input the current skin color data to be improved, and judge which cube the skin color data to be improved falls into in the three groups of dark, medium, and light color cubes. If it does not fall, it will not be processed.

在获得HSV三维坐标时,还需要计算H/S/V平均值,将其作为目标肤色的初始值,然后得到深色、中度、浅色三组肤色目标值数据,如果当前待改善数据落入一个立方体中,计算当前肤色与所在立方体内肤色目标值的距离,并进行动态靠近,动态参数可调,调整后,输出调整后的附图。When obtaining the HSV three-dimensional coordinates, it is also necessary to calculate the average value of H/S/V and use it as the initial value of the target skin color, and then obtain three sets of skin color target value data of dark, medium, and light. If the current data to be improved falls Enter a cube, calculate the distance between the current skin color and the skin color target value in the cube, and perform dynamic approach, the dynamic parameters are adjustable, after adjustment, output the adjusted drawings.

在一种可能的实施例中,根据子区域的危险系数,对子区域进行图像处理,包括:根据子区域的危险系数,确定子区域的调整权重;根据调整权重,调整子区域的饱和度和/或子区域的背景亮度。In a possible embodiment, the image processing of the sub-region according to the risk coefficient of the sub-region includes: determining the adjustment weight of the sub-region according to the risk coefficient of the sub-region; adjusting the saturation and saturation of the sub-region according to the adjustment weight. /or the background brightness of the subregion.

在确定每个子区域的危险系数的情况下,根据危险系数,确定每个子区域的调整权重,危险系数越大的子区域,调整权重也越大,从而可以对拍摄图像进行统一调整。In the case of determining the risk coefficient of each sub-region, the adjustment weight of each sub-region is determined according to the risk coefficient, and the sub-region with a greater risk coefficient has a greater adjustment weight, so that the captured image can be uniformly adjusted.

子区域的危险系数越大,子区域与背景之间的色彩差异度越大,因此可以通过提高子区域的饱和度和/或降低其周围的亮度的方式对子区域进行图像处理。The greater the risk factor of the sub-region, the greater the color difference between the sub-region and the background. Therefore, image processing can be performed on the sub-region by increasing the saturation of the sub-region and/or reducing the brightness around it.

HK(Helmholtz–Kohlrausch)效应是一种感知现象,用于强调对于人眼的主观感觉来讲,光谱色调中的饱和度强度会被感知为颜色亮度的一部分。基于HK效应的危险系数可以基于拍摄装置的最高亮度计算得到。The HK (Helmholtz–Kohlrausch) effect is a perceptual phenomenon used to emphasize that for the subjective perception of the human eye, the intensity of saturation in a spectral hue is perceived as part of the brightness of a color. The risk factor based on the HK effect can be calculated based on the highest brightness of the shooting device.

在一种可能的实施例中,根据子区域的色相,确定子区域的危险系数,包括:基于六基色对应的危险系数,对子区域的色相进行插值计算,得到目标参数;根据目标参数和子区域的饱和度,确定子区域的危险系数。In a possible embodiment, determining the risk coefficient of the sub-region according to the hue of the sub-region includes: performing interpolation calculation on the hue of the sub-region based on the risk coefficient corresponding to the six primary colors to obtain the target parameter; according to the target parameter and the sub-region Saturation, determine the risk factor of the sub-region.

基于HK效应的危险系数可以基于拍摄装置的最高亮度计算得到,其中,蓝色、紫色、红色、绿色、青色和黄色为六基色,计算得到六基色的危险系数如下:The risk factor based on the HK effect can be calculated based on the highest brightness of the shooting device, where blue, purple, red, green, cyan and yellow are the six primary colors, and the calculated risk factor of the six primary colors is as follows:

Red(1.890869),Magenta(2.09621),Blue(7.02888),Cyan(1.048965),Green(1.21782),Yellow(1.037253)。Red (1.890869), Magenta (2.09621), Blue (7.02888), Cyan (1.048965), Green (1.21782), Yellow (1.037253).

危险系数dangerous_ratio=1/HK因子,HK因子与危险系数从趋势上成反比。Risk factor dangerous_ratio=1/HK factor, HK factor and risk factor are inversely proportional to the trend.

根据上述数据可知,蓝色,紫色,红色等色彩的HK效应较高,而绿色,青色,黄色的HK效应较低。According to the above data, it can be seen that the HK effect of blue, purple, red and other colors is higher, while the HK effect of green, cyan, and yellow is lower.

色彩的危险程度跟饱和度也成正比。举例说明,越高饱和度的黄色,可被判断为越危险。在计算危险系数过程中,需将危险色的危险程度进行归一化,使其位于【0,1】之间。在获取子区域的色相之后,通过插值计算,得到子区域的危险系数,例如,子区域获取的色相位于绿色的色相和黄色的色相之间,根据插值计算得到的危险系数也在1/1.21782和1/1.037253之间。数据显示该子区域越危险,则表示该子区域需要提升色彩鲜艳度来保持人眼接收到的局部色彩对比度,则越提高其饱和度,或降低其周围的亮度。基于上述逻辑,可以将以子区域为单位的数据传递至色彩调试模块,用于控制饱和度/色度/色彩亮度等数据的调整趋势和生效权重。The danger of color is also directly proportional to the saturation. For example, the higher the saturation of yellow, the more dangerous it can be judged. In the process of calculating the risk coefficient, it is necessary to normalize the degree of danger of the dangerous color so that it is between [0, 1]. After obtaining the hue of the sub-region, the risk coefficient of the sub-region is obtained through interpolation calculation. For example, the hue obtained by the sub-region is between the green hue and the yellow hue, and the risk coefficient obtained according to the interpolation calculation is also 1/1.21782 and Between 1/1.037253. The data shows that the more dangerous the sub-region is, it means that the sub-region needs to increase the color vividness to maintain the local color contrast received by the human eye, then increase its saturation, or reduce the brightness around it. Based on the above logic, the data in units of sub-regions can be passed to the color debugging module to control the adjustment trend and effective weight of data such as saturation/chroma/color brightness.

如图2所示,将获取到的图像数据YUV转换为HSV,然后根据平均色度值和平均饱和度计算色度与危险色的距离,计算距离单位与上述距离的差值,差值和饱和度的乘积体现危险色的程度。As shown in Figure 2, convert the acquired image data YUV to HSV, then calculate the distance between the chroma and the dangerous color according to the average chroma value and average saturation, and calculate the difference between the distance unit and the above distance, the difference and the saturation The product of degrees reflects the degree of danger color.

基于人眼固有的HK效应原理,对六基色进行分析,得到各色彩的可能发生局部主观性对比度变差的危险因子,本发明中称之为暗淡度因子,将其作为一种提前预设的参数(危险系数),直接应用于色彩调整模块,间接应用于夜景录像中的对比度调试模块,用于动态的调整不同色度的颜色及其周边背景表现,从而通过动态的提升色彩亮度和色彩与背景色之间的色彩对比度,达到改善人眼看到的主观画质对比度表现。Based on the inherent HK effect principle of the human eye, the six primary colors are analyzed to obtain the risk factor of local subjective contrast deterioration of each color, which is called the dimness factor in the present invention, and it is used as a preset in advance The parameter (danger factor) is directly applied to the color adjustment module, and indirectly applied to the contrast adjustment module in the night scene video, which is used to dynamically adjust the color of different chromaticity and the performance of the surrounding background, so as to dynamically improve the color brightness and color and The color contrast between the background colors can improve the subjective image quality contrast performance seen by the human eye.

通过对提前计算好的肤色目标值数据库,精简提炼为几个软件控制参数,并通过DSW(Developer Studio Workspace)模块来对当前夜景录像模式下的肤色进行动态调整,达到不开美颜效果,不开人像效果,仅在夜景模式默认效果下就可以使消费者拍到较为满意的人像效果。By simplifying and refining the skin color target value database calculated in advance into several software control parameters, and using the DSW (Developer Studio Workspace) module to dynamically adjust the skin color in the current night scene video mode, to achieve the effect of no beauty, no Turn on the portrait effect, only under the default effect of the night scene mode, consumers can take a more satisfactory portrait effect.

如图4所示,对拍摄视频的整体调整过程如下,一方面,对肤色数据库区分为深/中/浅三组,调试肤色目标值,来进一步优化视觉感受,然后传入DSW模块进行动态选择配置。另一方面,进行六基色暗淡因子计算,将采集到的数据输入危险色检测模块,再将颜色危险度系数传递进调色模块。拍摄图像经亮度调试模块、对比度调试模块和噪声调试模块进行调整后,肤色预改善模块调整人物肤色,色彩调试模块调整拍摄图像的色彩,最后输出夜景输出图像。As shown in Figure 4, the overall adjustment process of the shooting video is as follows. On the one hand, the skin color database is divided into three groups: dark/medium/light, and the skin color target value is adjusted to further optimize the visual experience, and then passed to the DSW module for dynamic selection configuration. On the other hand, calculate the dimming factor of the six primary colors, input the collected data into the dangerous color detection module, and then pass the color risk coefficient into the color matching module. After the captured image is adjusted by the brightness adjustment module, contrast adjustment module and noise adjustment module, the skin color pre-improvement module adjusts the skin color of the person, the color adjustment module adjusts the color of the captured image, and finally outputs the night scene output image.

本申请实施例提供的拍摄方法,执行主体可以为拍摄装置。本申请实施例中以拍摄装置执行拍摄的方法为例,说明本申请实施例提供的拍摄装置。The shooting method provided in the embodiment of the present application may be executed by a shooting device. In the embodiment of the present application, the photographing device provided in the embodiment of the present application is described by taking the method for performing photographing by the photographing device as an example.

如图5所示,在本申请的一些实施例中,提供了一种拍摄装置200,包括:As shown in FIG. 5, in some embodiments of the present application, a photographingdevice 200 is provided, including:

获取模块210,用于获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域和获取子区域的色相;Anacquisition module 210, configured to acquire a photographed image in the photographing interface, where the photographed image includes a plurality of sub-regions and acquires the hue of the sub-regions;

确定模块220,根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;Thedetermination module 220 determines the risk coefficient of the sub-region according to the hue of the sub-region, and the risk coefficient is used to represent the color difference between the sub-region and the background;

处理模块230,根据子区域的危险系数,对子区域进行图像处理,得到处理后的拍摄图像;Theprocessing module 230 performs image processing on the sub-region according to the risk coefficient of the sub-region to obtain a processed captured image;

获取模块210还用于,获取拍摄界面内的人物肤色;The obtainingmodule 210 is also used to obtain the skin color of the person in the shooting interface;

调整模块240,基于目标肤色,对人物肤色进行调整,其中,根据人物肤色、拍摄装置的拍摄模式和肤色选取输入中的至少一种确定目标肤色;Theadjustment module 240 is configured to adjust the person's skin color based on the target skin color, wherein the target skin color is determined according to at least one of the person's skin color, the shooting mode of the camera, and the skin color selection input;

拍摄模块250,根据调整后的人物肤色和处理后的拍摄图像,拍摄目标视频。Theshooting module 250 shoots the target video according to the adjusted person's skin color and the processed captured image.

在对每个子区域的图像进行优化调整之后,可以改善人眼看到的主观画质对比度表现,根据优化后的拍摄图像和调整后的人物肤色进行视频拍摄,有利于进一步提高拍摄效果。After optimizing and adjusting the image of each sub-region, the subjective image quality contrast performance seen by the human eye can be improved, and video shooting based on the optimized shooting image and the adjusted skin color of the person is conducive to further improving the shooting effect.

需要对人物肤色进行调整的情况下,需要确定目标肤色,以目标肤色为标准,对人物肤色进行调整,使得人物肤色趋近于目标肤色。目标肤色是用户普遍在视觉上觉得舒适和具有美感的肤色,因此,以目标肤色作为调整目标,使得拍摄视频中的人物肤色能够被预期的调整。通过目标肤色对人物肤色进行调整,能够提高对人物肤色的调整效果,可以满足用户对视频中对肤色的预期,用户可以拍摄得到满意的人像效果。When the skin color of a person needs to be adjusted, the target skin color needs to be determined, and the target skin color is used as a standard to adjust the person's skin color so that the person's skin color approaches the target skin color. The target skin color is the skin color that users generally feel visually comfortable and aesthetically pleasing. Therefore, the target skin color is used as the adjustment target, so that the skin color of the person in the video can be adjusted as expected. Adjusting the person's skin color through the target skin color can improve the adjustment effect of the person's skin color, which can meet the user's expectation of the skin color in the video, and the user can shoot a satisfactory portrait effect.

通过目标肤色对人物肤色进行调整,能够提高对人物肤色的调整效果,可以满足用户对视频中对肤色的预期,用户可以拍摄得到满意的人像效果,因此,通过调整后的拍摄图像和人物肤色进行视频拍摄,避免拍摄视频过程中产生不自然的颜色,能够满足用户对视频拍摄效果的预期。Adjusting the person's skin color through the target skin color can improve the adjustment effect of the person's skin color, which can meet the user's expectations for the skin color in the video, and the user can get a satisfactory portrait effect. Therefore, the adjusted image and the person's skin color Video shooting, avoiding unnatural colors in the process of shooting video, can meet users' expectations for video shooting effects.

在一种可能的实施例中,获取拍摄界面内的人物肤色之后,确定模块用于:根据人物肤色,确定人物肤色的肤色类别;根据肤色类别,确定目标肤色,其中,不同肤色类别中的目标肤色不同。In a possible embodiment, after the person's skin color in the shooting interface is acquired, the determination module is used to: determine the skin color category of the person's skin color according to the person's skin color; determine the target skin color according to the skin color category, wherein the target skin color in different skin color categories Skin color is different.

在一种可能的实施例中,获取拍摄界面内的人物肤色之后,确定模块用于:根据人物肤色,确定人物肤色的肤色类别;获取模块还用于:获取拍摄装置的拍摄模式;确定模块还用于:根据肤色类别和拍摄模式,确定目标肤色,其中,不同肤色类别中的目标肤色不同,不同拍摄模式下的目标肤色不同。In a possible embodiment, after obtaining the person's skin color in the shooting interface, the determining module is used to: determine the skin color category of the person's skin color according to the person's skin color; the obtaining module is also used to: obtain the shooting mode of the shooting device; Used for: determining the target skin color according to the skin color category and shooting mode, wherein the target skin color is different in different skin color categories, and the target skin color is different in different shooting modes.

在一种可能的实施例中,获取拍摄界面内的人物肤色之后,确定模块用于:接收肤色选取输入;根据肤色选取输入,确定目标肤色;基于接收到关闭肤色选取的输入,根据人物肤色和/或拍摄装置的拍摄模式确定目标肤色。In a possible embodiment, after the person's skin color in the shooting interface is acquired, the determining module is configured to: receive the skin color selection input; determine the target skin color according to the skin color selection input; /or the shooting mode of the shooting device determines the target skin color.

在一种可能的实施例中,对人物肤色进行调整之后,获取模块还用于:获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域;获取子区域的色相;根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;根据子区域的危险系数,对子区域进行图像优化,得到优化后的拍摄图像;拍摄模块还用于:根据调整后的人物肤色和优化后的拍摄图像,拍摄目标视频。In a possible embodiment, after the person's skin color is adjusted, the acquiring module is further configured to: acquire the photographed image in the photographing interface, the photographed image includes multiple sub-regions; obtain the hue of the sub-regions; determine the The risk coefficient of the sub-region, the risk coefficient is used to represent the color difference between the sub-region and the background; according to the risk coefficient of the sub-region, the image optimization of the sub-region is performed to obtain the optimized captured image; the shooting module is also used to: After adjusting the skin color of the person and the optimized shooting image, shoot the target video.

在一种可能的实施例中,获取模块还用于:根据子区域的危险系数,确定子区域的调整权重;根据调整权重,调整子区域的饱和度和/或子区域的背景亮度。In a possible embodiment, the obtaining module is further configured to: determine the adjustment weight of the sub-region according to the risk coefficient of the sub-region; and adjust the saturation of the sub-region and/or the background brightness of the sub-region according to the adjustment weight.

在一种可能的实施例中,获取模块还用于:基于六基色对应的危险系数,对子区域的色相进行插值计算,得到目标参数;根据目标参数和子区域的饱和度,确定子区域的危险系数。In a possible embodiment, the acquisition module is also used to: perform interpolation calculation on the hue of the sub-region based on the risk coefficient corresponding to the six primary colors to obtain the target parameter; determine the risk of the sub-region according to the target parameter and the saturation of the sub-region coefficient.

本申请实施例中的拍摄装置可以是电子设备,也可以是电子设备中的部件,例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtualreality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personalcomputer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personalcomputer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The photographing device in the embodiment of the present application may be an electronic device, or may be a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or other devices other than the terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) devices, robots, wearable devices, ultra-mobile personalcomputers (ultra-mobile personalcomputers, UMPCs), netbooks or personal digital assistants (personal digital assistants, PDAs), etc., can also serve as servers, network attached storage (Network Attached Storage, NAS) , a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which are not specifically limited in this embodiment of the present application.

本申请实施例中的拍摄装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The photographing device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.

本申请实施例提供的拍摄装置能够实现图1中方法实施例实现的各个过程,为避免重复,这里不再赘述。The photographing device provided in the embodiment of the present application can implement various processes implemented in the method embodiment in FIG. 1 , and details are not repeated here to avoid repetition.

可选地,如图6所示,本申请实施例还提供一种拍摄装置300,包括处理器310和存储器320,存储器320上存储有可在处理器310上运行的程序或指令,该程序或指令被处理器310执行时实现上述拍摄方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 6 , the embodiment of the present application also provides a photographingdevice 300, including aprocessor 310 and amemory 320. Thememory 320 stores programs or instructions that can run on theprocessor 310. The program or When the instructions are executed by theprocessor 310, each step of the above-mentioned photographing method embodiment can be realized, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

需要说明的是,本申请实施例中的拍摄装置包括上述的移动电子设备和非移动电子设备。It should be noted that the photographing device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.

图7实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 7 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、以及处理器410等部件。Theelectronic device 400 includes but is not limited to: aradio frequency unit 401, anetwork module 402, anaudio output unit 403, aninput unit 404, asensor 405, adisplay unit 406, auser input unit 407, aninterface unit 408, amemory 409, and aprocessor 410, etc. part.

本领域技术人员可以理解,电子设备400还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图7中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that theelectronic device 400 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to theprocessor 410 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions. The structure of the electronic device shown in FIG. 7 does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine some components, or arrange different components, and details will not be repeated here. .

其中,处理器410,用于获取拍摄界面内的拍摄图像,拍摄图像包括多个子区域;获取子区域的色相;根据子区域的色相,确定子区域的危险系数,危险系数用于表示子区域与背景之间的色彩差异度;根据子区域的危险系数,对子区域进行图像处理,得到处理后的拍摄图像;获取拍摄界面内的人物肤色;基于目标肤色,对人物肤色进行调整;根据调整后的人物肤色和处理后的拍摄图像,拍摄目标视频。Wherein, theprocessor 410 is used to obtain the captured image in the shooting interface, the captured image includes a plurality of sub-regions; obtain the hue of the sub-region; determine the risk coefficient of the sub-region according to the hue of the sub-region, and the risk coefficient is used to indicate the difference between the sub-region and the sub-region. The degree of color difference between the backgrounds; according to the risk coefficient of the sub-region, image processing is performed on the sub-region to obtain the processed image; the skin color of the person in the shooting interface is obtained; based on the target skin color, the skin color of the person is adjusted; according to the adjusted The skin color of the person and the processed captured image are used to shoot the target video.

通过目标肤色对人物肤色进行调整,能够提高对人物肤色的调整效果,可以满足用户对视频中对肤色的预期,用户可以拍摄得到满意的人像效果,因此,通过调整后的拍摄图像和人物肤色进行视频拍摄,避免拍摄视频过程中产生不自然的颜色,能够满足用户对视频拍摄效果的预期。Adjusting the person's skin color through the target skin color can improve the adjustment effect of the person's skin color, which can meet the user's expectations for the skin color in the video, and the user can get a satisfactory portrait effect. Therefore, the adjusted image and the person's skin color Video shooting, avoiding unnatural colors in the process of shooting video, can meet users' expectations for video shooting effects.

可选地,处理器410,还用于在获取拍摄界面内的人物肤色之后,根据人物肤色,确定人物肤色的肤色类别;获取拍摄装置的拍摄模式;根据肤色类别和拍摄模式,确定目标肤色,其中,不同肤色类别中的目标肤色不同,不同拍摄模式下的目标肤色不同。Optionally, theprocessor 410 is also configured to determine the skin color category of the person's skin color according to the skin color of the person after acquiring the skin color of the person in the shooting interface; acquire the shooting mode of the shooting device; determine the target skin color according to the skin color category and shooting mode, Wherein, target skin colors are different in different skin color categories, and target skin colors are different in different shooting modes.

可选地,处理器410,还用于接收肤色选取输入;根据肤色选取输入,确定目标肤色;基于接收到关闭肤色选取的输入,根据人物肤色和/或拍摄模式确定目标肤色。Optionally, theprocessor 410 is also configured to receive a skin color selection input; determine the target skin color according to the skin color selection input; and determine the target skin color according to the person's skin color and/or shooting mode based on receiving the input of disabling the skin color selection.

可选地,处理器410,还用于根据子区域的危险系数,确定子区域的调整权重;根据调整权重,调整子区域的饱和度和/或子区域的背景亮度。Optionally, theprocessor 410 is further configured to determine the adjustment weight of the sub-region according to the risk coefficient of the sub-region; and adjust the saturation of the sub-region and/or the background brightness of the sub-region according to the adjustment weight.

可选地,处理器410,还用于基于六基色对应的危险系数,对子区域的色相进行插值计算,得到目标参数;根据目标参数和子区域的饱和度,确定子区域的危险系数。基于人眼固有的HK效应原理,对六基色进行分析,得到各色彩的可能发生局部主观性对比度变差的危险因子,本发明中称之为暗淡度因子,将其作为一种提前预设的参数(危险系数),直接应用于色彩调整模块,间接应用于夜景录像中的对比度调试模块,用于动态的调整不同色度的颜色及其周边背景表现,从而通过动态的提升色彩亮度和色彩与背景色之间的色彩对比度,达到改善人眼看到的主观画质对比度表现。Optionally, theprocessor 410 is further configured to interpolate the hue of the sub-region based on the risk coefficients corresponding to the six primary colors to obtain target parameters; and determine the risk coefficient of the sub-region according to the target parameters and the saturation of the sub-region. Based on the inherent HK effect principle of the human eye, the six primary colors are analyzed to obtain the risk factor of local subjective contrast deterioration of each color, which is called the dimness factor in the present invention, and it is used as a preset in advance The parameter (danger factor) is directly applied to the color adjustment module, and indirectly applied to the contrast adjustment module in the night scene video, which is used to dynamically adjust the color of different chromaticity and the performance of the surrounding background, so as to dynamically improve the color brightness and color and The color contrast between the background colors can improve the subjective image quality contrast performance seen by the human eye.

通过对提前计算好的肤色目标值数据库,精简提炼为几个软件控制参数,并通过DSW(Developer Studio Workspace)模块来对当前夜景录像模式下的肤色进行动态调整,达到不开美颜效果,不开人像效果,仅在夜景模式默认效果下就可以使消费者拍到较为满意的人像效果。By simplifying and refining the skin color target value database calculated in advance into several software control parameters, and using the DSW (Developer Studio Workspace) module to dynamically adjust the skin color in the current night scene video mode, to achieve the effect of no beauty, no Turn on the portrait effect, only under the default effect of the night scene mode, consumers can take a more satisfactory portrait effect.

应理解的是,本申请实施例中,输入单元404可以包括图形处理器(GraphicsProcessing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元406可包括显示面板4061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板4061。用户输入单元407包括触控面板4071以及其他输入设备4072中的至少一种。触控面板4071,也称为触摸屏。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that, in the embodiment of the present application, theinput unit 404 may include a graphics processing unit (Graphics Processing Unit, GPU) 4041 and amicrophone 4042, and thegraphics processing unit 4041 is compatible with the image capturing device (such as Camera) to process the image data of still pictures or videos. Thedisplay unit 406 may include adisplay panel 4061, and thedisplay panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. Theuser input unit 407 includes at least one of atouch panel 4071 andother input devices 4072 . Thetouch panel 4071 is also called a touch screen. Thetouch panel 4071 may include two parts, a touch detection device and a touch controller.Other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

存储器409可用于存储软件程序以及各种数据。存储器409可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器409可以包括易失性存储器或非易失性存储器,或者,存储器409可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器409包括但不限于这些和任意其它适合类型的存储器。Thememory 409 can be used to store software programs as well as various data. Thememory 409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required by at least one function (such as a sound playing function, image playback function, etc.), etc. Furthermore,memory 409 may include volatile memory or nonvolatile memory, or,memory 409 may include both volatile and nonvolatile memory. Among them, the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. Volatile memory can be random access memory (Random Access Memory, RAM), static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random access memory (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data Rate SDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (Synch link DRAM , SLDRAM) and Direct Memory Bus Random Access Memory (Direct Rambus RAM, DRRAM). Thememory 409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

处理器410可包括一个或多个处理单元;可选的,处理器410集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。Theprocessor 410 may include one or more processing units; optionally, theprocessor 410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., Modem processors mainly process wireless communication signals, such as baseband processors. It can be understood that the foregoing modem processor may not be integrated into theprocessor 410 .

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, the readable storage medium stores a program or an instruction, and when the program or instruction is executed by a processor, each process of the above-mentioned photographing method embodiment is realized, and can achieve the same Technical effects, in order to avoid repetition, will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk, and the like.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to realize the various aspects of the above shooting method embodiments process, and can achieve the same technical effect, in order to avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.

本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述拍摄方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application provides a computer program product, the program product is stored in a storage medium, and the program product is executed by at least one processor to implement the various processes in the above-mentioned shooting method embodiment, and can achieve the same technical effect, To avoid repetition, details are not repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的灰度图可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, grayscale images described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of computer software products, which are stored in a storage medium (such as ROM/RAM, magnetic disk, etc.) , optical disc), including several instructions to enable a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this application.

Claims (10)

CN202211214000.2A2022-09-302022-09-30 Shooting method and deviceActiveCN115589526B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211214000.2ACN115589526B (en)2022-09-302022-09-30 Shooting method and device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211214000.2ACN115589526B (en)2022-09-302022-09-30 Shooting method and device

Publications (2)

Publication NumberPublication Date
CN115589526Atrue CN115589526A (en)2023-01-10
CN115589526B CN115589526B (en)2025-09-26

Family

ID=84777968

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211214000.2AActiveCN115589526B (en)2022-09-302022-09-30 Shooting method and device

Country Status (1)

CountryLink
CN (1)CN115589526B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100188521A1 (en)*2009-01-282010-07-29Nikon CorporationElectronic camera and medium storing image processing program
CN107592517A (en)*2017-09-212018-01-16青岛海信电器股份有限公司A kind of method and device of colour of skin processing
CN110099222A (en)*2019-05-172019-08-06睿魔智能科技(深圳)有限公司A kind of exposure adjustment method of capture apparatus, device, storage medium and equipment
CN111062891A (en)*2019-12-162020-04-24Oppo广东移动通信有限公司Image processing method, device, terminal and computer readable storage medium
CN111127367A (en)*2019-12-262020-05-08上海传英信息技术有限公司 Method, device and system for face image processing
CN112887582A (en)*2019-11-292021-06-01深圳市海思半导体有限公司Image color processing method and device and related equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100188521A1 (en)*2009-01-282010-07-29Nikon CorporationElectronic camera and medium storing image processing program
CN107592517A (en)*2017-09-212018-01-16青岛海信电器股份有限公司A kind of method and device of colour of skin processing
CN110099222A (en)*2019-05-172019-08-06睿魔智能科技(深圳)有限公司A kind of exposure adjustment method of capture apparatus, device, storage medium and equipment
CN112887582A (en)*2019-11-292021-06-01深圳市海思半导体有限公司Image color processing method and device and related equipment
CN111062891A (en)*2019-12-162020-04-24Oppo广东移动通信有限公司Image processing method, device, terminal and computer readable storage medium
CN111127367A (en)*2019-12-262020-05-08上海传英信息技术有限公司 Method, device and system for face image processing

Also Published As

Publication numberPublication date
CN115589526B (en)2025-09-26

Similar Documents

PublicationPublication DateTitle
US11503205B2 (en)Photographing method and device, and related electronic apparatus
CN106303250A (en)A kind of image processing method and mobile terminal
JP6685188B2 (en) Imaging device, image processing device, control method thereof, and program
US8525899B2 (en)Image-capturing device, user interface and method for selective color balance adjustment
CN115242992B (en) Video processing method, device, electronic device and storage medium
CN105874786B (en)Image processing apparatus, image processing method and computer readable recording medium storing program for performing
CN108111772A (en)A kind of image pickup method and terminal
CN105744174A (en) A Selfie method, device and mobile terminal
EP4266674A1 (en)Video processing method and apparatus, electronic device, and storage medium
CN111901519B (en)Screen light supplement method and device and electronic equipment
CN114449199B (en) Video processing method, device, electronic device and storage medium
CN113132696B (en) Image tone mapping method, device, electronic device and storage medium
CN116668838B (en) Image processing methods and electronic equipment
US8687091B2 (en)Image capturing systems and methods utilizing customizable look management
US8654210B2 (en)Adaptive color imaging
US8502882B2 (en)Image pick-up apparatus, white balance setting method and recording medium
CN112541955A (en)Image processing method, device and equipment
CN115589526A (en) Shooting method and device
CN114638951B (en)House model display method and device, electronic equipment and readable storage medium
CN108335659A (en)Method for displaying image and equipment
CN113615148B (en) Camera color image processing
WO2022262848A1 (en)Image processing method and apparatus, and electronic device
WO2023016042A1 (en)Video processing method and apparatus, electronic device, and storage medium
JP6703787B2 (en) Imaging device, control method thereof, program, and storage medium
CN116095510B (en) Shooting method and device

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp