CN115103130A - Aperture control method, device, equipment and storage medium - Google Patents

Aperture control method, device, equipment and storage medium Download PDF

Info

Publication number
CN115103130A
CN115103130A CN202211015624.1A CN202211015624A CN115103130A CN 115103130 A CN115103130 A CN 115103130A CN 202211015624 A CN202211015624 A CN 202211015624A CN 115103130 A CN115103130 A CN 115103130A
Authority
CN
China
Prior art keywords
environment
aperture
camera
target
data
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
CN202211015624.1A
Other languages
Chinese (zh)
Other versions
CN115103130B (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.)
Longcheer Electronics Huizhou Co Ltd
Original Assignee
Longcheer Electronics Huizhou 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 Longcheer Electronics Huizhou Co Ltd filed Critical Longcheer Electronics Huizhou Co Ltd
Priority to CN202211015624.1A priority Critical patent/CN115103130B/en
Publication of CN115103130A publication Critical patent/CN115103130A/en
Application granted granted Critical
Publication of CN115103130B publication Critical patent/CN115103130B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B7/00Control of exposure by setting shutters, diaphragms or filters, separately or conjointly
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B9/00Exposure-making shutters; Diaphragms
    • G03B9/02Diaphragms

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a diaphragm control method, a diaphragm control device, diaphragm control equipment and a storage medium, wherein the method comprises the following steps: judging whether a first environment where the camera is located at the current moment is the same as a second environment where the camera is located at the last moment according to preset parameters, when the first environment is different from the second environment, determining a target identifier of the first environment according to image data of the first environment and image data ranges corresponding to identifiers of a plurality of environments, determining target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and a mapping relation, and finally controlling the aperture of the camera according to the target aperture data, wherein the mapping relation is the corresponding relation between the identifier of the environment and the aperture data. Whether the first environment is the same as the second environment or not is judged through preset parameters, and when the first environment is different from the second environment, the target aperture data is determined through the mapping relation, so that a manual processing process is replaced, and the accuracy of aperture adjustment and the quality of a shot image are improved.

Description

