CN115037883A - Exposure parameter adjusting method and device, storage medium and electronic equipment - Google Patents

Exposure parameter adjusting method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115037883A
CN115037883A CN202210481753.3A CN202210481753A CN115037883A CN 115037883 A CN115037883 A CN 115037883A CN 202210481753 A CN202210481753 A CN 202210481753A CN 115037883 A CN115037883 A CN 115037883A
Authority
CN
China
Prior art keywords
image data
image
weight value
target
target area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210481753.3A
Other languages
Chinese (zh)
Inventor
谢炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210481753.3A priority Critical patent/CN115037883A/en
Publication of CN115037883A publication Critical patent/CN115037883A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses an exposure parameter adjusting method, an exposure parameter adjusting device, a storage medium and electronic equipment, wherein the method comprises the following steps: the method comprises the steps of acquiring first image data acquired by an image sensor, extracting a target area in the first image data based on a set of set areas, wherein the set of set areas are sample area sets which are preset in different shooting scenes, acquiring a light meter weight value corresponding to the target area based on position information of the target area in the first image data, and adjusting exposure parameters of the image sensor based on the first image data and the light meter weight value. By the aid of the method and the device, the weight value of the light meter and the exposure parameter of the image sensor are dynamically adjusted according to the target area in the shot image in the process of shooting the image, so that normal exposure of the shot image is realized.

Description

