CN113766145A - Camera adjusting method and device, electronic equipment and storage medium - Google Patents

Camera adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113766145A
CN113766145A CN202111151945.XA CN202111151945A CN113766145A CN 113766145 A CN113766145 A CN 113766145A CN 202111151945 A CN202111151945 A CN 202111151945A CN 113766145 A CN113766145 A CN 113766145A
Authority
CN
China
Prior art keywords
adjusted
value
exposure
current
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111151945.XA
Other languages
Chinese (zh)
Other versions
CN113766145B (en
Inventor
秦长泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Unisinsight Technology Co Ltd
Original Assignee
Chongqing Unisinsight 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 Chongqing Unisinsight Technology Co Ltd filed Critical Chongqing Unisinsight Technology Co Ltd
Priority to CN202111151945.XA priority Critical patent/CN113766145B/en
Publication of CN113766145A publication Critical patent/CN113766145A/en
Application granted granted Critical
Publication of CN113766145B publication Critical patent/CN113766145B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/745Detection of flicker frequency or suppression of flicker wherein the flicker is caused by illumination, e.g. due to fluorescent tube illumination or pulsed LED illumination
    • 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/72Combination of two or more compensation controls
    • 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/70Circuitry for compensating brightness variation in the scene
    • H04N23/76Circuitry for compensating brightness variation in the scene by influencing the image signals

Abstract

The application discloses a camera adjusting method, a camera adjusting device, electronic equipment and a storage medium, which solve the problem of image flicker caused by adjusting an aperture in a zooming process. In the embodiment of the application, the optimal aperture size under different multiplying powers is calibrated in advance, in the zooming process, the sizes of different apertures are adjusted according to different multiplying powers, the phenomena of image fogging, large chromatic aberration and poor definition can not occur in the process of multiplying power change, meanwhile, according to the adjusted aperture size, the exposure is adjusted, the phenomenon of image flicker which does not occur in the stable transition of image brightness in the aperture adjusting process is ensured, the stable and smooth image brightness in the whole zooming adjusting process is ensured, and the requirement that the image can have a better image effect under different multiplying powers is met.

Description

Camera adjusting method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of video image processing technologies, and in particular, to a camera adjustment method and apparatus, an electronic device, and a storage medium.
Background
With the wide application of monitoring cameras, the adaptability requirement of the cameras is higher and higher, and the original view is seen far away. With the wide application of the large-magnification lens, the camera can meet the requirements for monitoring scenes at different distances by zooming.
The lens mainly comprises a plurality of lenses, and in the zooming process, a monitored scene picture is transmitted into an image Sensor (Sensor) through an aperture by adjusting the lenses. Because the lens moves, the angles of light rays under different multiplying powers change, and meanwhile, if the size of the aperture is not proper, the phenomena of purple edges, dark corners and the like of images under different multiplying powers are easily caused, and the image effect is greatly influenced. In order to eliminate the influence on the image caused by the unreasonable size of the aperture when the magnification is changed, the most direct and effective method is to adjust the size of the lens aperture when the magnification is changed. However, in the process of adjusting the lens aperture, the size of the aperture is suddenly adjusted in the process of changing the magnification, so that the brightness of the picture suddenly changes, and the image flickers.
Disclosure of Invention
The application aims to provide a camera adjusting method, a camera adjusting device, an electronic device and a storage medium, which are used for solving the problem of image flicker caused by adjusting an aperture in a zooming process.
In a first aspect, an embodiment of the present application provides a camera adjustment method, including:
in the acquisition process of the video stream, responding to a magnification adjusting instruction of a user, and determining an adjusting magnification corresponding to the adjusting instruction;
determining a to-be-adjusted aperture corresponding to the adjusting magnification according to the corresponding relation between the preset magnification and the aperture, and determining a first exposure corresponding to the to-be-adjusted aperture according to the corresponding relation between the preset aperture and the exposure;
determining a shutter value to be adjusted of the camera and a gain value to be adjusted of the image sensor according to the first exposure amount;
and adjusting the current aperture, the current shutter value and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted and the gain value to be adjusted.
In the embodiment of the application, the problems of image flicker and poor definition caused when the aperture is adjusted according to the magnification are solved by adjusting the aperture and the shutter value and the gain value at the same time when the aperture is adjusted in the zooming process, the image stability is ensured to pass through the magnification adjusting process, the smoothness of the image in the zooming process is ensured, and the image can have better image effect under different magnifications.
In some possible embodiments, the determining the value of the shutter to be adjusted of the camera and the value of the gain to be adjusted of the image sensor according to the first exposure amount includes:
determining the adjusting trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted;
determining candidate exposure lines from a plurality of exposure lines included in an exposure path according to the adjusting trend, the current shutter value and the current gain value; wherein each exposure line corresponds to a range of parameters, the parameters at least including: shutter and gain;
determining the adjustment sequence of the candidate exposure lines according to the adjustment trend and the sequence of the candidate exposure lines in the exposure path;
and determining a shutter value to be adjusted and a gain value to be adjusted according to the first exposure and the adjusting sequence.
In this application, can set up the order of exposing to the sun the line in the light path according to the camera lens that different products used and the difference of sensor light sensitiveness for this application is all suitable for various products, has improved the universality of this application.
In some possible embodiments, the determining the adjustment trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted includes:
if the comparison result shows that the current aperture is larger than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the upper limit value of the exposure line;
and if the comparison result shows that the current aperture is smaller than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the lower limit value of the exposure line.
In the embodiment of the application, the adjusting trend of the exposure line is determined according to the comparison result, so that the adjustment of each exposure line in the exposure path device is more accurate.
In some possible embodiments, the determining a candidate exposure line from a plurality of exposure lines included in the exposure path according to the adjustment trend, the current shutter value, and the current gain value includes:
if the adjustment trend is adjusted according to the upper limit value of the exposure line, determining the upper limit value of the exposure line where the current shutter value is located and the upper limit value of the exposure line where the current gain value is located; determining the candidate exposure line according to the upper limit value of the exposure line of the current shutter value, the upper limit value of the exposure line of the current gain value and the sequence, wherein the sequence is the sequence of the candidate exposure line in the exposure path; or
If the adjustment trend is adjusted according to the lower limit value of the exposure line, determining the lower limit value of the exposure line where the current shutter value is located and the lower limit value of the exposure line where the current gain value is located; and determining the candidate exposure line according to the lower limit value of the exposure line where the current shutter value is located, the lower limit value of the exposure line where the current gain value is located and the sequence.
In the embodiment of the application, the candidate exposure lines are determined according to different sequences and the upper and lower limit values of the exposure lines, so that the efficiency of determining the gain to be adjusted and the shutter to be adjusted is improved.
In some possible embodiments, the determining the shutter value to be adjusted and the gain value to be adjusted according to the first exposure amount and the adjustment sequence includes:
if the adjusting trend indicates that adjustment is carried out according to the upper limit value of the exposure line, determining a first exposure line to be adjusted according to the adjusting sequence; the first exposure line to be adjusted is the exposure line which is sequenced as the first exposure line in the adjusting sequence; determining the current value of the parameter in the first exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the upper limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; if the required exposure is equal to or less than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to the upper limit value of the parameter corresponding to the first exposure line to be adjusted; or
If the adjusting trend indicates that the adjustment is carried out according to the lower limit value of the exposure line, determining a second exposure line to be adjusted according to the adjusting sequence; the second exposure line to be adjusted is the exposure line which is sequenced into the first exposure line in the adjusting sequence; determining the current value of the parameter in the second exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the lower limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; and if the exposure amount is equal to or less than the first exposure amount, determining the shutter value to be adjusted and the gain value to be adjusted according to the lower limit value of the parameter corresponding to the second exposure line to be adjusted.
In the embodiment of the application, the gain to be adjusted and the shutter to be adjusted are determined according to the preset algorithm and the first exposure, and the gain to be adjusted and the exposure can be accurately determined, so that the transition of a picture in a zooming process is more stable.
In some possible embodiments, before the adjusting the current aperture, the current shutter value, and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted, and the gain value to be adjusted, the method further includes:
and determining that the adjusting multiplying power is different from the current multiplying power, wherein the current multiplying power is the multiplying power stored before responding to the adjusting instruction of the multiplying power by the user.
In the embodiment of the application, the aperture is adjusted when the adjusting magnification is different from the current magnification, so that the flicker of the picture in the zooming process is avoided.
In some possible embodiments, the method further comprises:
and if the adjusting magnification is the same as the prestored magnification, not adjusting the current aperture, the current shutter and the gain of the current image sensor of the camera.
In the embodiment of the application, when the adjusting magnification is the same as the current magnification, the aperture, the shutter and the gain of the camera are not adjusted, so that the waste of resources caused by adjusting the aperture shutter and the gain every time is avoided.
Second aspect the present application also provides a camera adjustment apparatus, the apparatus comprising:
the magnification determining module is used for responding to a magnification adjusting instruction of a user in the acquisition process of the video stream and determining the adjusting magnification corresponding to the adjusting instruction;
the first exposure determining module is used for determining a to-be-adjusted aperture corresponding to the adjusting magnification according to the corresponding relation between the preset magnification and the aperture, and determining a first exposure corresponding to the to-be-adjusted aperture according to the corresponding relation between the preset aperture and the exposure;
the shutter gain determination module is used for determining a to-be-adjusted shutter value of the camera and a to-be-adjusted gain value of the image sensor according to the first exposure amount;
and the adjusting module is used for adjusting the current aperture, the current shutter value and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted and the gain value to be adjusted.
In some possible embodiments, the shutter gain determination module, when performing the determination of the value of the shutter to be adjusted of the camera and the value of the gain to be adjusted of the image sensor from the first exposure amount, is configured to:
determining the adjusting trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted;
determining candidate exposure lines from a plurality of exposure lines included in an exposure path according to the adjusting trend, the current shutter value and the current gain value; wherein each exposure line corresponds to a range of parameters, the parameters at least including: shutter and gain;
determining the adjustment sequence of the candidate exposure lines according to the adjustment trend and the sequence of the candidate exposure lines in the exposure path;
and determining a shutter value to be adjusted and a gain value to be adjusted according to the first exposure and the adjusting sequence.
In some possible embodiments, the shutter gain determination module, when performing the determination of the adjustment trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted, is configured to:
if the comparison result shows that the current aperture is larger than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the upper limit value of the exposure line;
and if the comparison result shows that the current aperture is smaller than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the lower limit value of the exposure line.
In some possible embodiments, the shutter gain determination module, when determining the exposure line candidate from the plurality of exposure lines included in the exposure path according to the adjustment trend and the current shutter value and the current gain value, is configured to:
if the adjustment trend is adjusted according to the upper limit value of the exposure line, determining the upper limit value of the exposure line where the current shutter value is located and the upper limit value of the exposure line where the current gain value is located; determining the candidate exposure line according to the upper limit value of the exposure line of the current shutter value, the upper limit value of the exposure line of the current gain value and the sequence, wherein the sequence is the sequence of the candidate exposure line in the exposure path; or
If the adjustment trend is adjusted according to the lower limit value of the exposure line, determining the lower limit value of the exposure line where the current shutter value is located and the lower limit value of the exposure line where the current gain value is located; and determining the candidate exposure line according to the lower limit value of the exposure line where the current shutter value is located, the lower limit value of the exposure line where the current gain value is located and the sequence.
In some possible embodiments, the shutter gain determination module, when performing the determination of the shutter value to be adjusted and the gain value to be adjusted according to the first exposure amount and the adjustment order, is configured to:
if the adjusting trend indicates that adjustment is carried out according to the upper limit value of the exposure line, determining a first exposure line to be adjusted according to the adjusting sequence; the first exposure line to be adjusted is the exposure line which is sequenced as the first exposure line in the adjusting sequence; determining the current value of the parameter in the first exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the upper limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; if the required exposure is equal to or less than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to the upper limit value of the parameter corresponding to the first exposure line to be adjusted; or
If the adjusting trend indicates that the adjustment is carried out according to the lower limit value of the exposure line, determining a second exposure line to be adjusted according to the adjusting sequence; the second exposure line to be adjusted is the exposure line which is sequenced into the first exposure line in the adjusting sequence; determining the current value of the parameter in the second exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the lower limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; and if the exposure amount is equal to or less than the first exposure amount, determining the shutter value to be adjusted and the gain value to be adjusted according to the lower limit value of the parameter corresponding to the second exposure line to be adjusted.
In some possible embodiments, the adjusting module, before performing the adjustment of the current aperture, the current shutter value, and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted, and the gain value to be adjusted, is further configured to:
and determining that the adjusting multiplying power is different from the current multiplying power, wherein the current multiplying power is the multiplying power stored before responding to the adjusting instruction of the multiplying power by the user.
In some possible embodiments, the apparatus further comprises:
and if the adjusting magnification is the same as the prestored magnification, not adjusting the current aperture, the current shutter and the gain of the current image sensor of the camera.
In a third aspect, another embodiment of the present application further provides an electronic device, including at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any one of the methods provided by the embodiments of the first aspect of the present application.
In a fourth aspect, another embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and the computer program is configured to cause a computer to execute any one of the methods provided in the first aspect of the present application.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is an application scenario diagram of a camera adjustment method according to an embodiment of the present application;
fig. 2 is an overall flowchart of a camera adjustment method according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a relationship between an aperture and an exposure according to a camera adjusting method of an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating a method for adjusting a camera according to an embodiment of the present application, wherein a shutter value to be adjusted and a gain value to be adjusted of the camera are determined according to a first exposure amount;
fig. 5 is a schematic diagram of an exposure path of a camera adjustment method according to an embodiment of the present disclosure;
fig. 6 is a flowchart of adjusting according to an upper limit value of an exposure line in a camera adjusting method according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram illustrating an adjustment according to an upper limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 8 is another schematic diagram illustrating an adjustment performed according to an upper limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 9 is a flowchart of adjusting according to a lower limit value of an exposure line in a camera adjusting method according to an embodiment of the present disclosure;
fig. 10 is a schematic diagram illustrating an adjustment according to a lower limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 11 is another schematic diagram illustrating an adjustment performed according to a lower limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 12 is a flowchart illustrating an adjustment according to an upper limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 13 is a schematic diagram illustrating an adjustment according to an upper limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 14 is a schematic diagram of determining a to-be-adjusted shutter value and a to-be-adjusted gain value in a camera adjustment method according to an embodiment of the present application;
fig. 15 is a flowchart of adjusting according to a lower limit value of an exposure line in a camera adjusting method according to an embodiment of the present application;
fig. 16 is a schematic diagram illustrating an adjustment according to a lower limit value of an exposure line in a camera adjustment method according to an embodiment of the present disclosure;
fig. 17 is an overall flowchart of a camera adjustment method according to an embodiment of the present application;
fig. 18 is a schematic device diagram of a camera adjustment method according to an embodiment of the present application;
fig. 19 is a schematic electronic device diagram of a camera adjustment method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
It is noted that the terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. 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 present application, as detailed in the appended claims.
For ease of understanding, the terms referred to in this application are explained first:
a shutter: the faster the shutter speed is controlled, the shorter the light passing time is, and the darker the screen is. The slower the shutter speed is, the longer the light passing time is, and the brighter the picture is;
gain: and a video amplifier for amplifying the signal of the Sensor of the camera, wherein the amplification factor is called gain. If the gain of the amplifier remains unchanged, the video signal will saturate in high brightness environments. The automatic gain control circuit of the camera can automatically adjust the gain of the amplifier along with the change of the illumination inside and outside the environment, so that the camera can work in a larger illumination range;
exposure amount: the light rays passing through the finger enable the photosensitive element to obtain a clear image;
aperture: means for controlling the amount of light transmitted through the lens and into the light-sensing surface of the body, typically within the lens;
multiplying power: the optical lens performance parameter refers to the ratio of the imaging size of an object passing through the lens on a focal plane to the actual size of the object.
The inventor researches and discovers that with the wide application of the monitoring camera, the requirement on the adaptability of the camera is higher and higher, and the original sight is far from the present sight. With the wide application of the large-magnification lens, the camera can meet the requirements for monitoring scenes at different distances by zooming.
The lens mainly comprises a plurality of lenses, and in the zooming process, the monitoring scene picture is transmitted into the Sensor through the aperture by adjusting the lenses. Because the lens moves, the angles of light rays under different multiplying powers change, and meanwhile, if the size of the aperture is not proper, the phenomena of purple edges, dark corners and the like of images under different multiplying powers are easily caused, and the image effect is greatly influenced. In order to eliminate the influence on the image caused by the unreasonable size of the aperture when the magnification is changed, the most direct and effective method is to adjust the size of the lens aperture when the magnification is changed. However, in the process of adjusting the lens aperture, the size of the aperture is suddenly adjusted in the process of changing the magnification, so that the brightness of the picture suddenly changes, and the image flickers.
In view of the above, the present application provides a camera adjusting method, apparatus, electronic device and storage medium to solve the above problems. The inventive concept of the present application can be summarized as follows: the optimal aperture size under different multiplying powers is calibrated in advance, in the zooming process, the sizes of different apertures are adjusted according to different multiplying powers, the phenomena of image fogging, large chromatic aberration and poor definition can not occur in the process of changing the multiplying powers, meanwhile, the exposure is adjusted according to the adjusted aperture size, the phenomenon of image flicker which does not occur in the process of adjusting the aperture and the stable transition of image brightness is ensured, the stable and smooth image brightness in the whole zooming adjusting process is ensured, and the image can have better image effect under different multiplying powers.
A camera adjustment method proposed in the embodiment of the present application is described in detail below with reference to the accompanying drawings:
fig. 1 is a view of an application scenario of the camera adjustment method in the embodiment of the present application. The figure includes: memory 10, camera 20; wherein:
in the acquisition process of the video stream, the camera responds to a magnification adjusting instruction of a user and determines an adjusting magnification corresponding to the adjusting instruction; and acquiring the aperture to be adjusted and the first exposure corresponding to the magnification from the memory 10; and determining a shutter to be adjusted and a gain to be adjusted according to the first exposure, and adjusting the current aperture, shutter and gain of the camera according to the aperture to be adjusted, the shutter to be adjusted and the gain to be adjusted.
In the embodiment of the present application, the memory may be disposed inside the camera, or may be a separate external memory, which is not limited in this application. All the cameras with adjustable magnification are suitable for the application, and the application does not limit the cameras.
Only a single camera is detailed in the description of the present application, but it will be understood by those skilled in the art that the illustrated camera 20, memory 10 are intended to represent the operations of the camera and memory involved in the technical aspects of the present application. The detailed description of a single camera and memory is for convenience of description at least and does not imply limitations on the number, type, or location of cameras, etc. It should be noted that the underlying concepts of the example embodiments of the present application may not be altered if additional modules are added or removed from the illustrated environments.
It should be noted that the storage in the embodiment of the present application may be, for example, a cache system, or a hard disk storage, a memory storage, and the like. In addition, the camera adjustment method provided by the application is not only suitable for the application scene shown in fig. 1, but also suitable for any device with camera adjustment requirements.
As shown in fig. 2, an overall flowchart of a camera adjustment method provided in the embodiment of the present application is shown, where:
in step 201: in the acquisition process of the video stream, responding to a magnification adjusting instruction of a user, and determining an adjusting magnification corresponding to the adjusting instruction;
in step 202: determining a to-be-adjusted aperture corresponding to the adjusting magnification according to the corresponding relation between the preset magnification and the aperture, and determining a first exposure corresponding to the to-be-adjusted aperture according to the corresponding relation between the preset aperture and the exposure;
in step 203: determining a shutter value to be adjusted of the camera and a gain value to be adjusted of the image sensor according to the first exposure amount;
in step 204: and adjusting the current aperture, the current shutter value and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted and the gain value to be adjusted.
In some embodiments, a person skilled in the art calibrates an optimal aperture value corresponding to different magnifications according to an image effect, and the value can ensure that the problems of point light source starburst, image blurring and the like do not occur in an image under the magnifications; in practical application, the aperture value is finally converted into a stepping value of the motor. Such as: when the multiplying power is 1X, the optimal aperture value is 250 steps; when the multiplying power is 10X, the optimal aperture value is 200 steps; when the multiplying power is 16X, the optimal aperture value is 300 steps; when the magnification is 45X, the optimum aperture value is 300 steps. When the corresponding conditions are met, the optimal effect of the image can be ensured, and the image can not have the phenomena of blurring, starburst of point light source, chromatic aberration and the like. In order to quickly determine the optimal aperture value corresponding to the magnification, the corresponding relation between the aperture and the magnification can be stored in a memory, and the optimal aperture value corresponding to the magnification can be acquired from the memory by a table look-up method according to the magnification in later application. It is of course to be understood that a person skilled in the art can set an aperture range for each magnification according to the display effect of the image, for example: when the multiplying power is 1X, the optimal aperture value is 250 +/-10 steps; when the multiplying power is 10X, the optimal aperture value is 200 +/-10 steps; the universality of the application is increased by the method.
Since the aperture can be used to control the light passing through the lens, the brightness of the picture will change correspondingly when the aperture is changed. For example, if the aperture becomes larger, the screen brightness becomes larger; the aperture becomes smaller and the screen brightness becomes smaller. When the aperture is small, the exposure is greatly influenced by the change of the aperture; when the aperture is large, the exposure amount is not changed much when the aperture is changed as when the aperture is small. In the embodiment of the present application, in order to avoid the flicker of the picture due to the change of the aperture, the exposure amount is adjusted while the aperture is adjusted. In order to determine the exposure amount corresponding to the aperture, the corresponding relationship between the aperture and the exposure amount is calibrated in advance in the present application, and as shown in fig. 3, when the aperture is changed, the exposure amount corresponding to the aperture is determined according to the corresponding relationship shown in fig. 3.
The adjustment of the exposure amount can be realized by adjusting the shutter and the gain in the camera, and the value of the shutter to be adjusted and the value of the gain to be adjusted of the Sensor of the camera are determined according to the first exposure amount, which can be embodied as the steps shown in fig. 4:
in step 401: determining the adjusting trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted;
in the embodiment of the application, when the adjustment trend is determined according to the comparison result, if the comparison result shows that the current aperture is larger than the aperture to be adjusted, the adjustment trend is determined to be adjusted according to the upper limit value of the exposure line; and if the comparison result shows that the current aperture is smaller than the aperture to be adjusted, determining the adjustment trend to be adjusted according to the lower limit value of the exposure line.
In step 402: determining candidate exposure lines from a plurality of exposure lines included in the exposure path according to the adjustment trend, the current shutter value and the current gain value; wherein each exposure line corresponds to a range of parameters, and the parameters at least include: shutter and gain;
in the specific implementation process, because the lenses and the Sensor photosensitivities of different cameras are different, the requirements of different cameras on the exposure lines in the exposure path are different, and in the embodiment of the application, different numbers and sequences of exposure lines can be set in the exposure path according to the requirements of the cameras. For example: as shown in fig. 5, the exposure lines may be arranged in the exposure path 1 in the order of: aperture, shutter, gain, aperture, gain; the sequence of setting exposure lines in the exposure path 2 is: shutter, gain, aperture, shutter, gain.
In the embodiment of the present application, the adjusting order of the exposure line candidates according to the upper limit value of the exposure line and the exposure line candidates according to the lower limit value of the exposure line may be divided according to the adjusting trend, which is described below:
1. determining candidate exposure lines according to the upper limit value of the exposure lines
When the adjustment is performed according to the upper limit value of the exposure line, the steps as shown in fig. 6 can be implemented:
in step 601: determining the upper limit value of the exposure line where the current shutter value is located and the upper limit value of the exposure line where the current gain value is located;
in step 602: and determining candidate exposure lines according to the upper limit value of the exposure line where the current shutter value is located, the upper limit value of the exposure line where the current gain value is located and the sequence, wherein the sequence is the sequence of the candidate exposure lines in the exposure path.
For ease of understanding, the following examples are illustrated as shown in FIG. 7:
the current shutter value is 1/500, the current gain value is 35, and the order of the exposure lines in the current exposure path is: aperture 1, shutter 1, gain 1, aperture 2, shutter 2, gain 2; the current shutter value is at shutter 1 and the current gain value is at gain 2; the upper limit of the shutter 1 is 1/100, the upper limit of the shutter 2 is 1/10, the upper limit of the gain 1 is 30, the upper limit of the gain 2 is 50, the aperture is adjusted from the current value 300 to 400, the shutter and the gain need to be adjusted to be large, and the current shutter value 1/500 can be adjusted to be 1/10 at the maximum in the current exposure path; the current gain value is 35, and the maximum gain can be adjusted to 50, so that the exposure line candidates can be determined to be shutter 1, shutter 2 and gain 2.
In another embodiment, as shown in FIG. 8, the current shutter value is 1/50, the current gain value is 20, and the order of exposure lines in the current exposure path is: aperture 1, shutter 1, gain 1, aperture 2, shutter 2, gain 2; the current shutter value is on shutter 2, and the current gain value is on gain 1; the upper limit of the shutter 1 is 1/100, the upper limit of the shutter 2 is 1/10, the upper limit of the gain 1 is 30, the upper limit of the gain 2 is 50, the aperture is adjusted from the current value 300 to 400, the shutter and the gain need to be adjusted to be large, and the current shutter value 1/50 can be adjusted to be 1/10 at the maximum in the current exposure path; the current gain value is 20, and the maximum gain can be adjusted to 50, so that the exposure line candidates can be determined to be gain 1, shutter 2 and gain 2.
2. Defining candidate exposure lines according to their lower limit
In some embodiments, when adjusting according to the lower limit of the exposure line, the method can be implemented as the steps shown in fig. 9:
in step 901: determining the lower limit value of the exposure line where the current shutter value is located and the lower limit value of the exposure line where the current gain value is located;
in step 902: and determining candidate exposure lines according to the lower limit value of the exposure line where the current shutter value is located, the lower limit value of the exposure line where the current gain value is located and the sequence.
For ease of understanding, the following examples are illustrated as shown in FIG. 10:
the current shutter value is 1/500, the current gain value is 35, and the order of the exposure lines in the current exposure path is: aperture 1, shutter 1, gain 1, aperture 2, shutter 2, gain 2; the current shutter value is at shutter 1 and the current gain value is at gain 2; the lower limit of the shutter 1 is 1/1000, the lower limit of the shutter 2 is 1/100, the lower limit of the gain 1 is 0, the lower limit of the gain 2 is 30, the aperture is adjusted to 300 from the current value 400, the shutter and the gain need to be adjusted to be small, and the current shutter value 1/500 can be adjusted to 1/1000 at the minimum in the current exposure path; the current gain value is 35, and the minimum value can be adjusted to 0, so that the exposure line candidates can be determined to be shutter 1, gain 1 and gain 2.
In another embodiment, as shown in FIG. 11, the current shutter value is 1/50, the current gain value is 40, and the order of the exposure lines in the current exposure path is: aperture 1, shutter 1, gain 1, aperture 2, shutter 2, gain 2; the current shutter value is on shutter 2, the current gain value is on gain 2; the lower limit of the shutter 1 is 1/1000, the lower limit of the shutter 2 is 1/100, the lower limit of the gain 1 is 0, the lower limit of the gain 2 is 30, the aperture is adjusted to 300 from the current value 400, the shutter and the gain need to be adjusted to be small, and the current shutter value 1/50 can be adjusted to 1/1000 at the minimum in the current exposure path; the current gain value is 40, and the minimum value can be adjusted to 0, so that the exposure line candidates can be determined to be shutter 1, gain 1, shutter 2 and gain 2.
In step 403: determining the adjustment sequence of the candidate exposure lines according to the adjustment trend and the sequence of the candidate exposure lines in the exposure path;
taking fig. 7 as an example, the exposure line candidates are shutter 1, shutter 2, and gain 2, and the adjustment trend is to determine the exposure line candidate according to the upper limit value of the exposure line, so the adjustment sequence of the exposure line candidates is: shutter 1, shutter 2, gain 2. Taking fig. 8 as an example, the exposure line candidates are gain 1, shutter 2, and gain 2, and the adjustment trend is to determine the exposure line candidate according to the upper limit value of the exposure line, so the adjustment sequence of the exposure line candidates is: gain 1, shutter 2, gain 2.
Taking fig. 10 as an example, the exposure line candidates are shutter 1, gain 1, and gain 2, and the adjustment trend is to determine the exposure line candidate according to the lower limit value of the exposure line, so the adjustment sequence of the exposure line candidates is: gain 2, gain 1, shutter 1; taking fig. 11 as an example, the exposure line candidates are shutter 1, gain 1, shutter 2, and gain 2, and the adjustment trend is to determine the exposure line candidate according to the lower limit value of the exposure line, so the adjustment sequence of the exposure line candidates is: gain 2, shutter 2, gain 1, shutter 1.
In step 404: and determining a shutter value to be adjusted and a gain value to be adjusted according to the first exposure and the adjusting sequence.
For ease of understanding, the following description will be made of a method for determining the shutter value to be adjusted and the gain value to be adjusted, based on the adjustment tendency:
1. adjusting according to the upper limit value of the exposure line
The method can be specifically implemented as the steps shown in fig. 12:
step 1201: determining a first exposure line to be adjusted according to the adjustment sequence; the first exposure line to be adjusted is the exposure line which is sequenced as the first exposure line in the adjustment sequence;
as shown in fig. 13, the adjustment trend at this time is adjusted according to the upper limit of the exposure line, and the exposure line candidates at this time are: the shutter 1, the shutter 2 and the gain 2, the first exposure line to be adjusted is the shutter 1.
Step 1202: determining the current value of the parameter in the first exposure line to be adjusted;
step 1203: the exposure amount required for the current value to be adjusted to the upper limit value is determined.
In the embodiment of the present application, when determining the exposure amount, according to the difference of the parameter value in the first exposure line to be adjusted, the value can be determined by using formula 1 or formula 2:
Figure BDA0003287481100000151
wherein SnsGain is the value of the gain,
Figure BDA0003287481100000152
representing the fineness degree of the exposure by using a weight coefficient, wherein Luma is the current brightness, and Ev is the exposure;
Figure BDA0003287481100000153
the Shutter is a value of the Shutter,
Figure BDA0003287481100000154
and the weighting coefficient is used for representing the fineness degree of the exposure, Luma is the current brightness, and Ev is the exposure.
The exposure amount required for adjusting the current value of the parameter in the first exposure line to be adjusted to the upper limit of the exposure line can be accurately calculated through the above formula 1 and formula 2.
In the embodiment of the application, if the required exposure is larger than the first exposure, determining a shutter value to be adjusted and a gain value to be adjusted according to a preset algorithm and a current value; if the required exposure is equal to or less than the first exposure, determining a value of a shutter to be adjusted and a value of a gain to be adjusted according to an upper limit value of a parameter corresponding to the first exposure to be adjusted; for example:
as shown in fig. 14, the current shutter value is 1/500, the current gain value is 20, and the order of exposure lines in the current exposure path is: aperture 1, shutter 1, gain 1, aperture 2, shutter 2, gain 2; the current shutter value is on shutter 1, and the current gain value is on gain 1; the upper limit of the shutter 1 is 1/100, the upper limit of the shutter 2 is 1/10, the upper limit of the gain 1 is 30, the upper limit of the gain 2 is 50, the aperture is adjusted from the current value 300 to 400, and the corresponding first exposure amount is a; the shutter and gain need to be adjusted larger. The exposure candidates are: shutter 1, gain 1, shutter 2, gain 2,; the first exposure line to be adjusted is shutter 1, and the exposure amount required to adjust the current value 1/500 in shutter 1 to 1/100 is:
Figure BDA0003287481100000161
if a < b at this time, it means that the first exposure amount corresponding to the adjustment of the diaphragm from 300 to 400 is insufficient to adjust the shutter from 1/500 to 1/100, and thus no more gain adjustment is required, at which time the value of the shutter to be adjusted can be determined according to the first exposure amount and equation 2; the value of the gain to be adjusted is the value of the current gain;
if at this time a>b, indicating that the exposure amount corresponding to the adjustment of the aperture from 300 to 400 is still left for adjusting the shutter from 1/500 to 1/100, the gain 1 needs to be continuously adjusted, and the exposure amount required for adjusting the current value of the gain 1 from 20 to 30 is as follows:
Figure BDA0003287481100000162
if at this time a>b + c, the first exposure amount is remained after the gain is adjusted from 20 to 30, the shutter 2 needs to be continuously adjusted at the moment, and the exposure amount needed for adjusting the shutter from 1/100 to 1/10 is determined
Figure BDA0003287481100000163
If at this time a>b + c + d, indicating that the first exposure amount remains after the shutter is adjusted to 1/10, then it is necessary to continue adjusting gain 2, determine the exposure amount required to adjust gain 2 from 30 to 50,
Figure BDA0003287481100000164
if at this time a>b + c + d + e, which indicates that the first exposure still remains but the shutter and gain values cannot be adjusted, the current camera parameters are adjusted by using the shutter value of 1/10, the gain value of 50 and the aperture value of 400.
Continuing to take the above example as an example, if a > b, a > b + c, a > b + c + d, and a is less than or equal to b + c + d + e, it may be determined that the value of the to-be-adjusted shutter is 1/10, and the value of the to-be-adjusted gain is determined according to formula 1;
if a is greater than b, a is greater than b + c, and a is less than or equal to b + c + d, the gain value to be adjusted is 30, and the value of the shutter to be adjusted is determined according to the formula 2;
if a is greater than b and a is less than or equal to b + c, the value of the to-be-adjusted shutter is 1/100, and the value of the to-be-adjusted gain is determined according to the formula 1;
if a is not more than b, the gain value to be adjusted is 20, and the value of the shutter to be adjusted is determined according to the formula 2.
2. Adjusting according to the lower limit of the exposure line
The method can be specifically implemented as the steps shown in fig. 15:
in step 1501: determining a second exposure line to be adjusted; the second exposure line to be adjusted is the exposure line which is sequenced into the first exposure line in the adjusting sequence;
as shown in fig. 13, the adjustment trend at this time is adjusted according to the lower limit of the exposure line, and the exposure line candidates at this time are: gain 2, gain 1 and shutter 1, the first exposure line to be adjusted is gain 2.
In step 1502: determining a current value of a parameter in the second exposure line to be adjusted;
in step 1503: the exposure amount at which the current value is adjusted to the lower limit value is determined.
In the embodiment of the application, if the required exposure is larger than the first exposure, determining a shutter value to be adjusted and a gain value to be adjusted according to a preset algorithm and a current value; if the exposure is equal to or less than the first exposure, determining a to-be-adjusted shutter value and a to-be-adjusted gain value according to the lower limit value of the parameter corresponding to the second to-be-adjusted exposure; for example:
as shown in fig. 16, the current shutter value is 1/50, the current gain value is 40, and the order of exposure lines in the current exposure path is: gain 2, shutter 2, aperture 2, gain 2, shutter 1, aperture 1; the current shutter value is on shutter 2, the current gain value is on gain 2; the lower limit of the shutter 2 is 1/100, the lower limit of the shutter 1 is 1/1000, the lower limit of the gain 1 is 0, the lower limit of the gain 2 is 30, the aperture is adjusted from the current value 400 to 300, and the corresponding exposure amount is a; the shutter and gain need to be adjusted down. The exposure candidates are: shutter 1, gain 1, shutter 2, gain 2,; the second exposure line to be adjusted is gain 2, and the exposure amount required to adjust the current value 40 in gain 2 to 30 is:
Figure BDA0003287481100000181
if a < b at this time, it means that the exposure amount corresponding to the adjustment of the aperture from 300 to 400 is insufficient to adjust the gain from 40 to 30, and therefore, the shutter does not need to be adjusted any more, and at this time, the value of the gain to be adjusted can be determined from the exposure amount (first exposure amount) corresponding to the adjustment of the aperture from 300 to 400 and equation 1; the value of the shutter to be adjusted is the value of the current shutter;
if at this time a>b, it means that the exposure amount corresponding to the adjustment of the aperture from 400 to 300, the gain from 40 to 30 and the rest remain, the shutter 2 needs to be continuously adjusted, and the exposure amount required for adjusting the current value of the shutter 2 from 1/50 to 1/100 is:
Figure BDA0003287481100000182
if at this time a>b + c, which means that the first exposure amount is remained after the shutter is adjusted from 1/50 to 1/100, then the gain 1 needs to be continuously adjusted, and the exposure amount needed for adjusting the gain from 30 to 0 is determined
Figure BDA0003287481100000183
If at this time a>b + c + d, which indicates that the first exposure amount remains after the gain is adjusted to 0, the shutter 1 needs to be continuously adjusted at this time, the exposure amount required for adjusting the shutter 1 from 1/100 to 1/1000 is determined,
Figure BDA0003287481100000184
Figure BDA0003287481100000185
if at this time a>b + c + d + e, which indicates that the first exposure still remains but the shutter and gain values cannot be adjusted, the current camera parameters are adjusted by using the shutter value of 1/1000, the gain value of 0 and the aperture value of 300.
Continuing to take the above example as an example, if a > b, a > b + c, a > b + c + d, and a is less than or equal to b + c + d + e, it may be determined that the gain value to be adjusted is 0, and the shutter value to be adjusted is determined according to formula 1;
if a is greater than b, a is greater than b + c, and a is less than or equal to b + c + d, the gain value to be adjusted is 30, and the value of the shutter to be adjusted is determined according to the formula 2;
if a is greater than b and a is less than or equal to b + c, the value of the to-be-adjusted shutter is 1/100, and the value of the to-be-adjusted gain is determined according to the formula 1;
if a is less than or equal to b, the value of the shutter to be adjusted is 1/50, and the value of the gain to be adjusted is determined according to the formula 2.
In some embodiments, the user may not adjust the camera magnification, and if the steps shown in fig. 2 are continuously executed at this time, resources are wasted, so in this embodiment of the present application, before adjusting the camera parameters, it is necessary to determine that the adjustment magnification is different from the current magnification, and the steps in fig. 2 are continuously executed, where the current magnification is the magnification stored before responding to the adjustment instruction of the magnification by the user.
If the adjustment magnification is the same as the prestored magnification, the parameters of the camera may not be adjusted, and it is needless to say that the order of determining the magnitude relation between the adjustment magnification and the prestored magnification is not limited in this application.
For convenience of understanding, the following describes the overall flow of the camera adjustment method provided in the embodiments of the present application in detail, as shown in fig. 17:
step 1701: responding to a magnification adjusting instruction of a user, and determining an adjusting magnification corresponding to the adjusting instruction;
step 1702: determining whether the adjusting magnification is the same as the current stored magnification, if so, entering a step 1703, and if not, entering a step 1704;
step 1703: collecting the video stream by adopting the current parameter value;
step 1704: determining a to-be-adjusted aperture corresponding to the adjusting magnification;
step 1705: determining a first exposure corresponding to the aperture to be adjusted;
step 1706: determining the adjusting trend of the exposure line to be adjusted according to the upper limit; if yes, go to step 1707, otherwise go to step 1708;
step 1707: determining the upper limit value of the exposure line where the current shutter value is located and the upper limit value of the exposure line where the current gain value is located; determining candidate exposure lines according to the upper limit value of the exposure line where the current shutter value is located, the upper limit value of the exposure line where the current gain value is located and the sequence;
step 1708: determining the lower limit value of the exposure line where the current shutter value is located and the lower limit value of the exposure line where the current gain value is located; determining candidate exposure lines according to the lower limit value of the exposure line where the current shutter value is located, the lower limit value of the exposure line where the current gain value is located and the sequence;
step 1709: determining a first exposure line to be adjusted according to the adjustment sequence; the first exposure line to be adjusted is the exposure line which is sequenced as the first exposure line in the adjustment sequence; determining the current value of the parameter in the first exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the upper limit value;
step 1710: determining whether the required exposure is greater than a first exposure, if so, entering a step 1711, otherwise, entering a step 1712;
step 1711: determining a shutter value to be adjusted and a gain value to be adjusted according to a preset algorithm and a current value;
step 1712: determining a shutter value to be adjusted and a gain value to be adjusted according to the upper limit value of the parameter corresponding to the first exposure line to be adjusted;
step 1713: determining a second exposure line to be adjusted according to the adjusting sequence; the second exposure line to be adjusted is the exposure line which is sequenced into the first exposure line in the adjusting sequence; determining the current value of the parameter in the second exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the lower limit value;
step 1714: if the required exposure is greater than the first exposure, then go to step 1711, otherwise go to step 1715;
in step 1715: determining a to-be-adjusted shutter value and a to-be-adjusted gain value according to the lower limit value of the parameter corresponding to the second to-be-adjusted exposure line;
in step 1716: and adjusting the current aperture, the current shutter value and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted and the gain value to be adjusted.
As shown in fig. 18, based on the same inventive concept, the embodiment of the present application further provides a camera adjusting apparatus 1800, including:
a magnification determining module 18001, configured to, in a process of acquiring a video stream, respond to a magnification adjustment instruction of a user, and determine an adjustment magnification corresponding to the adjustment instruction;
a first exposure amount determining module 18002, configured to determine, according to a preset correspondence between a magnification and an aperture, an aperture to be adjusted corresponding to the adjustment magnification, and determine, according to a preset correspondence between an aperture and an exposure amount, a first exposure amount corresponding to the aperture to be adjusted;
a shutter gain determining module 18003, configured to determine, according to the first exposure amount, a to-be-adjusted shutter value of the camera and a to-be-adjusted gain value of the image Sensor;
an adjusting module 18004, configured to adjust a current aperture, a current shutter value, and a current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted, and the gain value to be adjusted.
In some possible embodiments, the shutter gain determination module, when performing the determination of the to-be-adjusted shutter value of the camera and the to-be-adjusted gain value of the image Sensor according to the first exposure amount, is configured to:
determining the adjusting trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted;
determining candidate exposure lines from a plurality of exposure lines included in an exposure path according to the adjusting trend, the current shutter value and the current gain value; wherein each exposure line corresponds to a range of parameters, the parameters at least including: shutter and gain;
determining the adjustment sequence of the candidate exposure lines according to the adjustment trend and the sequence of the candidate exposure lines in the exposure path;
and determining a shutter value to be adjusted and a gain value to be adjusted according to the first exposure and the adjusting sequence.
In some possible embodiments, the shutter gain determination module, when performing the determination of the adjustment trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted, is configured to:
if the comparison result shows that the current aperture is larger than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the upper limit value of the exposure line;
and if the comparison result shows that the current aperture is smaller than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the lower limit value of the exposure line.
In some possible embodiments, the shutter gain determination module, when determining the exposure line candidate from the plurality of exposure lines included in the exposure path according to the adjustment trend and the current shutter value and the current gain value, is configured to:
if the adjustment trend is adjusted according to the upper limit value of the exposure line, determining the upper limit value of the exposure line where the current shutter value is located and the upper limit value of the exposure line where the current gain value is located; determining the candidate exposure line according to the upper limit value of the exposure line of the current shutter value, the upper limit value of the exposure line of the current gain value and the sequence, wherein the sequence is the sequence of the candidate exposure line in the exposure path; or
If the adjustment trend is adjusted according to the lower limit value of the exposure line, determining the lower limit value of the exposure line where the current shutter value is located and the lower limit value of the exposure line where the current gain value is located; and determining the candidate exposure line according to the lower limit value of the exposure line where the current shutter value is located, the lower limit value of the exposure line where the current gain value is located and the sequence.
In some possible embodiments, the shutter gain determination module, when performing the determination of the shutter value to be adjusted and the gain value to be adjusted according to the first exposure amount and the adjustment order, is configured to:
if the adjusting trend indicates that adjustment is carried out according to the upper limit value of the exposure line, determining a first exposure line to be adjusted according to the adjusting sequence; the first exposure line to be adjusted is the exposure line which is sequenced as the first exposure line in the adjusting sequence; determining the current value of the parameter in the first exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the upper limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; if the required exposure is equal to or less than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to the upper limit value of the parameter corresponding to the first exposure line to be adjusted; or
If the adjusting trend indicates that the adjustment is carried out according to the lower limit value of the exposure line, determining a second exposure line to be adjusted according to the adjusting sequence; the second exposure line to be adjusted is the exposure line which is sequenced into the first exposure line in the adjusting sequence; determining the current value of the parameter in the second exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the lower limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; and if the exposure amount is equal to or less than the first exposure amount, determining the shutter value to be adjusted and the gain value to be adjusted according to the lower limit value of the parameter corresponding to the second exposure line to be adjusted.
In some possible embodiments, the adjusting module, before performing the adjustment of the current aperture, the current shutter value, and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted, and the gain value to be adjusted, is further configured to:
and determining that the adjusting multiplying power is different from the current multiplying power, wherein the current multiplying power is the multiplying power stored before responding to the adjusting instruction of the multiplying power by the user.
In some possible embodiments, the apparatus further comprises:
and if the adjusting multiplying power is the same as the prestored multiplying power, not adjusting the current aperture, the current shutter and the current Sensor gain of the camera.
Having described the camera adjustment method and apparatus of the exemplary embodiments of the present application, an electronic device according to another exemplary embodiment of the present application is next described.
As will be appreciated by one skilled in the art, aspects of the present application may be embodied as a system, method or program product. Accordingly, various aspects of the present application may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible implementations, an electronic device according to the present application may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the camera adjustment method according to various exemplary embodiments of the present application described above in the present specification.
The electronic apparatus 130 according to this embodiment of the present application is described below with reference to fig. 19. The electronic device 130 shown in fig. 19 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 19, the electronic apparatus 130 is represented in the form of a general electronic apparatus. The components of the electronic device 130 may include, but are not limited to: the at least one processor 131, the at least one memory 132, and a bus 133 that connects the various system components (including the memory 132 and the processor 131).
Bus 133 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 132 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)1321 and/or cache memory 1322, and may further include Read Only Memory (ROM) 1323.
Memory 132 may also include a program/utility 1325 having a set (at least one) of program modules 1324, such program modules 1324 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The electronic device 130 may also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with the electronic device 130, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 130 to communicate with one or more other electronic devices. Such communication may occur via input/output (I/O) interfaces 135. Also, the electronic device 130 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 136. As shown, network adapter 136 communicates with other modules for electronic device 130 over bus 133. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, aspects of a camera adjusting method provided by the present application may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of a camera adjusting method according to various exemplary embodiments of the present application described above in this specification when the program product is run on the computer device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for camera adjustment of the embodiments of the present application may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on an electronic device. However, the program product of the present application is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on a remote electronic device, or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic devices may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., through the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more units described above may be embodied in one unit, according to embodiments of the application. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Further, while the operations of the methods of the present application are depicted in the drawings in a particular order, this does not require or imply that these operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A camera adjustment method, the method comprising:
in the acquisition process of the video stream, responding to a magnification adjusting instruction of a user, and determining an adjusting magnification corresponding to the adjusting instruction;
determining a to-be-adjusted aperture corresponding to the adjusting magnification according to the corresponding relation between the preset magnification and the aperture, and determining a first exposure corresponding to the to-be-adjusted aperture according to the corresponding relation between the preset aperture and the exposure;
determining a shutter value to be adjusted of the camera and a gain value to be adjusted of the image sensor according to the first exposure amount;
and adjusting the current aperture, the current shutter value and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted and the gain value to be adjusted.
2. The method of claim 1, wherein determining the value of the shutter to be adjusted of the camera and the value of the gain to be adjusted of the image sensor based on the first exposure amount comprises:
determining the adjusting trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted;
determining candidate exposure lines from a plurality of exposure lines included in an exposure path according to the adjusting trend, the current shutter value and the current gain value; wherein each exposure line corresponds to a range of parameters, the parameters at least including: shutter and gain;
determining the adjustment sequence of the candidate exposure lines according to the adjustment trend and the sequence of the candidate exposure lines in the exposure path;
and determining a shutter value to be adjusted and a gain value to be adjusted according to the first exposure and the adjusting sequence.
3. The method of claim 2, wherein determining the adjustment trend of the exposure line according to the comparison result of the current aperture and the aperture to be adjusted comprises:
if the comparison result shows that the current aperture is larger than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the upper limit value of the exposure line;
and if the comparison result shows that the current aperture is smaller than the aperture to be adjusted, determining that the adjustment trend is adjusted according to the lower limit value of the exposure line.
4. The method of claim 3, wherein determining a candidate exposure line from a plurality of exposure lines included in an exposure path based on the adjustment trend and the current shutter value and current gain value comprises:
if the adjustment trend is adjusted according to the upper limit value of the exposure line, determining the upper limit value of the exposure line where the current shutter value is located and the upper limit value of the exposure line where the current gain value is located; determining the candidate exposure line according to the upper limit value of the exposure line of the current shutter value, the upper limit value of the exposure line of the current gain value and the sequence, wherein the sequence is the sequence of the candidate exposure line in the exposure path; or
If the adjustment trend is adjusted according to the lower limit value of the exposure line, determining the lower limit value of the exposure line where the current shutter value is located and the lower limit value of the exposure line where the current gain value is located; and determining the candidate exposure line according to the lower limit value of the exposure line where the current shutter value is located, the lower limit value of the exposure line where the current gain value is located and the sequence.
5. The method of claim 3, wherein determining a shutter value to be adjusted and a gain value to be adjusted based on the first exposure amount and the adjustment order comprises:
if the adjusting trend indicates that adjustment is carried out according to the upper limit value of the exposure line, determining a first exposure line to be adjusted according to the adjusting sequence; the first exposure line to be adjusted is the exposure line which is sequenced as the first exposure line in the adjusting sequence; determining the current value of the parameter in the first exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the upper limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; if the required exposure is equal to or less than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to the upper limit value of the parameter corresponding to the first exposure line to be adjusted; or
If the adjusting trend indicates that the adjustment is carried out according to the lower limit value of the exposure line, determining a second exposure line to be adjusted according to the adjusting sequence; the second exposure line to be adjusted is the exposure line which is sequenced into the first exposure line in the adjusting sequence; determining the current value of the parameter in the second exposure line to be adjusted, and determining the exposure amount required by adjusting the current value to the lower limit value;
if the required exposure is larger than the first exposure, determining the shutter value to be adjusted and the gain value to be adjusted according to a preset algorithm and the current value; and if the exposure amount is equal to or less than the first exposure amount, determining the shutter value to be adjusted and the gain value to be adjusted according to the lower limit value of the parameter corresponding to the second exposure line to be adjusted.
6. The method according to any one of claims 1 to 5, wherein before adjusting the current aperture, the current shutter value, and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted, and the gain value to be adjusted, the method further comprises:
and determining that the adjusting multiplying power is different from the current multiplying power, wherein the current multiplying power is the multiplying power stored before responding to the adjusting instruction of the multiplying power by the user.
7. The method of claim 6, further comprising:
and if the adjusting magnification is the same as the prestored magnification, not adjusting the current aperture, the current shutter and the gain of the current image sensor of the camera.
8. A camera adjustment device, characterized in that the device comprises:
the magnification determining module is used for responding to a magnification adjusting instruction of a user in the acquisition process of the video stream and determining the adjusting magnification corresponding to the adjusting instruction;
the first exposure determining module is used for determining a to-be-adjusted aperture corresponding to the adjusting magnification according to the corresponding relation between the preset magnification and the aperture, and determining a first exposure corresponding to the to-be-adjusted aperture according to the corresponding relation between the preset aperture and the exposure;
the shutter gain determination module is used for determining a to-be-adjusted shutter value of the camera and a to-be-adjusted gain value of the image sensor according to the first exposure amount;
and the adjusting module is used for adjusting the current aperture, the current shutter value and the current gain value of the camera according to the aperture to be adjusted, the shutter value to be adjusted and the gain value to be adjusted.
9. An electronic device comprising at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
10. A computer storage medium, characterized in that the computer storage medium stores a computer program for causing a computer to execute the method of any one of claims 1-7.
CN202111151945.XA 2021-09-29 2021-09-29 Camera adjusting method, device, electronic equipment and storage medium Active CN113766145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111151945.XA CN113766145B (en) 2021-09-29 2021-09-29 Camera adjusting method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111151945.XA CN113766145B (en) 2021-09-29 2021-09-29 Camera adjusting method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113766145A true CN113766145A (en) 2021-12-07
CN113766145B CN113766145B (en) 2023-06-02

