Shooting method and device

By dividing the shooting interface into multiple sub-areas in night scene shooting mode, determining the risk factor based on hue and performing image processing, combined with target skin color adjustment, the problem of unnatural colors in night scene shooting is solved and better video shooting effects are achieved.

CN115589526BActive Publication Date: 2025-09-26VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211214000.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-09-26
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

In night scene shooting mode, automatic image adjustment results in unnatural colors, which makes it difficult to meet users' expectations for video shooting effects.

Method used

By dividing the shooting interface into multiple sub-areas, determining the risk factor according to the hue of the sub-area, performing image processing on the sub-area, adjusting the character's skin color based on the target skin color, and optimizing the adjustment range to improve image contrast and skin color effects.

Benefits of technology

The subjective image quality contrast performance is improved to meet users' expectations of skin color in videos, avoid unnatural colors, and improve shooting effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589526B_ABST
    Figure CN115589526B_ABST
Patent Text Reader

Abstract

The present application discloses a shooting method and apparatus, belonging to the field of shooting equipment. The shooting method includes: obtaining a captured image within a shooting interface, the captured image including multiple sub-areas; obtaining the hue of the sub-areas; determining a risk factor for the sub-areas based on the hue of the sub-areas, the risk factor being used to represent the color difference between the sub-areas and the background; performing image processing on the sub-areas based on the risk factor to obtain a processed captured image; obtaining the skin color of a person within the shooting interface; adjusting the skin color of the person based on the target skin color; and capturing a target video based on the adjusted skin color of the person and the processed captured image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of photographing equipment, and specifically relates to a photographing method and a photographing device. Background Art

[0002] Currently, users record their lives by shooting videos, so their requirements for the shooting quality of electronic devices are gradually increasing.

[0003] In night scene shooting mode, during the automatic adjustment of the image, part of the image will be adjusted unexpectedly, resulting in unnatural colors in the image, making it difficult to meet the user's expectations for the video shooting effect. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a shooting method and device that can solve the problem that it is difficult for users to shoot videos with expected shooting effects in night scenes.

[0005] In a first aspect, an embodiment of the present application provides a photographing method, used in a photographing device, the photographing method comprising:

[0006] Acquire a captured image within the capture interface, where the captured image includes multiple sub-areas;

[0007] Get the hue of the sub-region;

[0008] Determine the danger factor of the sub-region according to the hue of the sub-region, where the danger factor is used to represent the color difference between the sub-region and the background;

[0009] Performing image processing on the sub-region according to the risk factor of the sub-region to obtain a processed captured image;

[0010] Get the skin color of the person in the shooting interface;

[0011] Adjust the character's skin color based on the target skin color;

[0012] Shoot a target video based on the adjusted skin color of the person and the processed captured image.

[0013] In a second aspect, an embodiment of the present application provides a photographing device, including:

[0014] An acquisition module is configured to acquire a captured image in a capture interface, wherein the captured image includes a plurality of sub-regions and acquire the hue of the sub-regions;

[0015] A determination module determines a risk factor of the sub-region according to the hue of the sub-region, where the risk factor is used to represent the color difference between the sub-region and the background;

[0016] A processing module performs image processing on the sub-region according to the risk factor of the sub-region to obtain a processed captured image;

[0017] The acquisition module is also used to: obtain the skin color of the person in the shooting interface;

[0018] Adjustment module, which adjusts the character's skin color based on the target skin color;

[0019] The shooting module shoots the target video according to the adjusted character skin color and the processed shooting image.

[0020] In a third aspect, an embodiment of the present application provides a shooting device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the shooting method in the first aspect are implemented.

[0021] In a fourth aspect, an 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 of the first aspect are implemented.

[0022] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.

[0023] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.