Exposure parameter adjusting method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for adjusting exposure parameters, a storage medium, and an electronic device.
Background
Automatic exposure is the default setting for many digital cameras, in which the camera will automatically control the exposure of the shot, the user does not need to do anything at all, and the camera can automatically set the exposure parameters according to the intensity of the light reflected from the scene. The exposure parameters are mainly used to adjust the overall brightness of the photographic subject, and if the photographic subject is too dim, the exposure parameters may be adjusted to increase the brightness.
Light measurement is an important link for measuring proper exposure parameters, and a satisfactory picture can be shot only if correct exposure parameters are obtained through light measurement.
Disclosure of Invention
According to the exposure parameter adjusting method and device, the storage medium and the electronic device, the weight value of the light meter and the exposure parameter of the image sensor can be dynamically adjusted according to the target area in the shot image in the process of shooting the image, so that normal exposure of the shot image is achieved. The technical scheme is as follows:
in a first aspect, an exposure parameter adjusting method provided in an embodiment of the present application includes:
acquiring first image data acquired by an image sensor, and extracting a target region in the first image data based on a set of set regions, wherein the set of set regions are preset sample region sets under different shooting scenes;
acquiring a photometric table weight value corresponding to the target area based on the position information of the target area in the first image data;
and adjusting exposure parameters of the image sensor based on the first image data and the photometric weighting value.
In a second aspect, an exposure parameter adjusting apparatus provided in an embodiment of the present application includes:
the target area acquisition module is used for acquiring first image data acquired by an image sensor and extracting a target area in the first image data based on a set of set areas, wherein the set of set areas are preset sample area sets under different shooting scenes;
a light meter calculation module, configured to obtain a light meter weight value corresponding to the target area based on position information of the target area in the first image data;
and the exposure parameter adjusting module is used for adjusting the exposure parameters of the image sensor based on the first image data and the photometric weighting value.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
In one or more embodiments of the present application, when an image is captured, first image data acquired by an image sensor is acquired, a target region is extracted from the first image data based on a set region set, a photometric table weight value corresponding to the target region is acquired based on position information of the target region in the first image data, and an exposure parameter of the image sensor is adjusted based on the first image data and the photometric table weight value. By adopting the method and the device, the weight value of the photometric meter and the exposure parameter of the image sensor are dynamically adjusted according to the target area in the shot image in the process of shooting the image, so that the normal exposure of the shot image is realized based on the adjusted exposure parameter, and the imaging quality of the shot image is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of an exposure parameter adjusting method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating an exposure parameter adjusting method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating an example of extracting a target region according to an embodiment of the present disclosure;
fig. 4 is an exemplary schematic diagram of an image area division and light metering table according to an embodiment of the present disclosure;
fig. 5 is a schematic flowchart illustrating an exposure parameter adjusting method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an exposure parameter adjusting apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an exposure parameter adjusting module according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an exposure parameter adjusting apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is noted that, unless explicitly stated or limited otherwise, "including" and "having" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. In addition, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Automatic exposure is the default setting for many digital cameras, in which the camera will automatically control the exposure of the shot, the user does nothing at all, and the camera can automatically set the exposure parameters based on the intensity of the light reflected from the scene. The exposure parameters are mainly used to adjust the overall brightness of the photographic subject, and if the photographic subject is too dim, the exposure parameters may be adjusted to increase the brightness.
Light measurement is an important link for measuring proper exposure parameters, and a satisfactory picture can be shot only if correct exposure parameters are obtained through light measurement.
In the mainstream automatic exposure control scheme in the prior art, light metering is mostly performed on a shot image according to a light metering table with a fixed weight value, changes of picture contents are not considered, normal exposure is easily realized in a light metering area with a higher weight value, and underexposure or overexposure is easily realized in a light metering area with an excessively low weight value.
Based on this, the application provides an exposure parameter adjustment method, when an image is taken, first image data acquired by an image sensor is acquired, a target area is extracted from the first image data based on a set area set, a photometric table weight value corresponding to the target area is acquired based on position information of the target area in the first image data, and an exposure parameter of the image sensor is adjusted based on the first image data and the photometric table weight value. By the adoption of the method and the device, the weight value of the light meter and the exposure parameter of the image sensor are dynamically adjusted according to the target area in the shot image in the process of shooting the image, so that normal exposure of the shot image is achieved based on the adjusted exposure parameter, and imaging quality of the shot image is improved.
The following is a detailed description of specific embodiments. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. The flow diagrams depicted in the figures are merely exemplary and need not be performed in the order of the steps shown. For example, some steps are parallel, and there is no strict sequence relationship in logic, so the actual execution sequence is variable.
Fig. 1 is a schematic flow chart of an exposure parameter adjustment method according to an embodiment of the present disclosure. In a specific embodiment, the exposure parameter adjusting method may be applied to an exposure parameter adjusting device or an electronic device equipped with the exposure parameter adjusting device. The following will describe a specific flow of the present embodiment by taking the execution subject as an electronic device as an example. As will be described in detail with respect to the flow shown in fig. 2, the exposure parameter adjusting method may specifically include the following steps:
s102, acquiring first image data acquired by an image sensor, and extracting a target region in the first image data based on a set region set, wherein the set region set is a preset sample region set under different shooting scenes;
specifically, when an image is taken, the image sensor acquires first image data within a viewing range, detects whether the first image data includes a preset target area in a set of setting areas, and if so, extracts a corresponding target area in the first image data.
The first image data is preview image data acquired by an image sensor in a view finding range of the camera.
In one or more embodiments of the present application, the set of setting regions is a preset sample region set in different shooting scenes, and is used for adaptively adjusting weight values in a light metering table used when an image is shot by a user based on sample regions in the image if the image includes a preset sample region in the set of setting regions, so as to improve imaging quality of a final shot image.
In one or more embodiments of the present application, first image data within a camera view range is captured by an image sensor, format conversion processing is performed on the first image data to obtain second image data in the first image format, a target region set in a set of regions is detected in the second image data based on a region segmentation model for deep learning, and when the target region is detected, the target region is segmented and extracted from the second image data. For example, the second image data includes a sky region and a non-sky region, and the sky region belongs to a target region in the set of regions, and the sky region in the second image data is segmented and extracted based on a region segmentation model.
S104, acquiring a photometric table weight value corresponding to a target area based on the position information of the target area in the first image data;
specifically, after the target area is extracted from the first image data, the weight value of each area in the light meter is adjusted according to the position information of the target area in the first image data.
It should be noted that the light meter includes a plurality of same rectangular areas, each rectangular area has a corresponding weight value, and rectangular areas with different weight values have different light metering results. In one or more embodiments of the present application, different light meter adjustment strategies are preset for different target areas, and weight value adjustment may be performed on each rectangular area in a light meter according to a light meter adjustment strategy and position information corresponding to a target area, so as to improve light metering accuracy.
For example, the target area is a sky area, and the light meter adjustment strategy corresponding to the sky area is closer to the center of the sky area, and the weight value is larger, then the weight value of the rectangular area corresponding to the position in the light meter may be adjusted to be closer to the center of the sky area according to the position information of the sky area in the first image, and the weight value is larger.
And S106, adjusting exposure parameters of the image sensor based on the first image data and the photometric table weight value.
Specifically, after a weight value of a light meter of the light meter is adjusted, light metering is performed on the first image data by using the adjusted weight value of the light meter to obtain an average brightness of the first image data, a preset target brightness of the first image data is obtained, and an exposure parameter corresponding to the image sensor is adjusted based on the average brightness and the target brightness.
In one or more embodiments of the present application, after adjusting the exposure parameter corresponding to the image sensor, the method further includes: and controlling the image sensor to acquire third image data by using the adjusted exposure parameters. The third image data is image data acquired by the image sensor in a view range of the camera.
In the embodiment of the application, first image data acquired by an image sensor is acquired, a target area is extracted from the first image data based on a set area set, a photometric table weight value corresponding to the target area is acquired based on position information of the target area in the first image data, and an exposure parameter of the image sensor is adjusted based on the first image data and the photometric table weight value. By adopting the method and the device, the weight value of the photometric meter and the exposure parameter of the image sensor are dynamically adjusted according to the target area in the shot image in the process of shooting the image, so that the normal exposure of the shot image is realized based on the adjusted exposure parameter, and the imaging quality of the shot image is improved.
Fig. 2 is a schematic flow chart of an exposure parameter adjustment method according to an embodiment of the present disclosure. As shown in fig. 2, the exposure parameter adjustment method may include the steps of:
s202, acquiring first image data acquired by an image sensor;
specifically, the first image data is preview image data acquired by the image sensor within a viewing range of the camera.
S204, carrying out format conversion processing on the first image data by adopting a first image format to obtain second image data;
s206, extracting a target area from the second image data by adopting a set area set and based on an area segmentation model;
it should be noted that, since the first image data acquired by the image sensor is original data obtained by converting the light source signal into the digital signal, it is not convenient for the area segmentation model to perform the target area detection, and therefore, after the first image data is acquired by the image sensor, the format conversion processing is performed on the first image data to obtain the second image data in the first image format, and then the area segmentation model is used to detect whether the second image data includes the target area belonging to the set area set, and the detected target area is segmented and extracted from the second image data.
In one or more embodiments of the present application, the first image data acquired by the image sensor may be in a Raw format, and the second image data may be in a Yuv format.
In one or more embodiments of the present application, the first image format of the second image data may also be other feasible image formats, such as rgb format, jpg format, and the like. In this regard, the embodiments of the present application are not particularly limited.
In one or more embodiments of the present application, the target region may be a sky region, the second image data includes a sky region and a non-sky region, and the sky region in the second image data is segmented and extracted based on a region segmentation model.
Please refer to fig. 3, which is a schematic diagram illustrating an example of extracting a target region according to an embodiment of the present disclosure. As shown in fig. 3, the detected second image data includes a sky region and a non-sky region, where a detected sky region is above a dotted line, and a detected non-sky region is below the dotted line, and the sky region belongs to a target region in the set of regions, so that the sky region is extracted from the second image data to obtain the target region.
In one or more embodiments of the present application, the region segmentation model may be a deep learning-based neural network model, and the neural network model may detect a target region belonging to the set of set regions in the second image data and segment and extract the target region in the second image data.
It should be noted that any of the neural network models mentioned in one or more embodiments of the present application may be trained on the basis of sample data before performing the present solution. The basic model has the same input, output and internal logic design as the neural network model, but the convolution kernel parameter of the basic model is preset, the convolution kernel parameter of the basic model is continuously adjusted and trained through the training of sample data, so that the output prediction result of the basic model tends to a real result, and when the difference between the output prediction result and the real result is smaller than a preset threshold value, the basic model obtained through training at the moment is used as the neural network model to finish the model training process.
It should be noted that the process of the model training may be completed in advance, and when the scheme is specifically executed, the process of the model training does not need to be repeatedly executed, so as to save processing steps and time and improve processing efficiency. Of course, the model training process may be repeated before the step S206 is executed, and the embodiment of the present invention is not limited thereto.
The region segmentation model referred to in the embodiments of the present application may include, but is not limited to: convolutional Neural Networks (CNN).
S208, acquiring a photometric table adjustment strategy corresponding to the target area;
specifically, a corresponding light meter table adjustment strategy is preset for each area in the set area set, and after the target area is extracted from the second image data, the light meter table adjustment strategy corresponding to the target area is searched and obtained.
For example, the target area is a sky area, and the light metering table adjustment strategy corresponding to the sky area may be such that the closer to the center of the sky area, the higher the weight value is.
S210, adjusting an initial photometric table weight value based on a photometric table adjustment strategy and position information of a target area to obtain a photometric table weight value corresponding to the target area;
specifically, the weight values corresponding to the rectangular areas in the light meter are adjusted according to the light meter adjustment strategy and the position information corresponding to the target area, so as to obtain the adjusted light meter weight values.
It can be understood that the photometric accuracy of the first image data can be improved according to the target area adjustment obtained photometry weight value.
S212, calculating an average brightness corresponding to the first image data based on the first image data and the photometric table weight value;
specifically, the first image data is subjected to area division processing based on the image signal processor to obtain at least two areas, the area brightness of each area is calculated, and the average brightness corresponding to the first image data is calculated based on the area brightness and the weight value of the light meter.
It should be noted that the number of the regions divided by the first image data is one-to-one corresponding to and equal to the number of the rectangular regions in the light meter, that is, each region divided by the first image data has a corresponding weight value in the light meter.
Fig. 4 is a schematic diagram illustrating an example of image area division and a light meter according to an embodiment of the present disclosure. As shown in fig. 4, the image area division diagram divides the first image data into a plurality of small rectangular areas, the photometry expression intention is that the photometry table also includes a plurality of rectangular areas, each rectangular area has a corresponding weight value, and each rectangular area in the photometry table corresponds to each rectangular area obtained by dividing the first image data.
In one or more embodiments of the present application, after performing region division processing on the first image data based on the image signal processor to obtain at least two regions, and calculating the region brightness of each region may be: and respectively obtaining the brightness value of each pixel point in each region, and taking the average value of the brightness values of each pixel point in a single region as the region brightness of the region.
In one or more embodiments of the present application, calculating an average luminance corresponding to the first image data based on the luminance of each region and the weight value of the light meter may be: and summing the products of the brightness of each region and the weight value of the corresponding region, and dividing the sum by the number of the regions to obtain the average brightness.
S214, acquiring target brightness corresponding to the first image data;
in one or more embodiments of the present application, the target brightness corresponding to the first image data may be a brightness value preset according to a preference of a user. After the average brightness corresponding to the first image data is obtained according to the adjusted weight value of the light meter, the target brightness corresponding to the first image data is obtained.
Optionally, the target brightness corresponding to the first image data may also be based on a scene recognition model to recognize a scene type of the first image data, and then the scene recognition model provides the corresponding target brightness according to the scene type of the first image data. The scene recognition model may be a deep learning based neural network model.
S216, adjusting exposure parameters of the image sensor based on the average brightness and the target brightness.
Specifically, if the average brightness of the first image data is less than the target brightness, the exposure parameter of the image sensor is adjusted to increase the exposure, if the average brightness of the first image data is greater than the target brightness, the exposure parameter of the image sensor is adjusted to decrease the exposure, and if the average brightness of the first image data is equal to the target brightness, the exposure parameter of the image sensor does not need to be adjusted.
It should be noted that, if the average brightness of the first image data is smaller than the target brightness, which indicates that the first image data collected by the image sensor is under-exposed after the weight value of the light meter is adjusted according to the target area, and the brightness value is insufficient, the exposure parameter of the image sensor is adjusted in the direction of increasing the exposure, so as to ensure that the image sensor can be normally exposed when the image sensor is controlled to collect the next frame of image data by using the adjusted exposure parameter.
If the average brightness of the first image data is greater than the target brightness, which indicates that after the weight value of the light meter is adjusted according to the target area, the first image data collected by the image sensor is overexposed, so that the brightness value of the first image data is too high, the exposure parameter of the image sensor is adjusted towards the direction of weakening exposure, so as to ensure that normal exposure can be performed when the image sensor is controlled to collect the next frame of image data by using the adjusted exposure parameter.
If the average brightness of the first image data is equal to the target brightness, which indicates that the first image data collected by the image sensor is normally exposed after the weight value of the light meter is adjusted according to the target area, the exposure parameter of the image sensor does not need to be adjusted, and the original exposure parameter is continuously used for controlling the image sensor to collect the next frame of image data.
In the embodiment of the application, a target area belonging to a set area set is extracted from first image data acquired by an image sensor, a weight value of a light meter is adjusted according to a light meter adjustment strategy corresponding to the target area, then light measurement is performed on the first image data by using the adjusted light meter weight value, average brightness of the first image data is obtained through calculation, and finally exposure parameters of the image sensor are adjusted according to the average brightness and the target brightness corresponding to the first image data, so that acquisition of next frame image data can be normally exposed, and imaging quality of a shot image is improved.
Fig. 5 is a schematic flow chart of an exposure parameter adjustment method according to an embodiment of the present disclosure. As shown in fig. 5, the exposure parameter adjustment method may include the steps of:
s302, acquiring first image data acquired by an image sensor;
specifically, please refer to the description of step S202 in another embodiment for step S302, which is not repeated herein.
S304, carrying out format conversion processing on the first image data by adopting a first image format to obtain second image data;
specifically, please refer to the description of step S204 in another embodiment in step S304, which is not repeated herein.
S306, extracting a target area from the second image data by adopting a set area set and based on an area segmentation model;
specifically, please refer to the description of step S206 in another embodiment for step S306, which is not repeated herein.
S308, acquiring a photometric table adjustment strategy corresponding to the target area;
specifically, please refer to the description of step S208 in another embodiment for step S308, which is not repeated herein.
S310, adjusting an initial photometric table weight value based on a photometric table adjustment strategy and position information of the target area to obtain a photometric table weight value corresponding to the target area;
specifically, please refer to the description of step S210 in another embodiment for step S310, which is not repeated herein.
S312, calculating an average brightness corresponding to the first image data based on the first image data and the photometric table weight value;
specifically, please refer to the description of step S212 in another embodiment for step S312, which is not repeated herein.
S314, acquiring target brightness corresponding to the first image data;
specifically, please refer to the description of step S214 in another embodiment for step S314, which is not repeated herein.
S316, adjusting exposure parameters of the image sensor based on the average brightness and the target brightness;
specifically, please refer to the description of step S216 in another embodiment for step S316, which is not repeated herein.
S318, responding to the shooting instruction, and controlling the image sensor to collect third image data based on the adjusted exposure parameters;
and S320, performing format conversion processing on the third image data by adopting a second image format to obtain fourth image data.
It can be understood that, step S302 to step S316 are a process executed in a loop before the user issues the shooting instruction, that is, the exposure parameter controls the image sensor to collect the first image data, then the weight value of the light meter is adjusted based on the target area in the first image data, the average brightness of the first image data is calculated based on the adjusted weight value of the light meter, the exposure parameter is adjusted based on the average brightness of the first image data and the preset target brightness of the first image data, then the image sensor is controlled to collect the next frame of image data by using the adjusted exposure parameter, and the operation is repeated in such a loop, the weight value of the light meter and the exposure parameter are continuously and dynamically adjusted according to the change of each frame of image data collected by the image sensor, so that it is always ensured that the image data collected by the image sensor can be normally exposed based on the adjusted exposure parameter.
Step S318 to step S320 are specifically, in response to a shooting instruction issued by a user, controlling the image sensor to acquire third image data within a view finding range of the camera at the current time based on the adjusted exposure parameter, and then performing format conversion processing on the third image data to obtain fourth image data in the second image format.
In one or more embodiments of the present application, a user issues a shooting instruction by clicking a shooting button, responds to the shooting instruction, and controls an image sensor to acquire third image data within a view range of a camera at the current time based on an adjusted exposure parameter, where the third image data is image data in a Raw format, and finally converts the third image data in the Raw format into fourth image data in a jpg format. The fourth image data is a shot image obtained by shooting.
In the embodiment of the application, a target area belonging to a set area set is extracted from first image data acquired by an image sensor, a light meter weight value is adjusted according to a light meter adjustment strategy corresponding to the target area, then light measurement is performed on the first image data by using the adjusted light meter weight value, average brightness of the first image data is obtained through calculation, exposure parameters of the image sensor are adjusted according to the average brightness and target brightness corresponding to the first image data, so that normal exposure can be guaranteed for acquisition of next frame of image data, when a shooting instruction is received, the image sensor is controlled to acquire third image data based on the adjusted exposure parameters, and finally format conversion is performed on the third image data to acquire fourth image data in a second image format, so that imaging quality of a shot image is improved.
The exposure parameter adjusting apparatus provided in the embodiments of the present application will be described in detail below with reference to fig. 6. It should be noted that the exposure parameter adjusting apparatus shown in fig. 6 is used for executing the method of the embodiment shown in fig. 1, fig. 2 and fig. 5 of the present application, and for convenience of description, only the portion related to the embodiment of the present application is shown, and details of the technology are not disclosed, please refer to the embodiment shown in fig. 1, fig. 2 and fig. 5 of the present application.
Fig. 6 is a schematic structural diagram of an exposure parameter adjusting apparatus according to an embodiment of the present disclosure. As shown in fig. 6, the exposure parameter adjusting apparatus 1 may be implemented by software, hardware, or a combination of both as all or a part of a terminal device. According to some embodiments, the exposure parameter adjusting apparatus 1 includes a target area obtaining module 11, a light meter calculating module 12, and an exposure parameter adjusting module 13, and specifically includes:
a target region acquiring module 11, configured to acquire first image data acquired by an image sensor, and extract a target region in the first image data based on a set of set regions, where the set of set regions are sample region sets preset in different shooting scenes;
a light meter calculating module 12, configured to obtain a light meter weight value corresponding to the target area based on the position information of the target area in the first image data;
and an exposure parameter adjusting module 13, configured to adjust an exposure parameter of the image sensor based on the first image data and the photometric weighting value.
Optionally, the target area obtaining module 11 is specifically configured to:
carrying out format conversion processing on the first image data by adopting a first image format to obtain second image data;
and adopting a set region set, and extracting a target region in the second image data based on a region segmentation model.
Optionally, the light meter calculating module 12 is specifically configured to:
acquiring a photometric table adjustment strategy corresponding to the target area;
and adjusting an initial photometric list weight value based on the photometric list adjustment strategy and the position information of the target area to obtain a photometric list weight value corresponding to the target area.
Optionally, please refer to fig. 7, which is a schematic structural diagram of an exposure parameter adjusting module according to an embodiment of the present application. As shown in fig. 7, the exposure parameter adjusting module 13 includes:
an average brightness calculation unit 131 configured to calculate an average brightness corresponding to the first image data based on the first image data and the photometric table weight value;
a target luminance obtaining unit 132 for obtaining a target luminance corresponding to the first image data;
an exposure parameter adjusting unit 133, configured to adjust an exposure parameter of the image sensor based on the average brightness and the target brightness.
Optionally, the average brightness calculating unit 131 is specifically configured to:
performing region division processing on the first image data based on an image signal processor to obtain at least two regions, and calculating the region brightness of each region;
and calculating the average brightness corresponding to the first image data based on the brightness of each area and the weight value of the light meter.
Optionally, the target brightness acquiring unit 132 is specifically configured to:
identifying a scene category of the first image data based on a scene recognition model;
and acquiring the target brightness corresponding to the scene category.
Optionally, please refer to fig. 8, which is a schematic structural diagram of an exposure parameter adjusting apparatus according to an embodiment of the present disclosure. As shown in fig. 8, the exposure parameter adjusting apparatus further includes:
the image shooting module 14 is used for responding to a shooting instruction and controlling the image sensor to acquire third image data based on the adjusted exposure parameters;
and the format conversion module 15 is configured to perform format conversion processing on the third image data by using the second image format to obtain fourth image data.
In the embodiment of the application, a target area belonging to a set area set is extracted from first image data acquired by an image sensor, a light meter weight value is adjusted according to a light meter adjustment strategy corresponding to the target area, then light measurement is performed on the first image data by using the adjusted light meter weight value, average brightness of the first image data is obtained through calculation, exposure parameters of the image sensor are adjusted according to the average brightness and target brightness corresponding to the first image data, so that normal exposure can be guaranteed for acquisition of next frame of image data, when a shooting instruction is received, the image sensor is controlled to acquire third image data based on the adjusted exposure parameters, and finally format conversion is performed on the third image data to acquire fourth image data in a second image format, so that imaging quality of a shot image is improved.
It should be noted that, when the exposure parameter adjusting apparatus provided in the foregoing embodiment executes the exposure parameter adjusting method, only the division of the functional modules is taken as an example, and in practical applications, the functions may be distributed to different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to complete all or part of the functions described above. In addition, the exposure parameter adjusting apparatus and the exposure parameter adjusting method provided in the above embodiments belong to the same concept, and details of implementation processes thereof are shown in the method embodiments, which are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
A computer storage medium further provided in the embodiments of the present application may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and being executed by the exposure parameter adjustment method according to the embodiments shown in fig. 1 to fig. 5, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to fig. 5, which is not described herein again.
A computer program product further provided by the present application stores at least one instruction, where the at least one instruction is loaded by the processor and executes the exposure parameter adjustment method according to the embodiment shown in fig. 1 to 7, and a specific execution process may refer to specific descriptions of the embodiment shown in fig. 1 to 7, which is not described herein again.
Referring to fig. 9, a block diagram of an electronic device according to an exemplary embodiment of the present application is shown. The electronic device in the present application may comprise one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be coupled by a bus 150.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the entire electronic device using various interfaces and lines, and performs various functions of the terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user page, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 120 includes a Non-Transitory Computer-Readable Medium (Non-transient Computer-Readable Storage Medium). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, and the like), instructions for implementing the above method embodiments, and the like, and the operating system may be an Android (Android) system, including a system based on Android system depth development, an IOS system developed by apple, including a system based on IOS system depth development, or other systems.
The memory 120 may be divided into an operating system space, where an operating system runs, and a user space, where native and third-party applications run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in an animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
In order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
The input device 130 is used for receiving input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used for outputting instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are touch display screens.
The touch display screen can be designed as a full-face screen, a curved screen or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configurations of the electronic devices illustrated in the above-described figures do not constitute limitations on the electronic devices, which may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components. For example, the electronic device further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a Wireless Fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the electronic device shown in fig. 9, the processor 110 may be configured to call the exposure parameter adjustment program stored in the memory 120, and specifically perform the following operations:
acquiring first image data acquired by an image sensor, and extracting a target region in the first image data based on a set of set regions, wherein the set of set regions are preset sample region sets under different shooting scenes;
acquiring a photometric table weight value corresponding to the target area based on the position information of the target area in the first image data;
and adjusting exposure parameters of the image sensor based on the first image data and the photometric weighting value.
In one embodiment, when the processor 110 performs the extracting the target region from the first image data based on the set region set, the following operations are specifically performed:
carrying out format conversion processing on the first image data by adopting a first image format to obtain second image data;
and adopting a set region set, and extracting a target region in the second image data based on a region segmentation model.
In an embodiment, when the processor 110 executes the obtaining of the photometric table weight value corresponding to the target area based on the position information of the target area in the first image data, specifically:
acquiring a photometric table adjustment strategy corresponding to the target area;
and adjusting an initial photometric table weight value based on the photometric table adjustment strategy and the position information of the target area to obtain a photometric table weight value corresponding to the target area.
In an embodiment, when performing the adjustment of the exposure parameter of the image sensor based on the first image data and the photometric table weight value, the processor 110 specifically performs the following operations:
calculating average brightness corresponding to the first image data based on the first image data and the photometric table weight value;
acquiring target brightness corresponding to the first image data;
and adjusting exposure parameters of the image sensor based on the average brightness and the target brightness.
In one embodiment, when the processor 110 performs the calculating of the average brightness corresponding to the first image data based on the first image data and the photometric weight value, the following operations are specifically performed:
performing region division processing on the first image data based on an image signal processor to obtain at least two regions, and calculating the region brightness of each region;
and calculating the average brightness corresponding to the first image data based on the brightness of each area and the weight value of the light meter.
In an embodiment, when the obtaining of the target brightness corresponding to the first image data is performed, the processor 110 specifically performs the following operations:
identifying a scene category of the first image data based on a scene recognition model;
and acquiring the target brightness corresponding to the scene category.
In one embodiment, the processor 110 further performs the following operations:
responding to a shooting instruction, and controlling the image sensor to acquire third image data based on the adjusted exposure parameters;
and performing format conversion processing on the third image data by adopting a second image format to obtain fourth image data.
In the embodiment of the application, a target area belonging to a set area set is extracted from first image data acquired by an image sensor, a light meter weight value is adjusted according to a light meter adjustment strategy corresponding to the target area, then light measurement is performed on the first image data by using the adjusted light meter weight value, average brightness of the first image data is obtained through calculation, exposure parameters of the image sensor are adjusted according to the average brightness and target brightness corresponding to the first image data, so that normal exposure can be guaranteed for acquisition of next frame of image data, when a shooting instruction is received, the image sensor is controlled to acquire third image data based on the adjusted exposure parameters, and finally format conversion is performed on the third image data to acquire fourth image data in a second image format, so that imaging quality of a shot image is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and should not be taken as limiting the scope of the present application, so that the present application will be covered by the appended claims.

