Exposure parameter adjustment method, device, electronic device and storage medium

By acquiring and fusing the semantic features and brightness features of the picture, and calculating the average reflectivity to adjust the exposure parameters, the problem of inaccurate exposure of the automatic exposure method in large areas of white or black scenes is solved, and more accurate exposure parameter adjustment and picture effect are achieved.

CN115580781BActive Publication Date: 2025-08-19VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing automatic exposure methods are prone to inaccurate exposure when shooting large-area white or large-area black scenes, resulting in inaccurate brightness of objects in the picture.

Method used

By acquiring the semantic features and brightness features of the picture, the average reflectivity is calculated, and the exposure parameters are adjusted based on the average reflectivity.

Benefits of technology

Improve the accuracy of adjustment of exposure parameters to ensure accurate display of objects in large-area white and large-area black scenes in the picture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115580781B_ABST
    Figure CN115580781B_ABST
Patent Text Reader

Abstract

This application discloses an exposure parameter adjustment method, apparatus, electronic device, and storage medium, belonging to the field of image processing technology. The exposure parameter adjustment method includes: obtaining semantic features of a first image, and obtaining brightness features based on the exposure parameters, color histogram, and brightness histogram of the first image; performing feature fusion on the semantic features and brightness features to obtain a fused feature; obtaining an average reflectivity of the first image based on the fused feature; and adjusting the exposure parameters of the shooting based on the average reflectivity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of image processing technology, and specifically relates to a method, device, electronic device and storage medium for adjusting exposure parameters. Background Art

[0002] Currently, during the shooting process, automatic exposure (AE) can be used to obtain pictures with brightness that meets the human eye's perception in different lighting conditions and scenes, making the brightness of objects in the pictures more realistic.

[0003] However, for some shooting scenes with large areas of white (such as white snow scenes or white paper scenes, etc.) or large areas of black (such as gray wall scenes or black chassis scenes, etc.), the existing automatic exposure method is prone to inaccurate exposure problems, which is manifested as overexposure for large areas of black scenes, and the brightness of black objects in the picture is too bright, while underexposure for large areas of white scenes, and the brightness of white objects in the picture is too dark.

[0004] Currently, deep learning methods can leverage image semantic information (such as texture, outline, and object type) to determine the reflectivity of the scene in the image. Exposure compensation based on this reflectivity can then be applied to achieve the appropriate exposure, resolving the aforementioned issue of inaccurate exposure. An object's reflectivity refers to its ability to reflect light and is related to its inherent properties (such as its material and surface roughness).

[0005] However, existing deep learning-based methods for obtaining the reflectivity of shooting scenes in images are prone to errors and have poor accuracy when obtaining the reflectivity of shooting scenes with large areas of white or large areas of black, resulting in inaccurate adjustment of exposure parameters and poor quality of the captured images. Summary of the Invention

[0006] The purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for adjusting exposure parameters, which can solve the problem of poor accuracy in adjusting exposure parameters.

[0007] In a first aspect, an embodiment of the present application provides a method for adjusting exposure parameters, the method comprising:

[0008] Obtaining semantic features of a first image, and obtaining brightness features based on an exposure parameter, a color histogram, and a brightness histogram of the first image;

[0009] Performing feature fusion on the semantic feature and the brightness feature to obtain a fused feature;

[0010] Obtaining an average reflectivity of the first image based on the fusion feature;

[0011] Based on the average reflectivity, exposure parameters of the shooting are adjusted.

[0012] In a second aspect, an embodiment of the present application provides an exposure parameter adjustment device, the device comprising:

[0013] a feature acquisition module, configured to acquire semantic features of the first image, and acquire brightness features based on exposure parameters, a color histogram, and a brightness histogram of the first image;

[0014] A feature fusion module, configured to fuse the semantic feature and the brightness feature to obtain a fused feature;

[0015] a reflectivity acquisition module, configured to acquire an average reflectivity of the first image based on the fusion feature;

[0016] The parameter adjustment module is used to adjust the exposure parameters of the shooting based on the average reflectivity.

[0017] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.

[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0019] 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 described in the first aspect.

[0020] In an embodiment of the present application, by obtaining the semantic features and brightness features of the first image, obtaining the fusion features based on the semantic features and the brightness features, and obtaining the average reflectivity of the shooting scene in the first image based on the fusion features, considering the influence of brightness on the acquisition of reflectivity, and weakening the influence of the image brightness change caused by the exposure parameter change on the acquisition of reflectivity, white objects in dim light and black objects in strong light can be more accurately distinguished, the accuracy and stability of the reflectivity acquisition results can be improved, the accuracy of the exposure parameter adjustment can be improved, and the effect of the captured picture can be improved. The captured picture can more accurately display the shooting scene with a large area of white and the shooting scene with a large area of black. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is one of the flow charts of the exposure parameter adjustment method provided in the embodiment of the present application;