[0024] In an embodiment of the present application, to improve the accuracy of distinguishing dangerous colors, the captured image within the shooting interface is divided into multiple sub-regions, and the danger factor of each sub-region is determined by its hue. The image of each sub-region is optimized and adjusted based on the danger factor. The higher the danger factor, the greater the required adjustment. After optimizing and adjusting the image of each sub-region, the subjective image quality contrast performance as seen by the human eye can be improved. Video shooting based on the optimized captured image and the adjusted skin color of the person is beneficial to improving the shooting effect.

[0025] When adjusting a person's skin tone, you need to determine a target skin tone. Using the target skin tone as a standard, adjust the person's skin tone to approximate the target skin tone. The target skin tone is a skin tone that users generally find visually comfortable and aesthetically pleasing. Therefore, using the target skin tone as an adjustment target ensures that the person's skin tone in the captured video is adjusted as desired.

[0026] Adjusting the skin color of a person through the target skin color can improve the adjustment effect of the skin color of the person, which can meet the user's expectations of the skin color in the video, and the user can obtain a satisfactory portrait effect. Therefore, by shooting a video with the adjusted captured image and the person's skin color, unnatural colors can be avoided during the video shooting process, which can meet the user's expectations for the video shooting effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 is a flowchart of the shooting method in an embodiment of the present application;

[0028] Figure 2 2 is a schematic diagram of a process for determining the danger level of a danger color in an embodiment of the present application;

[0029] Figure 3 2 is a schematic diagram of a process for adjusting a character's skin color in an embodiment of the present application;

[0030] Figure 4 is a schematic diagram of a process for processing a captured image in an embodiment of the present application;

[0031] Figure 5 This is one of the schematic block diagrams of the photographing device in the embodiment of the present application;

[0032] Figure 6 This is the second schematic block diagram of the photographing device in the embodiment of the present application;

[0033] Figure 7 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0035] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0036] The following describes in detail the shooting method and device provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0037] like Figure 1 As shown, in some embodiments of the present application, a shooting method is provided for a shooting device, and the shooting method includes:

[0038] Step 102: Acquire a captured image within the capture interface, where the captured image includes multiple sub-areas.

[0039] Step 104, obtaining the hue of the sub-region;

[0040] Step 106, determining a risk factor of the sub-region based on the hue of the sub-region, where the risk factor is used to represent the color difference between the sub-region and the background;

[0041] Step 108: performing image processing on the sub-region according to the risk factor of the sub-region to obtain a processed captured image;

[0042] Step 110, obtaining the skin color of the person in the shooting interface;

[0043] Step 112, adjusting the character's skin color based on the target skin color;

[0044] Step 114 , shooting a target video based on the adjusted skin color of the person and the processed shot image.

[0045] When shooting a video, it is necessary to determine whether there are dangerous colors in the image within the shooting interface. The colors of the disaster areas that are prone to dim colors are called dangerous colors. The danger coefficient is used to indicate the degree of danger of the dangerous colors. The higher the danger coefficient, the darker the color.

[0046] To improve the accuracy of hazard color discrimination, the captured image within the shooting interface is divided into multiple sub-areas. The hue of each sub-area is used to determine the hazard factor of each sub-area. The image of each sub-area is optimized and adjusted based on the hazard factor. The higher the hazard factor, the greater the required adjustment. This optimization and adjustment of the image in each sub-area improves the subjective contrast of the image quality as seen by the human eye. Video recording based on these optimized images and adjusted skin tones can further enhance the quality of the video.

[0047] For example, when a highly saturated yellow is surrounded by white, it is perceived as dark. The human eye interprets this portion of the image as having very low vividness, creating the illusion of overall dimness and low color contrast. This occurs even though the numerical values ​​of the yellow RG channels in this area may have reached their maximum values. In this case, yellow can be considered a dangerous color, requiring optimization and adjustment of the dangerous area.

[0048] During the video shooting process, if there is a person image in the shooting interface, the skin color of the person in the person image is obtained. The shooting device can optimize and adjust the obtained person skin color separately, which is conducive to improving the adjustment effect of the person skin color.