Claims (10)

1. An exposure parameter adjustment method, comprising:
acquiring first image data acquired by an image sensor, and extracting a target region in the first image data based on a set of set regions, wherein the set of set regions are preset sample region sets under different shooting scenes;
acquiring a photometric table weight value corresponding to the target area based on the position information of the target area in the first image data;
and adjusting exposure parameters of the image sensor based on the first image data and the photometric weighting value.
2. The method according to claim 1, wherein the extracting a target region in the first image data based on the set of set regions comprises:
carrying out format conversion processing on the first image data by adopting a first image format to obtain second image data;
and adopting a set region set, and extracting a target region in the second image data based on a region segmentation model.
3. The method of claim 1, wherein the obtaining a photometric table weight value corresponding to the target region based on the position information of the target region in the first image data comprises:
acquiring a photometric table adjustment strategy corresponding to the target area;
and adjusting an initial photometric table weight value based on the photometric table adjustment strategy and the position information of the target area to obtain a photometric table weight value corresponding to the target area.
4. The method of claim 1, wherein adjusting the exposure parameters of the image sensor based on the first image data and the photometric weighting value comprises:
calculating average brightness corresponding to the first image data based on the first image data and the photometric table weight value;
acquiring target brightness corresponding to the first image data;
and adjusting exposure parameters of the image sensor based on the average brightness and the target brightness.
5. The method of claim 4, wherein the calculating an average brightness corresponding to the first image data based on the first image data and the photometric weight value comprises:
performing region division processing on the first image data based on an image signal processor to obtain at least two regions, and calculating the region brightness of each region;
and calculating the average brightness corresponding to the first image data based on the brightness of each area and the weight value of the light meter.
6. The method of claim 4, wherein obtaining the target brightness corresponding to the first image data comprises:
identifying a scene category of the first image data based on a scene recognition model;
and acquiring the target brightness corresponding to the scene category.
7. The method of claim 1, further comprising:
responding to a shooting instruction, and controlling the image sensor to acquire third image data based on the adjusted exposure parameters;
and performing format conversion processing on the third image data by adopting a second image format to obtain fourth image data.
8. An exposure parameter adjustment apparatus, characterized by comprising:
the target area acquisition module is used for acquiring first image data acquired by an image sensor and extracting a target area in the first image data based on a set of set areas, wherein the set of set areas are preset sample area sets under different shooting scenes;
a light meter calculation module, configured to obtain a light meter weight value corresponding to the target area based on position information of the target area in the first image data;
and the exposure parameter adjusting module is used for adjusting the exposure parameters of the image sensor based on the first image data and the photometric weighting value.
9. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method of any one of claims 1 to 7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of the method according to any of claims 1-7.
CN202210481753.3A 2022-05-05 2022-05-05 Exposure parameter adjusting method and device, storage medium and electronic equipment Pending CN115037883A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210481753.3A CN115037883A (en) 2022-05-05 2022-05-05 Exposure parameter adjusting method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210481753.3A CN115037883A (en) 2022-05-05 2022-05-05 Exposure parameter adjusting method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115037883A true CN115037883A (en) 2022-09-09

