CN112887630A - Automatic exposure method, electronic device, and computer-readable storage medium - Google Patents

Automatic exposure method, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
CN112887630A
CN112887630A CN202110371012.5A CN202110371012A CN112887630A CN 112887630 A CN112887630 A CN 112887630A CN 202110371012 A CN202110371012 A CN 202110371012A CN 112887630 A CN112887630 A CN 112887630A
Authority
CN
China
Prior art keywords
image
image brightness
preset
brightness
exposure
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
CN202110371012.5A
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.)
Nanchang OFilm Tech Co Ltd
Nanchang OFilm Optoelectronics Technology Co Ltd
Original Assignee
Nanchang OFilm Optoelectronics Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanchang OFilm Optoelectronics Technology Co Ltd filed Critical Nanchang OFilm Optoelectronics Technology Co Ltd
Priority to CN202110371012.5A priority Critical patent/CN112887630A/en
Publication of CN112887630A publication Critical patent/CN112887630A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/73Circuitry for compensating brightness variation in the scene by influencing the exposure time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • H04N23/676Bracketing for image capture at varying focusing conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/71Circuitry for evaluating the brightness variation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The embodiment of the application relates to the technical field of images and discloses an automatic exposure method, electronic equipment and a computer readable storage medium. The method comprises the following steps: calibrating a preset first corresponding relation under the initial zooming magnification; when a zoom instruction is detected, obtaining a brightness change value of the first image brightness relative to the first preset image brightness according to a preset second corresponding relation, an initial zoom magnification and a target zoom magnification corresponding to the zoom instruction, wherein the second corresponding relation is used for representing the corresponding relation between the image brightness value and the zoom magnification, and the first preset image brightness is used for calibrating the first corresponding relation; and determining a second exposure time length corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation, and controlling a camera of the electronic equipment to expose in the second exposure time length under the target zoom magnification so as to obtain a first image with the image brightness as the first image brightness. The method is beneficial to improving the imaging efficiency.

Description

Automatic exposure method, electronic device, and computer-readable storage medium
Technical Field
The present disclosure relates to the field of imaging technologies, and in particular, to an automatic exposure method, an electronic device, and a computer-readable storage medium.
Background
In an optical continuous zooming module used on a mobile terminal (such as a mobile phone, a flat panel and the like), in the continuous zooming process, the brightness of an imaging image before and after zooming is different. In order to stabilize the brightness of the imaged image, automatic exposure is often required.
Each zooming of the existing optical continuous zooming module generally needs to dynamically adjust exposure parameters to obtain an image with brightness meeting requirements, and the required time is longer, so that the imaging efficiency is influenced.
Disclosure of Invention
The embodiment of the application discloses an automatic exposure method, electronic equipment and a computer-readable storage medium, which can improve imaging efficiency.
The first aspect of the embodiment of the present application discloses an automatic exposure method, which is applied to an electronic device, and the method includes:
executing at least one first preprocessing step under the initial zoom magnification, and acquiring a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by a camera is the same as a first preset image brightness; wherein the first exposure parameter comprises a first exposure duration; performing the first preprocessing step once, including: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a target image, and judging whether the image brightness of the target image is the same as the first preset image brightness; when the judgment result is that the image brightness of the target image is different from the first preset image brightness, triggering to execute the next first preprocessing step;
calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness, wherein the first corresponding relation is used for representing the corresponding relation between the image brightness value and the exposure duration;
when a zoom instruction is detected, acquiring a magnification difference value of the initial zoom magnification and a target zoom magnification corresponding to the zoom instruction; determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation; the second corresponding relation is used for representing the corresponding relation between the brightness value of the image and the zooming magnification;
and determining a second exposure time length corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation, and controlling a camera of the electronic equipment to expose at the target zoom magnification for the second exposure time length to obtain a first image with the image brightness as the first image brightness.
In the embodiment of the application, the exposure parameters are dynamically adjusted only under the initial zoom magnification, and then the exposure duration corresponding to the zoomed image can be quickly determined according to the preset second corresponding relation and the calibrated first corresponding relation in each zooming, so that the exposure is performed by using the determined exposure duration to obtain the image with the image brightness meeting the requirement, and the imaging efficiency is greatly improved.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the number of the first preset image luminances is multiple, the first correspondence is a linear function, and the obtaining a first exposure parameter corresponding to the target image is performed at least once under the initial zoom magnification until the image luminance of the target image acquired by the camera is the same as the first preset image luminance, includes:
executing at least one first preprocessing step at an initial zooming magnification aiming at each first preset image brightness, and acquiring a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by a camera is the same as the first preset image brightness so as to obtain a first exposure parameter corresponding to each first preset image brightness;
the calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness includes:
and calibrating a preset first corresponding relation by using the first preset image brightness and the first exposure duration corresponding to each first preset image brightness.
In the embodiment of the application, the preset first corresponding relation can be calibrated by using a plurality of first preset image brightnesses and the first exposure durations corresponding to the first preset image brightnesses.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the number of the first preset image luminances is one, and the calibrating the preset first corresponding relationship by using the first preset image luminances and the first exposure time duration in the first exposure parameter to determine the first corresponding relationship includes:
acquiring the ratio of the first preset image brightness to the first exposure time;
and taking the ratio as a proportionality coefficient of the direct proportional function to obtain a calibrated first corresponding relation.
In the embodiment of the present application, the first corresponding relationship is calibrated by using the ratio of the first preset image brightness to the first exposure duration, so that the validity of the first corresponding relationship can be ensured.
As an optional implementation manner, in the first aspect of the embodiment of the present application, the determining, according to the image brightness variation value and the first corresponding relationship after calibration, a second exposure time duration corresponding to the target zoom magnification includes:
obtaining a time length change value according to the image brightness change value and the proportion coefficient; obtaining a second exposure duration under the target zoom magnification according to the first exposure duration and the duration change value;
alternatively, the first and second electrodes may be,
obtaining first image brightness according to the image brightness change value and the first preset image brightness; and obtaining a second exposure duration under the target zoom magnification according to the first image brightness and the scale coefficient.
The embodiment of the application provides two ways of obtaining the second exposure duration, the first way is to obtain the duration change value by using an image brightness change value and a proportionality coefficient, and then obtain the second exposure duration under the second zoom magnification according to the first exposure duration and the duration change value, and the second way is to obtain the first image brightness by using the image brightness change value and the first preset image brightness, and then obtain the second exposure duration under the second zoom magnification according to the proportionality coefficient and the first image brightness, so that the obtaining way of the second exposure duration is more flexible.
As an optional implementation manner, in the first aspect of the embodiment of the present application, before obtaining, according to the preset second correspondence, the initial zoom magnification and the target zoom magnification corresponding to the zoom instruction, a brightness change value of the first image brightness relative to the first preset image brightness, the method further includes:
and calibrating a second corresponding relation between an image brightness value and a zooming magnification of a calibration image acquired by a camera of the electronic equipment under the calibration ambient brightness based on the set sensor analog gain value under the certain calibration ambient brightness.
In the embodiment of the application, under a certain calibration environment brightness, a second corresponding relation between an image brightness value of a calibration image acquired under the calibration environment brightness and a zoom magnification can be calibrated based on a set sensor analog gain value, which is beneficial to realizing flexible calibration of the second corresponding relation.
As an optional implementation manner, in the first aspect of the embodiment of the present application, calibrating, based on a set sensor analog gain value, a second corresponding relationship between an image brightness value and a zoom magnification of a calibration image acquired by the camera under a certain calibration ambient brightness includes:
executing at least one second preprocessing step under certain calibrated ambient brightness and a first zoom magnification, and acquiring a second exposure parameter corresponding to a second image until the image brightness of the second image acquired by the camera is the same as a second preset image brightness; wherein the second exposure parameter comprises a third exposure duration; performing the second preprocessing step once, including: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a second image, and judging whether the image brightness of the second image is the same as the second preset image brightness; when the judgment result is that the image brightness of the second image is different from the second preset image brightness, triggering to execute the next second preprocessing step;
under the calibration environment brightness, adjusting the calibration zoom magnification of the camera according to a preset zoom magnification step length, and controlling the camera to perform exposure under each calibration zoom magnification by using the sensor analog gain value and the third exposure duration to obtain a calibration image corresponding to each calibration zoom magnification;
acquiring second image brightness corresponding to each calibration image;
and obtaining a second corresponding relation between the image brightness value and the zooming magnification according to the first zooming magnification, the second preset image brightness, each calibrated zooming magnification and the second image brightness corresponding to each calibrated zooming magnification.
In the embodiment of the application, the exposure parameters are dynamically adjusted at the first zoom magnification to obtain a second image meeting second preset image brightness, a third exposure duration in the exposure parameters corresponding to the second image is obtained, then the gradual zoom exposure is carried out according to the third exposure duration and the set sensor simulation gain value to obtain second image brightness corresponding to each calibrated zoom magnification, and finally a second corresponding relation between the image brightness value and the zoom magnification is obtained according to the first zoom magnification, the second preset image brightness, each calibrated zoom magnification and the second image brightness corresponding to each calibrated zoom magnification. Because the calibration method depends on a plurality of calibration zoom magnifications, the effectiveness of the second corresponding relation between the image brightness value and the zoom magnifications is greatly improved.
As an optional implementation manner, in the first aspect of the embodiments of the present application, the obtaining, according to the first zoom magnification, the second preset image brightness, each of the calibrated zoom magnifications, and the second image brightness corresponding to each of the calibrated zoom magnifications, a second corresponding relationship between an image brightness value and a zoom magnification includes:
obtaining a first coordinate point according to the first zooming magnification and the second preset image brightness;
obtaining a plurality of second coordinate points according to each calibration zoom magnification and the second image brightness corresponding to each calibration zoom magnification;
and fitting the first coordinate points and the plurality of second coordinate points according to a preset curve fitting algorithm to obtain a second corresponding relation between the brightness value of the image and the zoom magnification.
In the embodiment of the application, a plurality of coordinate points are obtained based on the first zoom ratio, the second preset image brightness, each calibration zoom ratio and the second image brightness corresponding to each calibration zoom ratio, and then the plurality of coordinate points are fitted based on a curve fitting algorithm to obtain the second corresponding relationship between the image brightness value and the zoom ratio, so that the effectiveness of the second corresponding relationship between the image brightness value and the zoom ratio can be further improved.
As an optional implementation manner, in the first aspect of this embodiment of the present application, a nine-axis sensor is disposed on the electronic device, and the method further includes:
acquiring pose change information of the electronic equipment by using the nine-axis sensor;
and when the pose variation indicated by the pose variation information is larger than a preset variation, re-executing the first preprocessing step at least once under the initial zoom magnification, and acquiring a first exposure parameter until the image brightness of the target image is the same as the first preset image brightness.
In the embodiment of the application, when the pose variation of the electronic device is greater than the preset variation, the preset first corresponding relation can be recalibrated, and the effectiveness and the accuracy of the calibrated first corresponding relation are effectively guaranteed.
A second aspect of an embodiment of the present application discloses an electronic device, including:
the calibration unit is used for executing at least one first preprocessing step, and acquiring a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by the camera is the same as a first preset image brightness; wherein the first exposure parameter comprises a first exposure duration; performing the first preprocessing step once, including: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a target image, and judging whether the image brightness of the target image is the same as the first preset image brightness; when the judgment result is that the image brightness of the target image is different from the first preset image brightness, triggering to execute the next first preprocessing step;
the calibration unit is further configured to calibrate a preset first corresponding relationship by using the first exposure duration and the first preset image brightness, where the first corresponding relationship is used to represent a corresponding relationship between an image brightness value and an exposure duration;
the first determining unit is used for acquiring a magnification difference value of the initial zooming magnification and a target zooming magnification corresponding to the zooming instruction when the zooming instruction is detected; determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation; the second corresponding relation is used for representing the corresponding relation between the brightness value of the image and the zooming magnification;
a second determining unit, configured to determine, according to the image brightness change value and the calibrated first corresponding relationship, a second exposure duration corresponding to the target zoom magnification;
and the control unit is used for controlling the camera of the electronic equipment to expose in the second exposure duration under the target zoom magnification so as to obtain a first image with the image brightness as the first image brightness.
A third aspect of the embodiments of the present application discloses an electronic device, including:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute any one of the methods of the first aspect of the embodiments of the present application;
a camera; the electronic device executes any one method of the first aspect of the embodiment of the present application through the camera;
a nine-axis sensor; wherein the electronic device performs the corresponding method of the first aspect of the embodiments of the present application through the nine-axis sensor.
A fourth aspect of embodiments of the present application discloses a computer-readable storage medium storing a computer program, which when executed by a processor implements any one of the methods of the first aspect of embodiments of the present application.
A fifth aspect of embodiments of the present application discloses a computer program product, which, when run on a computer, causes the computer to execute any one of the methods of the first aspect.
A sixth aspect of the present embodiment discloses an application publishing platform, configured to publish a computer program product, wherein when the computer program product runs on a computer, the computer is caused to execute any one of the methods of the first aspect.
Compared with the prior art, the embodiment of the application has the following beneficial effects:
the automatic exposure method disclosed by the embodiment of the application is applied to electronic equipment and comprises the following steps: executing at least one first preprocessing step under the initial zoom magnification, obtaining a first exposure parameter corresponding to the target image until the image brightness of the target image is the same as the first preset image brightness, and calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness in the first exposure parameter; when a zoom instruction is detected, acquiring a magnification difference value of an initial zoom magnification and a target zoom magnification corresponding to the zoom instruction; determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation, wherein the second corresponding relation is used for representing the corresponding relation between the image brightness value and the zooming magnification, and the first preset image brightness is used for calibrating the first corresponding relation; and determining a second exposure time length corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation, and controlling a camera of the electronic equipment to expose in the second exposure time length under the target zoom magnification so as to obtain a first image with the image brightness as the first image brightness. The automatic exposure method disclosed by the embodiment of the application only dynamically adjusts the exposure parameters under the initial zoom magnification, and then the exposure duration corresponding to the zoomed image can be quickly determined according to the preset second corresponding relation and the calibrated first corresponding relation in each zooming, so that the exposure is carried out by using the determined exposure duration to obtain the image with the image brightness meeting the requirement, and the imaging efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flow chart of an automatic exposure method disclosed in an embodiment of the present application;
FIG. 1A is a schematic diagram of a first correspondence disclosed in an embodiment of the present application;
FIG. 1B is a diagram illustrating a second mapping relationship disclosed in an embodiment of the present application;
fig. 2 is a schematic flowchart of a calibration method for a second correspondence relationship disclosed in the embodiment of the present application;
FIG. 3 is a schematic flow chart of another automatic exposure method disclosed in the embodiments of the present application;
fig. 4 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of another electronic device disclosed in the embodiments of the present application;
fig. 6 is a schematic structural diagram of another electronic device disclosed in the 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.
It should be noted that the terms "first" and "second" and the like in the description and claims of the present application are used for distinguishing different objects, and are not used for describing a specific order. The terms "comprises," "comprising," and "having," and any variations thereof, of the embodiments of the present application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The embodiment of the application discloses an automatic exposure method, electronic equipment and a computer readable storage medium, which can improve imaging efficiency.
The camera of the electronic equipment disclosed in the embodiment of the application can include the optics module of zooming, and the optics of the optics module of zooming mainly zooms the distance transform through the camera lens, and the focus imaging each other between the meniscus. The electronic device may include a general handheld electronic terminal such as a smart phone, a portable terminal, a Personal Digital Assistant (PDA), a Portable Multimedia Player (PMP) device, a notebook computer, a notebook (Note Pad), a Wireless Broadband (Wibro) terminal, a tablet computer (PC), an intelligent PC, a car computer, and the like. The electronic device may also include a wearable device. The wearable device may be worn directly on the user or may be a portable electronic device integrated into the user's clothing or accessories. Wearable equipment is not only a hardware equipment, can realize powerful intelligent function through software support and data interaction, high in the clouds interaction more, for example: the system has the functions of calculation, positioning and alarming, and can be connected with wearable equipment and various terminals. Wearable devices may include, but are not limited to, wrist-supported watch types (e.g., wrist watches, wrist-supported products), foot-supported shoes types (e.g., shoes, socks, or other leg-worn products), head-supported Glass types (e.g., glasses, helmets, headbands, etc.), and various types of non-mainstream products such as smart clothing, bags, crutches, accessories, and the like.
Some of the terms mentioned in the examples of the present application are explained below as follows:
the zoom magnification (hereinafter, an initial zoom magnification, a target zoom magnification, a first zoom magnification, and a calibration zoom magnification) refers to a magnification for a photographic subject at the time of imaging.
The exposure parameters (e.g., first exposure parameter, second exposure parameter) include a sensor gain value, an exposure time period, and an aperture size. Wherein:
the aperture size represents the amount of light entering the camera.
The exposure time period (hereinafter, referred to as a first exposure time period, a second exposure time period, and a third exposure time period) refers to a time interval from the opening to the closing of the shutter of the camera, and the longer the exposure time period, the more light projected onto the photosensitive surface of the photographic photosensitive material, and conversely, the less light projected onto the photosensitive surface of the photographic photosensitive material.
The sensor gain value refers to the magnitude by which the sensor adjusts the light received from the original scene up or down.
The image brightness value (image brightness of the target image, first preset image brightness, first image brightness, image brightness of the second image, second preset image brightness, second image brightness) refers to a brightness level of the image.
In some embodiments, the manner in which the electronic device obtains the image brightness of the image (e.g., the target image and the second image) may include, but is not limited to, the following:
(1) the electronic device averages the brightness of all pixels of the image to obtain the brightness value of the image.
(2) The electronic equipment sets different weights for different areas of the image, averages the brightness of all pixels included in each area to obtain the average brightness corresponding to each area, and performs weighted summation on the average brightness corresponding to each area to obtain the brightness value of the image.
(3) The electronic equipment determines a target image area from the image, wherein the target image area is a central area with a preset size in the image, and the brightness of all pixels in the target image area is averaged to obtain the brightness value of the image.
Further, when the image is in YUV (brightness, color, saturation) image format, the electronic device averaging the brightness of all pixels in the target image area to obtain the image brightness value may include: and acquiring a gray value of the target image area, and taking the gray value of the target image area as an image brightness value.
(4) The electronic equipment determines a target image area from the image, wherein the target image area is a central area with a preset size in the image, determines a target color component according to an image format of the image, and averages pixel brightness corresponding to the target color component in the target image area to obtain an image brightness value.
It should be noted that the target color component may be a red color component, a green color component, or a blue color component. The target color components for calculating the image brightness are different for different image formats. For example, the corresponding target color component of the raw (raw Image format) Image format may be a red color component or a blue color component, and the corresponding target color component of the bmp (bitmap) Image format may be a green color component.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating an automatic exposure method according to an embodiment of the present disclosure. As shown in fig. 1, includes:
101. and executing at least one first preprocessing step under the initial zoom magnification until the image brightness of the target image is the same as the first preset image brightness, acquiring a first exposure parameter corresponding to the target image, and calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness in the first exposure parameter.
In this embodiment of the present application, the performing the first preprocessing step once may include: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a target image, and judging whether the image brightness of the target image is the same as the first preset image brightness; and triggering and executing the next first preprocessing step when the judgment result is that the image brightness of the target image is different from the first preset image brightness.
In some embodiments, the first correspondence is used to characterize the correspondence between the image brightness value and the exposure duration, and the first correspondence may be a linear function measured by a plurality of experiments, and may be expressed as y ═ kx + b, where x denotes the exposure duration and y denotes the image brightness value.
In some embodiments, the number of the first preset image brightnesses may be multiple, and the above performing the first preprocessing step at least once under the initial zoom magnification until the image brightness of the target image acquired by the camera is the same as the first preset image brightness, and acquiring the first exposure parameter corresponding to the target image may include: aiming at each first preset image brightness, executing at least one first preprocessing step under the initial zooming magnification, and obtaining a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by a camera is the same as the first preset image brightness so as to obtain a first exposure parameter corresponding to each first preset image brightness;
further, the calibrating the preset first corresponding relationship by using the first exposure duration and the first preset image brightness may include: and calibrating the preset first corresponding relation by utilizing the first preset image brightness and the first exposure duration corresponding to each first preset image brightness.
For example, if the number of the first preset image luminances is 2, the first preset image luminance corresponds to a first exposure time duration, the second first preset image luminance corresponds to a second first exposure time duration, the first preset image luminance is y1, the first preset image luminance is y2, the first exposure time duration is x1, and the first exposure time duration is x2, (x1, y1) and (x2, y2) are used to obtain k and b in the first correspondence relationship, so that the purpose of calibrating the first correspondence relationship can be achieved.
Further, the first corresponding relationship may be a direct proportional function, that is, y ═ kx, since the image brightness value is also 0 when the exposure time period is 0, the first corresponding relationship must pass through the origin, the number of the first preset image brightness is one, and k may be obtained by dividing the first preset image brightness by the first exposure time period. Illustratively, as shown in fig. 1A, fig. 1A is a schematic diagram of the first correspondence relationship, the abscissa in fig. 1A represents the exposure time period, and the ordinate in fig. 1A represents the image luminance value.
102. When a zoom instruction is detected, acquiring a magnification difference value of an initial zoom magnification and a target zoom magnification corresponding to the zoom instruction; and determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation.
In the embodiment of the present application, the preset second corresponding relationship may be a polynomial function regarding an image brightness value and a zoom magnification, an independent variable of the polynomial function may be the zoom magnification, a dependent variable is the image brightness value, if x represents the zoom magnification, y represents the image brightness value, and the second corresponding relationship may be: y is Ax3+Bx2+ Cx + D, exemplary, the second correspondence is: y-62.69 x3+397.1x2+847.5x + 690.7. Referring to fig. 1B, fig. 1B is a schematic diagram of a second corresponding relationship disclosed in the embodiment of the present application. In fig. 1B, the abscissa represents zoom magnification, and the ordinate represents an image luminance value.
In some embodiments, the second correspondence may be obtained by curve fitting the data of the plurality of trials.
It should be noted that, under different exposure durations, sensor gains, or ambient brightness, the respective second corresponding relationships are translation relationships, and only the constant term D of the respective second corresponding relationships is different. For example, taking different exposure durations as an example (a fourth exposure duration and a fifth exposure duration), the second corresponding relationship corresponding to the fourth exposure duration may be obtained by performing up-translation or down-translation on the second corresponding relationship corresponding to the fifth exposure duration. Based on this, the electronic device may first obtain a magnification difference between the initial zoom magnification and the target zoom magnification, and then determine a brightness change value of the first image brightness relative to the first preset image brightness based on the magnification difference and the preset second corresponding relationship.
103. And determining a second exposure time corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation.
In some embodiments, the electronic device determines the second exposure duration corresponding to the target zoom magnification according to the image brightness variation value and the calibrated first corresponding relationship, which may include, but is not limited to, the following manners:
the method 1 obtains a time length change value according to the image brightness change value and the proportionality coefficient; and obtaining a second exposure duration under the target zoom magnification according to the first exposure duration and the duration change value.
In the embodiment of the present application, since the first corresponding relationship is a proportional function with respect to the brightness value of the image and the exposure time duration, the brightness variation value and the time duration variation value are equal to the proportional coefficient, and therefore, the time duration variation value can be obtained by dividing the brightness variation value by the proportional coefficient. Further, the second exposure duration at the target zoom magnification may be obtained by accumulating the duration change value from the first exposure duration.
Mode 2, obtaining a first image brightness according to the image brightness change value and a first preset image brightness; and obtaining a second exposure duration under the target zoom magnification according to the first image brightness and the scale coefficient.
104. And controlling a camera of the electronic equipment to expose in the second exposure duration under the target zoom magnification so as to obtain a first image with the image brightness as the first image brightness.
By implementing the method, the electronic equipment can only dynamically adjust the exposure parameters under the initial zoom magnification, and then the exposure duration corresponding to the zoomed image can be quickly determined according to the preset second corresponding relation and the calibrated first corresponding relation in each zooming, so that the exposure is carried out by utilizing the determined exposure duration to obtain the image with the image brightness meeting the requirement, and the imaging efficiency is greatly improved.
In one embodiment, before step 101, it may include: and calibrating a second corresponding relation between the image brightness value and the zooming magnification of a calibration image acquired by a camera of the electronic equipment under the calibration ambient brightness based on the set sensor analog gain value under the certain calibration ambient brightness. The calibrated ambient brightness may include the ambient brightness of the current environment of the electronic device, and the sensor analog gain value may be measured according to multiple experiments. For example, the sensor analog gain value may be 1.
As shown in fig. 2, in an embodiment, the step of calibrating, based on the set sensor analog gain value, a second corresponding relationship between an image brightness value and a zoom magnification of a calibration image acquired by a camera of the electronic device under a certain calibration ambient brightness may include the following steps:
step 201, executing at least one second preprocessing step under certain calibrated ambient brightness and a first zoom magnification, and acquiring a second exposure parameter corresponding to a second image until the image brightness of the second image is the same as a second preset image brightness; wherein the second exposure parameter comprises a third exposure duration.
Wherein, executing the second preprocessing step once may include: calculating an exposure parameter, controlling a camera to apply the exposure parameter to obtain a second image, and judging whether the image brightness of the second image is the same as the second preset image brightness; when the judgment result is that the image brightness of the second image is different from the second preset image brightness, triggering to execute a next second preprocessing step;
the first zooming magnification can be selected by a user from a plurality of zooming magnifications of the zooming module. Illustratively, the plurality of zoom magnifications of the zoom module may include 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9 and 2, and the first magnification may be 1. The second preset image brightness may be an index for judging whether the image is clear, and if the image brightness of the second image meets the second preset image brightness, it indicates that the second image is clear, otherwise, it indicates that the second image is not clear. Illustratively, the first preset image brightness is 180.
Step 202, under the calibration ambient brightness, adjusting the calibration zoom magnification of the camera according to a preset zoom magnification step length, and controlling the camera to perform exposure under each calibration zoom magnification by using a sensor simulation gain value and a third exposure duration to obtain a calibration image corresponding to each calibration zoom magnification;
the zoom magnification step refers to a magnification increment of two adjacent calibration zoom magnifications, and exemplarily, the zoom magnification step is 0.1, and then the calibration zoom magnification of the camera may include: 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9 and 2.
Step 203, acquiring second image brightness corresponding to each calibration image;
and 204, obtaining a second corresponding relation between the image brightness value and the zoom magnification according to the first zoom magnification, the second preset image brightness, each calibrated zoom magnification and the second image brightness corresponding to each calibrated zoom magnification.
In some embodiments, the obtaining, by the electronic device, a second corresponding relationship between the image brightness value and the zoom magnification according to the first zoom magnification, the second preset image brightness, each calibration zoom magnification, and the second image brightness corresponding to each calibration zoom magnification may include: the electronic equipment obtains a first coordinate point according to the first zoom magnification and the second preset image brightness; obtaining a plurality of second coordinate points according to each calibration zoom magnification and the second image brightness corresponding to each calibration zoom magnification; and fitting the first coordinate points and the plurality of second coordinate points according to a preset curve fitting algorithm to obtain a second corresponding relation between the image brightness value and the zooming magnification.
Illustratively, the second preset image brightness corresponding to the first zoom magnification of 1 is 176.8908, and the first coordinate point is (1, 176.8908); the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.1 is 156.109, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.2 is 139.313, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.3 is 119.9452, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.4 is 110.0637, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.5 is 101.6893, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.6 is 94.79118, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.7 is 85.50805, the second image brightness of the calibrated image corresponding to the calibrated zoom magnification ratio 1.8 is 86.2436, the second image brightness of the calibrated image corresponding to the zoom magnification ratio 1.9 is 84.01539, and the second image brightness of the calibrated image corresponding to the zoom magnification ratio 2 is 82.33387, and the plurality of second coordinate points may include (1.1, 156.109), (1.2, 139.313), (1.3, 119.9452), (1.4, 110.0637), (1.5, 101.6893), (1.6, 94.79118), (1.7, 85.50805), (1.8, 86.2436), (1.9, 84.01539) and (2, 82.33387).
In some embodiments, the preset curve fitting algorithm may include, but is not limited to, least squares, cubic spline curve fitting, and the like.
By implementing the method, a plurality of coordinate points are obtained based on the first zoom ratio, the second preset image brightness, each calibration zoom ratio and the second image brightness corresponding to each calibration zoom ratio, and then the plurality of coordinate points are fitted based on a curve fitting algorithm to obtain the second corresponding relation between the image brightness value and the zoom ratio, so that the effectiveness of the second corresponding relation between the image brightness value and the zoom ratio can be further improved.
Referring to fig. 3, fig. 3 is a schematic flow chart of an automatic exposure method according to an embodiment of the present disclosure. As shown in fig. 3, includes:
301. and executing at least one first preprocessing step under the initial zoom magnification until the image brightness of the target image is the same as the first preset image brightness, acquiring a first exposure parameter corresponding to the target image, and calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness in the first exposure parameter.
302. And acquiring pose change information of the electronic equipment by using a nine-axis sensor of the electronic equipment.
In some embodiments, the nine-axis sensors may include a 3-axis accelerometer, a 3-axis magnetometer, and a 3-axis gyroscope.
In some embodiments, the pose change information includes pose change information and/or displacement information. The pose change information indicates the change amount of the current pose relative to the pose corresponding to the last measurement time point, and the displacement change information indicates the change amount of the current position relative to the position corresponding to the last measurement time point.
303. And judging whether the pose variation indicated by the pose variation information is larger than a preset variation.
If the determination result in the step 304 is yes, re-executing the step 301; if the determination result in step 304 is negative, go to step 304 and step 306.
In some embodiments, the pose change information indicating a pose change amount greater than a preset change amount may include:
when the pose change information comprises pose change information, the pose change amount of the electronic equipment indicated by the pose change information is larger than a preset pose change amount;
when the posture change information comprises displacement information, the displacement of the electronic equipment indicated by the displacement information is larger than a preset displacement threshold;
when the pose change information includes pose change information and displacement information, the pose variation of the electronic device indicated by the pose change information is larger than a preset pose variation, and/or the displacement of the electronic device indicated by the displacement information is larger than a preset displacement threshold.
It should be noted that, if the pose variation indicated by the pose variation information is greater than the preset variation, the ambient brightness may be greatly changed, or the reflectivity of the scene may be greatly changed, at this time, the first corresponding relationship is failed, and the first corresponding relationship needs to be determined again, that is, step 301 to step 302 are executed. Therefore, by implementing the method, the validity of the first corresponding relation can be ensured.
304. When a zoom instruction is detected, acquiring a magnification difference value of an initial zoom magnification and a target zoom magnification corresponding to the zoom instruction; and determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation.
305. And determining a second exposure time corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation.
306. And controlling a camera of the electronic equipment to expose in the second exposure duration under the target zoom magnification so as to obtain a first image with the image brightness as the first image brightness.
It should be noted that, for detailed descriptions of step 301, step 304, and step 306, please refer to step 102 to step 104 shown in fig. 1, which is not described herein again.
By implementing the method, the exposure parameters are dynamically adjusted only under the initial zoom magnification, and then the exposure duration corresponding to the zoomed image can be quickly determined according to the preset second corresponding relation and the calibrated first corresponding relation in each zooming, so that the exposure is carried out by using the determined exposure duration to obtain the image with the image brightness meeting the requirement, and the imaging efficiency is greatly improved. The electronic equipment can recalibrate the first corresponding relation when the pose variation of the electronic equipment is larger than the preset variation, so that the validity of the first corresponding relation is guaranteed, and the stability of the image brightness is further guaranteed.
Referring to fig. 4, fig. 4 is an electronic device according to an embodiment of the disclosure. The electronic device as shown in fig. 4 may include: a calibration unit 401, a first determination unit 402, a second determination unit 403, and a control unit 404.
The calibration unit 401 is configured to execute at least one first preprocessing step at an initial zoom magnification, and acquire a first exposure parameter corresponding to a target image until the image brightness of the target image is the same as a first preset image brightness; wherein the first exposure parameter comprises a first exposure duration; performing a first preprocessing step once may include: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a target image, and judging whether the image brightness of the target image is the same as the first preset image brightness; when the judgment result is that the image brightness of the target image is different from the first preset image brightness, triggering to execute a next first preprocessing step;
the calibration unit 401 is further configured to calibrate a preset first corresponding relationship by using the first exposure duration and the first preset image brightness, where the first corresponding relationship is used to represent a corresponding relationship between an image brightness value and an exposure duration;
a first determining unit 402, configured to, when a zoom instruction is detected, acquire a magnification difference between an initial zoom magnification and a target zoom magnification corresponding to the zoom instruction; determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation; the second corresponding relation is used for representing the corresponding relation between the brightness value of the image and the zoom magnification;
a second determining unit 403, configured to determine, according to the image brightness change value and the calibrated first corresponding relationship, a second exposure duration corresponding to the target zoom magnification;
and the control unit 404 is configured to control a camera of the electronic device to perform exposure for a second exposure duration under the target zoom magnification, so as to obtain a first image with the image brightness being the first image brightness.
In some embodiments, the number of the first preset image luminances may be multiple, the first correspondence relationship is a linear function, and the calibration unit 401 is specifically configured to execute at least one first preprocessing step at an initial zoom magnification for each first preset image luminance until the image luminance of the target image acquired by the camera is the same as the first preset image luminance, and acquire a first exposure parameter corresponding to the target image to acquire a first exposure parameter corresponding to each first preset image luminance; further, the calibration unit 401 is specifically configured to calibrate the preset first corresponding relationship by using the multiple first preset image luminances and the first exposure durations corresponding to the first preset image luminances.
In some embodiments, the first corresponding relationship may be a direct proportional function, the number of the first preset image luminances is 1, and the calibrating unit 401 is configured to calibrate the preset first corresponding relationship by using the first preset image luminances and the first exposure duration in the first exposure parameter, where the method may specifically include: a calibration unit 401, configured to obtain a ratio of a first preset image brightness to a first exposure duration; and taking the ratio as a proportionality coefficient of a direct proportional function to obtain a calibrated first corresponding relation.
In some embodiments, the second determining unit 403 is configured to determine the second exposure time duration corresponding to the target zoom magnification according to the image brightness variation value and the calibrated first corresponding relationship, including but not limited to the following manners:
a second determining unit 403, configured to obtain a duration change value according to the image brightness change value and the scale coefficient; obtaining a second exposure duration under the target zoom magnification according to the first exposure duration and the duration change value;
alternatively, the first and second electrodes may be,
a second determining unit 403, configured to obtain a first image brightness according to the image brightness variation value and a first preset image brightness; and obtaining a second exposure duration under the target zoom magnification according to the first image brightness and the scale coefficient.
Referring to fig. 5, fig. 5 is an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 5 is optimized from the electronic device shown in fig. 4. The electronic apparatus shown in fig. 5 may include a calibration unit 401, a first determination unit 402, a second determination unit 403, a control unit 404, a second relationship determination unit 405, and an attitude detection unit 406. Wherein:
for specific functions of the calibration unit 401, the first determining unit 402, the second determining unit 403, and the control unit 404, please refer to the embodiment shown in fig. 4, which is not described herein again.
The second relationship determining unit 405 is configured to calibrate, based on the set sensor analog gain value, a second corresponding relationship between an image brightness value of a calibration image acquired by a camera of the electronic device under the calibration ambient brightness and a zoom magnification under a certain calibration ambient brightness.
In some embodiments, the manner that the second relationship determining unit 405 is configured to calibrate, based on the set sensor analog gain value, the second corresponding relationship between the image brightness value and the zoom magnification of the calibration image acquired by the camera of the electronic device under the calibration ambient brightness may specifically include:
a second relation determining unit 405, configured to execute a second preprocessing step at least once under a certain calibrated ambient brightness and a certain first zoom magnification, until an image brightness of a second image is the same as a second preset image brightness, obtain a second exposure parameter corresponding to the second image; wherein the second exposure parameter comprises a third exposure duration; performing a second preprocessing step once, comprising: calculating an exposure parameter, controlling a camera to apply the exposure parameter to obtain a second image, and judging whether the image brightness of the second image is the same as the second preset image brightness; when the judgment result is that the image brightness of the second image is different from the second preset image brightness, triggering to execute a next second preprocessing step; under the calibration environment brightness, the calibration zoom magnification of the camera is adjusted according to a preset zoom magnification step length, the camera is controlled to be exposed under each calibration zoom magnification by a sensor simulation gain value and a third exposure duration, and a calibration image corresponding to each calibration zoom magnification is obtained; acquiring second image brightness corresponding to each calibration image; and obtaining a second corresponding relation between the image brightness value and the zooming magnification according to the first zooming magnification, the second preset image brightness, each calibrated zooming magnification and the second image brightness corresponding to each calibrated zooming magnification.
In some embodiments, the manner that the second relationship determining unit 405 is configured to obtain the second corresponding relationship between the image brightness value and the zoom magnification according to the first zoom magnification, the second preset image brightness, each calibration zoom magnification, and the second image brightness corresponding to each calibration zoom magnification may specifically include:
a second relation determining unit 405, configured to obtain a first coordinate point according to the first zoom magnification and a second preset image brightness value; obtaining a plurality of second coordinate points according to each calibration zoom magnification and the second image brightness corresponding to each calibration zoom magnification; and fitting the first coordinate points and the plurality of second coordinate points according to a preset curve fitting algorithm to obtain a second corresponding relation between the image brightness value and the zooming magnification.
A posture detection unit 406, configured to acquire pose change information of the electronic device by using a nine-axis sensor of the electronic device; and when the pose variation indicated by the pose variation information is larger than a preset variation, triggering the calibration unit 401 to execute at least one first preprocessing step at the initial zoom magnification, and acquiring a first exposure parameter corresponding to the target image until the image brightness of the target image is the same as the first preset image brightness.
Referring to fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
As shown in fig. 6, the electronic device may include:
a memory 601 in which executable program code is stored;
a processor 602 coupled to a memory 601;
wherein, the processor 602 calls the executable program code stored in the memory 601 to execute any one of the above method embodiments;
a camera 603; the electronic equipment executes any method in the method embodiments through the camera;
a nine-axis sensor 604; the electronic equipment executes the corresponding method in the method embodiment through the nine-axis sensor.
The embodiment of the application discloses a computer-readable storage medium which stores a computer program, wherein the computer program enables a computer to execute any method in the method embodiments.
Embodiments of the present application disclose a computer program product comprising a non-transitory computer readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform any of the above method embodiments.
The embodiment of the application discloses an application publishing platform, wherein the application publishing platform is used for publishing a computer program product, and when the computer program product runs on a computer, the computer is enabled to execute any method in the method embodiments.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. Those skilled in the art should also appreciate that the embodiments described in this specification are all alternative embodiments and that the acts and modules involved are not necessarily required for this application.
In various embodiments of the present application, it should be understood that the size of the serial number of each process described above does not mean that the execution sequence is necessarily sequential, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated units, if implemented as software functional units and sold or used as a stand-alone product, may be stored in a computer accessible memory. Based on such understanding, the technical solution of the present application, which is a part of or contributes to the prior art in essence, or all or part of the technical solution, may be embodied in the form of a software product, stored in a memory, including several requests for causing a computer device (which may be a personal computer, a server, a network device, or the like, and may specifically be a processor in the computer device) to execute part or all of the steps of the above-described method of the embodiments of the present application.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood, however, that determining B from a does not mean determining B from a alone, but may also be determined from a and/or other information.
In various embodiments of the present application, it is understood that the meaning of "a and/or B" means that a and B are each present individually or both are included.
It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by hardware instructions of a program, and the program may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Compact Disc Read-Only Memory (CD-ROM), or other Memory, such as a magnetic disk, or a combination thereof, A tape memory, or any other medium readable by a computer that can be used to carry or store data.
The automatic exposure method, the electronic device and the computer-readable storage medium disclosed in the embodiments of the present application are described in detail above, and specific examples are applied herein to illustrate the principles and embodiments of the present application, and the description of the embodiments above is only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (11)