[0049] When adjusting a person's skin tone, you need to determine a target skin tone. Using the target skin tone as a standard, adjust the person's skin tone to approximate the target skin tone. The target skin tone is a skin tone that users generally find visually comfortable and aesthetically pleasing. Therefore, using the target skin tone as an adjustment target ensures that the person's skin tone in the captured video is adjusted as desired.

[0050] When determining a target skin color, the target skin color can be determined based on the skin color of the person. When the skin color of the person is obtained, the target skin color that matches 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 significantly from the user's original skin color, which is conducive to improving the adjustment effect of the skin color of the person.

[0051] When determining the target skin color, the target skin color can also be determined based on the shooting mode of the shooting device. Under different shooting modes, the overall color tone in 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 character's skin color being 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 character's skin color.

[0052] In a possible application, the shooting mode can be actively switched by the user, or the shooting device can automatically switch the shooting mode based on the captured images, so that the shooting mode is adapted to the current shooting environment.

[0053] When determining the target skin color, the target skin color can also be determined based on the skin color selection input. The user can select the target skin color according to his or her own needs. The user can subjectively select the target skin color that suits him or her and has a better shooting effect, thereby meeting the user's shooting needs and helping to improve the adjustment effect of the character's skin color.

[0054] Adjusting the skin color of a person through the target skin color can improve the adjustment effect of the skin color of the person, which can meet the user's expectations of the skin color in the video, and the user can obtain a satisfactory portrait effect. Therefore, by shooting a video with the adjusted captured image and the person's skin color, unnatural colors can be avoided during the video shooting process, which can meet the user's expectations for the video shooting effect.

[0055] In a possible embodiment, after obtaining the skin color of the person in the shooting interface, the method further includes: determining the skin color category of the person according to the skin color of the person; and determining the target skin color according to the skin color category, wherein the target skin colors in different skin color categories are different.

[0056] When capturing a person's skin color within the capture interface, you need to determine their skin color category. Different skin color categories can vary significantly, so different target skin colors are set for each skin color category. By determining the target skin color based on the skin color category, you ensure that the person's skin color doesn't differ significantly from the target skin color, thus avoiding over-adjustment and ensuring the correct adjustment effect.

[0057] For example, when the skin color of a 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 black, resulting in the problem of over-adjustment.

[0058] In one possible application, when determining a target skin color from different skin color categories, the skin color data source can be a shared online skin color database or a self-collected skin color dataset from different countries or regions. The collected skin color dataset is then divided into three groups: dark skin color, medium skin color, and light skin color. The skin color categories are distinguished by skin color brightness. Although the skin color data of each group varies significantly, they generally fall within a predetermined range. The mean skin color data of each skin color category is calculated, and the skin color range of each person is calculated. This calculation results in the adjusted target skin color.

[0059] 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 based on the person's skin color; obtaining the shooting mode of the shooting device; and determining the target skin color based on the skin color category and the shooting mode, wherein the target skin colors in different skin color categories are different, and the target skin colors in different shooting modes are different.

[0060] When capturing the skin color of a person in the capture interface, it's necessary to determine the skin color category of the person. Different skin color categories vary significantly, so the person's skin color needs to be matched to the corresponding skin color category. After determining the skin color category, it's necessary to obtain the current capture mode of the camera. Different capture modes correspond to different target skin colors, so the target skin color needs to be determined based on the person's skin color and the capture mode.

[0061] For example, a camera has two modes: polar night mode and normal mode. The background color of the video captured in different shooting modes is different. If the same target skin color is used in different shooting modes, the adjusted skin color of the person may not match the background color of the video, resulting in poor video quality. In this embodiment, different target skin colors can be set for different shooting modes. Therefore, within the same skin color category, the number of target skin colors can be the same as the number of shooting modes.

[0062] In one possible application, after obtaining target skin colors of different skin color categories, the adjustment of the target skin colors within the same category can be done by adding an offset parameter to the chroma and a gain parameter to the saturation and brightness to increase the debugging flexibility, and based on the debugging experience, obtain color data that can make the visual feeling comfortable for each skin color of the human race.

