CN111263078B - Method and device for determining image pickup mode, storage medium and electronic device - Google Patents

Method and device for determining image pickup mode, storage medium and electronic device Download PDF

Info

Publication number
CN111263078B
CN111263078B CN202010080006.XA CN202010080006A CN111263078B CN 111263078 B CN111263078 B CN 111263078B CN 202010080006 A CN202010080006 A CN 202010080006A CN 111263078 B CN111263078 B CN 111263078B
Authority
CN
China
Prior art keywords
window
image
images
value
brightness value
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.)
Active
Application number
CN202010080006.XA
Other languages
Chinese (zh)
Other versions
CN111263078A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202010080006.XA priority Critical patent/CN111263078B/en
Publication of CN111263078A publication Critical patent/CN111263078A/en
Application granted granted Critical
Publication of CN111263078B publication Critical patent/CN111263078B/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/71Circuitry for evaluating the brightness variation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes
    • 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/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals

Landscapes

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

Abstract

The invention provides a method and a device for determining a camera mode, a storage medium and an electronic device, wherein the method comprises the following steps: determining an environment brightness value of each frame of image in N frames of continuously shot images, wherein N is an integer greater than 1; and under the condition that the exposure value difference value of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the white balance parameter difference value of any two continuous frames of images is determined to be in a second preset range, determining the image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images. The invention solves the problems of low stability and accuracy of camera mode switching.

Description

Method and device for determining image pickup mode, storage medium and electronic device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for determining an image capture mode, a storage medium, and an electronic apparatus.
Background
The day and night switching mode is a common mode in video cameras. In the prior art, day and night mode switching of the camera is generally realized by hardware circuits and photosensitive elements. However, the photosensitive element is usually interfered by environmental factors to cause mode switching errors, and the light emitting device in other environments, such as a lamp, can affect the accuracy of mode switching. In addition, the lifetime of the photosensitive element is limited, and its sensitivity is reduced by long-term use.
Aiming at the problems of low stability and accuracy of camera mode switching in the related technology, no effective solution exists at present.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining a camera mode, a storage medium and an electronic device, which are used for at least solving the problems of low stability and low accuracy of camera mode switching in the related art.
According to an embodiment of the present invention, there is provided a method of determining an image capture mode, including: determining an environment brightness value of each frame of image in N frames of continuously shot images, wherein N is an integer greater than 1; and under the condition that the exposure value difference value of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the white balance parameter difference value of any two continuous frames of images is determined to be in a second preset range, determining the image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images.
Optionally, determining an ambient brightness value of each of N images continuously captured includes: acquiring image information of N frames of continuously shot images, wherein the image information comprises an exposure value of each frame of image and a brightness value of a preset position in each frame of image; for each frame of image, giving different weights to the brightness values of different preset positions in each frame of image to obtain the window brightness value of each frame of image; and determining the environment brightness value of each frame of image according to the exposure value and the window brightness value of each frame of image.
Optionally, taking any continuous four-frame image as a window, wherein the determining the image capturing mode according to the relationship between the environmental brightness values of at least two continuous frames of images includes: switching the image pickup mode when a preset condition is met under the condition that the difference value of the environment brightness values of any two continuous frames of images in a first window is determined to be within a third preset range, the difference value of the environment brightness values of any two continuous frames of images in a second window is determined to be within a fourth preset range, and the difference value of the average environment brightness value of the first window and the average environment brightness value of the second window is determined to be within a fifth preset range; the last frame image of the first window and the first frame image of the second window are continuously shot, the average environment brightness value is the average value of the environment brightness values of all the images in the window, and the preset condition is that the environment brightness value of the currently shot image is larger than a target threshold value.
Optionally, switching the image capturing mode includes one of: under the condition that the average environment brightness value of the first window is determined to be smaller than the average environment brightness value of the second window, switching the image pickup mode to be a daytime mode; and under the condition that the average environment brightness value of the first window is determined to be larger than the average environment brightness value of the second window, switching the image pickup mode to a night mode.
Optionally, the method further comprises: and sequentially storing the average environment brightness value of the first window and the average environment brightness value of the second window to a target array.
Optionally, after sequentially storing the average ambient brightness value of the first window and the average ambient brightness value of the second window to a target array, the method further includes: emptying the target array under the condition that the average environment brightness value of a third window and the average environment brightness value of the second window are not in the fifth preset range; wherein the last frame image of the second window and the first frame image of the third window are continuously photographed.
According to another embodiment of the present invention, there is provided an image capturing mode determination apparatus including: the first determining module is used for determining the environment brightness value of each frame of image in N frames of images which are continuously shot, wherein N is an integer larger than 1; and the second determining module is used for determining the image pickup mode according to the relationship of the environment brightness values of at least two continuous frames of images under the condition that the exposure value difference value of any two continuous frames of images in the N frames of images is determined to be within a first preset range and the white balance parameter difference value of any two continuous frames of images is determined to be within a second preset range.
Optionally, the first determining module includes: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring image information of N frames of continuously shot images, and the image information comprises an exposure value of each frame of image and a brightness value of a preset position in each frame of image; the giving unit is used for giving different weights to the brightness values of different preset positions in each frame of image so as to obtain the window brightness value of each frame of image; a first determining unit for determining an environment brightness value of each frame image according to the exposure value and the window brightness value of each frame image.
According to a further embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, the environmental brightness value of each frame of image in N frames of images continuously shot is determined, wherein N is an integer greater than 1; and under the condition that the difference value of the exposure values of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the difference value of the white balance parameters of any two continuous frames of images is determined to be in a second preset range, determining the image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images. Therefore, the problems of low stability and accuracy of camera mode switching can be solved, and the effect of improving the accuracy of camera mode switching is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a method for determining a camera mode according to an embodiment of the present invention;
fig. 2 is a flowchart of determination of an image capturing mode according to an embodiment of the present invention;
fig. 3 is a first schematic diagram illustrating a method for determining an image capture mode according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a second method for determining an image capture mode according to an embodiment of the present invention;
fig. 5 is a third schematic diagram of a determination method of an image capture mode according to an embodiment of the present invention;
fig. 6 is a block diagram of the configuration of an image capturing mode determination apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the method performed by a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a method for determining a camera mode according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the determination method of the image capturing mode in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In the present embodiment, a method for determining a camera mode operating in the mobile terminal is provided, and fig. 2 is a flowchart for determining a camera mode according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, determining the environment brightness value of each frame of image in N frames of continuously shot images, wherein N is an integer larger than 1;
n is a preset statistical frame number, and the value of N may be an integer multiple of the frame rate, where FrameRate is the frame rate and M is an integer. For example, the monitoring camera frame rate may be 25 frames or 30 frames.
Step S204, under the condition that the exposure value difference value of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the white balance parameter difference value of any two continuous frames of images is determined to be in a second preset range, determining an image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images.
When the difference between two continuous frames of exposure and white balance parameters in the monitored environment is smaller than a set threshold, the access condition is used for performing data statistics and condition judgment, and the condition of ambient brightness change caused by interference is filtered out, which indicates that the ambient brightness is basically stable, wherein the first preset range and the second preset range can be arbitrarily set according to the actual condition, and are not limited herein. For example, 10, 20, 100, etc.
Through the steps, the environment brightness value of each frame of image in N frames of images continuously shot is determined, wherein N is an integer larger than 1; and under the condition that the difference value of the exposure values of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the difference value of the white balance parameters of any two continuous frames of images is determined to be in a second preset range, determining the image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images. Therefore, the problems of low stability and accuracy of camera mode switching can be solved, and the effect of improving the accuracy of camera mode switching is achieved.
Alternatively, the execution subject of the above steps may be a terminal or the like, but is not limited thereto.
As an alternative embodiment, determining the ambient brightness value of each frame image in N frames of images taken consecutively comprises: acquiring image information of N frames of continuously shot images, wherein the image information comprises an exposure value of each frame of image and a brightness value of a preset position in each frame of image; for each frame of image, giving different weights to the brightness values of different preset positions in each frame of image to obtain the window brightness value of each frame of image; and determining the environment brightness value of each frame of image according to the exposure value and the window brightness value of each frame of image. In this embodiment, the parameters of image exposure and white balance, gain and shutter time, the variation of continuous statistical exposure and white balance, the statistical exposure value of each window, and the calculation method of real-time environment brightness value algorithm parameter description are as follows:
exposure difference, difference of exposure values of two consecutive frames: Δ Expose ═ ExposeCurv-ExposeLast |, where ExposeCurv denotes the exposure value of the next frame image, ExposeLast denotes the exposure value of the previous frame image, and the difference takes a positive number.
The white balance parameter difference value g _ byAwbB [0] ═ AwbBGainCurv-AwbBGainLast |, where awbbbgaincurrv represents the white balance parameter value of the next frame image and the white balance parameter value of the previous frame image, and the difference value takes a positive number.
The exposure value is calculated by the formula: ExposeCurv ═ K1/(pow (2, cur _ gain/K2)/cur _ shut, (pow denotes cur _ gain/K2 raised to the power of 2, cur _ gain denotes gain), and cur _ shut denotes shutter time.
The technical formula of the environment brightness value is as follows: envLumData ═ (Expose _ MAX-Expose Curv)/2+ AverageAewed/4, where Expose _ MAX is the maximum exposure intensity, i.e., the maximum gain and the exposure value at maximum shutter, and the ambient brightness value is synthesized from the exposure value and the AE window brightness value. Wherein averageawind ═ (aewindow [0] + aewindow [1] + aewindow [2] + aewindow [3] + aewindow [4] + 2+ aewindow [5] × 2)/8, wherein aewindow [0], aewindow [1], aewindow [2], aewindow [3] are the statistical brightnesses of the four corner windows, aewindow [4] is the central window statistical brightness, aewindow [5] is the statistical brightness of the window located lower in the center, and the window brightness weights for the center and the position lower in the center are greater than the four corners, as shown in fig. 3, indicating the positions of the respective windows in one frame of image.
As an alternative embodiment, taking any continuous four-frame image as a window, wherein the determining the image capturing mode according to the relationship of the environmental brightness values of at least two continuous frames of images comprises: switching the image pickup mode when a preset condition is met under the condition that the difference value of the environment brightness values of any two continuous frames of images in a first window is determined to be within a third preset range, the difference value of the environment brightness values of any two continuous frames of images in a second window is determined to be within a fourth preset range, and the difference value of the average environment brightness value of the first window and the average environment brightness value of the second window is determined to be within a fifth preset range; the last frame image of the first window and the first frame image of the second window are continuously shot, the average environment brightness value is the average value of the environment brightness values of all the images in the window, and the preset condition is that the environment brightness value of the currently shot image is larger than a target threshold value. In this embodiment, images are continuously captured by the camera, every four continuous frames of images are used as a window, and if the environment brightness value between the images in each window is within a preset range and the average environment brightness value between the continuous windows is also within the preset range, it is described that the environment brightness value at this time changes steadily, and the preset range may be set according to the actual situation. When the ambient brightness value of the current image captured by the camera is a target value, mode switching is performed. For example, the camera continuously captures images with numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, uses the images with numbers 1, 2, 3, 4 as a first window, uses the images with numbers 5, 6, 7, 8 as a second window, uses the average value of the environment brightness values of 1, 2, 3, 4 as the average environment brightness value of the first window, uses the average value of the environment brightness values of 4, 5, 6, 7, 8 as the average environment brightness value of the second window, and performs mode switching of image capturing if the difference value between the environment brightness values of 1, 2, 3, 4, 5, 6, 7, 8 is within a preset range and the difference value between the average environment brightness value of the first window and the average environment brightness value of the second window is within the preset range, and if the environment brightness value of the image with number 9 reaches a preset threshold.
As an alternative embodiment, switching the image capturing mode includes one of: under the condition that the average environment brightness value of the first window is determined to be smaller than the average environment brightness value of the second window, switching the image pickup mode to be a daytime mode; and under the condition that the average environment brightness value of the first window is determined to be larger than the average environment brightness value of the second window, switching the image pickup mode to a night mode. In this embodiment, if the average environmental brightness value of the first window is smaller than the average environmental brightness value of the second window, it indicates that the brightness of the monitoring environment is stable and gradually brightens, and conforms to the curve characteristic of real-time light change in the natural environment, and at this time, the camera is switched to the daytime mode. In contrast, if the average ambient brightness value of the first window is greater than the average ambient brightness value of the second window, which indicates that the brightness of the monitored environment is steadily and slowly dimming, the camera is switched to the night mode.
As an alternative embodiment, the method further comprises: and sequentially storing the average environment brightness value of the first window and the average environment brightness value of the second window to a target array. In this embodiment, if the average ambient brightness difference between the first window and the second window is within the preset range, the average ambient brightness values of the first window and the second window are sequentially stored in the target array.
As an alternative embodiment, in the case that the average ambient brightness value of the third window and the average ambient brightness value of the second window are not within the fifth preset range, emptying the target array; wherein the last frame image of the second window and the first frame image of the third window are continuously photographed. In this embodiment, if the average ambient brightness values in the third window and the second window are not within the preset range, which indicates that interference occurs in the environment, the data filtering is performed again.
Fig. 4 is a flowchart of an optional camera day-night switching mode according to the present invention, and fig. 5 is a flowchart of an optional camera night-day switching mode according to the present invention, in the present application, based on characteristic information that light illuminance in a natural environment is stably and slowly continuously changed, light change characteristics in the morning and evening are identified through statistical analysis of brightness related parameters by software, and day-night switching is performed through a set illuminance threshold, so that accuracy of camera mode switching is improved, and a problem of switching back and forth or not switching caused by erroneous judgment is avoided.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for determining an image capturing mode is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 6 is a block diagram showing the configuration of an apparatus for determining an image capturing mode according to an embodiment of the present invention, which includes, as shown in fig. 6: a first determining module 62, configured to determine an ambient brightness value of each frame of N frames of images captured continuously, where N is an integer greater than 1; and a second determining module 64, configured to determine the image capturing mode according to a relationship between the environment brightness values of at least two consecutive frames of images when it is determined that the difference between the exposure values of any two consecutive frames of images in the N frames of images is within a first preset range and the difference between the white balance parameters of any two consecutive frames of images is within a second preset range.
As an alternative embodiment, the first determining module comprises: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring image information of N frames of continuously shot images, and the image information comprises an exposure value of each frame of image and a brightness value of a preset position in each frame of image; the giving unit is used for giving different weights to the brightness values of different preset positions in each frame of image so as to obtain the window brightness value of each frame of image; a first determining unit for determining an environment brightness value of each frame image according to the exposure value and the window brightness value of each frame image.
As an optional embodiment, the second determining module is further configured to switch the image capturing mode when a preset condition is met when determining that a difference between environment brightness values of any two consecutive frames of images in the first window is within a third preset range, a difference between environment brightness values of any two consecutive frames of images in the second window is within a fourth preset range, and a difference between an average environment brightness value of the first window and an average environment brightness value of the second window is within a fifth preset range; the last frame image of the first window and the first frame image of the second window are continuously shot, the average environment brightness value is the average value of the environment brightness values of all the images in the window, and the preset condition is that the environment brightness value of the currently shot image is larger than a target threshold value.
As an alternative embodiment, the second determining module is further configured to switch the image capturing mode by: under the condition that the average environment brightness value of the first window is determined to be smaller than the average environment brightness value of the second window, switching the image pickup mode to be a daytime mode; and under the condition that the average environment brightness value of the first window is determined to be larger than the average environment brightness value of the second window, switching the image pickup mode to a night mode.
As an alternative embodiment, the apparatus is further configured to sequentially store the average ambient brightness value of the first window and the average ambient brightness value of the second window to a target array.
As an optional embodiment, the apparatus is further configured to, after the average ambient brightness value of the first window and the average ambient brightness value of the second window are sequentially stored in the target array, clear the target array if the average ambient brightness value of the third window and the average ambient brightness value of the second window are not within the fifth preset range; wherein the last frame image of the second window and the first frame image of the third window are continuously photographed.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, determining the environmental brightness value of each frame of image in N frames of continuously shot images, wherein N is an integer larger than 1;
and S2, determining an image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images under the condition that the exposure value difference of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the white balance parameter difference of any two continuous frames of images is determined to be in a second preset range.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, determining the environmental brightness value of each frame of image in N frames of continuously shot images, wherein N is an integer larger than 1;
and S2, determining an image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images under the condition that the exposure value difference of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the white balance parameter difference of any two continuous frames of images is determined to be in a second preset range.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A method for determining an image capture mode, comprising:
determining an environment brightness value of each frame of image in N frames of continuously shot images, wherein N is an integer greater than 1;
determining an image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images under the condition that the exposure value difference value of any two continuous frames of images in the N frames of images is determined to be in a first preset range and the white balance parameter difference value of any two continuous frames of images is determined to be in a second preset range;
wherein, determining the environmental brightness value of each frame of image in the continuously shot N frames of images comprises: acquiring image information of N frames of continuously shot images, wherein the image information comprises an exposure value of each frame of image and a brightness value of a preset position in each frame of image; for each frame of image, giving different weights to the brightness values of different preset positions in each frame of image to obtain the window brightness value of each frame of image; determining the environment brightness value of each frame of image according to the exposure value and the window brightness value of each frame of image;
the determining the image pickup mode according to the relation of the environment brightness values of at least two continuous frames of images comprises the following steps:
taking any continuous four frames of images as a window, and switching the image pickup mode when a preset condition is met under the condition that the difference value of the environment brightness values of any continuous two frames of images in a first window is determined to be in a third preset range, the difference value of the environment brightness values of any continuous two frames of images in a second window is determined to be in a fourth preset range, and the difference value of the average environment brightness value of the first window and the average environment brightness value of the second window is determined to be in a fifth preset range;
the last frame image of the first window and the first frame image of the second window are continuously shot, the average environment brightness value is the average value of the environment brightness values of all the images in the window, and the preset condition is that the environment brightness value of the currently shot image is larger than a target threshold value.
2. The method of claim 1, wherein switching the image capture mode comprises one of:
under the condition that the average environment brightness value of the first window is determined to be smaller than the average environment brightness value of the second window, switching the image pickup mode to be a daytime mode;
and under the condition that the average environment brightness value of the first window is determined to be larger than the average environment brightness value of the second window, switching the image pickup mode to a night mode.
3. The method of claim 2, further comprising:
and sequentially storing the average environment brightness value of the first window and the average environment brightness value of the second window to a target array.
4. The method of claim 3, wherein after sequentially storing the average ambient brightness value for the first window and the average ambient brightness value for the second window to a target array, the method further comprises:
emptying the target array under the condition that the average environment brightness value of a third window and the average environment brightness value of the second window are not in the fifth preset range;
wherein the last frame image of the second window and the first frame image of the third window are continuously photographed.
5. An apparatus for determining an image capturing mode, comprising:
the first determining module is used for determining the environment brightness value of each frame of image in N frames of images which are continuously shot, wherein N is an integer larger than 1;
the second determining module is used for determining the camera shooting mode according to the relation of the environment brightness values of at least two continuous frames of images under the condition that the exposure value difference value of any two continuous frames of images in the N frames of images is determined to be within a first preset range and the white balance parameter difference value of any two continuous frames of images is determined to be within a second preset range;
the first determining module includes: the device comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring image information of N frames of continuously shot images, and the image information comprises an exposure value of each frame of image and a brightness value of a preset position in each frame of image; the giving unit is used for giving different weights to the brightness values of different preset positions in each frame of image so as to obtain the window brightness value of each frame of image; a first determining unit for determining an environment brightness value of each frame of image according to an exposure value and a window brightness value of each frame of image;
the second determining module is further configured to use any continuous four frames of images as a window, and switch the image capturing mode when a preset condition is met under the condition that it is determined that a difference value of environment brightness values of any continuous two frames of images in the first window is within a third preset range, that a difference value of environment brightness values of any continuous two frames of images in the second window is within a fourth preset range, and that a difference value of an average environment brightness value of the first window and an average environment brightness value of the second window is within a fifth preset range; the last frame image of the first window and the first frame image of the second window are continuously shot, the average environment brightness value is the average value of the environment brightness values of all the images in the window, and the preset condition is that the environment brightness value of the currently shot image is larger than a target threshold value.
6. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 4 when executed.
7. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 4.
CN202010080006.XA 2020-02-04 2020-02-04 Method and device for determining image pickup mode, storage medium and electronic device Active CN111263078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010080006.XA CN111263078B (en) 2020-02-04 2020-02-04 Method and device for determining image pickup mode, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010080006.XA CN111263078B (en) 2020-02-04 2020-02-04 Method and device for determining image pickup mode, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN111263078A CN111263078A (en) 2020-06-09
CN111263078B true CN111263078B (en) 2021-11-05

Family

ID=70952673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010080006.XA Active CN111263078B (en) 2020-02-04 2020-02-04 Method and device for determining image pickup mode, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN111263078B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113747149B (en) * 2021-08-26 2024-04-16 浙江大华技术股份有限公司 Abnormality detection method and device for optical filter, electronic device and storage medium
CN116033275B (en) * 2023-03-29 2023-08-15 荣耀终端有限公司 Automatic exposure method, electronic equipment and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014225828A (en) * 2013-05-17 2014-12-04 キヤノン株式会社 Image pickup device
CN104301616A (en) * 2014-10-31 2015-01-21 苏州科达科技股份有限公司 Method and system for controlling day-to-night switching mode of camera and method and system for controlling night-to-day switching mode of camera
CN106231179A (en) * 2016-07-29 2016-12-14 浙江大华技术股份有限公司 One the most double optical-filter switcher changing method and device
CN108289173A (en) * 2018-01-23 2018-07-17 杭州矩视科技有限公司 A kind of camera shooting control method, device, terminal device and storage medium
CN109495685A (en) * 2018-12-07 2019-03-19 杭州登虹科技有限公司 A kind of video camera day and night method for handover control, device and storage medium
CN110225257A (en) * 2019-07-09 2019-09-10 浙江大华技术股份有限公司 Diurnal pattern switching method and device, photographic device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107438163B (en) * 2017-07-31 2020-07-07 努比亚技术有限公司 Photographing method, terminal and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014225828A (en) * 2013-05-17 2014-12-04 キヤノン株式会社 Image pickup device
CN104301616A (en) * 2014-10-31 2015-01-21 苏州科达科技股份有限公司 Method and system for controlling day-to-night switching mode of camera and method and system for controlling night-to-day switching mode of camera
CN106231179A (en) * 2016-07-29 2016-12-14 浙江大华技术股份有限公司 One the most double optical-filter switcher changing method and device
CN108289173A (en) * 2018-01-23 2018-07-17 杭州矩视科技有限公司 A kind of camera shooting control method, device, terminal device and storage medium
CN109495685A (en) * 2018-12-07 2019-03-19 杭州登虹科技有限公司 A kind of video camera day and night method for handover control, device and storage medium
CN110225257A (en) * 2019-07-09 2019-09-10 浙江大华技术股份有限公司 Diurnal pattern switching method and device, photographic device and storage medium

Also Published As

Publication number Publication date
CN111263078A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN110351490B (en) Exposure method, exposure device and image pickup equipment
US12041358B2 (en) High dynamic range image synthesis method and apparatus, image processing chip and aerial camera
US11532076B2 (en) Image processing method, electronic device and storage medium
US9451173B2 (en) Electronic device and control method of the same
US8520094B2 (en) Flicker detecting circuit and method in image sensor
CN111263078B (en) Method and device for determining image pickup mode, storage medium and electronic device
AU2019326496A1 (en) Method for capturing images at night, apparatus, electronic device, and storage medium
CN110225257B (en) Day and night mode switching method and device, camera device and storage medium
CN106559623B (en) Photographic device and flicker detection method
CN111385477A (en) Mode switching control method and device for camera, camera and storage medium
CN109842763A (en) A kind of automatic light-supplementing method, system and video camera
CN108093183B (en) Camera day and night mode switching method and terminal equipment
CN103227928A (en) White balance adjusting method and device
US8212891B2 (en) Apparatus, methods and computer readable storage mediums
CN111273504B (en) Focusing processing method and device
CN111935415B (en) Brightness adjusting method and device, storage medium and electronic device
CN102308255B (en) Portable terminal with camera function, flashlight control method and flashlight control program
CN112712564A (en) Camera shooting method and device, storage medium and electronic device
CN107257437B (en) Method and device for accelerating AEC convergence and terminal equipment
CN111723619A (en) Method and device for determining mobile information, storage medium and electronic device
CN111510636B (en) Method and device for acquiring brightness evaluation value and computer storage medium
CN115278059A (en) Parameter configuration method and related device
CN109600547B (en) Photographing method and device, electronic equipment and storage medium
US10742853B2 (en) Image sensor and body module
CN114255177A (en) Exposure control method, device, equipment and storage medium in imaging

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