[0022] Figure 2 This is a second flow chart of the method for adjusting exposure parameters provided in an embodiment of the present application;

[0023] Figure 3 This is the third flow chart of the method for adjusting exposure parameters provided in an embodiment of the present application;

[0024] Figure 4 is a structural diagram of an exposure parameter adjustment device provided in an embodiment of the present application;

[0025] Figure 5 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0026] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0028] 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 refers to at least one of the connected objects, and the character " / " generally indicates that the objects connected are in an "or" relationship.

[0029] The following describes in detail the exposure parameter adjustment method, device, electronic device, and storage medium provided in the embodiments of the present application through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0030] Figure 1 One of the flow charts of the exposure parameter adjustment method provided in the embodiment of the present application is as follows. Figure 1 The following describes the exposure parameter adjustment method provided by the embodiment of the present application. Figure 1 As shown, the method includes: step 101, step 102, step 103 and step 104.

[0031] Optionally, the exposure parameter adjustment device can be implemented in various forms. For example, the exposure parameter adjustment device described in the embodiments of the present application can include mobile terminals such as mobile phones, smart phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), navigation devices, smart bracelets, smart watches, digital cameras, etc., as well as fixed terminals such as desktop computers, televisions, etc. Below, it is assumed that the exposure parameter adjustment device is a mobile terminal. However, those skilled in the art will appreciate that the methods according to the embodiments of the present application can also be applied to fixed-type terminals.

[0032] Step 101: Acquire semantic features of a first image, and acquire brightness features based on exposure parameters, a color histogram, and a brightness histogram of the first image.

[0033] Optionally, the semantic feature of the first image refers to a feature of semantic information of the first image.

[0034] The semantics of an image can be divided into the visual layer, the object layer, and the conceptual layer.

[0035] The visual layer is commonly understood as the bottom layer, which can include color, texture, shape, etc. The above features are called bottom-layer feature semantics.

[0036] The object layer is the middle layer, which usually includes attribute features, etc. Attribute features are generally the state of an object at a certain moment.

[0037] The conceptual layer is the high level, and is what the picture expresses that is closest to human understanding.

[0038] In layman's terms, for example, if there is sand, blue sky, sea water, etc. in a picture, the visual layer is the distinction between blocks, the object layer is sand, blue sky, sea water, etc., and the conceptual layer is the beach, which is the semantics expressed in this picture.

[0039] Semantic features can include low-level semantic features and high-level semantic features.

[0040] The underlying semantic features may include contours, edges, colors, textures, shapes, etc. Among them, edges and contours can reflect the content of the image.

[0041] High-level semantic features refer to what the human eye can see.

[0042] For example, by extracting the underlying semantic features of a face image, we can obtain the face outline, nose, eyes, etc., and the high-level semantic features can be displayed as a face.

[0043] Optionally, feature extraction may be performed on the first image using any method for extracting semantic features, thereby obtaining the semantic features of the first image.

[0044] Optionally, the semantic features of the first image may be extracted based on a pre-trained first model. Optionally, the first model may be a model based on a neural network.

[0045] Exemplarily, the first model can be based on a model such as MobileNet or a deep residual network. The MobileNet series of models includes MobileNetV1, MobileNetV2, and MobileNetV3. The MobileNet series of models is a lightweight classic neural network that can be applied to mobile terminals. The deep residual network (ResNet) model can be used for fixed terminals.

[0046] Exposure parameters include the camera's aperture, shutter speed, and ISO. A larger aperture results in a brighter image; a longer shutter speed results in a brighter image; a higher ISO speed results in a brighter image; a lower ISO speed results in a darker image.

[0047] The image captured by the electronic device may carry the above exposure parameters. Therefore, based on the first image, the exposure parameters of the first image can be obtained. The exposure parameters of the first image are the exposure parameters of the camera that captured the first image when capturing the first image.

[0048] Under the same exposure parameters, black objects appear darker and white objects appear brighter. Changes in exposure parameters will cause changes in the brightness of the image.

[0049] The color histogram of the first image is used to reflect the color distribution of each pixel in the first image.

[0050] The brightness histogram of the first image is used to reflect the brightness distribution of each pixel in the first image.

[0051] The brightness of a pixel can be obtained based on the color of the pixel.