[0063] In a possible embodiment, after obtaining the skin color of the person in the shooting interface, it also includes: receiving skin color selection input; determining the target skin color based on the skin color selection input; and determining the target skin color based on the person's skin color and / or the shooting mode of the shooting device based on receiving the input to turn off the skin color selection.

[0064] In shooting mode, users can manually switch the target skin color. Users can view the video shooting effects after selecting different target skin colors, so that they can choose the target skin color that suits them and has a higher shooting effect, which is conducive to meeting the user's satisfaction and shooting needs in video shooting.

[0065] The "Skin Color Selection" option can be set within the shooting interface. By clicking on "Skin Color Selection," the user activates the manual selection of the target skin color. At this point, the camera will not automatically select the target skin color based on the subject's skin color and shooting mode. The "Skin Color Selection" drop-down menu will offer different target skin color options, allowing the user to select the target skin color independently. Clicking on the "Skin Color Selection" option again disables the manual selection of the target skin color, and the camera will automatically select the target skin color based on the subject's skin color and / or shooting mode.

[0066] In one possible application, different target skin tones can be fed into the DSW module for dynamic selection and configuration, automatically selecting the owner's applicable skin tone range and preferred color based on the system setting information transmitted by the camera device.

[0067] 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 shooting device, and the skin color selection input. For example, when the user actively selects the target skin color, the person's skin color or the shooting mode can also be used to assist the user in selecting the target skin color.

[0068] like Figure 3As shown, HSV (Hue, Saturation, Value) refers to hue, saturation, and value. Among them, hue (H) represents the basic attributes of color, that is, the name of the color, such as red, green, etc. Saturation (H) refers to the purity of the color. The higher the saturation, the purer the color, and the lower the saturation, the grayer the color. Value (V) refers to the brightness of a set of primary colors. The acquired image data YUV is converted to HSV, and all points in the image data are presented in the three-dimensional space of HSV. Then, the boundary values ​​of the high-density areas are taken. It is necessary to delete some interfering data at the boundaries to obtain the maximum and minimum values ​​in the three dimensions of HSV, thereby obtaining a skin color cube. The current skin color data to be improved is input, and it is determined which of the three groups of skin color cubes, dark, medium, and light, the current skin color data to be improved falls into. If it does not fall into any of the three groups, no processing is performed.

[0069] When obtaining the HSV three-dimensional coordinates, it is also necessary to calculate the H / S / V average value and use it as the initial value of the target skin color. Then, three sets of skin color target value data for dark, medium, and light are obtained. If the current data to be improved falls into a cube, the distance between the current skin color and the skin color target value in the cube is calculated, and dynamically approached. The dynamic parameters are adjustable. After adjustment, the adjusted attached figure is output.

[0070] In a possible embodiment, image processing is performed on the sub-region according to the danger coefficient of the sub-region, including: determining an adjustment weight of the sub-region according to the danger coefficient of the sub-region; and adjusting the saturation of the sub-region and / or the background brightness of the sub-region according to the adjustment weight.

[0071] When the risk factor of each sub-region is determined, the adjustment weight of each sub-region is determined according to the risk factor. The larger the risk factor of the sub-region, the larger the adjustment weight, so that the captured images can be uniformly adjusted.

[0072] The greater the risk factor of the sub-region, the greater the color difference between the sub-region and the background. Therefore, the image processing of the sub-region may be performed by increasing the saturation of the sub-region and / or reducing the brightness of its surroundings.

[0073] The HK effect (Helmholtz–Kohlrausch) is a perceptual phenomenon that emphasizes the subjective perception of the human eye as a function of the intensity of saturation within a spectral hue as a percentage of the color's brightness. The risk factor for the HK effect can be calculated based on the maximum brightness of the camera.