Family

ID=83118740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210481753.3A Pending CN115037883A (en) 2022-05-05 2022-05-05 Exposure parameter adjusting method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115037883A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117651212A (en) * 2024-01-29 2024-03-05 荣耀终端有限公司 Exposure parameter adjusting method and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110691199A (en) * 2019-10-10 2020-01-14 厦门美图之家科技有限公司 Face automatic exposure method and device, shooting equipment and storage medium
CN111225162A (en) * 2020-01-21 2020-06-02 厦门亿联网络技术股份有限公司 Image exposure control method, system, readable storage medium and camera equipment
CN111742545A (en) * 2019-07-12 2020-10-02 深圳市大疆创新科技有限公司 Exposure control method and device and movable platform
CN112073645A (en) * 2020-09-04 2020-12-11 深圳创维-Rgb电子有限公司 Exposure control method, device, terminal equipment and storage medium
CN114257738A (en) * 2021-11-30 2022-03-29 上海闻泰信息技术有限公司 Automatic exposure method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111742545A (en) * 2019-07-12 2020-10-02 深圳市大疆创新科技有限公司 Exposure control method and device and movable platform
CN110691199A (en) * 2019-10-10 2020-01-14 厦门美图之家科技有限公司 Face automatic exposure method and device, shooting equipment and storage medium
CN111225162A (en) * 2020-01-21 2020-06-02 厦门亿联网络技术股份有限公司 Image exposure control method, system, readable storage medium and camera equipment
CN112073645A (en) * 2020-09-04 2020-12-11 深圳创维-Rgb电子有限公司 Exposure control method, device, terminal equipment and storage medium
CN114257738A (en) * 2021-11-30 2022-03-29 上海闻泰信息技术有限公司 Automatic exposure method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117651212A (en) * 2024-01-29 2024-03-05 荣耀终端有限公司 Exposure parameter adjusting method and electronic equipment