[0052] It is understandable that both the exposure parameter and the color are related to the brightness. Therefore, the brightness feature of the first image can be obtained based on the exposure parameter, the color histogram, and the brightness histogram of the first image.

[0053] Step 102: Fusing the semantic features and the brightness features to obtain fused features.

[0054] Optionally, feature fusion may be performed on the semantic features of the first image and the brightness features of the first image based on any feature fusion method to obtain fused features of the first image.

[0055] Optionally, when both the semantic feature of the first image and the brightness feature of the first image are vectors, the two vectors may be concatenated to obtain a fusion feature of the first image in vector form.

[0056] Exemplarily, the semantic features of the first image and the brightness features of the first image are respectively an m-dimensional column vector and an n-dimensional column vector (which can be respectively referred to as a semantic feature vector and a brightness feature vector). The m-dimensional semantic feature vector and the n-dimensional brightness feature vector can be spliced into an (m+n)-dimensional column vector (which can be referred to as a fused feature vector).

[0057] Step 103: Obtain the average reflectivity of the first image based on the fusion features.

[0058] Optionally, the relationship between the fusion features of the image and the average reflectivity can be obtained in advance. Based on the fusion features of the first image and the above relationship, the average reflectivity corresponding to the fusion features of the first image can be obtained as the average reflectivity of the first image.

[0059] Optionally, the average reflectivity of the scene in the first image may be obtained based on a pre-trained second model. Optionally, the second model may be a model based on a neural network.

[0060] Optionally, the fusion features of the first image may be input into a trained second model to obtain the average reflectivity of the shooting scene in the first image output by the second model.

[0061] Optionally, the second model may include at least one fully connected layer.

[0062] Optionally, the second model may include multiple layers of fully connected layers.

[0063] Multiple layers of fully connected layers are cascaded, and each fully connected layer takes the output of the previous fully connected layer as input (except each fully connected layer).

[0064] The fused features are input into the first fully connected layer. After being processed by the first fully connected layer, they are processed by the second fully connected layer, and so on, so that the average reflectivity output by the last fully connected layer can be obtained.

[0065] It should be noted that for some shooting scenes with large areas of white (even pure white) or large areas of white and black (set to pure black), the scene semantic information is relatively low. When the external light is too dim, white objects in the image appear gray, and when the external light is too bright, black objects in the image also appear gray, making it difficult to determine the original color of the object, thus causing errors in the reflectivity acquisition results. In addition, because the camera adjusts the image brightness based on the reflectivity returned by the algorithm, the change in image brightness will affect the stability of the reflectivity acquisition results, resulting in unstable reflectivity acquisition results and affecting the stability of the preview screen brightness.

[0066] By using the method provided in the embodiment of the present application, the brightness feature is added, and the color of the object can be judged more accurately even for shooting scenes with less semantic information, thereby avoiding obtaining incorrect reflectivity due to incorrect color recognition of the object.

[0067] Step 104: Adjust the exposure parameters of the shooting based on the average reflectivity.

[0068] Optionally, exposure parameters of a shooting scene displayed in the first picture shot by a camera may be adjusted based on the average reflectivity of the first picture.

[0069] Optionally, exposure compensation may be performed based on the difference between the average reflectivity of the first image and a preset reflectivity value, and the exposure parameters of the shooting scene displayed in the first image shot by the camera may be adjusted.

[0070] The preset reflectivity value can be determined according to actual needs. The specific value of the preset reflectivity value is not limited in the embodiment of the present application.

[0071] Optionally, the brightness adjustment target can be determined based on the difference between the average reflectivity of the first picture and the preset reflectivity value; the exposure parameters of the shooting scene displayed by the first picture taken by the camera are adjusted, so as to achieve the brightness of the second picture obtained by taking the shooting scene based on the adjusted camera, compared with the brightness of the first picture, to achieve the aforementioned adjustment target.

[0072] The embodiment of the present application obtains semantic features and brightness features of the first image, obtains fusion features based on the semantic features and brightness features, and obtains the average reflectivity of the shooting scene in the first image based on the fusion features. The influence of brightness on the acquisition of reflectivity is taken into account, and the influence of changes in image brightness caused by changes in exposure parameters on the acquisition of reflectivity is weakened. This can more accurately distinguish white objects in dim light and black objects in strong light, improve the accuracy and stability of reflectivity acquisition results, improve the accuracy of exposure parameter adjustment, and improve the effect of the captured images. The captured images can more accurately display shooting scenes with large areas of white and shooting scenes with large areas of black.

[0073] Optionally, acquiring the brightness feature based on the exposure parameter, the color histogram, and the brightness histogram of the first image includes: acquiring the color histogram and the brightness histogram.

[0074] Optionally, the color histogram of the first image may be obtained by statistically analyzing the distribution of each color component of each pixel in the first image and obtaining the number of pixels of each value of the color component.

[0075] Optionally, the brightness histogram of the first image may be obtained by statistically analyzing the distribution of the brightness of each pixel in the first image and obtaining the number of pixels with each brightness value.

[0076] A first feature is obtained based on the color histogram and the brightness histogram, and a weight is obtained based on the exposure parameter.

[0077] Optionally, an original brightness feature of the first picture may be extracted based on a color histogram of the first picture and a brightness histogram of the first picture as the first feature.

[0078] Optionally, the aforementioned three exposure parameters may jointly affect the brightness of the image, and the same image brightness value may be obtained by combining different values of the three exposure parameters.

[0079] Optionally, based on each exposure parameter and a coefficient corresponding to each exposure parameter, the sum of the products of the exposure parameter and the corresponding coefficient may be obtained to obtain the weight.

[0080] Optionally, the coefficients corresponding to the exposure parameters can be pre-set or pre-acquired through deep learning.

[0081] Based on the first feature and the weight, a brightness feature is obtained.

[0082] Optionally, the first feature may be multiplied by the weight to obtain a brightness feature.

[0083] The embodiment of the present application obtains the first feature based on the color histogram and the brightness histogram, obtains the weight based on the exposure parameter, and obtains the brightness feature based on the first feature and the weight, so as to more accurately obtain the brightness feature of the first picture, thereby obtaining a more accurate average reflectivity of the shooting scene in the first picture based on the brightness feature of the first picture.

[0084] Optionally, based on the fused features, obtaining an average reflectivity of the captured scene in the first picture includes: inputting the fused features into a first fully connected layer for processing to obtain a first output.

[0085] Optionally, the multi-layer fully connected layer is two fully connected layers: a first fully connected layer and a second fully connected layer.

[0086] The fused features are input into the first fully connected layer for processing. The first fully connected layer integrates the fused features for the first time, and the first output of the first fully connected layer can be obtained.

[0087] Exemplarily, assuming that the fused feature is a 160*1 dimensional vector (x1, x2, …, x160), after the first fully connected layer (the first fully connected layer is a 160*1*1280 fully connected layer), similar to 1280 160*1 parameters (w1, w2, …, w160) and 1280 1*1 bias b, the first output (y1, y2, .., y1280) is obtained, where y = w1*x1+w2*x2+w3*x3+ …+w160*x160+b.

[0088] The first output is input into the second fully connected layer for processing to obtain the average reflectivity.

[0089] Optionally, the first output is input into a second fully connected layer for processing, and the second fully connected layer performs a second integration on the fused features after the first integration, so as to obtain the average reflectivity of the first image output by the second fully connected layer.

[0090] Exemplarily, the aforementioned first output (y1, y2, .., y1280) passes through the second fully connected layer 1280*1 (w1, w2,…, w1280) and the bias parameter b to obtain the final reflectivity r = w1*y1+w2*y2+…+w1280*y1280+b.

[0091] In the embodiment of the present application, the fusion features are processed through two fully connected layers to obtain the average reflectivity. Compared with processing the fusion features through only one fully connected layer, this embodiment can better solve the nonlinear problem and more accurately fit the relationship between the fusion features and the average reflectivity of the image, thereby obtaining a more accurate average reflectivity.

[0092] Optionally, obtaining the first feature based on the color histogram and the brightness histogram includes: concatenating the color histogram and the brightness histogram to obtain the color brightness histogram.

[0093] Optionally, the color histogram and the brightness histogram have the same dimension, and the color histogram and the brightness histogram can be concatenated into a new histogram, which is called a color-brightness histogram.

[0094] Optionally, the size of the color brightness histogram may be N1*N2.

[0095] N1 indicates that both the color component and brightness are levels, corresponding to the range of the color component and brightness. For example, N1 can be 64, 128, or 256, respectively, indicating that the color component and brightness have 64, 128, or 256 levels, and the range of the color component and brightness can be 0-63, 0-127, and 0-255, respectively.

[0096] N2 represents the number of color components plus 1. Plus 1 represents brightness. N2 can be 3 or 4, etc.

[0097] Optionally, the color components may be R / G / B, and N2 may be equal to 3; the color components may be C / M / Y / K, and N2 may be equal to 4.

[0098] Perform feature extraction on the color brightness histogram to obtain the first feature.