[0074] In a possible embodiment, the risk coefficient of the sub-region is determined according to the hue of the sub-region, including: performing interpolation calculation on the hue of the sub-region based on the risk coefficients corresponding to the six primary colors to obtain target parameters; and determining the risk coefficient of the sub-region according to the target parameters and the saturation of the sub-region.

[0075] The risk factor based on the HK effect can be calculated based on the maximum brightness of the camera. Blue, purple, red, green, cyan, and yellow are the six primary colors. The risk factors of the six primary colors are calculated as follows:

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

[0077] Dangerous_ratio = 1 / HK factor. The HK factor is inversely proportional to the dangerous ratio in terms of trend.

[0078] According to the above data, the HK effect of blue, purple, red and other colors is higher, while the HK effect of green, cyan and yellow is lower.

[0079] The degree of danger of a color is directly proportional to its saturation. For example, the higher the saturation of yellow, the more dangerous it is judged to be. When calculating the danger coefficient, the danger level of dangerous colors must be normalized to be between [0, 1]. After obtaining the hue of a subregion, interpolation is performed to determine the danger coefficient of that subregion. For example, if the hue of a subregion falls between green and yellow, the interpolated danger coefficient will be between 1 / 1.21782 and 1 / 1.037253. The more dangerous the data indicates, the more likely it is that the subregion needs to have more vivid colors to maintain the local color contrast perceived by the human eye. This means increasing its saturation or reducing the surrounding brightness. Based on this logic, data per subregion can be passed to the color adjustment module to control the adjustment trend and effective weighting of data such as saturation, hue, and brightness.

[0080] like Figure 2 As shown, the acquired image data YUV is converted into HSV, and then the distance between the chromaticity and the dangerous color is calculated based on the average chromaticity value and the average saturation. The difference between the distance unit and the above distance is calculated, and the product of the difference and the saturation reflects the degree of the dangerous color.

[0081] Based on the inherent HK effect principle of the human eye, the six primary colors are analyzed to obtain the risk factor for the possible local subjective contrast degradation of each color. This risk factor is called the dimness factor in the present invention. It is used as a pre-set parameter (risk coefficient) and directly applied to the color adjustment module. It is indirectly applied to the contrast adjustment module in night scene recording to dynamically adjust the color of different chromaticities and their surrounding background performance. By dynamically improving the color brightness and the color contrast between the color and the background color, the subjective image quality contrast performance seen by the human eye is improved.

[0082] By simplifying the pre-calculated skin color target value database into several software control parameters and dynamically adjusting the skin color in the current night scene recording mode through the DSW (Developer Studio Workspace) module, consumers can achieve relatively satisfactory portrait effects in the default night scene mode without turning on the beauty effect or portrait effect.

[0083] like Figure 4 As shown in the figure, the overall adjustment process for the captured video is as follows: First, the skin color database is divided into three groups: dark, medium, and light. The skin color target values ​​are adjusted to further optimize the visual experience and then passed to the DSW module for dynamic selection and configuration. Second, the dimming factors of the six primary colors are calculated. The collected data is input into the dangerous color detection module, and the color danger coefficient is then passed to the color adjustment module. After the captured image is adjusted by the brightness adjustment module, the contrast adjustment module, and the noise adjustment module, the skin color pre-improvement module adjusts the character's skin color, and the color adjustment module adjusts the captured image color. Finally, the night scene output image is output.

[0084] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method performed by the shooting device is taken as an example to illustrate the shooting device provided in the embodiment of the present application.

[0085] like Figure 5 As shown, in some embodiments of the present application, a photographing device 200 is provided, including:

[0086] An acquisition module 210 is configured to acquire a captured image in a capture interface, the captured image including a plurality of sub-regions and to acquire the hue of the sub-regions;

[0087] A determination module 220 determines a risk factor of the sub-region based on the hue of the sub-region, where the risk factor is used to represent the color difference between the sub-region and the background;

[0088] The processing module 230 performs image processing on the sub-region according to the risk factor of the sub-region to obtain a processed captured image;

[0089] The acquisition module 210 is further used to acquire the skin color of the person in the shooting interface;

[0090] An adjustment module 240 adjusts the skin color of the person based on a target skin color, wherein the target skin color is determined based on at least one of the skin color of the person, a shooting mode of a shooting device, and a skin color selection input;

[0091] The shooting module 250 shoots the target video according to the adjusted skin color of the person and the processed shot image.

[0092] After optimizing and adjusting the image of each sub-area, the subjective image quality contrast performance seen by the human eye can be improved. Video shooting based on the optimized captured image and adjusted character skin color can help further improve the shooting effect.

[0093] When adjusting a person's skin tone, you need to determine a target skin tone. Using this target skin tone as a standard, adjust the subject's skin tone to approximate the target skin tone. The target skin tone is a skin tone that users generally find visually comfortable and aesthetically pleasing. Therefore, using the target skin tone as the adjustment target ensures the subject's skin tone in the video is adjusted as desired. Adjusting the subject's skin tone based on the target skin tone improves the adjustment effect, meeting user expectations for skin tone in videos and enabling users to capture satisfying portraits.

[0094] Adjusting the skin color of a person through the target skin color can improve the adjustment effect of the skin color of the person, which can meet the user's expectations of the skin color in the video, and the user can obtain a satisfactory portrait effect. Therefore, by shooting a video with the adjusted captured image and the person's skin color, unnatural colors can be avoided during the video shooting process, which can meet the user's expectations for the video shooting effect.

[0095] In a possible embodiment, after obtaining the skin color of the person in the shooting interface, the determination module is used to: determine the skin color category of the person's skin color based on the person's skin color; determine the target skin color based on the skin color category, wherein the target skin colors in different skin color categories are different.

[0096] In a possible embodiment, after obtaining the skin color of the person in the shooting interface, the determination module is used to: determine the skin color category of the person's skin color based on the person's skin color; the acquisition module is also used to: obtain the shooting mode of the shooting device; the determination module is also used to: determine the target skin color based on the skin color category and the shooting mode, wherein the target skin colors in different skin color categories are different, and the target skin colors in different shooting modes are different.

[0097] In a possible embodiment, after obtaining the skin color of the person in the shooting interface, the determination module is used to: receive skin color selection input; determine the target skin color based on the skin color selection input; and determine the target skin color based on the person's skin color and / or the shooting mode of the shooting device based on the input received to turn off skin color selection.

[0098] In a possible embodiment, after adjusting the skin color of the person, the acquisition module is also used to: acquire a captured image within the shooting interface, the captured image including multiple sub-areas; acquire the hue of the sub-area; determine the danger coefficient of the sub-area based on the hue of the sub-area, the danger coefficient is used to represent the color difference between the sub-area and the background; optimize the image of the sub-area based on the danger coefficient of the sub-area to obtain an optimized captured image; the shooting module is also used to: shoot the target video based on the adjusted skin color of the person and the optimized captured image.

[0099] In a possible embodiment, the acquisition module is further configured to: determine an adjustment weight of the sub-region according to a risk factor 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.

[0100] In a possible embodiment, the acquisition module is further used to: perform interpolation calculation on the hue of the sub-region based on the risk coefficients corresponding to the six primary colors to obtain the target parameter; and determine the risk coefficient of the sub-region according to the target parameter and the saturation of the sub-region.

[0101] The shooting device in the embodiments of the present application can be an electronic device or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present application do not specifically limit this.

[0102] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0103] The shooting device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented in the method embodiment will not be described here.

[0104] Alternatively, as Figure 6 As shown, an embodiment of the present application also provides a shooting device 300, including a processor 310 and a memory 320, and the memory 320 stores a program or instruction that can be run on the processor 310. When the program or instruction is executed by the processor 310, the various steps of the above-mentioned shooting method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0105] 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.

[0106] Figure 7 A schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