Similar Documents

Publication Publication Date Title
US11006046B2 (en) Image processing method and mobile terminal
US11210768B2 (en) Digital image auto exposure adjustment
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
US9330446B2 (en) Method and apparatus for processing image
CN110022469B (en) Image processing method, image processing device, storage medium and electronic equipment
CN107820020A (en) Method of adjustment, device, storage medium and the mobile terminal of acquisition parameters
WO2020192692A1 (en) Image processing method and related apparatus
CN113411498B (en) Image shooting method, mobile terminal and storage medium
CN107690804B (en) Image processing method and user terminal
CN110264473B (en) Image processing method and device based on multi-frame image and electronic equipment
CN113421189A (en) Image super-resolution processing method and device and electronic equipment
CN109104578B (en) Image processing method and mobile terminal
CN111028276A (en) Image alignment method and device, storage medium and electronic equipment
CN115037883A (en) Exposure parameter adjusting method and device, storage medium and electronic equipment
CN109784327B (en) Boundary box determining method and device, electronic equipment and storage medium
WO2022151852A1 (en) Image processing method, apparatus, and system, electronic device, and storage medium
CN112351197B (en) Shooting parameter adjusting method and device, storage medium and electronic equipment
CN114429476A (en) Image processing method, image processing apparatus, computer device, and storage medium
CN114339060A (en) Exposure adjusting method and device, storage medium and electronic equipment
CN108401119B (en) Image processing method, mobile terminal and related medium product
CN107454340B (en) Image synthesis method and device based on high dynamic range principle and mobile terminal
CN111353330A (en) Image processing method, image processing device, electronic equipment and storage medium
CN115379128A (en) Exposure control method and device, computer readable medium and electronic equipment
CN113891008B (en) Exposure intensity adjusting method and related equipment
CN105141857A (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination