CN113163194A - Detection method and device for flicker of shooting scene, shooting equipment and medium - Google Patents

Detection method and device for flicker of shooting scene, shooting equipment and medium Download PDF

Info

Publication number
CN113163194A
CN113163194A CN202110163635.3A CN202110163635A CN113163194A CN 113163194 A CN113163194 A CN 113163194A CN 202110163635 A CN202110163635 A CN 202110163635A CN 113163194 A CN113163194 A CN 113163194A
Authority
CN
China
Prior art keywords
image frame
scene
brightness
ith
average
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
CN202110163635.3A
Other languages
Chinese (zh)
Other versions
CN113163194B (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.)
Zhuhai Shixi Technology Co Ltd
Original Assignee
Zhuhai Shixi 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 Zhuhai Shixi Technology Co Ltd filed Critical Zhuhai Shixi Technology Co Ltd
Priority to CN202110163635.3A priority Critical patent/CN113163194B/en
Publication of CN113163194A publication Critical patent/CN113163194A/en
Application granted granted Critical
Publication of CN113163194B publication Critical patent/CN113163194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)
  • Picture Signal Circuits (AREA)

Abstract

The disclosure relates to a method and a device for detecting flicker of a shooting scene, a shooting device and a medium, wherein a difference value between a first image frame and a first average image frame is obtained and binarized to obtain a first fitting image frame under the condition that the current shooting scene is determined to be a static scene, not dim light and high dynamic; acquiring the line average brightness of each line of the first fitting image frame; fitting a first curve according to the line number and the line average brightness, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis; if the first curve is a sine curve, the flicker of the current shooting scene is determined, and the change of the line brightness of the first fitting image frame can reflect the brightness change of the external light source in the current scene, so that the first curve fitted according to the line number and the line average brightness can reflect the brightness change of the external light source and the brightness change period, and the flicker detection accuracy is improved.

Description

Detection method and device for flicker of shooting scene, shooting equipment and medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for detecting flicker in a shooting scene, a shooting device, and a medium.
Background
When an object is photographed by an imaging device under a light source supplied with power from a commercial ac power source, a luminance change with respect to time, so-called flicker, is generated in a video signal outputted for photographing. The reason for causing the flicker is that the energy of the alternating current periodically changes in a sine wave form, when the external light source is light, under the condition that the exposure time does not meet integral multiple of the alternating current energy period, the brightness of the image periodically changes along with the change of the number of lines, and the dynamic image looks like stripes flickering on the surface.
In the existing flicker detection method, a line average vector of a current image frame is usually calculated, a difference value is calculated with the line average vector of a previous image frame to obtain a difference vector, and whether a flicker phenomenon exists in the current image frame is judged through the difference vector; or obtaining the picture of the light source area, calculating the average gray value of all pixels in each row, and judging whether the current scene has the flicker phenomenon or not according to the change rule of the average gray value.
However, in the case of dark light or high dynamic state, by adopting the method in the prior art, the phenomenon of weak light flicker is easy to miss detection or false detection, and the flicker detection accuracy is reduced.
Disclosure of Invention
To solve the technical problem or at least partially solve the technical problem, the present disclosure provides a method, an apparatus, a photographing device, and a medium for detecting flicker of a photographing scene.
In a first aspect, the present disclosure provides a method for detecting flicker in a shooting scene, including:
under the condition that the current shooting scene is determined to be a static scene, not dim light and high in dynamic, obtaining a difference value between a first image frame and a first average image frame and carrying out binarization to obtain a first fitting image frame, wherein the first average image frame is an average image frame of a first group of image frames, the first group of image frames comprise N continuous image frames, the first image frame is the first image frame, and N is an integer greater than or equal to 2;
acquiring the line average brightness of each line of the first fitting image frame;
fitting a first curve according to the line number and the line average brightness, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
and if the first curve is a sine curve, determining that the current shooting scene has flicker.
Optionally, the method further includes:
under the condition that the current shooting scene is determined to be a static scene, dim light and high dynamic, obtaining a difference value between an ith image frame and an ith average image frame and carrying out binarization to obtain an ith fitting image frame, wherein i is an integer which is more than or equal to 1 and less than or equal to M, the ith average image frame is an average image frame of an ith group of image frames, the ith group of image frames comprises N continuous image frames, a first image frame of the ith group of image frames is the ith image frame, and N is an integer which is more than or equal to 2;
acquiring the row average brightness of each row of the ith fitting image frame;
fitting a second curve according to the line number and the line average brightness of the ith fitting image frame, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
and if the second curve contains S periods of sine waves, determining that the current shooting scene has flicker, wherein S is an integer greater than or equal to 1.
Optionally, the method further includes:
determining that the current shooting scene is a static scene;
and performing histogram statistics on the first average image frame, and determining that the current static scene is a non-dim light and high dynamic situation or a dim light and high dynamic situation according to histogram statistical information.
Optionally, the determining, according to the histogram statistical information, that the current static scene is a non-dim light and high dynamic situation, or a dim light and high dynamic situation includes:
if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic;
if the number of pixels in the brightness value interval larger than the first brightness value is smaller than a second preset threshold value, determining that the current scene is dim light;
and if the number of pixels in the brightness value interval larger than the first brightness value is larger than or equal to a second preset threshold value, determining that the current scene is not dim light.
Optionally, the determining that the current shooting scene is a static scene includes:
acquiring an ith average image frame of an ith group of image frames, and determining the ith scene brightness according to the ith average image frame, wherein i is an integer which is greater than or equal to 1 and less than or equal to K, the ith group of image frames comprises N continuous image frames, and the initial image frames of two adjacent groups of image frames are adjacent;
and determining that the current scene is a static scene according to the 1 st scene brightness to the Kth scene brightness, wherein the difference value of any two scene brightness in the K scene brightness is smaller than a third preset threshold value.
In a second aspect, the present disclosure provides a device for detecting flicker in a shooting scene, including:
the image processing device comprises a processing module, a first fitting image frame and a second fitting image frame, wherein the processing module is used for acquiring a difference value between a first image frame and a first average image frame and carrying out binarization to obtain the first fitting image frame under the condition that a current shooting scene is a static scene, is not dim light and is high in dynamic state, the first average image frame is an average image frame of a first group of image frames, the first group of image frames comprises N continuous image frames, the first image frame is the first image frame, and N is an integer greater than or equal to 2;
the obtaining module is used for obtaining the line average brightness of each line of the first fitting image frame;
the processing module is further used for fitting a first curve according to the line number and the line average brightness, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
the processing module is further configured to determine that flicker exists in the current shooting scene if the first curve is a sinusoidal curve.
Optionally, the method further includes:
the processing module is further configured to, when it is determined that a current shooting scene is a static scene, dim light and high dynamic, obtain a difference value between an ith image frame and an ith average image frame and perform binarization, so as to obtain an ith fitted image frame, where i is an integer greater than or equal to 1 and less than or equal to M, the ith average image frame is an average image frame of an ith group of image frames, the ith group of image frames includes N consecutive image frames, a first image frame of the ith group of image frames is the ith image frame, and N is an integer greater than or equal to 2;
the obtaining module is further configured to obtain a row average brightness of each row of the ith fitting image frame;
the processing module is further used for fitting a second curve according to the line number and the line average brightness of the ith fitting image frame, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
the processing module is further configured to determine that flicker exists in the current shooting scene if the second curve includes S periods of sine waves, where S is an integer greater than or equal to 1.
Optionally, the method further includes:
the processing module is further used for determining that the current shooting scene is a static scene; and the histogram statistics is carried out on the first average image frame, and the condition that the current static scene is not dim light and high in dynamic state or the condition that the current static scene is dim light and high in dynamic state is determined according to the histogram statistical information.
Optionally, the processing module is specifically configured to:
if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic;
if the number of pixels in the brightness value interval larger than the first brightness value is smaller than a second preset threshold value, determining that the current scene is dim light;
and if the number of pixels in the brightness value interval larger than the first brightness value is larger than or equal to a second preset threshold value, determining that the current scene is not dim light.
Optionally, the processing module is specifically configured to:
acquiring an ith average image frame of an ith group of image frames, and determining the ith scene brightness according to the ith average image frame, wherein i is an integer which is greater than or equal to 1 and less than or equal to K, the ith group of image frames comprises N continuous image frames, and the initial image frames of two adjacent groups of image frames are adjacent;
and determining that the current scene is a static scene according to the 1 st scene brightness to the Kth scene brightness, wherein the difference value of any two scene brightness in the K scene brightness is smaller than a third preset threshold value.
In a third aspect, the present disclosure provides a photographing apparatus comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of any one of the first aspect when executing the program.
In a fourth aspect, the present disclosure provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any one of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
obtaining a difference value between a first image frame and a first average image frame and carrying out binarization to obtain a first fitting image frame under the condition that the current shooting scene is a static scene, is not dim and is high in dynamic, wherein the first average image frame is an average image frame of a first group of image frames, the first group of image frames comprise N continuous image frames, the first image frame is the first image frame, and N is an integer greater than or equal to 2; acquiring the line average brightness of each line of the first fitting image frame; fitting a first curve according to the line number and the line average brightness, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis; if the first curve is a sine curve, the flicker of the current shooting scene is determined, and the change of the line brightness of the first fitting image frame can reflect the brightness change of the external light source in the current scene, so that the first curve fitted according to the line number and the line average brightness can reflect the brightness change of the external light source and the brightness change period, and the flicker detection accuracy is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a schematic flowchart of an embodiment of a method for detecting flicker in a shooting scene according to the present disclosure;
fig. 2 is a schematic flowchart of another embodiment of a method for detecting flicker in a shooting scene according to the present disclosure;
fig. 3 is a schematic flowchart of another embodiment of a method for detecting flicker in a shooting scene according to the present disclosure;
fig. 4 is a schematic flowchart of another embodiment of a method for detecting flicker in a shooting scene according to the present disclosure;
fig. 5 is a schematic flowchart of another embodiment of a method for detecting flicker in a shooting scene according to the present disclosure;
fig. 6 is a schematic structural diagram of a detection apparatus for detecting scene flicker provided in the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced in other ways than those described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
The technical solutions of the present disclosure are described in several specific embodiments, and the same or similar concepts may be referred to one another, and are not described in detail in each place.
The detection method for flicker of shooting scene provided by the embodiment of the present disclosure may be applied to electronic devices such as a mobile phone, a tablet computer, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a Personal Digital Assistant (PDA), a wearable electronic device, and a virtual reality device, and the embodiment of the present disclosure does not limit the above.
Fig. 1 is a schematic flowchart of an embodiment of a method for detecting flicker in a shooting scene, as shown in fig. 1, the method of the embodiment includes:
s101: and under the condition that the current shooting scene is determined to be a static scene, not dim light and high in dynamic, obtaining the difference value of the first image frame and the first average image frame and carrying out binarization to obtain a first fitting image frame.
The first average image frame is an average image frame of a first group of image frames, the first group of image frames comprises N continuous image frames, the first image frame is a first image frame, and N is an integer greater than or equal to 2.
For example, after a user opens a camera application on a mobile phone, a camera starts to acquire a shooting picture according to a certain shooting frequency, the shooting picture is displayed in a preview interface, under the condition that the current shooting scene is determined to be a static scene, not dim light and high dynamic according to image frames captured by the camera, the 1 st image frame captured by the camera is acquired, 30 frames are buffered by taking the 1 st image frame as a reference, an average image frame from the 1 st image frame to the 30 th image frame is calculated, the difference value between the 1 st image frame and the average image frame is acquired, and binarization processing is performed on the image frames after the difference value to acquire a fitting image frame.
Optionally, it may be determined that the current shooting scene is a static scene, non-dim light and high dynamic according to the following manner, as shown in fig. 2:
s201: and determining that the current shooting scene is a static scene.
Optionally, if the current shooting scene is not a static scene, the flicker does not need to be detected, and the process is ended.
S202: and performing histogram statistics on the first average image frame, and determining that the current static scene is not dim light and is high in dynamic according to the histogram statistical information.
For example: if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic; and if the number of pixels in the brightness value interval larger than the first brightness value is larger than or equal to a second preset threshold value, determining that the current scene is not dim light.
S102: the line average brightness of each line of the first fitted image frame is obtained.
Wherein the first fitting image frame is an image with alternating regularity of black and white.
S103: a first curve is fitted based on the row number and the row average luminance.
Wherein, the line number is the horizontal axis, and the line average brightness is the vertical axis.
With the (line number, line average brightness) of the first fitted image frame as known data, the appropriate curve type is selected to fit the data.
S104: and judging whether the first curve is a sine curve or not.
If yes, go to step S105.
S105: and determining that the flicker exists in the current shooting scene.
One possible implementation is: and according to the period of the sine curve, calculating the frequency of the external light source in the current scene, feeding back the frequency of the external light source and the exposure time of the current image to the automatic exposure algorithm module, and readjusting the image exposure time in the current scene by the automatic exposure algorithm module to eliminate image flicker.
In this embodiment, under the condition that the current shooting scene is a static scene, not dim light and high dynamic, obtaining a difference value between a first image frame and a first average image frame and performing binarization to obtain a first fitted image frame, where the first average image frame is an average image frame of a first group of image frames, the first group of image frames includes N consecutive image frames, the first image frame is a first image frame, and N is an integer greater than or equal to 2; acquiring the line average brightness of each line of the first fitting image frame; fitting a first curve according to the line number and the line average brightness; judging whether the first curve is a sine curve or not; if so, determining that the current shooting scene has flicker, and reflecting the brightness change of the external light source in the current scene due to the change of the line brightness of the first fitting image frame, so that the brightness change of the external light source and the brightness change period can be reflected according to the first curve fitted by the line number and the line average brightness, and the flicker detection accuracy is improved.
Fig. 3 is a schematic flowchart of another embodiment of a method for detecting flicker in a shooting scene according to the present disclosure, where fig. 3 is a technical solution for determining whether flicker exists in a current shooting scene under the condition that the current static scene is not dim light and is highly dynamic, as shown in fig. 3:
s301: and under the condition that the current shooting scene is determined to be a static scene, dim light and high dynamic, obtaining the difference value of the ith image frame and the ith average image frame and carrying out binarization to obtain the ith fitting image frame.
The image processing method comprises the steps of obtaining an ith group of image frames, obtaining an ith average image frame, obtaining an ith group of image frames, obtaining a ith group of image frames, wherein i is an integer which is larger than or equal to 1 and smaller than or equal to M, the ith average image frame is an average image frame of the ith group of image frames, the ith group of image frames comprises N continuous image frames, the first image frame of the ith group of image frames is the ith image frame, N is an integer which is larger than or equal to 2, and M is an integer which is larger than or equal to 2 and smaller than N.
Optionally, it may be determined that the current shooting scene is dim and highly dynamic according to the following manner, as shown in fig. 4:
s203: and performing histogram statistics on the first average image frame, and determining the condition that the current static scene is dim light and high dynamic according to the histogram statistical information.
For example: if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic; and if the number of the pixels in the brightness value interval larger than the first brightness value is smaller than a second preset threshold value, determining that the current scene is dim light.
S302: and acquiring the row average brightness of each row of the ith fitting image frame.
Wherein the ith fitting image frame is an image which is irregular in black and white alternation.
S303: and fitting a second curve according to the line number and the line average brightness of the ith fitting image frame.
Wherein, the line number is the horizontal axis, and the line average brightness is the vertical axis.
S304: and judging whether the second curve contains S periods of sine waves.
Wherein S is an integer of 1 or more. The sine wave may be a full cycle sine wave or a partial cycle sine wave. .
If yes, S305 is performed.
If not, a possible implementation manner is as follows: determining that no flicker exists in the current shooting scene, and ending the process; another possible implementation is: and S301 is executed again, and the next image frame of the ith group of image frames is obtained, wherein the initial image frame of the next group of image frames is adjacent to the ith image frame.
S305: and determining that the flicker exists in the current shooting scene.
One possible implementation is: and calculating the frequency of the external light source in the current scene according to the sine waves of the S periods, feeding back the frequency of the external light source and the exposure time of the current image to the automatic exposure algorithm module, and readjusting the exposure time of the image in the current scene by the automatic exposure algorithm module to adaptively eliminate image flicker.
In this embodiment, under the condition that a current shooting scene is a static scene, dim light and high dynamic, a difference value between an ith image frame and an ith average image frame is obtained and binarized to obtain an ith fitting image frame, where i is an integer greater than or equal to 1 and less than or equal to M, the ith average image frame is an average image frame of an ith group of image frames, the ith group of image frames includes N continuous image frames, a first image frame of the ith group of image frames is the ith image frame, and N is an integer greater than or equal to 2; acquiring the row average brightness of each row of the ith fitting image frame, and fitting a second curve according to the row number and the row average brightness of the ith fitting image frame; and judging whether the second curve contains sine waves of S periods, wherein S is an integer more than or equal to 1, if so, determining that the current shooting scene has flicker, and determining that the current shooting scene has flicker when the second curve which is fit according to the line number and the line average brightness of the ith fitting image frame contains sine waves of S periods because the current shooting scene is dim light and high dynamic.
Fig. 5 is a schematic flowchart of another embodiment of a method for detecting flicker in a shooting scene according to the present disclosure, and fig. 5 is a description of a possible manner of S201 based on the embodiment shown in fig. 2 or fig. 4, and includes:
s2011: and acquiring the ith average image frame of the ith group of image frames, and determining the ith scene brightness according to the ith average image frame.
Wherein i is an integer greater than or equal to 1 and less than or equal to K, the ith group of image frames comprises N continuous image frames, and the initial image frames of the two adjacent groups of image frames are adjacent.
Taking K equal to 20 and M equal to 30 as an example, buffering 30 consecutive image frames with reference to the 1 st image frame acquired by the camera, calculating the 1 st average image frame of the 1 st group of image frames from the 1 st image frame to the 30 th image frame, and determining the 1 st scene brightness according to the 1 st average image frame.
And buffering 30 continuous image frames by taking the 2 nd image frame as a reference, calculating the 2 nd average image frame of the 2 nd group of image frames by taking the 2 nd image frame to the 31 nd image frame as the 2 nd group of image frames, and determining the 2 nd scene brightness according to the 2 nd average image frame.
And buffering 30 continuous image frames by taking the 20 th image frame as a reference, calculating the 20 th average image frame of the 20 th image frame by taking the 20 th image frame to the 49 th image frame as the 20 th group image frame, and determining the 20 th scene brightness according to the 20 th average image frame.
S2012: and determining that the current scene is a static scene according to the 1 st scene brightness to the Kth scene brightness.
And in the K scene brightness, the difference value of any two scene brightness is smaller than a third preset threshold value.
In this embodiment, the luminance of an ith scene is determined according to an ith average image frame of an ith group of image frames, where i is an integer greater than or equal to 1 and less than or equal to K, the ith group of image frames includes N consecutive image frames, and starting image frames of two adjacent groups of image frames are adjacent; and determining that the current scene is a static scene according to the 1 st scene brightness to the K th scene brightness, wherein the difference value of any two scene brightness in the K scene brightness is smaller than a third preset threshold value, namely, determining that the current scene is the static scene according to the brightness of a plurality of scenes, thereby improving the accuracy of flicker detection and the shooting quality of images in the static scene.
Fig. 6 is a schematic structural diagram of a detection apparatus for detecting flicker in a shooting scene, the apparatus of this embodiment includes: a processing module 601 and an acquisition module 602.
The processing module 601 is configured to, under the condition that a current shooting scene is determined to be a static scene, not dim light and high dynamic, obtain a difference value between a first image frame and a first average image frame and perform binarization to obtain a first fitted image frame, where the first average image frame is an average image frame of a first group of image frames, the first group of image frames includes N consecutive image frames, the first image frame is the first image frame, and N is an integer greater than or equal to 2;
an obtaining module 602, configured to obtain a row average brightness of each row of the first fitted image frame;
the processing module 601 is further configured to fit a first curve according to the line number and the line average luminance, where the line number is a horizontal axis and the line average luminance is a vertical axis;
the processing module 601 is further configured to determine that a flicker exists in the current shooting scene if the first curve is a sinusoidal curve.
Optionally, the method further includes:
the processing module 601 is further configured to, when it is determined that a current shooting scene is a static scene, dim light and high dynamic, obtain a difference between an ith image frame and an ith average image frame and perform binarization, to obtain an ith fitted image frame, where i is an integer greater than or equal to 1 and less than or equal to M, the ith average image frame is an average image frame of an ith group of image frames, the ith group of image frames includes N consecutive image frames, a first image frame of the ith group of image frames is the ith image frame, and N is an integer greater than or equal to 2;
an obtaining module 602, further configured to obtain a row average brightness of each row of the ith fitted image frame;
the processing module 601 is further configured to fit a second curve according to the line number and the line average brightness of the i-th fit image frame, where the line number is a horizontal axis and the line average brightness is a vertical axis;
the processing module 601 is further configured to determine that flicker exists in the current shooting scene if the second curve includes S periods of sine waves, where S is an integer greater than or equal to 1.
Optionally, the method further includes:
the processing module 601 is further configured to determine that the current shooting scene is a static scene; and the histogram statistics is carried out on the first average image frame, and the condition that the current static scene is not dim light and high in dynamic state or the condition that the current static scene is dim light and high in dynamic state is determined according to the histogram statistical information.
Optionally, the processing module 601 is specifically configured to:
if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic;
if the number of pixels in the brightness value interval larger than the first brightness value is smaller than a second preset threshold value, determining that the current scene is dim light;
and if the number of pixels in the brightness value interval larger than the first brightness value is larger than or equal to a second preset threshold value, determining that the current scene is not dim light.
Optionally, the processing module 601 is specifically configured to:
acquiring an ith average image frame of an ith group of image frames, and determining the ith scene brightness according to the ith average image frame, wherein i is an integer which is greater than or equal to 1 and less than or equal to K, the ith group of image frames comprises N continuous image frames, and the initial image frames of two adjacent groups of image frames are adjacent;
and determining that the current scene is a static scene according to the 1 st scene brightness to the Kth scene brightness, wherein the difference value of any two scene brightness in the K scene brightness is smaller than a third preset threshold value.
The device of this embodiment may be used to implement the technical solution of any one of the methods shown in fig. 1 to fig. 5, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the present disclosure provides a shooting device, including: the memory, the processor, and the computer program stored in the memory and capable of running on the processor, where the processor executes the program to implement the technical solution of any one of the methods shown in fig. 1 to 5, and the implementation principle and the technical effect are similar, and are not described herein again.
The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the solution of the method embodiment shown in any one of fig. 1 to 5.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (12)

1. A method for detecting flicker in a shooting scene, comprising:
under the condition that the current shooting scene is determined to be a static scene, not dim light and high in dynamic, obtaining a difference value between a first image frame and a first average image frame and carrying out binarization to obtain a first fitting image frame, wherein the first average image frame is an average image frame of a first group of image frames, the first group of image frames comprise N continuous image frames, the first image frame is the first image frame, and N is an integer greater than or equal to 2;
acquiring the line average brightness of each line of the first fitting image frame;
fitting a first curve according to the line number and the line average brightness, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
and if the first curve is a sine curve, determining that the current shooting scene has flicker.
2. The method of claim 1, further comprising:
under the condition that the current shooting scene is determined to be a static scene, dim light and high dynamic, obtaining a difference value between an ith image frame and an ith average image frame and carrying out binarization to obtain an ith fitting image frame, wherein i is an integer which is more than or equal to 1 and less than or equal to M, the ith average image frame is an average image frame of an ith group of image frames, the ith group of image frames comprises N continuous image frames, a first image frame of the ith group of image frames is the ith image frame, and N is an integer which is more than or equal to 2;
acquiring the row average brightness of each row of the ith fitting image frame;
fitting a second curve according to the line number and the line average brightness of the ith fitting image frame, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
and if the second curve contains S periods of sine waves, determining that the current shooting scene has flicker, wherein S is an integer greater than or equal to 1.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
determining that the current shooting scene is a static scene;
and performing histogram statistics on the first average image frame, and determining that the current static scene is a non-dim light and high dynamic situation or a dim light and high dynamic situation according to histogram statistical information.
4. The method of claim 3, wherein the determining whether the current static scene is non-dim and highly dynamic or dim and highly dynamic according to the histogram statistic information comprises:
if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic;
if the number of pixels in the brightness value interval larger than the first brightness value is smaller than a second preset threshold value, determining that the current scene is dim light;
and if the number of pixels in the brightness value interval larger than the first brightness value is larger than or equal to a second preset threshold value, determining that the current scene is not dim light.
5. The method of claim 3, wherein the determining that the current shooting scene is a static scene comprises:
acquiring an ith average image frame of an ith group of image frames, and determining the ith scene brightness according to the ith average image frame, wherein i is an integer which is greater than or equal to 1 and less than or equal to K, the ith group of image frames comprises N continuous image frames, and the initial image frames of two adjacent groups of image frames are adjacent;
and determining that the current scene is a static scene according to the 1 st scene brightness to the Kth scene brightness, wherein the difference value of any two scene brightness in the K scene brightness is smaller than a third preset threshold value.
6. A detection apparatus for flicker in a scene, comprising:
the image processing device comprises a processing module, a first fitting image frame and a second fitting image frame, wherein the processing module is used for acquiring a difference value between a first image frame and a first average image frame and carrying out binarization to obtain the first fitting image frame under the condition that a current shooting scene is a static scene, is not dim light and is high in dynamic state, the first average image frame is an average image frame of a first group of image frames, the first group of image frames comprises N continuous image frames, the first image frame is the first image frame, and N is an integer greater than or equal to 2;
the obtaining module is used for obtaining the line average brightness of each line of the first fitting image frame;
the processing module is further used for fitting a first curve according to the line number and the line average brightness, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
the processing module is further configured to determine that flicker exists in the current shooting scene if the first curve is a sinusoidal curve.
7. The apparatus of claim 6, further comprising:
the processing module is further configured to, when it is determined that a current shooting scene is a static scene, dim light and high dynamic, obtain a difference value between an ith image frame and an ith average image frame and perform binarization, so as to obtain an ith fitted image frame, where i is an integer greater than or equal to 1 and less than or equal to M, the ith average image frame is an average image frame of an ith group of image frames, the ith group of image frames includes N consecutive image frames, a first image frame of the ith group of image frames is the ith image frame, and N is an integer greater than or equal to 2;
the obtaining module is further configured to obtain a row average brightness of each row of the ith fitting image frame;
the processing module is further used for fitting a second curve according to the line number and the line average brightness of the ith fitting image frame, wherein the line number is a horizontal axis, and the line average brightness is a vertical axis;
the processing module is further configured to determine that flicker exists in the current shooting scene if the second curve includes S periods of sine waves, where S is an integer greater than or equal to 1.
8. The apparatus of claim 6 or 7, further comprising:
the processing module is further used for determining that the current shooting scene is a static scene; and the histogram statistics is carried out on the first average image frame, and the condition that the current static scene is not dim light and high in dynamic state or the condition that the current static scene is dim light and high in dynamic state is determined according to the histogram statistical information.
9. The apparatus of claim 8, wherein the processing module is specifically configured to:
if the difference value of the pixel quantity of the adjacent brightness value intervals is larger than a first preset threshold value, determining that the current static scene is high dynamic;
if the number of pixels in the brightness value interval larger than the first brightness value is smaller than a second preset threshold value, determining that the current scene is dim light;
and if the number of pixels in the brightness value interval larger than the first brightness value is larger than or equal to a second preset threshold value, determining that the current scene is not dim light.
10. The apparatus of claim 8, wherein the processing module is specifically configured to:
acquiring an ith average image frame of an ith group of image frames, and determining the ith scene brightness according to the ith average image frame, wherein i is an integer which is greater than or equal to 1 and less than or equal to K, the ith group of image frames comprises N continuous image frames, and the initial image frames of two adjacent groups of image frames are adjacent;
and determining that the current scene is a static scene according to the 1 st scene brightness to the Kth scene brightness, wherein the difference value of any two scene brightness in the K scene brightness is smaller than a third preset threshold value.
11. A photographing apparatus, characterized by comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor implementing the steps of the method according to any one of claims 1 to 5 when executing the program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202110163635.3A 2021-02-05 2021-02-05 Detection method and device for flicker of shooting scene, shooting equipment and medium Active CN113163194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110163635.3A CN113163194B (en) 2021-02-05 2021-02-05 Detection method and device for flicker of shooting scene, shooting equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110163635.3A CN113163194B (en) 2021-02-05 2021-02-05 Detection method and device for flicker of shooting scene, shooting equipment and medium

Publications (2)

Publication Number Publication Date
CN113163194A true CN113163194A (en) 2021-07-23
CN113163194B CN113163194B (en) 2022-01-04

Family

ID=76883168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110163635.3A Active CN113163194B (en) 2021-02-05 2021-02-05 Detection method and device for flicker of shooting scene, shooting equipment and medium

Country Status (1)

Country Link
CN (1) CN113163194B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110242359A1 (en) * 2005-12-22 2011-10-06 Crosstek Capital, LLC Flicker detecting circuit and method in image sensor
US20120081570A1 (en) * 2010-10-01 2012-04-05 Hong-Yeh Hsieh Circuit for automatically detecting image flicker and method thereof
CN103561232A (en) * 2010-12-29 2014-02-05 中国移动通信集团公司 Method and device for identifying video monitoring scenes
JP2017076969A (en) * 2015-10-13 2017-04-20 富士通株式会社 Flicker detection apparatus and method
CN110225403A (en) * 2019-07-12 2019-09-10 四川长虹电器股份有限公司 The bright dark scene of video image identifies control method
CN111355864A (en) * 2020-04-16 2020-06-30 浙江大华技术股份有限公司 Image flicker elimination method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110242359A1 (en) * 2005-12-22 2011-10-06 Crosstek Capital, LLC Flicker detecting circuit and method in image sensor
US20120081570A1 (en) * 2010-10-01 2012-04-05 Hong-Yeh Hsieh Circuit for automatically detecting image flicker and method thereof
CN103561232A (en) * 2010-12-29 2014-02-05 中国移动通信集团公司 Method and device for identifying video monitoring scenes
JP2017076969A (en) * 2015-10-13 2017-04-20 富士通株式会社 Flicker detection apparatus and method
CN110225403A (en) * 2019-07-12 2019-09-10 四川长虹电器股份有限公司 The bright dark scene of video image identifies control method
CN111355864A (en) * 2020-04-16 2020-06-30 浙江大华技术股份有限公司 Image flicker elimination method and device

Also Published As

Publication number Publication date
CN113163194B (en) 2022-01-04

Similar Documents

Publication Publication Date Title
CN111028189B (en) Image processing method, device, storage medium and electronic equipment
CN110766621B (en) Image processing method, image processing device, storage medium and electronic equipment
US9264629B2 (en) Suppressing flicker in digital images
CN102473061B (en) Ambient correction in rolling image capture system
US9569688B2 (en) Apparatus and method of detecting motion mask
JP2003198932A (en) Flicker correction device, flicker correction method, and recording medium with flicker correction program recorded
CN102369723A (en) Auto exposure method and device, and imaging device
CN109286758B (en) High dynamic range image generation method, mobile terminal and storage medium
CN113163128A (en) Image exposure method and electronic device
CN109327626A (en) Image-pickup method, device, electronic equipment and computer readable storage medium
US11546524B2 (en) Reducing a flicker effect of multiple light sources in an image
US20170104914A1 (en) Flicker detection apparatus and method
CN112383718A (en) Image exposure method and device and electronic equipment
CN105827902B (en) A kind of night scene detection method and terminal
CN110740266B (en) Image frame selection method and device, storage medium and electronic equipment
US8189068B2 (en) Apparatus and method for detecting flicker noise and computer readable medium stored thereon computer executable instructions for performing the method
US10972676B2 (en) Image processing method and electronic device capable of optimizing hdr image by using depth information
CN113163194B (en) Detection method and device for flicker of shooting scene, shooting equipment and medium
CN110428411B (en) Backlight plate detection method and system based on secondary exposure
CN115658410B (en) Method and system for testing fluency of touch screen of electronic equipment and storage medium
US20200092452A1 (en) Image generating method and electronic apparatus
CN109120856B (en) Camera shooting method and device
CN114222070A (en) Brightness compensation method, device, equipment and storage medium
JP2011259390A (en) Flicker detector
JP2019045990A (en) Image processing apparatus, image processing method, and program

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 519000 room 601-1, 6 / F, building 4, Gangwan science and Innovation Park, No. 1, Jintang Road, Tangjiawan Town, high tech Zone, Zhuhai, Guangdong

Applicant after: Zhuhai Shixi Technology Co.,Ltd.

Address before: 519000 Room 401, 4th floor, building 17, science and Technology Innovation Park, 1 Jintang Road, Tangjiawan Town, Gaoxin District, Zhuhai City, Guangdong Province

Applicant before: Zhuhai Shixi Technology Co.,Ltd.

GR01 Patent grant
GR01 Patent grant