Family

ID=78798184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111151945.XA Active CN113766145B (en) 2021-09-29 2021-09-29 Camera adjusting method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113766145B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090002544A1 (en) * 2007-06-29 2009-01-01 Sony Ericsson Mobile Communications Ab Methods of adding additional parameters during automatic exposure for a digital camera and related electronic devices and computer program products
CN105450936A (en) * 2014-05-30 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for intelligently adjusting camera during automatic exposure
CN111447372A (en) * 2020-03-31 2020-07-24 浙江大华技术股份有限公司 Control method, device, equipment and medium for brightness parameter adjustment
CN112672071A (en) * 2021-03-16 2021-04-16 浙江华创视讯科技有限公司 Automatic exposure method, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090002544A1 (en) * 2007-06-29 2009-01-01 Sony Ericsson Mobile Communications Ab Methods of adding additional parameters during automatic exposure for a digital camera and related electronic devices and computer program products
CN105450936A (en) * 2014-05-30 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for intelligently adjusting camera during automatic exposure
CN111447372A (en) * 2020-03-31 2020-07-24 浙江大华技术股份有限公司 Control method, device, equipment and medium for brightness parameter adjustment
CN112672071A (en) * 2021-03-16 2021-04-16 浙江华创视讯科技有限公司 Automatic exposure method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113766145B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN101185322B (en) Method, device and controller for digital imaging
CN108769542B (en) Exposure parameter determination method and device and readable medium
US11532076B2 (en) Image processing method, electronic device and storage medium
JP2021530911A (en) Night view photography methods, devices, electronic devices and storage media
CN112217999B (en) Wide dynamic mode adjusting method and device, electronic equipment and storage medium
CN112312035B (en) Exposure parameter adjusting method, exposure parameter adjusting device and electronic equipment
CN109361853A (en) Image processing method, device, electronic equipment and storage medium
CN111741228B (en) Exposure adjusting method and device for panoramic image
CN103874959B (en) Action control device and action control method, imaging device, and program
WO2007058099A1 (en) Imaging device
CN113766145B (en) Camera adjusting method, device, electronic equipment and storage medium
CN101790037B (en) Imaging device and imaging method
CN114785966B (en) Exposure control method, shooting processing method, device and medium
WO2022253299A1 (en) Image generation method, apparatus and device based on lcd apparatus, and storage medium
JP2023078061A (en) Imaging exposure control method and apparatus, device and storage medium
US20190052803A1 (en) Image processing system, imaging apparatus, image processing apparatus, control method, and storage medium
Rowlands Equivalence theory for cross-format photographic image quality comparisons
CN113489962B (en) White balance adjustment method, device and storage medium
JP2007256562A (en) Microcamera
CN110336938B (en) Photosensitive element, image acquisition device, lens driving method, and storage medium
JP5023874B2 (en) Color imaging device
WO2023245391A1 (en) Preview method and apparatus for camera
WO2021065065A1 (en) Imaging device
WO2023188939A1 (en) Image capture method, image capture device, and program
JP2012008442A (en) Exposure controller and exposure control method

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
GR01 Patent grant
GR01 Patent grant