Aperture control method, device, equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling an aperture.
Background
The diaphragm is an aperture formed by overlapping small blades inside the lens, and can adjust the light receiving quantity of the image sensor according to the opening and closing degree of the diaphragm, so that the image quality shot by the camera is influenced.
At present, before shooting an image, the adjusting ring on the lens needs to be manually rotated according to the shooting environment to set the aperture value ranges of the maximum aperture and the minimum aperture, so that the camera can shoot the image by adopting the aperture value within the aperture value range.
However, the manual adjustment of the aperture value range has the problems of low adjustment accuracy and high labor cost.
Disclosure of Invention
The application provides a diaphragm control method, a diaphragm control device, diaphragm control equipment and a storage medium, and aims to solve the problems that in the prior art, the accuracy is low and the labor cost is high when the diaphragm value range is manually adjusted.
In a first aspect, an embodiment of the present application provides a diaphragm control method, including:
judging whether a first environment of a camera at the current moment is the same as a second environment of the camera at the last moment according to preset parameters, wherein the preset parameters comprise at least one of the following parameters: presetting brightness, contrast, moving speed and pose.
When the first environment is different from the second environment, determining a target identifier of the first environment according to image data of the first environment and image data ranges corresponding to identifiers of a plurality of environments, wherein the image data comprises at least one of the following items: the camera captures image brightness, image depth of field and image sharpness in the first environment.
And determining target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and a mapping relation, wherein the mapping relation is the corresponding relation between the identifier of the environment and the aperture data, and the target aperture data is used for representing the maximum aperture value and the minimum aperture value of the camera in the first environment.
And controlling the aperture of the camera according to the target aperture data.
In a possible design of the first aspect, the determining, according to the image data of the first environment and the image data range corresponding to the identifiers of the plurality of environments, the target identifier of the first environment includes:
and determining the target identification of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identifications of the plurality of environments and the point light source information. Wherein the point light source information of each environment is used to indicate whether a point light source exists in the environment.
Optionally, the determining the target identifier of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identifiers of the plurality of environments, and the point light source information includes:
and when the image data of the first environment is in the image data range corresponding to the identifier of any environment and the point light source information of the first environment is consistent with the point light source information corresponding to the identifier of any environment, determining the identifier of any environment as the target identifier of the first environment.
In another possible design of the first aspect, after determining, according to the target identifier of the first environment and the mapping relationship, target aperture data corresponding to the target identifier of the first environment, the method further includes:
and updating an exposure table according to the target aperture data to generate a new exposure table.
Correspondingly, the controlling the aperture of the camera according to the target aperture data comprises:
and controlling the aperture of the camera according to the new exposure table.
In yet another possible design of the first aspect, the determining whether a first environment of the camera at the current time is the same as a second environment of the camera at the previous time according to preset parameters includes:
judging whether the first environment is the same as the second environment according to preset conditions, wherein the preset conditions comprise at least one of the following items: the brightness difference value of the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset brightness, the contrast difference value of the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset contrast, the moving speed difference value of the camera in the first environment and the camera in the second environment is larger than the preset moving speed, and the pose difference value of the camera in the first environment and the camera in the second environment is larger than the preset pose.
In yet another possible design of the first aspect, when the first environment is the same as the second environment, the method further includes:
determining current aperture data of the camera as the target aperture data.
In a second aspect, an embodiment of the present application provides an aperture control apparatus, including:
the judging module is used for judging whether a first environment where the camera is located at the current moment is the same as a second environment where the camera is located at the previous moment according to preset parameters, wherein the preset parameters comprise at least one of the following: and presetting brightness, contrast, moving speed and pose.
A determining module, configured to determine, when the first environment is different from the second environment, a target identifier of the first environment according to image data of the first environment and an image data range corresponding to identifiers of multiple environments, where the image data includes at least one of: the image brightness, the image depth of field and the image sharpness of the camera shot in the first environment.
The determining module is further configured to determine, according to a target identifier of the first environment and a mapping relationship, target aperture data corresponding to the target identifier of the first environment, where the mapping relationship is a corresponding relationship between an identifier of an environment and aperture data, and the target aperture data is used to represent a maximum aperture value and a minimum aperture value of the camera in the first environment.
And the control module is used for controlling the aperture of the camera according to the target aperture data.
In a possible design of the second aspect, the determining module is specifically configured to:
and determining the target identifier of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data range corresponding to the identifiers of the plurality of environments and the point light source information. Wherein the point light source information of each environment is used to indicate whether a point light source exists in the environment.
Optionally, the determining module is specifically configured to:
and when the image data of the first environment is in the image data range corresponding to the identifier of any environment and the point light source information of the first environment is consistent with the point light source information corresponding to the identifier of any environment, determining the identifier of any environment as the target identifier of the first environment.
In another possible design of the second aspect, after determining, according to the target identifier of the first environment and the mapping relationship, target aperture data corresponding to the target identifier of the first environment, the apparatus further includes:
and the generating module is used for updating the exposure table according to the target aperture data and generating a new exposure table.
Correspondingly, the control module is specifically configured to:
and controlling the aperture of the camera according to the new exposure table.
In yet another possible design of the second aspect, the determining module is specifically configured to:
judging whether the first environment is the same as the second environment according to preset conditions, wherein the preset conditions comprise at least one of the following items: the brightness difference value of the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset brightness, the contrast difference value of the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset contrast, the moving speed difference value of the camera in the first environment and the camera in the second environment is larger than the preset moving speed, and the pose difference value of the camera in the first environment and the camera in the second environment is larger than the preset pose.
In yet another possible design of the second aspect, when the first environment is the same as the second environment, the determining module is further configured to:
determining current aperture data of the camera as the target aperture data.
In a third aspect, an embodiment of the present application provides an electronic device, including: a processor, a memory and computer program instructions stored on the memory and executable on the processor for implementing the method of the first aspect and each possible design when the processor executes the computer program instructions.
In a fourth aspect, embodiments of the present application may provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the method provided by the first aspect and each possible design when executed by a processor.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program that, when executed by a processor, is configured to implement the method provided by the first aspect and each possible design.
In the method, whether a first environment where a camera is located at the current time is the same as a second environment where the camera is located at the previous time is judged according to preset parameters, when the first environment is different from the second environment, a target identifier of the first environment is determined according to image data of the first environment and image data ranges corresponding to identifiers of multiple environments, target aperture data corresponding to the target identifier of the first environment is determined according to the target identifier of the first environment and a mapping relation, and finally, an aperture of the camera is controlled according to the target aperture data, wherein the mapping relation is a corresponding relation between the identifier of the environment and the aperture data. In the technical scheme, whether the first environment is the same as the second environment or not is judged through the preset parameters, and the target aperture data is determined through the mapping relation when the first environment is different from the second environment, so that the manual processing process is replaced, and the accuracy of aperture adjustment and the quality of shot images are improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic view of an application scenario of an aperture control method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart of a first embodiment of a diaphragm control method according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of a second embodiment of a diaphragm control method according to the present application;
fig. 4 is a schematic structural diagram of an aperture control apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. The drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the concepts of the application by those skilled in the art with reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Before introducing the embodiments of the present application, an application context of the embodiments of the present application is explained first:
an aperture is a device used to control the amount of light transmitted through the lens and into the light-sensing surface in the body, usually in the lens. In practical applications, before capturing an image using a camera, a user needs to set aperture value ranges of a maximum aperture and a minimum aperture according to a capturing environment so that the camera captures an image with an aperture value within the aperture value range. For example, when taking a picture outdoors in daytime, a smaller maximum aperture and a smaller minimum aperture need to be set, assuming strong light; on the contrary, when taking a picture in a dark environment in the evening, a larger maximum aperture and a larger minimum aperture need to be set to ensure the imaging quality of the image due to the dim light at the moment.
However, in the prior art, a user needs to manually adjust the aperture value range before shooting an image, and the problems of low adjustment accuracy and high labor cost exist. If the aperture size adjusted by the user is not accurate, the problems of image blurring, front and back scene blurring and the like can occur, and the imaging quality of the image is seriously influenced. For example, in a scene with a large depth of field, if the aperture is too large, the depth of field will be small, the background will be blurred when the foreground is focused, and the foreground will be blurred when the background is focused.
In view of the above problems, the inventive concept of the present application is as follows: when setting the aperture value range, in the current scheme, because there is no way to ensure the rigor of the processing procedure manually, the accuracy of adjusting the aperture value range cannot be ensured. Based on this, the inventor finds that if the environment of the camera at the current moment is the same as the environment at the previous moment before the image is shot every time, if so, the aperture data used at the previous moment is still used in the shooting, and the aperture data comprises the maximum aperture value and the minimum aperture value; if the image data of the environment where the camera is located at the current moment is different from the image data of the environment, the identifier of the environment is determined, the aperture data corresponding to the environment is determined again according to the mapping relation between the pre-stored identifier of the environment and the aperture data, and the aperture is configured according to the aperture data, so that the manual adjusting process can be replaced, the adjusting accuracy and the shot image quality are improved, and the labor cost is reduced.
For example, the aperture control method provided in the embodiment of the present application may be applied to an application scenario diagram shown in fig. 1. Fig. 1 is a schematic view of an application scenario of an aperture control method according to an embodiment of the present disclosure, so as to solve the above technical problem. As shown in fig. 1, the application scene may include a scene a of the second environment in which the camera 101 was located at the previous time and a scene B of the first environment in which the camera 101 was located at the current time. Wherein, scene a and scene B may both include: a user, a camera 101 used by the user to take an image, a subject (such as a tree in fig. 1) within the range of the camera 101, and an electronic device 102 in communication with the camera 101.
It will be appreciated that scene a is a daytime scene, that is to say the user takes an image during the day, and scene B is a nighttime scene, that is to say the user takes an image during the night.
In an embodiment of the present application, the camera 101 may transmit relevant parameters and image data to the electronic device 102 in real time, where the relevant parameters may include brightness of an image taken by the camera 101 in a current environment, contrast of the image, a moving speed and a pose of the camera 101 in a current scene. Illustratively, the camera 101 transmits the relevant parameters and image data of the first environment to the electronic device 102 when in the first environment, and transmits the relevant parameters and image data of the second environment to the electronic device 102 when the camera 101 is in the second environment. The electronic device 102 may perform processing according to the received related parameters and pre-stored preset parameters, so as to determine whether the environment in which the camera 101 is located changes. When the environment changes, that is, the first environment is different from the second environment, target aperture data for controlling the aperture of the camera 101 is determined from the currently received image data and transmitted to the camera 101, so that the camera 101 adjusts the aperture of the camera 101 according to the target aperture data.
In the embodiment of the present application, it can be understood that the electronic device in the application scenario shown in fig. 1 may be a terminal device, for example, a device such as a computer and a tablet computer, a server, for example, a processing platform in the background, and a camera with a computing processing function for capturing an image. The embodiment explains and explains the execution subject of the aperture control method as the electronic device, and it can be determined according to the actual situation as to whether the electronic device is specifically a terminal device, a server or a camera, and the embodiment of the present application does not specifically limit this.
The technical solution of the present application will be described in detail below with reference to specific examples.
It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a schematic flowchart of a first embodiment of a diaphragm control method according to the present application. As shown in fig. 2, the aperture control method may include the steps of:
s201, judging whether a first environment of the camera at the current moment is the same as a second environment of the camera at the previous moment according to preset parameters.
When an image is shot, the sizes of the apertures used by the cameras in different environments are different, so that the problem that the image shot by the cameras is over-exposed or under-exposed is solved. For example, when shooting in a light-rich environment, the aperture value of the camera should be small; on the contrary, when shooting in an environment with poor light, the aperture value of the camera should be larger. Therefore, in this embodiment, before the camera captures an image, it needs to determine whether the environment where the camera is located changes compared to the previous time, that is, whether the first environment and the second environment are the same, so that when the environment changes, the size of the aperture of the camera is adjusted in time to ensure the quality of the image captured by the camera.
Alternatively, the camera may transmit the relevant parameters of the current environment to the electronic device. The relevant parameters comprise image brightness, image contrast, moving speed and pose of the camera in the current scene, wherein the image brightness and the image contrast are shot by the camera in the current environment. For example, the camera may transmit the relevant parameters of the second environment to the electronic device at the last moment; the camera may transmit the relevant parameters of the first environment to the electronic device at the current time.
Alternatively, the image brightness may be determined by an Auto Exposure (AE) flag of the camera, the image contrast may be determined by a Focus Value (FV) of the camera, the moving speed of the camera may be determined by a G-sensor flag of the camera, and the moving speed of the camera may be determined by a gyroscope flag.
Optionally, the camera may send the relevant parameters to the electronic device under a certain trigger condition, for example, when a user presses a relevant key (such as a shutter) of the camera, the camera may also send the relevant parameters to the electronic device in real time.
It should be understood that, when the camera sends the relevant parameter to the electronic device under a certain trigger condition, the last time refers to the time when the trigger condition was last satisfied, and the current time refers to the time when the trigger condition is currently satisfied.
Optionally, the preset parameter includes at least one of the following: presetting brightness, contrast, moving speed and pose.
S202, when the first environment is different from the second environment, determining a target identifier of the first environment according to the image data of the first environment and the image data range corresponding to the identifiers of the plurality of environments.
In the embodiment of the present application, the image data captured in different environments is different, for example, the brightness of the image captured in the environment with sufficient light is higher, whereas the brightness of the image captured in the environment without light is lower. Therefore, the image data ranges corresponding to different environments can be determined in advance according to the characteristics of the different environments, so that the target identification corresponding to the first environment can be determined according to the image data of the first environment.
Wherein the image data comprises at least one of: the camera captures image brightness, image depth and image sharpness in the first environment.
For example, the camera may acquire image data of the first environment in a preview mode.
Optionally, the camera may send the acquired image data of the first environment to the electronic device when sending the relevant parameter of the first environment, and may also send the image data of the first environment to the electronic device when receiving an upload instruction returned by the electronic device. The uploading instruction is generated when the electronic equipment judges that the first environment is different from the second environment and is used for indicating the camera to upload the image data of the first environment.
Alternatively, the identifiers of a plurality of environments and the image data range corresponding to the identifier of each environment may be represented by table 1.
TABLE 1
Identification of an environment Range of image data
Normal scene Image data range 1
Scene with large depth of field Image data range 2
High dynamic scenes Image data range 3
Extreme dark fieldLandscape Image data range 4
Ultra-long distance scene Image data range 5
Fog scene Image data range 6
Flat and minuteness free scene Image data range 7
Night scene point light source scene Image data range 8
Custom special scenes Image data range 9
It can be understood that the customized special scene is a scene set by the user according to the self-demand, and the scene content of the customized special scene is not limited in the embodiment of the application. In addition, only part of the scene identifiers and the image data range corresponding to the scene identifiers are shown in table 1, in an actual application, there may also be other scene identifiers and image data ranges corresponding to the scene identifiers, and the scene identifiers and the image data ranges corresponding to the scene identifiers may also have other expression forms, which may be defined according to actual requirements, which is not specifically defined in the embodiment of the present application.
S203, determining target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and the mapping relation.
In this embodiment, the sizes of the apertures of the cameras in different environments are different, and therefore, a mapping relationship may be established in advance according to aperture data corresponding to different environments, where the aperture data includes a maximum aperture value and a minimum aperture value, so as to determine target aperture data corresponding to the identifier of the first environment.
The mapping relation is a corresponding relation between the identification of the environment and the aperture data, and the target aperture data is used for representing the maximum aperture value and the minimum aperture value of the camera in the first environment. Optionally, the mapping relationship may be pre-stored in the electronic device by a technician.
Illustratively, the mapping relationship can be represented by table 2.
TABLE 2
Identification of an environment Aperture data
Normal scene Aperture data 1
Scene with large depth of field Aperture data 2
High dynamic scenes Aperture data 3
Ultra-dark scene Aperture data 4
Ultra-long distance scene Aperture data 5
Fog scene Aperture data 6
Flat and detail-free scene Aperture data 7
Night scene point light source scene Aperture data 8
Custom special scenes Aperture data 9
As shown in table 2, assuming that the object of the first environment is identified as an extreme dark scene, the object aperture data determined from the above mapping relationship is aperture data 4. It should be understood that only the identification of a portion of a scene and the aperture data corresponding to the identification of that scene are shown in table 2. In practical applications, the identifiers of other scenes and the aperture data corresponding to the identifier of the scene may also exist, and the identifiers of the scenes and the aperture data corresponding to the identifiers of the scenes may also have other expression forms, which are not described herein again.
And S204, controlling the aperture of the camera according to the target aperture data.
In the embodiment of the present application, after the target aperture data is determined, the current aperture value may be adjusted to be within the aperture value range corresponding to the target aperture data, that is, the current aperture value may be adjusted to be within a range smaller than the maximum aperture value and larger than the minimum aperture value, so as to ensure the quality of the image captured according to the adjusted aperture value.
Optionally, after the aperture value is adjusted, the exposure time and the gain of the camera may be adjusted according to the adjusted aperture value.
The aperture control method provided in the embodiment of the application determines, according to preset parameters, whether a first environment in which a camera is located at a current time is the same as a second environment in which the camera is located at a previous time, determines, when the first environment is different from the second environment, a target identifier of the first environment according to image data of the first environment and an image data range corresponding to identifiers of multiple environments, determines target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and a mapping relationship, and finally controls an aperture of the camera according to the target aperture data, where the mapping relationship is a correspondence relationship between the identifier of the environment and the aperture data. In the technical scheme, whether the first environment is the same as the second environment or not is judged through the preset parameters, and the target aperture data is determined through the mapping relation when the first environment is different from the second environment, so that the manual processing process is replaced, and the accuracy of aperture adjustment and the quality of shot images are improved.
In the prior art, adjusting the aperture value range is usually implemented by hardware, such as setting the aperture value range by manually rotating an adjusting ring on a lens. The scheme can be realized through software, and the aperture value range is automatically corrected through the software according to the shooting environment, so that the labor cost is saved, the use experience of a user is improved, and the shooting image effect is ensured.
Optionally, in some embodiments, the step S202 may be implemented by:
determining a target identifier of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identifiers of the plurality of environments and the point light source information; the point light source information of each environment is used for indicating whether a point light source exists in the environment.
Optionally, the point light source information may be a point light source or a non-point light source, and may also be the volume size and the brightness size of the point light source, which may be determined according to the actual situation requirement, and the embodiment of the present application does not specifically limit this.
In this embodiment, the image data ranges and point light source information corresponding to the identifications of the plurality of environments may be represented by table 3.
TABLE 3
Identification of an environment Range of image data Point light source information
Normal scene Image data range 1 Point light source information 1
Scene with large depth of field Image data range 2 Point light source information 2
High dynamic scenes Image data range 3 Point light source information 3
Dark scene Image data range 4 Point light source information 4
Ultra-long distance scene Image data range 5 Point light source information 5
Fog scene Image data range 6 Point light source information 6
Flat and minuteness free scene Image data range 7 Point light source information 7
Night scene point light source scene Image data range 8 Point light source information 8
Custom special scenes Image data range 9 Point light source information 9
It can be understood that only the identifiers of a part of scenes and the image data ranges and point light source information corresponding to the identifiers of the scenes are shown in table 3, in practical applications, there may also be identifiers of other scenes and image data ranges and point light source information corresponding to the identifiers of the scenes, and the image data ranges and point light source information corresponding to the identifiers of the scenes and the identifiers of the scenes may also have other expression forms, which are not described herein again.
In the prior art, in a scene lacking light, an automatic exposure mechanism of a camera adjusts a current aperture value to be larger within a preset aperture value range, so that a shot image can obtain higher brightness. However, if there is a point light source in the current scene, there is a ring of obvious aperture at the edge of the point light source, and if a large aperture value is still used for shooting at this time, the shot image has a problem of blurriness. In the method, when the aperture value adjustable range (namely the target aperture data) is determined, point light source information of different environments is considered, so that the accuracy of subsequent aperture adjustment is further improved.
Optionally, in some embodiments, the determining the target identifier of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identifiers of the plurality of environments, and the point light source information may be implemented by:
and when the image data of the first environment is in the image data range corresponding to the identifier of any environment and the point light source information of the first environment is consistent with the point light source information corresponding to the identifier of any environment, determining the identifier of any environment as the target identifier of the first environment.
As shown in table 3, assuming that the image data of the first environment is within the image data range 6 and the point light source information of the first environment is consistent with the point light source information 6, the fog scene is determined as the target identification of the first environment.
In the embodiment, the image data and the point light source information of the first environment are respectively compared with the image data range of the identifier of each environment and the point light source information, so that the accuracy of determining the target identifier of the first environment is improved, and the quality of subsequently shot images is ensured.
Optionally, in some embodiments, after determining target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and the mapping relationship, the aperture control method may further include the following steps: and updating the exposure table according to the target aperture data to generate a new exposure table.
Optionally, the exposure table is a lookup table array, and each set of data is used for storing an aperture value, an exposure time and a gain.
Optionally, each set of data in the exposure table may be arranged in order of aperture value from small to large.
The new exposure table generated by updating has an aperture value within the range of the aperture value corresponding to the target aperture data, that is, the aperture value in the new exposure table is smaller than the maximum aperture value of the target aperture data and larger than the minimum aperture value of the target aperture data.
Correspondingly, the control of the aperture of the camera according to the target aperture data can be realized by the following steps:
and controlling the aperture of the camera according to the new exposure table.
In one implementable manner, controlling the aperture of the camera according to the new exposure table may be achieved by:
step 1, selecting any group of data in the new exposure table, and determining the any group of data as target data.
And step 2, controlling an aperture according to the target data, and determining whether the image shot according to the target data has the problems of overexposure or underexposure in a preview mode.
And 3, if the overexposure problem exists, re-determining the previous group of data of any group of data as the target data.
And 4, if the underexposure problem exists, re-determining the next group of data of any group of data as the target data.
Repeating the above steps 2 to 4 until stopping when it is determined that there is no overexposure or underexposure of the image photographed according to the above object data in the preview mode.
And 5, controlling the aperture according to the target data.
In the embodiment, the aperture value used in the current shooting is determined through the new exposure table in the preview mode, so that the quality of the subsequent shot picture is further improved, and the problem of overexposure or underexposure in practical application is avoided.
Optionally, in some embodiments, the step S201 may be implemented by:
judging whether the first environment is the same as the second environment according to preset conditions, wherein the preset conditions comprise at least one of the following conditions: the brightness difference value between the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset brightness, the contrast difference value between the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset contrast, the moving speed difference value between the camera in the first environment and the camera in the second environment is larger than the preset moving speed, and the pose difference value between the camera in the first environment and the camera in the second environment is larger than the preset pose.
Optionally, after receiving the relevant parameters of the first environment and the relevant parameters of the second environment sent by the camera, the electronic device may calculate a difference value of each sub-parameter in the relevant parameters. If so, calculating a brightness difference value of the image brightness of the relevant parameter of the first environment and the image brightness of the relevant parameter of the second environment; calculating a contrast difference between the image contrast of the relevant parameter of the first environment and the image contrast of the relevant parameter of the second environment; calculating a speed difference value of the moving speed of the relevant parameter of the first environment and the moving speed of the relevant parameter of the second environment; and calculating a pose difference value of the pose of the relevant parameter of the first environment and the pose of the relevant parameter of the second environment.
In the above embodiment, the difference between the relevant parameter of the first environment and the relevant parameter of the second environment is compared with the preset parameter, so as to determine whether the first environment and the second environment are the same, improve the accuracy of the determination, and avoid the problem of low accuracy of redundant calculation or aperture control caused by misjudgment.
Optionally, in some embodiments, when the first environment is the same as the second environment, the aperture control method may further include the steps of:
the current aperture data of the camera is determined as target aperture data.
In the above embodiment, when the first environment is the same as the second environment, it is described that the environment does not change at this time, and therefore, the data of the current aperture can be directly determined as the target aperture data without changing the aperture data, and the aperture is controlled according to the target aperture data, so that the accuracy of controlling the aperture is improved, the redundant calculation amount is reduced, and the processing efficiency is improved.
Fig. 3 is a flowchart illustrating a second embodiment of a diaphragm control method according to an embodiment of the present application. As shown in fig. 3, the aperture control method may include the steps of:
s301, image data ranges corresponding to the identifiers of the plurality of environments are preset.
S302, judging whether a first environment of the camera at the current moment is the same as a second environment of the camera at the previous moment according to preset parameters. S303 is executed when not identical, the current aperture data of the camera is determined as the target aperture data when identical, and S305 is executed.
S303, determining a target identifier of the first environment according to the image data of the first environment and the image data range corresponding to the identifiers of the plurality of environments.
S304, determining target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and the mapping relation.
S305, the exposure table is updated based on the target aperture data, and a new exposure table is generated.
And S306, controlling the aperture of the camera according to the new exposure table.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 4 is a schematic structural diagram of an aperture control apparatus according to an embodiment of the present application. As shown in fig. 4, the aperture control apparatus includes:
the determining module 41 is configured to determine, according to preset parameters, whether a first environment where the camera is located at the current time is the same as a second environment where the camera is located at the previous time, where the preset parameters include at least one of: presetting brightness, contrast, moving speed and pose;
a determining module 42, configured to determine, when the first environment is different from the second environment, a target identifier of the first environment according to the image data of the first environment and the image data range corresponding to the identifiers of the multiple environments, where the image data includes at least one of: the image brightness, the image depth of field and the image sharpness of the camera shot in the first environment;
the determining module 42 is further configured to determine, according to a target identifier of the first environment and a mapping relationship, target aperture data corresponding to the target identifier of the first environment, where the mapping relationship is a corresponding relationship between the identifier of the environment and the aperture data, and the target aperture data is used to represent a maximum aperture value and a minimum aperture value of the camera in the first environment;
and a control module 43 for controlling the aperture of the camera according to the target aperture data.
In a possible design of the embodiment of the present application, the determining module 42 is specifically configured to:
determining a target identifier of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identifiers of the plurality of environments and the point light source information; the point light source information of each environment is used for indicating whether a point light source exists in the environment.
Optionally, the determining module 42 is specifically configured to:
and when the image data of the first environment is in the image data range corresponding to the identifier of any environment and the point light source information of the first environment is consistent with the point light source information corresponding to the identifier of any environment, determining the identifier of any environment as the target identifier of the first environment.
In another possible design of the embodiment of the present application, after determining, according to the target identifier of the first environment and the mapping relationship, target aperture data corresponding to the target identifier of the first environment, the apparatus further includes:
the generating module is used for updating the exposure table according to the target aperture data and generating a new exposure table;
correspondingly, the control module 43 is specifically configured to:
and controlling the aperture of the camera according to the new exposure table.
In another possible design of the embodiment of the present application, the determining module 41 is specifically configured to:
judging whether the first environment is the same as the second environment according to preset conditions, wherein the preset conditions comprise at least one of the following items: the brightness difference value between the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset brightness, the contrast difference value between the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset contrast, the moving speed difference value between the camera in the first environment and the camera in the second environment is larger than the preset moving speed, and the pose difference value between the camera in the first environment and the camera in the second environment is larger than the preset pose.
In yet another possible design of the embodiment of the present application, when the first environment is the same as the second environment, the determining module 42 is further configured to:
the current aperture data of the camera is determined as target aperture data.
The aperture control device provided in the embodiment of the present application can be used to implement the method in any of the above embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the electronic device may include: a processor 51, a memory 52 and computer program instructions stored on the memory 52 and executable on the processor 51, the processor 51 implementing the aperture control method provided by any of the foregoing embodiments when executing the computer program instructions.
Optionally, the above devices of the electronic device may be connected by a system bus.
The memory 52 may be a separate memory unit or a memory unit integrated into the processor. The number of processors is one or more.
Optionally, the electronic device may further include an interface for interacting with other devices.
It should be understood that the Processor 51 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in this application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
The system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus. The memory may include Random Access Memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk memory.
All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (optical disc), and any combination thereof.
The electronic device provided in the embodiment of the present application can be used to execute the aperture control method provided in any of the above method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
The embodiment of the application provides a computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are run on a computer, the computer is enabled to execute the aperture control method.
The computer readable storage medium may be any type of volatile or non-volatile storage device or combination thereof, such as static random access memory, electrically erasable programmable read only memory, magnetic storage, flash memory, magnetic or optical disk. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer.
Alternatively, a readable storage medium may be coupled to the processor such that the processor can read information from, and write information to, the readable storage medium. Of course, the readable storage medium may also be an integral part of the processor. The processor and the readable storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium may also reside as discrete components in the apparatus.
Embodiments of the present application further provide a computer program product, which includes a computer program stored in a computer-readable storage medium, from which the computer program can be read by at least one processor, and the at least one processor can implement the above-mentioned aperture control method when executing the computer program.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. An aperture control method, characterized by comprising:
judging whether a first environment of a camera at the current moment is the same as a second environment of the camera at the previous moment according to preset parameters, wherein the preset parameters comprise at least one of the following: presetting brightness, contrast, moving speed and pose;
when the first environment is different from the second environment, determining a target identifier of the first environment according to image data of the first environment and image data ranges corresponding to identifiers of a plurality of environments, wherein the image data comprises at least one of the following items: the image brightness, the image depth of field and the image sharpness of the camera shot in the first environment;
determining target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and a mapping relation, wherein the mapping relation is the corresponding relation between the identifier of the environment and the aperture data, and the target aperture data is used for representing the maximum aperture value and the minimum aperture value of the camera in the first environment;
and controlling the aperture of the camera according to the target aperture data.
2. The method of claim 1, wherein determining the target identity of the first environment from the image data of the first environment and the image data range corresponding to the identities of the plurality of environments comprises:
determining the target identification of the first environment according to the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identifications of the plurality of environments and the point light source information; the point light source information of each environment is used for indicating whether a point light source exists in the environment.
3. The method of claim 2, wherein determining the target identity of the first environment from the image data of the first environment, the point light source information of the first environment, the image data ranges corresponding to the identities of the plurality of environments, and the point light source information comprises:
and when the image data of the first environment is in the image data range corresponding to the identifier of any environment and the point light source information of the first environment is consistent with the point light source information corresponding to the identifier of any environment, determining the identifier of any environment as the target identifier of the first environment.
4. The method according to any one of claims 1 to 3, wherein after determining the target aperture data corresponding to the target identifier of the first environment according to the target identifier of the first environment and the mapping relationship, the method further comprises:
updating an exposure table according to the target aperture data to generate a new exposure table;
correspondingly, the controlling the aperture of the camera according to the target aperture data includes:
and controlling the aperture of the camera according to the new exposure table.
5. The method of claim 1, wherein the determining whether a first environment of the camera at the current time is the same as a second environment of the camera at the previous time according to preset parameters comprises:
judging whether the first environment is the same as the second environment according to preset conditions, wherein the preset conditions comprise at least one of the following items: the brightness difference value of the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset brightness, the contrast difference value of the image shot by the camera in the first environment and the image shot by the camera in the second environment is larger than the preset contrast, the moving speed difference value of the camera in the first environment and the camera in the second environment is larger than the preset moving speed, and the pose difference value of the camera in the first environment and the camera in the second environment is larger than the preset pose.
6. The method of claim 1, wherein when the first environment is the same as the second environment, the method further comprises:
determining current aperture data of the camera as the target aperture data.
7. An aperture control device characterized by comprising:
the judging module is used for judging whether a first environment of the camera at the current moment is the same as a second environment of the camera at the previous moment according to preset parameters, wherein the preset parameters comprise at least one of the following parameters: presetting brightness, contrast, moving speed and pose;
a determining module, configured to determine, when the first environment is different from the second environment, a target identifier of the first environment according to image data of the first environment and an image data range corresponding to identifiers of multiple environments, where the image data includes at least one of: the image brightness, the image depth of field and the image sharpness of the camera shot in the first environment;
the determining module is further configured to determine, according to a target identifier of the first environment and a mapping relationship, target aperture data corresponding to the target identifier of the first environment, where the mapping relationship is a corresponding relationship between an identifier of an environment and aperture data, and the target aperture data is used to represent a maximum aperture value and a minimum aperture value of the camera in the first environment;
and the control module is used for controlling the aperture of the camera according to the target aperture data.
8. An electronic device, comprising: processor, memory and computer program instructions stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program instructions, is adapted to implement the aperture control method according to any of claims 1 to 6.
9. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the aperture control method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program is adapted to be executed by a processor for implementing the aperture control method according to any of claims 1 to 6.
CN202211015624.1A 2022-08-24 2022-08-24 Aperture control method, device, equipment and storage medium Active CN115103130B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211015624.1A CN115103130B (en) 2022-08-24 2022-08-24 Aperture control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211015624.1A CN115103130B (en) 2022-08-24 2022-08-24 Aperture control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115103130A true CN115103130A (en) 2022-09-23
CN115103130B CN115103130B (en) 2023-05-02