1. An automatic exposure method, applied to an electronic device, the method comprising:
executing at least one first preprocessing step under the initial zoom magnification, and acquiring a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by a camera is the same as a first preset image brightness; wherein the first exposure parameter comprises a first exposure duration; performing the first preprocessing step once, including: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a target image, and judging whether the image brightness of the target image is the same as the first preset image brightness; when the judgment result is that the image brightness of the target image is different from the first preset image brightness, triggering to execute the next first preprocessing step;
calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness, wherein the first corresponding relation is used for representing the corresponding relation between the image brightness value and the exposure duration;
when a zoom instruction is detected, acquiring a magnification difference value of the initial zoom magnification and a target zoom magnification corresponding to the zoom instruction; determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation; the second corresponding relation is used for representing the corresponding relation between the brightness value of the image and the zooming magnification;
and determining a second exposure time length corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation, and controlling a camera of the electronic equipment to expose at the target zoom magnification for the second exposure time length to obtain a first image with the image brightness as the first image brightness.
2. The method according to claim 1, wherein the number of the first preset image luminances is plural, the first correspondence relationship is a linear function, and the obtaining the first exposure parameter corresponding to the target image is performed at least once when the image luminance of the target image collected by the camera is the same as the first preset image luminance under the initial zoom magnification, includes:
executing at least one first preprocessing step at an initial zooming magnification aiming at each first preset image brightness, and acquiring a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by a camera is the same as the first preset image brightness so as to obtain a first exposure parameter corresponding to each first preset image brightness;
the calibrating a preset first corresponding relation by using the first exposure duration and the first preset image brightness includes:
and calibrating a preset first corresponding relation by using the first preset image brightness and the first exposure duration corresponding to each first preset image brightness.
3. The method according to claim 1, wherein the number of the first preset image intensities is one, the first correspondence is a proportional function, and the calibrating the preset first correspondence by using the first preset image intensities and the first exposure duration in the first exposure parameters to determine the first correspondence comprises:
acquiring the ratio of the first preset image brightness to the first exposure time;
and taking the ratio as a proportionality coefficient of the direct proportional function to obtain a calibrated first corresponding relation.
4. The method according to claim 3, wherein determining the second exposure time duration corresponding to the target zoom magnification according to the image brightness variation value and the calibrated first corresponding relationship comprises:
obtaining a time length change value according to the image brightness change value and the proportion coefficient; obtaining a second exposure duration under the target zoom magnification according to the first exposure duration and the duration change value;
alternatively, the first and second electrodes may be,
obtaining first image brightness according to the image brightness change value and the first preset image brightness; and obtaining a second exposure duration under the target zoom magnification according to the first image brightness and the scale coefficient.
5. The method according to any one of claims 1 to 4, wherein before calibrating the preset first corresponding relationship at the initial zoom magnification, the method further comprises:
and calibrating a second corresponding relation between an image brightness value and a zooming magnification of a calibration image acquired by a camera of the electronic equipment under the calibration ambient brightness based on the set sensor analog gain value under the certain calibration ambient brightness.
6. The method according to claim 5, wherein calibrating, based on the set sensor analog gain value, a second corresponding relationship between an image brightness value and a zoom magnification of a calibration image acquired by a camera of the electronic device at a certain calibration ambient brightness comprises:
executing at least one second preprocessing step under certain calibrated ambient brightness and a first zoom magnification, and acquiring a second exposure parameter corresponding to a second image until the image brightness of the second image acquired by the camera is the same as a second preset image brightness; wherein the second exposure parameter comprises a third exposure duration; performing the second preprocessing step once, including: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a second image, and judging whether the image brightness of the second image is the same as the second preset image brightness; when the judgment result is that the image brightness of the second image is different from the second preset image brightness, triggering to execute the next second preprocessing step;
under the calibration environment brightness, adjusting the calibration zoom magnification of the camera according to a preset zoom magnification step length, and controlling the camera to perform exposure under each calibration zoom magnification by using the sensor analog gain value and the third exposure duration to obtain a calibration image corresponding to each calibration zoom magnification;
acquiring second image brightness corresponding to each calibration image;
and obtaining a second corresponding relation between the image brightness value and the zooming magnification according to the first zooming magnification, the second preset image brightness, each calibrated zooming magnification and the second image brightness corresponding to each calibrated zooming magnification.
7. The method according to claim 6, wherein obtaining a second corresponding relationship between an image brightness value and a zoom magnification according to the first zoom magnification, the second preset image brightness, each of the calibration zoom magnifications, and the second image brightness corresponding to each of the calibration zoom magnifications comprises:
obtaining a first coordinate point according to the first zooming magnification and the second preset image brightness;
obtaining a plurality of second coordinate points according to each calibration zoom magnification and the second image brightness corresponding to each calibration zoom magnification;
and fitting the first coordinate points and the plurality of second coordinate points according to a preset curve fitting algorithm to obtain a second corresponding relation between the brightness value of the image and the zoom magnification.
8. The method of claim 1, wherein a nine-axis sensor is disposed on the electronic device, the method further comprising:
acquiring pose change information of the electronic equipment by using the nine-axis sensor;
and when the pose variation indicated by the pose variation information is larger than a preset variation, re-executing the first preprocessing step at least once under the initial zoom magnification, and acquiring a first exposure parameter until the image brightness of the target image is the same as the first preset image brightness.
9. An electronic device, comprising:
the calibration unit is used for executing at least one first preprocessing step, and acquiring a first exposure parameter corresponding to a target image until the image brightness of the target image acquired by the camera is the same as a first preset image brightness; wherein the first exposure parameter comprises a first exposure duration; performing the first preprocessing step once, including: calculating exposure parameters, controlling a camera to apply the exposure parameters to obtain a target image, and judging whether the image brightness of the target image is the same as the first preset image brightness; when the judgment result is that the image brightness of the target image is different from the first preset image brightness, triggering to execute the next first preprocessing step;
the calibration unit is further configured to calibrate a preset first corresponding relationship by using the first exposure duration and the first preset image brightness, where the first corresponding relationship is used to represent a corresponding relationship between an image brightness value and an exposure duration;
the first determining unit is used for acquiring a magnification difference value of the initial zooming magnification and a target zooming magnification corresponding to the zooming instruction when the zooming instruction is detected; determining a brightness change value of the first image brightness relative to the first preset image brightness according to the magnification difference value and a preset second corresponding relation; the second corresponding relation is used for representing the corresponding relation between the brightness value of the image and the zooming magnification;
and the second determining unit is used for determining a second exposure duration corresponding to the target zoom magnification according to the image brightness change value and the calibrated first corresponding relation, and controlling the camera of the electronic equipment to expose in the second exposure duration under the target zoom magnification so as to obtain a first image with the image brightness as the first image brightness.
10. An electronic device, comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calling the executable program code stored in the memory to perform the method of any of claims 1-8;
a camera; wherein the electronic device performs the method of any one of claims 1-8 through the camera;
a nine-axis sensor; wherein the electronic device performs the method of claim 8 with the nine-axis sensor.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method according to any one of claims 1-8.
CN202110371012.5A 2021-04-06 2021-04-06 Automatic exposure method, electronic device, and computer-readable storage medium Pending CN112887630A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110371012.5A CN112887630A (en) 2021-04-06 2021-04-06 Automatic exposure method, electronic device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110371012.5A CN112887630A (en) 2021-04-06 2021-04-06 Automatic exposure method, electronic device, and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN112887630A true CN112887630A (en) 2021-06-01

Family

ID=76039883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110371012.5A Pending CN112887630A (en) 2021-04-06 2021-04-06 Automatic exposure method, electronic device, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN112887630A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570531A (en) * 2021-07-27 2021-10-29 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114615439A (en) * 2022-03-08 2022-06-10 北京有竹居网络技术有限公司 Exposure statistical method and device, electronic equipment and medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005012397A (en) * 2003-06-18 2005-01-13 Casio Comput Co Ltd Imaging apparatus and control method of its image
CN1678034A (en) * 2004-01-14 2005-10-05 株式会社理光 Imaging apparatus, a focusing method, a focus control method
JP2007312294A (en) * 2006-05-22 2007-11-29 Konica Minolta Opto Inc Imaging apparatus, image processor, method for processing image, and image processing program
CN101184170A (en) * 2006-11-17 2008-05-21 富士胶片株式会社 Image pickup device and expose control method
US20090015707A1 (en) * 2007-04-13 2009-01-15 Elmo Co., Ltd. Method of exposure control and image pickup apparatus
CN101401418A (en) * 2006-03-09 2009-04-01 富士胶片株式会社 Imaging apparatus and exposure control method
CN103764013A (en) * 2011-08-25 2014-04-30 奥林巴斯株式会社 Automatic exposure control device, control device, endoscope device and automatic exposure control method
US20150373250A1 (en) * 2014-06-20 2015-12-24 Samsung Electronics Co., Ltd Circuit and method providing wide dynamic-range operation of auto-focus(af) focus state sensor elements, digital imaging device, and computer system including same
CN110493539A (en) * 2019-08-19 2019-11-22 Oppo广东移动通信有限公司 Automatic exposure processing method, processing unit and electronic equipment
CN110493515A (en) * 2019-08-07 2019-11-22 Oppo广东移动通信有限公司 High dynamic range screening-mode open method, device, storage medium and electronic equipment
CN111757015A (en) * 2019-03-28 2020-10-09 杭州海康威视数字技术股份有限公司 Exposure control method and device and electronic equipment
CN111771373A (en) * 2018-03-19 2020-10-13 富士胶片株式会社 Imaging device, zoom during exposure imaging method, program, and recording medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005012397A (en) * 2003-06-18 2005-01-13 Casio Comput Co Ltd Imaging apparatus and control method of its image
CN1678034A (en) * 2004-01-14 2005-10-05 株式会社理光 Imaging apparatus, a focusing method, a focus control method
CN101401418A (en) * 2006-03-09 2009-04-01 富士胶片株式会社 Imaging apparatus and exposure control method
JP2007312294A (en) * 2006-05-22 2007-11-29 Konica Minolta Opto Inc Imaging apparatus, image processor, method for processing image, and image processing program
CN101184170A (en) * 2006-11-17 2008-05-21 富士胶片株式会社 Image pickup device and expose control method
US20090015707A1 (en) * 2007-04-13 2009-01-15 Elmo Co., Ltd. Method of exposure control and image pickup apparatus
CN103764013A (en) * 2011-08-25 2014-04-30 奥林巴斯株式会社 Automatic exposure control device, control device, endoscope device and automatic exposure control method
US20150373250A1 (en) * 2014-06-20 2015-12-24 Samsung Electronics Co., Ltd Circuit and method providing wide dynamic-range operation of auto-focus(af) focus state sensor elements, digital imaging device, and computer system including same
CN111771373A (en) * 2018-03-19 2020-10-13 富士胶片株式会社 Imaging device, zoom during exposure imaging method, program, and recording medium
CN111757015A (en) * 2019-03-28 2020-10-09 杭州海康威视数字技术股份有限公司 Exposure control method and device and electronic equipment
CN110493515A (en) * 2019-08-07 2019-11-22 Oppo广东移动通信有限公司 High dynamic range screening-mode open method, device, storage medium and electronic equipment
CN110493539A (en) * 2019-08-19 2019-11-22 Oppo广东移动通信有限公司 Automatic exposure processing method, processing unit and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
马泽龙等: "采用图像直方图特征函数的高速相机自动曝光方法", 《光学精密工程》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113570531A (en) * 2021-07-27 2021-10-29 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114615439A (en) * 2022-03-08 2022-06-10 北京有竹居网络技术有限公司 Exposure statistical method and device, electronic equipment and medium
CN114615439B (en) * 2022-03-08 2024-03-05 北京有竹居网络技术有限公司 Exposure statistical method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN108174118B (en) Image processing method and device and electronic equipment
CN110418069B (en) Light supplementing control method, mobile terminal and computer readable storage medium
CN108040210B (en) Local distortion correction method, mobile terminal and related medium product
CN105049734B (en) It can carry out the license camera and shooting environmental detection method of shooting environmental shooting prompt
CN112887630A (en) Automatic exposure method, electronic device, and computer-readable storage medium
KR20170098089A (en) Electronic apparatus and operating method thereof
KR20180032291A (en) Method and electronic device for calivration of stereo camera
CN110708463B (en) Focusing method, focusing device, storage medium and electronic equipment
CN108200335A (en) Photographic method, terminal and computer readable storage medium based on dual camera
CN113313661A (en) Image fusion method and device, electronic equipment and computer readable storage medium
CN111896233B (en) Contrast testing method, contrast testing device and storage medium
US20220360707A1 (en) Photographing method, photographing device, storage medium and electronic device
CN105898152A (en) Method and system for restoring ambient light luminance on image
EP2282224A2 (en) Image processing apparatus, image processing method, and computer program
CN112991202B (en) Optical center position calibration method, terminal device and computer readable storage medium
CN113542709A (en) Projection image brightness adjusting method and device, storage medium and projection equipment
US9270883B2 (en) Image processing apparatus, image pickup apparatus, image pickup system, image processing method, and non-transitory computer-readable storage medium
CN115760653B (en) Image correction method, device, equipment and readable storage medium
CN114339028B (en) Photographing method, electronic device and computer readable storage medium
CN110971814A (en) Shooting adjustment method and device, electronic equipment and storage medium
CN116363174A (en) Parameter calibration method, storage medium, co-processing chip and electronic equipment
CN113766206A (en) White balance adjusting method, device and storage medium
CN110971813B (en) Focusing method and device, electronic equipment and storage medium
CN112995633A (en) Image white balance processing method and device, electronic equipment and storage medium
CN113870800A (en) Backlight adjusting method and device, terminal equipment and storage medium

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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20230929