[0099] Specifically, a method similar to extracting semantic features may be used to perform feature extraction on the color brightness histogram to obtain the first feature.

[0100] Optionally, the first feature may be extracted based on a pre-trained third model. Optionally, the third model may be a model based on a neural network.

[0101] Exemplarily, the third model may be based on a model such as MobileNet or a deep residual network.

[0102] The embodiment of the present application obtains a color-brightness histogram by splicing a color histogram and a brightness histogram, performs feature extraction on the color-brightness histogram, and obtains a first feature. A more accurate first feature can be obtained, so that the brightness feature of the first image can be more accurately obtained based on the first feature, and then based on the brightness feature of the first image, a more accurate average reflectivity of the captured scene in the first image can be obtained.

[0103] Optionally, adjusting the exposure parameters for shooting based on the average reflectivity includes adjusting the exposure parameters for shooting based on a proportional relationship between the average reflectivity and a preset reflectivity value.

[0104] Optionally, the proportional relationship between the average reflectivity and the preset reflectivity value can be obtained to determine the proportion of brightness adjustment, and exposure compensation is performed based on the proportion to adjust the exposure parameters of the shooting scene displayed in the first picture taken by the camera.

[0105] The preset reflectivity value can be determined according to actual needs. The specific value of the preset reflectivity value is not limited in the embodiment of the present application.

[0106] Optionally, the preset reflectivity value may generally be 18%, but is not limited thereto.

[0107] Exemplarily, the preset value of reflectivity is 18%; when the average reflectivity obtained is 30%, 30% / 18%=166%, and the proportion of brightness that needs to be adjusted is 166%-1=66%, that is, the brightness of the first picture needs to be increased by 66% through exposure compensation, and the exposure parameters of the shooting scene displayed in the first picture taken by the camera are adjusted with the goal of increasing the brightness by 66%; when the average reflectivity obtained is 9%, 9% / 18%=50%, and the proportion of brightness that needs to be adjusted is 50%-1=-50%, that is, the brightness of the first picture needs to be reduced by 50% through exposure compensation, and the exposure parameters of the shooting scene displayed in the first picture taken by the camera are adjusted with the goal of reducing the brightness by 50%.

[0108] The embodiment of the present application performs exposure compensation on the first image based on the proportional relationship between the average reflectivity and the preset reflectivity value, thereby obtaining an image with brightness closer to reality and to human eye perception.

[0109] Figure 2 This is the second flow chart of the exposure parameter adjustment method provided in the embodiment of the present application. Figure 2 The figure shows a process of obtaining the average reflectivity of a shooting scene in a first picture with a height of H and a width of W as input using the method provided in an embodiment of the present application.

[0110] Figure 3 This is the third flow chart of the exposure parameter adjustment method provided in the embodiment of the present application. The complete implementation process of an exposure parameter adjustment method can be as follows: Figure 3 As shown. Figure 3 As shown, the complete implementation process of the exposure parameter adjustment method may include the following steps:

[0111] Step 301: Image collection and annotation.

[0112] When capturing images, use automatic exposure in the camera's professional mode and save both DNG (raw) and JPG format images. A set of images is taken twice: the first time a gray card is placed on the surface of the object, and the second time the gray card is removed.

[0113] The object reflectivity is calculated using the formula: lux*r*K=brightness, where lux is the incident light intensity, r is the object reflectivity, K is a camera-related constant, and brightness is the image brightness.

[0114] Take the image with the gray card, or the average brightness of the gray card portion. Assuming the gray card reflectivity is 18%, calculate: lux*K = brightness / 18. Take the image without the gray card, obtain the average brightness of the object portion, and use the lux calculated above to calculate the object reflectivity: r = brightness / lux*K.

[0115] Based on the image and the calculated reflectivity, training can be performed to obtain a trained model.

[0116] Step 302: Read the image and its exposure parameters.

[0117] The input is the image and the exposure parameters of the image.

[0118] Step 303: Extract semantic features using models such as MobileNetV3.

[0119] Use MobileNetV3 and other models as the backbone to extract the deep features of the image and obtain the semantic feature vector.

[0120] Step 304: Calculate the color brightness histogram and read the exposure parameters of the image.

[0121] The distribution of the values in the R / G / B channels and the brightness value (calculated from the R / G / B values) of each pixel in the image are counted to obtain a color brightness distribution histogram (256*4), which is equivalent to a one-dimensional image.

[0122] Step 305: Normalize the color brightness histogram and extract the original brightness features through convolution and pooling operations.

[0123] The color brightness distribution histogram is used in a manner similar to step 303 to extract original brightness features.

[0124] Step 306: Multiply the exposure parameter by the 3*1 weight matrix to generate the weight of the exposure parameter.

[0125] The exposure parameter (3*1) information of the image is passed through a layer of weight matrix (3*1, learnable) to generate the weight of the exposure parameter (1*1).

[0126] For example, if the exposure parameter information is (x1, x2, x3) and the weight matrix is (w1, w2, w3), the weight of the exposure parameter w = w1*x1*w2*x2*w3*x3 can be calculated.

[0127] Step 307: Multiply the original brightness feature by the weight to obtain the brightness feature.

[0128] The original brightness feature obtained in step 305 and the weight of the exposure parameter obtained in step 106 are multiplied to obtain the restored true brightness feature information, that is, the brightness feature.

[0129] For example, the extracted brightness feature of the original image is an 80*1 feature vector (x1, x2, x3, ..., x80). The above 80 values are multiplied by the weight w of the exposure parameter obtained in step 306 to obtain a new 80*1 feature vector (w*x1, w*x2, w*x3, ..., w*x80), which is the brightness feature after removing the influence of the exposure parameter.

[0130] Step 308: Concatenate and fuse the brightness feature and the semantic feature to obtain a fused feature.

[0131] The restored brightness feature obtained in step 307 is concatenated with the semantic feature obtained in step 33 to obtain a fused feature containing the image semantic information and the true brightness information.

[0132] For example, assuming that the brightness feature obtained in step 307 is 80*1 dimensional (x1, x2, x3, …, x80), and the semantic feature obtained in step 303 is also 80*1 dimensional (y1, y2, y3, …, y80), the two feature vectors are directly concatenated and fused to obtain a new feature of 160*1 dimensional (x1, x2, x3, …, x80, y1, y2, …, y80).

[0133] Step 309: The fused features are passed through two fully connected layers to obtain the regressed mean reflectivity.

[0134] Step 310: Perform exposure compensation according to the average reflectivity.

[0135] Adjust the exposure parameters of the camera according to the average reflectivity to perform exposure compensation.

[0136] The exposure parameter adjustment method provided in the embodiment of the present application can be performed by an exposure parameter adjustment device. In the embodiment of the present application, the exposure parameter adjustment device performing the exposure parameter adjustment method is used as an example to illustrate the exposure parameter adjustment device provided in the embodiment of the present application.

[0137] Figure 4 Schematic diagram of the structure of the exposure parameter adjustment device provided in the embodiment of the present application. Figure 4 As shown, the device includes a feature acquisition module 401, a feature fusion module 402, a reflectivity acquisition module 403 and a parameter adjustment module 404, wherein:

[0138] A feature acquisition module 401 is configured to acquire semantic features of the first image and acquire brightness features based on exposure parameters, a color histogram, and a brightness histogram of the first image;

[0139] A feature fusion module 402 is used to fuse semantic features and brightness features to obtain fused features;

[0140] A reflectivity acquisition module 403 is configured to acquire an average reflectivity of the captured scene in the first image based on the fusion features;

[0141] The parameter adjustment module 404 is configured to adjust the exposure parameters of the shooting based on the average reflectivity.

[0142] Optionally, the feature acquisition module 401 , the feature fusion module 402 , the reflectivity acquisition module 403 and the parameter adjustment module 404 may be electrically connected.

[0143] The feature acquisition module 401 may perform feature extraction on the first image by using any method for extracting semantic features, thereby obtaining the semantic features of the first image.

[0144] The feature acquisition module 401 may acquire the brightness feature of the first image based on the exposure parameter, the color histogram, and the brightness histogram of the first image.

[0145] The feature fusion module 402 may perform feature fusion on the semantic features of the first image and the brightness features of the first image based on any feature fusion method to obtain fused features of the first image.

[0146] The reflectivity acquisition module 403 may acquire the average reflectivity corresponding to the fusion feature of the first image as the average reflectivity of the first image based on the relationship between the fusion feature of the first image and the fusion feature and average reflectivity of the previously acquired image.

[0147] The parameter adjustment module 404 may adjust the exposure parameters of the shooting scene displayed in the first picture shot by the camera based on the average reflectivity of the first picture.

[0148] Optionally, the feature acquisition module 401 may include a first acquisition submodule; the first acquisition submodule may include:

[0149] A histogram acquisition unit, used to acquire a color histogram and a brightness histogram;

[0150] A first feature acquisition unit, configured to acquire a first feature based on a color histogram and a brightness histogram;

[0151] A weight obtaining unit, configured to obtain a weight based on an exposure parameter;

[0152] The second feature acquisition unit is configured to acquire a brightness feature based on the first feature and the weight.

[0153] Optionally, the reflectivity acquisition module 403 may be specifically configured to input the fused features into a first fully connected layer for processing to obtain a first output; and input the first output into a second fully connected layer for processing to obtain an average reflectivity.

[0154] Optionally, the first feature acquisition unit may be specifically configured to concatenate the color histogram and the brightness histogram to obtain a color brightness histogram; and perform feature extraction on the color brightness histogram to obtain the first feature.

[0155] Optionally, the parameter adjustment module 404 may be specifically configured to adjust the exposure parameters of the shooting based on a proportional relationship between the average reflectivity and a preset reflectivity value.

[0156] The embodiment of the present application obtains semantic features and brightness features of the first image, obtains fusion features based on the semantic features and brightness features, and obtains the average reflectivity of the shooting scene in the first image based on the fusion features. The influence of brightness on the acquisition of reflectivity is taken into account, and the influence of changes in image brightness caused by changes in exposure parameters on the acquisition of reflectivity is weakened. This can more accurately distinguish white objects in dim light and black objects in strong light, improve the accuracy and stability of reflectivity acquisition results, improve the accuracy of exposure parameter adjustment, and improve the effect of the captured images. The captured images can more accurately display shooting scenes with large areas of white and shooting scenes with large areas of black.

[0157] The exposure parameter adjustment device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices 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 embodiment of the present application does not specifically limit it.

[0158] The exposure parameter adjustment device in the embodiment of the present application can be a device having an operating system. The operating system can 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.

[0159] The exposure parameter adjustment device in the embodiments of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can 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.

[0160] The exposure parameter adjustment device in the embodiment of the present application can be a device having an operating system. The operating system can 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.

[0161] The exposure parameter adjustment device provided in the embodiment of the present application can achieve Figures 1 to 3 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0162] Alternatively, as Figure 5 As shown, an embodiment of the present application further provides an electronic device 500, including a processor 501 and a memory 502, wherein the memory 502 stores a program or instruction that can be run on the processor 501, and when the program or instruction is executed by the processor 501, the various steps of the embodiment of the exposure parameter adjustment method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0163] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0164] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application.

[0165] The electronic device 600 includes but is not limited to components such as a radio frequency unit 601 , a network module 602 , an audio output unit 603 , an input unit 604 , a sensor 605 , a display unit 606 , a user input unit 607 , an interface unit 608 , a memory 609 , and a processor 610 .

[0166] Those skilled in the art will understand that the electronic device 600 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 610 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 6 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.

[0167] The processor 610 may be configured to obtain semantic features of the first image, and obtain brightness features based on exposure parameters, a color histogram, and a brightness histogram of the first image;

[0168] The processor 610 may also be configured to perform feature fusion on the semantic features and the brightness features to obtain fused features;

[0169] The processor 610 may also be configured to obtain an average reflectivity of the first image based on the fused features;

[0170] The processor 610 may also be configured to adjust exposure parameters for shooting based on the average reflectivity.

[0171] The embodiment of the present application obtains semantic features and brightness features of the first image, obtains fusion features based on the semantic features and brightness features, and obtains the average reflectivity of the shooting scene in the first image based on the fusion features. The influence of brightness on the acquisition of reflectivity is taken into account, and the influence of changes in image brightness caused by changes in exposure parameters on the acquisition of reflectivity is weakened. This can more accurately distinguish white objects in dim light and black objects in strong light, improve the accuracy and stability of reflectivity acquisition results, improve the accuracy of exposure parameter adjustment, and improve the effect of the captured images. The captured images can more accurately display shooting scenes with large areas of white and shooting scenes with large areas of black.

[0172] Optionally, the processor 610 may also be configured to obtain a color histogram and a brightness histogram;

[0173] The processor 610 may also be configured to obtain a first feature based on the color histogram and the brightness histogram;

[0174] The processor 610 may also be configured to obtain a weight based on the exposure parameter;

[0175] The processor 610 may also be configured to obtain a brightness feature based on the first feature and the weight.

[0176] Optionally, the processor 610 may also be configured to input the fused features into a first fully connected layer for processing to obtain a first output; and input the first output into a second fully connected layer for processing to obtain an average reflectivity.

[0177] Optionally, the processor 610 may be further configured to concatenate the color histogram and the brightness histogram to obtain a color-brightness histogram; and perform feature extraction on the color-brightness histogram to obtain a first feature.

[0178] Optionally, the processor 610 may also be configured to adjust exposure parameters for shooting based on a proportional relationship between the average reflectivity and a preset reflectivity value.

[0179] It should be understood that in an embodiment of the present application, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042, and the graphics processor 6041 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 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 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 a joystick, which will not be repeated here.

[0180] The memory 609 can be used to store software programs and various data. The memory 609 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 609 may include a volatile memory or a non-volatile memory, or the memory 609 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. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0181] Processor 610 may include one or more processing units. Optionally, processor 610 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 610.

[0182] 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 exposure parameter adjustment method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

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

[0184] 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 exposure parameter adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

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

[0186] 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 exposure parameter adjustment method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0187] 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 noted 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 features described with reference to certain examples may be combined in other examples.

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

[0189] 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 method for adjusting exposure parameters, characterized in that: include: Obtaining semantic features of the first image, and obtaining brightness features based on an exposure parameter, a color histogram, and a brightness histogram of the first image, wherein the semantic features of the first image refer to features of semantic information of the first image, and the semantic features include low-level semantic features and high-level semantic features, wherein the low-level semantic features include at least one of contour, edge, color, texture, and shape, and the high-level semantic features refer to content visible to the human eye; Performing feature fusion on the semantic feature and the brightness feature to obtain a fused feature; Inputting the fused features into a first fully connected layer for processing, so that the first fully connected layer performs a first integration on the fused features to obtain a first output; Inputting the first output into a second fully connected layer for processing, so that the second fully connected layer performs a second integration on the first output to obtain an average reflectivity of the first image; Based on the difference between the average reflectivity of the first picture and the preset reflectivity value, or based on the proportional relationship between the average reflectivity and the preset reflectivity value, exposure compensation is performed to adjust the exposure parameters of the shooting scene displayed in the first picture.

2. The exposure parameter adjustment method according to claim 1, wherein: The acquiring of brightness features based on the exposure parameter, color histogram, and brightness histogram of the first image includes: Obtaining the color histogram and the brightness histogram; Obtaining a first feature based on the color histogram and the brightness histogram, and obtaining a weight based on the exposure parameter; The brightness feature is obtained based on the first feature and the weight.

3. The exposure parameter adjustment method according to claim 2, wherein: The acquiring a first feature based on the color histogram and the brightness histogram includes: Concatenating the color histogram and the brightness histogram to obtain a color brightness histogram; Perform feature extraction on the color brightness histogram to obtain the first feature.

4. An exposure parameter adjustment device, characterized in that: include: a feature acquisition module, configured to acquire semantic features of the first image, and acquire brightness features based on exposure parameters, a color histogram, and a brightness histogram of the first image, wherein the semantic features of the first image refer to features of semantic information of the first image, and the semantic features include low-level semantic features and high-level semantic features, wherein the low-level semantic features include at least one of contour, edge, color, texture, and shape, and the high-level semantic features refer to content visible to the human eye; A feature fusion module, configured to fuse the semantic feature and the brightness feature to obtain a fused feature; a reflectivity acquisition module, configured to input the fused features into a first fully connected layer for processing, so that the first fully connected layer performs a first integration on the fused features to obtain a first output; and input the first output into a second fully connected layer for processing, so that the second fully connected layer performs a second integration on the first output to obtain an average reflectivity of the first image; A parameter adjustment module is used to perform exposure compensation based on the difference between the average reflectivity of the first image and the preset reflectivity value, or based on the proportional relationship between the average reflectivity and the preset reflectivity value, and adjust the exposure parameters of the shooting scene displayed by the first image.

5. The exposure parameter adjustment device according to claim 4, characterized in that: The feature acquisition module includes a first acquisition submodule; the first acquisition submodule includes: a histogram acquisition unit, configured to acquire the color histogram and the brightness histogram; a first feature acquisition unit, configured to acquire a first feature based on the color histogram and the brightness histogram; A weight obtaining unit, configured to obtain a weight based on the exposure parameter; A second feature acquisition unit is configured to acquire the brightness feature based on the first feature and the weight.

6. The exposure parameter adjustment device according to claim 5, characterized in that: The first feature acquisition unit is specifically configured to concatenate the color histogram and the brightness histogram to obtain a color brightness histogram; and perform feature extraction on the color brightness histogram to obtain the first feature.

7. An electronic device, characterized in that The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the method for adjusting the exposure parameters according to any one of claims 1 to 3 is implemented.

8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the method for adjusting the exposure parameters according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Camera shooting parameter adjusting method and device and electronic equipment

    CN113989387A