Family

ID=83300257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211015624.1A Active CN115103130B (en) 2022-08-24 2022-08-24 Aperture control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115103130B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450936A (en) * 2014-05-30 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for intelligently adjusting camera during automatic exposure
CN106534660A (en) * 2015-09-11 2017-03-22 深圳中集天达空港设备有限公司 Self-adaptive image shooting method and self-adaptive image shooting device
CN108681182A (en) * 2018-04-24 2018-10-19 浙江大华技术股份有限公司 A kind of diaphragm control method and terminal device
CN108702459A (en) * 2017-05-18 2018-10-23 深圳市大疆创新科技有限公司 A kind of automatic explosion method and device for camera
CN109413336A (en) * 2018-12-27 2019-03-01 北京旷视科技有限公司 Image pickup method, device, electronic equipment and computer readable storage medium
CN113938602A (en) * 2021-09-08 2022-01-14 荣耀终端有限公司 Image processing method, electronic device, chip and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450936A (en) * 2014-05-30 2016-03-30 杭州海康威视数字技术股份有限公司 Method and device for intelligently adjusting camera during automatic exposure
CN106534660A (en) * 2015-09-11 2017-03-22 深圳中集天达空港设备有限公司 Self-adaptive image shooting method and self-adaptive image shooting device
CN108702459A (en) * 2017-05-18 2018-10-23 深圳市大疆创新科技有限公司 A kind of automatic explosion method and device for camera
CN108681182A (en) * 2018-04-24 2018-10-19 浙江大华技术股份有限公司 A kind of diaphragm control method and terminal device
CN109413336A (en) * 2018-12-27 2019-03-01 北京旷视科技有限公司 Image pickup method, device, electronic equipment and computer readable storage medium
CN113938602A (en) * 2021-09-08 2022-01-14 荣耀终端有限公司 Image processing method, electronic device, chip and readable storage medium

Also Published As

Publication number Publication date
CN115103130B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN108335279B (en) Image fusion and HDR imaging
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
CN108322646B (en) Image processing method, image processing device, storage medium and electronic equipment
CN108337445B (en) Photographing method, related device and computer storage medium
KR101916355B1 (en) Photographing method of dual-lens device, and dual-lens device
CN108377345B (en) Exposure parameter value determination method and device, multi-view camera and storage medium
CN109194882B (en) Image processing method, image processing device, electronic equipment and storage medium
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
CN110213494B (en) Photographing method and device, electronic equipment and computer readable storage medium
CN109922275B (en) Self-adaptive adjustment method and device of exposure parameters and shooting equipment
CN108616689B (en) Portrait-based high dynamic range image acquisition method, device and equipment
CN110493539B (en) Automatic exposure processing method, processing device and electronic equipment
US11184537B2 (en) Method and apparatus having a function of constant automatic focusing when exposure changes
CN107613190B (en) Photographing method and terminal
CN109361853B (en) Image processing method, image processing device, electronic equipment and storage medium
CN106791451B (en) Photographing method of intelligent terminal
CN105578062A (en) Light metering mode selection method and image acquisition device utilizing same
CN111405185B (en) Zoom control method and device for camera, electronic equipment and storage medium
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN110493515B (en) High dynamic range shooting mode starting method and device, storage medium and electronic equipment
CN111953893A (en) High dynamic range image generation method, terminal device and storage medium
CN113840095B (en) Light supplement lamp control method and related device
CN110213499B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN113298735A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113163127A (en) Image processing method, image processing device, electronic equipment and storage medium

Legal Events

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