[0107] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .

[0108] Those skilled in the art will understand that the electronic device 400 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.

[0109] Among them, the processor 410 is used to obtain a captured image within the shooting interface, which includes multiple sub-areas; obtain the hue of the sub-area; determine the danger coefficient of the sub-area based on the hue of the sub-area, and the danger coefficient is used to represent the color difference between the sub-area and the background; perform image processing on the sub-area based on the danger coefficient of the sub-area to obtain a processed captured image; obtain the skin color of the person in the shooting interface; adjust the skin color of the person based on the target skin color; and shoot the target video based on the adjusted skin color of the person and the processed captured image.

[0110] Adjusting the skin color of a person through the target skin color can improve the adjustment effect of the skin color of the person, which can meet the user's expectations of the skin color in the video, and the user can obtain a satisfactory portrait effect. Therefore, by shooting a video with the adjusted captured image and the person's skin color, unnatural colors can be avoided during the video shooting process, which can meet the user's expectations for the video shooting effect.

[0111] Optionally, the processor 410 is also used to determine the skin color category of the person's skin color based on the person's skin color after obtaining the skin color of the person in the shooting interface; obtain the shooting mode of the shooting device; and determine the target skin color based on the skin color category and the shooting mode, wherein the target skin colors in different skin color categories are different, and the target skin colors in different shooting modes are different.

[0112] Optionally, the processor 410 is further configured to receive skin color selection input; determine a target skin color based on the skin color selection input; and determine a target skin color based on the person's skin color and / or shooting mode based on receiving an input for turning off skin color selection.

[0113] Optionally, the processor 410 is further configured to determine an adjustment weight of the sub-region according to the risk factor 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.

[0114] Optionally, the processor 410 is further configured to interpolate the hue of the sub-region based on the risk factors corresponding to the six primary colors to obtain a target parameter; and determine the risk factor of the sub-region based on the target parameter and the saturation of the sub-region. Based on the HK effect inherent in the human eye, the six primary colors are analyzed to obtain a risk factor for the possible local subjective contrast degradation of each color, which is referred to as a dimness factor in the present invention. This factor is used as a pre-set parameter (risk factor) and is directly applied to the color adjustment module and indirectly applied to the contrast adjustment module in night scene recording to dynamically adjust the performance of colors of different chromaticities and their surrounding backgrounds, thereby improving the subjective image quality contrast performance seen by the human eye by dynamically improving the color brightness and the color contrast between the color and the background color.

[0115] By simplifying the pre-calculated skin color target value database into several software control parameters and dynamically adjusting the skin color in the current night scene recording mode through the DSW (Developer Studio Workspace) module, consumers can achieve relatively satisfactory portrait effects in the default night scene mode without turning on the beauty effect or portrait effect.

[0116] It should be understood that in an embodiment of the present application, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and at least one of other input devices 4072. The touch panel 4071 is also called a touch screen. The touch 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, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and an operating stick, which will not be repeated here.

[0117] The memory 409 can be used to store software programs and various data. The memory 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, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 409 may include a volatile memory or a non-volatile memory, or the memory 409 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 409 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0118] Processor 410 may include one or more processing units. Optionally, processor 410 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 410.

[0119] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned shooting method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0120] The processor is the processor in the electronic device described in the above embodiment. 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.

[0121] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0122] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0123] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0124] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the 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 the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the grayscale images described with reference to certain examples may be combined in other examples.

[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0126] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A shooting method, used for a shooting device, characterized in that: The shooting method includes: Acquire a captured image within a capture interface, where the captured image includes a plurality of sub-areas; Get the hue of the sub-region; determining a risk factor of the sub-region according to the hue of the sub-region, wherein the risk factor represents a color difference between the sub-region and a background color, and a greater risk factor of the sub-region indicates a greater color difference between the sub-region and the background color; performing image processing on the sub-region according to the risk factor of the sub-region to obtain the processed captured image; Obtaining the skin color of the person in the shooting interface; Adjusting the skin color of the character based on the target skin color; The target skin color is a target skin color retrieved from a database that matches the skin color of the person, or the target skin color is determined according to a shooting mode of the shooting device, or the target skin color is determined according to a skin color selection input; Shooting a target video according to the adjusted skin color of the person and the processed captured image; Determining the risk factor of the sub-region according to the hue of the sub-region includes: Based on the hazard coefficients corresponding to the six primary colors, the hue of the sub-region is interpolated to obtain a target parameter, wherein the hazard coefficients corresponding to the six primary colors are calculated based on the maximum brightness of the camera; determining a risk factor of the sub-region according to the target parameter and the saturation of the sub-region; The performing image processing on the sub-region according to the risk coefficient of the sub-region includes: determining an adjustment weight of the sub-region according to a risk factor of the sub-region; The saturation of the sub-region and / or the background color brightness of the sub-region are adjusted according to the adjustment weight.

2. The shooting method according to claim 1, wherein: After obtaining the skin color of the person in the shooting interface, the method further includes: Determining a skin color category of the person's skin color according to the person's skin color; Acquire a shooting mode of the shooting device; A target skin color is determined according to the skin color category and the shooting mode, wherein the target skin colors in different skin color categories are different, and the target skin colors in different shooting modes are different.

3. The shooting method according to claim 1, wherein: After obtaining the skin color of the person in the shooting interface, the method further includes: Receive skin color selection input; Determining the target skin color according to the skin color selection input; Upon receiving an input for disabling the skin color selection, a target skin color is determined according to the person's skin color and / or a shooting mode of the shooting device.

4. A photographing device, characterized in that: include: An acquisition module, which acquires a captured image in a capture interface, wherein the captured image includes a plurality of sub-areas and acquires the hue of the sub-areas; a determination module, determining a risk factor of the sub-region according to the hue of the sub-region, wherein the risk factor is used to represent a color difference between the sub-region and a background color, and a larger risk factor of the sub-region indicates a larger color difference between the sub-region and the background color; a processing module, performing image processing on the sub-region according to the risk factor of the sub-region to obtain the processed captured image; The acquisition module is further used to: acquire the skin color of the person in the shooting interface; An adjustment module, adapted to adjust the skin color of the character based on a target skin color; The target skin color is a target skin color retrieved from a database that matches the skin color of the person, or the target skin color is determined according to a shooting mode of the shooting device, or the target skin color is determined according to a skin color selection input; a shooting module, shooting a target video according to the adjusted skin color of the person and the processed shot image; The acquisition module is further configured to: Based on the hazard coefficients corresponding to the six primary colors, the hue of the sub-region is interpolated to obtain a target parameter, wherein the hazard coefficients corresponding to the six primary colors are calculated based on the maximum brightness of the camera; determining a risk factor of the sub-region according to the target parameter and the saturation of the sub-region; The acquisition module is further configured to: determining the adjustment weight of the sub-region according to the risk coefficient of the sub-region; The saturation of the sub-region and / or the background color brightness of the sub-region are adjusted according to the adjustment weight.

5. The photographing device according to claim 4, wherein: After obtaining the skin color of the person in the shooting interface, the determining module is further used to: Determining a skin color category of the person's skin color according to the person's skin color; The acquisition module is further used to: acquire the shooting mode of the shooting device; The determination module is further configured to determine a target skin color according to the skin color category and the shooting mode, wherein the target skin colors in different skin color categories are different, and the target skin colors in different shooting modes are different.

6. The photographing device according to claim 4, wherein: After obtaining the skin color of the person in the shooting interface, the determining module is further used to: Receive skin color selection input; Determining the target skin color according to the skin color selection input; Upon receiving an input for disabling the skin color selection, a target skin color is determined according to the person's skin color and / or a shooting mode of the shooting device.

Citation Information

Patent Citations

  • Image color processing method and device and related equipment

    CN112887582A