CN110445952B - Picture flicker processing method, device, equipment and storage medium of camera - Google Patents

Picture flicker processing method, device, equipment and storage medium of camera Download PDF

Info

Publication number
CN110445952B
CN110445952B CN201910635797.5A CN201910635797A CN110445952B CN 110445952 B CN110445952 B CN 110445952B CN 201910635797 A CN201910635797 A CN 201910635797A CN 110445952 B CN110445952 B CN 110445952B
Authority
CN
China
Prior art keywords
camera
image frame
image
flicker
pixel brightness
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
CN201910635797.5A
Other languages
Chinese (zh)
Other versions
CN110445952A (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 CN201910635797.5A priority Critical patent/CN110445952B/en
Publication of CN110445952A publication Critical patent/CN110445952A/en
Application granted granted Critical
Publication of CN110445952B publication Critical patent/CN110445952B/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
    • 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/81Camera processing pipelines; Components thereof for suppressing or minimising disturbance in the image signal generation

Abstract

The application relates to a method, a device, equipment and a storage medium for processing image flicker of a camera. The method comprises the following steps: acquiring an image frame shot by a camera, carrying out image flicker detection on the camera according to the pixel brightness of the image frame, determining a target value of an exposure parameter of the camera according to the detection result of the image flicker detection if the image flicker phenomenon of the camera is detected, and adjusting the exposure parameter to the target value. By adopting the method, the image flicker of the camera can be detected and processed in a self-adaptive manner.

Description

Picture flicker processing method, device, equipment and storage medium of camera
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing image flicker of a camera.
Background
The camera device adopting the CMOS (Complementary Metal Oxide Semiconductor) sensor has strong data processing capability, can output high-definition images, and has wide application prospect in the field of video monitoring. However, in the use environment of the artificial ac electric light source, the CMOS image pickup apparatus based on line exposure has a phenomenon of screen flicker under the influence of the periodic variation of the ac electric power.
At present, the implementation of the anti-flicker function on the image pickup apparatus is a manual mode, and the current ac frequency used by the image pickup apparatus needs to be known in advance, and the exposure parameter value capable of eliminating the flicker phenomenon is correspondingly set according to the ac frequency value. The flicker phenomenon also occurs once the frequency of the alternating current is changed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method and an apparatus for processing flicker of a picture in a camera, a computer device, and a storage medium, which are capable of adaptively processing flicker of a picture.
A picture flicker processing method of a camera, the method comprising:
acquiring an image frame shot by a camera;
carrying out image flicker detection on the camera according to the pixel brightness on the image frame;
if the camera is detected to have a picture flicker phenomenon, determining a target value of an exposure parameter of the camera according to a detection result of the picture flicker detection;
and adjusting the exposure parameter to the target value.
In one embodiment, the image frames include a first image frame and a second image frame; the step of detecting the flicker of the camera according to the pixel brightness of the image frame comprises the following steps:
counting pixel brightness differences of adjacent rows of pixels between the first image frame and the second image frame;
and carrying out picture flicker detection on the camera according to the counted pixel brightness difference.
In one embodiment, the row of pixels is at least one row of pixels.
In one embodiment, the step of counting the pixel brightness difference of the adjacent row of pixels between the first image frame and the second image frame comprises:
acquiring the brightness of pixels in odd rows on the first image frame to generate a first pixel array;
acquiring the pixel brightness of even lines on the second image frame to generate a second pixel array;
and calculating the difference value of the first pixel array and the second pixel array to obtain the pixel brightness difference of adjacent rows of pixels between the first image frame and the second image frame.
In one embodiment, the step of performing image flicker detection on the camera according to the statistical pixel brightness difference includes:
and when the counted pixel brightness difference has periodic regular change, determining that the camera has a picture flicker phenomenon.
In one embodiment, the step of determining the target value of the exposure parameter of the camera according to the detection result of the screen flicker detection includes:
acquiring the current value of the exposure parameter;
and determining the target value according to the current value and the periodic regular change of the pixel brightness difference.
In one embodiment, the exposure parameters include exposure time and gain; the step of determining the target value according to the current value and the periodic regular change of the pixel brightness difference comprises:
acquiring a peak distance in the periodic regular change of the pixel brightness difference;
and calculating the target value of the exposure time and the target value of the gain according to the peak distance, the current value of the exposure time and the current value of the gain.
In one embodiment, after the step of adjusting the exposure parameter to the target value, the method further comprises:
and carrying out picture flicker detection on the camera again, and if detecting that the camera has a picture flicker phenomenon, restoring the exposure parameter to the value before the target value is adjusted.
A picture flicker processing apparatus of a camera, the apparatus comprising:
the image acquisition module is used for acquiring image frames shot by the camera;
the flicker detection module is used for carrying out image flicker detection on the camera according to the pixel brightness of the image frame;
the target value calculation module is used for determining a target value of the exposure parameter of the camera according to a detection result of the picture flicker detection if the picture flicker phenomenon exists in the camera; and
and the parameter adjusting module is used for adjusting the exposure parameter to the target value.
A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the image flicker processing method of the camera when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the above-described picture flicker processing method for a camera.
According to the image flicker processing method, the image flicker processing device, the image flicker processing equipment and the storage medium of the camera, image flicker detection is carried out according to the pixel brightness of an image frame shot by the camera, the target value of the exposure parameter of the camera is determined according to the detection result, and the exposure parameter is adjusted to the target value, so that the exposure parameter of the camera can be adaptively adjusted when the image of the camera flickers, and the image flicker phenomenon is eliminated.
Drawings
FIG. 1 is a diagram of an application environment of a method for flicker processing of a camera in an embodiment;
FIG. 2 is a flowchart illustrating a method for flicker processing of a camera in an embodiment;
FIG. 3 is a schematic flow chart of a flicker processing method for a camera in another embodiment;
FIG. 4 is a flowchart illustrating a flicker processing method for a camera in another embodiment;
FIG. 5 is a block diagram of an apparatus for a method of flicker processing of a camera in an embodiment; and
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The method for processing the flicker of the picture of the camera can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may capture video or images and store the captured video or image data on a local hard disk or send the captured video or image data to the server 104 for storage. The terminal 102 has a camera or is externally connected with a camera, the terminal 102 may be but not limited to various personal computers, notebook computers, smart phones, tablet computers and camera devices, the camera devices may be but not limited to a gun camera, a dome camera and a dome camera, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a method for flicker processing of a camera is provided, which is described by taking the method as an example applied to the terminal in fig. 1, and includes the following steps:
step 202, acquiring an image frame shot by a camera.
The image frame represents an image in a video shot by the camera, and may be a frame image or a continuous multi-frame image.
Specifically, when the camera is in a working state, image frames shot by the camera are acquired in real time. Or, when receiving a picture flicker processing request, acquiring an image frame shot by the camera in real time, wherein the picture flicker processing request can be triggered by a user or a system. Or when the image flicker processing mode of the camera is started, acquiring the image frames shot by the camera in real time.
And step 204, carrying out image flicker detection on the camera according to the pixel brightness of the image frame.
Specifically, the image flicker detection includes detecting whether an image flicker phenomenon exists in the camera, where the image flicker phenomenon is generated when the camera captures images and the exposure time of different image positions is different, so that the received light energy is different, the received light energy is more when the exposure time is long, the pixel brightness is high, the received light energy is less when the exposure time is short, and the pixel brightness is low. Therefore, the difference of the pixel brightness at different image positions on the image frame can be obtained by obtaining and comparing the pixel brightness at different image positions on the image frame, and if the difference meets the preset condition, the image flicker phenomenon of the camera is determined, so that the image flicker detection of the camera is realized.
Corresponding preset conditions are set for different types of image flicker phenomena so as to improve the detection accuracy of the various image flicker phenomena. The picture flicker phenomenon includes row flicker and column flicker. The line flicker is the phenomenon that the brightness of pixels on different lines on an image frame is different and is reflected as an obvious horizontal stripe phenomenon on the image frame, and the column flicker is the phenomenon that the brightness of pixels on different columns on the image frame is different and is reflected as an obvious vertical stripe phenomenon on the image frame. Therefore, different preset conditions may be set for the row flicker and the column flicker, respectively. For example, the preset condition of row flicker may be that the difference between the pixel brightness of the same row of pixels is smaller than a preset threshold, and the difference between the pixel brightness of different rows of pixels is larger than the preset threshold, and the preset condition of column flicker may be that the difference between the pixel brightness of the same column of pixels is smaller than the preset threshold, and the difference between the pixel brightness of different columns of pixels is larger than the preset threshold.
And step 206, if the camera is detected to have the picture flicker phenomenon, determining the target value of the exposure parameter of the camera according to the detection result of the picture flicker detection.
In step 208, the exposure parameters are adjusted to target values.
Specifically, when the camera is determined to have the picture flicker phenomenon, the difference of the image brightness of different image positions on the image frame is obtained from the detection result of the picture flicker. The difference of the image brightness of different image positions reflects the difference of the light energy received by different image positions, so that the target value of the exposure parameter of the camera can be determined according to the difference of the image brightness of different image positions, the difference of the light energy received by different image positions is reduced by adjusting the exposure parameter of the camera to the target value, and the flicker of the picture is eliminated.
In the method for processing the image flicker of the camera, the image flicker detection is carried out on the camera by comparing the pixel brightness of different image positions on the image frame so as to determine whether the image flicker phenomenon exists in the camera, if so, the target value of the exposure parameter is determined according to the detection result of the image flicker detection, so that the automatic detection of the image flicker of the camera is realized, the exposure parameter is adaptively adjusted, the automatic processing of the image flicker is realized, and the processing efficiency and the effect of the image flicker are effectively improved.
In one embodiment, as shown in fig. 3, for a case that a screen flicker of a camera is line flicker, there is provided a screen flicker processing method of a camera, which is described by taking an example that the method is applied to the terminal in fig. 1, and includes the following steps:
step 302, image frames shot by a camera are obtained, and the image frames comprise a first image frame and a second image frame.
The meaning of the image frames is the same, and the first image frame and the second image frame are both images in the video shot by the camera, and may be one frame of image or continuous multi-frame images. The "first" and "second" do not indicate the sequence, but are used to distinguish the first image frame from the second image frame, which means that the first image frame and the second image frame are different images, image sets or image sequences.
In step 304, the pixel brightness difference of the adjacent rows of pixels between the first image frame and the second image frame is counted.
Specifically, the pixel brightness of each line of pixels on the first image frame is acquired, and the pixel brightness of each line of pixels on the second image frame is acquired. Comparing the pixel brightness of each line of pixels on the first image frame with the adjacent line of pixels on the second image frame, for example, comparing the pixel brightness of a first line of pixels on the first image frame with a second line of pixels on the second image frame, to obtain the pixel brightness difference of the adjacent line of pixels between the first image frame and the second image frame. The line pixels are a pixel set formed by pixels in a line unit, for example, pixels located in the same line on the first image frame form one line of pixels on the first image frame.
Specifically, the video playing speed of 24 frames per second enables human eyes to watch the video without feeling stuck, and the picture flicker phenomenon watched by the human eyes is the pixel brightness change between multiple frames of images in the video, so that the subsequent picture flicker detection is performed through the pixel brightness difference of adjacent lines of pixels between two frames of images or through the pixel brightness difference of adjacent lines of pixels between two image sets (or image sequences), and the detection effect of the picture flicker phenomenon can be effectively improved.
Specifically, when the first image frame is a single-frame image, the pixel brightness of each line of pixels on the first image frame may be directly obtained. When the first image frame is a continuous multi-frame image, the pixel brightness of the pixels on the corresponding line on the first image frame can be obtained by obtaining the pixel brightness sum or the pixel brightness average value of the pixels on the same line on the images. Similarly, the pixel brightness of each line of pixels on the second image frame can be obtained, which is not described in detail.
In one embodiment, the first image frame and the second image frame are adjacent images, an adjacent image set, or an adjacent image sequence to further improve the detection effect of the picture flickering phenomenon.
And step 306, determining whether the camera has a picture flicker phenomenon by detecting whether the counted pixel brightness difference has periodic regular change.
Specifically, the counted pixel brightness difference is the pixel brightness difference of the adjacent line of pixels between the first image frame and the second image frame, for example, all the pixel brightness differences include the pixel brightness difference between the first line of pixels on the first image frame and the second line of pixels on the second image frame, the pixel brightness difference between the second line of pixels on the first image frame and the third line of pixels on the second image frame, and so on. And detecting whether the pixel brightness differences have periodic regular changes or not, wherein the pixel brightness differences are obtained by comparing adjacent pixels in different frames, and if the pixel brightness differences have the periodic regular changes, the fact that horizontal stripes appear on the image frames is indicated, and the horizontal stripes are not inherent horizontal stripes in the scene shot by the camera.
For example, by substituting the counted pixel brightness difference into a preset periodic function, if a parameter of the periodic function suitable for the change of the pixel brightness difference numerical values can be solved, it is determined that the counted pixel brightness difference has a periodic regular change. And moreover, a curve model of the pixel brightness difference is drawn by taking the adjacent rows of pixels as the abscissa, and whether the pixel brightness difference obtained through statistics has periodic regular change is determined by detecting whether the curve model has the periodic regular change.
And 308, if the camera is detected to have the picture flicker phenomenon, determining a target value of the exposure parameter of the camera according to a detection result of the picture flicker detection.
In step 310, the exposure parameters are adjusted to target values.
Specifically, when it is determined that there is a periodic regular change between pixel brightness differences obtained through statistics, it is determined that there is a picture flicker phenomenon in the camera, and data such as a period and an amplitude of the pixel brightness difference can be obtained from the periodic regular change of the pixel brightness difference, and the data can reflect a difference in light energy received by pixels in adjacent rows between the first image frame and the second image frame.
In the image flicker processing method of the camera, the pixel brightness difference of adjacent pixels between the first image frame and the second image frame is counted, whether the pixel brightness difference obtained through counting has periodic regular change or not is detected, if yes, the image flicker phenomenon of the camera is determined, and the target value of the exposure parameter is determined according to the periodic regular change of the pixel brightness difference, so that the automatic detection effect of the line flicker in the image flicker of the camera is effectively improved, the exposure parameter is adaptively adjusted, the automatic processing of the image flicker is realized, and the processing efficiency and the effect of the image flicker are effectively improved.
In one embodiment, a row of pixels is at least one row of pixels, that is, a row of pixels is at least composed of one row of pixels, and the number of rows of pixels specifically included in a row of pixels is not limited herein.
In one embodiment, as shown in fig. 4, for a case that the screen flicker of the camera is line flicker, there is provided a screen flicker processing method of the camera, which is described by taking the method applied to the terminal in fig. 1 as an example, and includes the following steps:
step 402, image frames shot by a camera are obtained, wherein the image frames comprise a first image frame and a second image frame of the first image frame.
Specifically, step 402 may refer to the description of step 302, which is not repeated herein.
Step 404, acquiring the brightness of the pixels in the odd-numbered rows of the first image frame, and generating a first pixel array.
Specifically, on the first image frame, the pixel intensities of all the odd lines are acquired, the odd lines are lines 1, 3, 5, … …, n is an odd number, and the value of n depends on the image size of the first image frame. The pixel brightness of all odd-numbered rows forms a first pixel array, the first pixel array is a two-dimensional array, the row number of the two-dimensional array is the total row number of all odd-numbered rows, and the column number of the two-dimensional array is the column number of the first image frame.
Step 406, the brightness of the pixels in the even-numbered rows of the second image frame is obtained, and a second pixel array is generated.
Specifically, on the second image frame, the pixel luminances of all the even-numbered lines are acquired, the even-numbered lines being the 2 nd, 4 th, 6 th, … … th, n +1 th lines. The pixel brightness of all even-numbered rows forms a second pixel array, the row number of the second pixel array is the total row number of all the even-numbered rows, and the column number of the second pixel array is the column number of the second image frame. The image sizes of the first image frame and the second image frame are the same, so the matrix sizes of the first pixel array and the second pixel array are also the same.
Step 408, performing difference calculation on the first pixel array and the second pixel array to obtain the pixel brightness difference of the adjacent rows of pixels between the first image frame and the second image frame.
Specifically, the second pixel array is subtracted from the first pixel array, or the first pixel array is subtracted from the second pixel array, so as to obtain the pixel brightness difference of the pixels in the adjacent row between the first image frame and the second image frame. As an example, the calculation formula of the pixel luminance difference may be expressed as:
c [ W ] [ H ] -, a [ W ] [ H ] -, B [ W ] [ H ], where a [ W ] [ H ] is a first pixel array, B [ W ] [ H ] is a second pixel array, C [ W ] [ H ] is a pixel luminance difference of adjacent rows of pixels between a first image frame and a second image frame, W denotes a number of rows of the first pixel array, and H denotes a number of columns of the first pixel array.
And step 410, determining whether the camera has a picture flicker phenomenon by detecting whether the counted pixel brightness difference has periodic regular change.
Specifically, after the pixel luminance difference C [ W ] [ H ] is obtained through statistics, the data of each row of the pixel luminance difference is accumulated respectively according to the row unit of the pixel luminance difference, and the pixel luminance difference accumulated value D [ H ] of each row is obtained. The behavior abscissa and the behavior ordinate are used to obtain the variation curve of DH, and the existence of periodic regular variation of DH is detected according to the variation curve of DH. And if so, determining that the camera has a picture flicker phenomenon.
Step 412, if it is detected that the camera has a flicker phenomenon, obtaining a current value of the exposure parameter, and determining a target value of the exposure parameter according to the periodic regular change of the current value and the pixel brightness difference.
Specifically, the current value of the exposure parameter can be obtained by reading the parameter of the corresponding sensor in the camera. When the camera is determined to have the picture flicker phenomenon, the target value of the exposure parameter is calculated according to the periodic regular change of the pixel brightness difference, the calculated target value is compared with the current value of the exposure parameter, and the target value of the exposure parameter is adjusted according to the comparison result. For example, when the target value of the exposure parameter does not exceed the current value of the exposure parameter, the step of calculating the target value of the exposure parameter according to the periodic regular variation of the pixel brightness difference is re-executed, so that a suitable target value is obtained through multiple calculations of the target value.
In step 414, the exposure parameters are adjusted to target values.
In the image flicker processing method of the camera, the pixel brightness difference between the odd line of the first image frame and the even line of the second image frame is calculated, whether the pixel brightness difference has periodic regular change or not is detected, if yes, the image flicker phenomenon of the camera is determined, and the target value of the exposure parameter is determined according to the periodic regular change of the pixel brightness difference and the current value of the exposure parameter, so that the automatic detection effect of the line flicker in the image flicker of the camera is effectively improved, the exposure parameter is adaptively adjusted, the automatic processing of the image flicker is realized, and the processing efficiency and the effect of the image flicker are effectively improved.
In one embodiment, the exposure parameters of the camera comprise the exposure time of the camera and the gain of the camera, so that the processing effect of the flicker of the camera is effectively improved by simultaneously skipping the exposure time of the camera and the gain of the camera.
In one embodiment, when determining the target value of the exposure parameter according to the current value and the periodic regular change of the pixel brightness difference, the average lateral distance of adjacent peaks in the periodic regular change of D [ H ] is calculated, the target value of the exposure time is calculated according to the average lateral distance, whether the current value of the exposure time exceeds the target value of the exposure time is judged, and if not, the target value of the gain is calculated according to the target value of the exposure time, the current value and the current value of the gain, so that the target value of the exposure time and the target value of the gain are obtained.
In one embodiment, the calculation formula of the target value targetShut of the exposure time may be expressed as:
the targetShut is (α × β) × γ/2, where α is 2 × L, L is an average lateral distance of adjacent peaks in the periodic regular change of D [ H ], β is a line exposure time of the camera, that is, an exposure time of one line of pixels in the image frame, and γ is a preset parameter. (α β) γ/2 represents the product of the peak-to-valley distance and the line exposure time in the periodic regular variation of D [ H ], the inverse of which is the period of light energy received by the image frame. The target value of the exposure time is set to be integral multiple of the product, and the image flicker phenomenon of the camera can be effectively eliminated, so that the target value of the exposure time is updated through a formula targetshut-m.
In one embodiment, when determining whether the current value of the exposure time exceeds the target value of the exposure time before setting the target value of the exposure time to be an integral multiple of (α × β) × γ/2, if the current value of the exposure time exceeds the target value of the exposure time, the target value of the exposure time may be adjusted by adjusting a multiple relationship between α and β.
In one embodiment, the formula for calculating the target value targetGain of the gain according to the target value, the current value of the exposure time, and the current value of the gain may be expressed as:
targetGain (currShut currGain)/targetShut, where currShut is the current value of the exposure time and currGain is the current value of the gain.
In one embodiment, after the exposure parameter is adjusted to the target value, the camera is subjected to image flicker detection again, and if it is detected that the image flicker phenomenon exists in the camera, it indicates that the image flicker phenomenon occurring in the camera is likely to be a horizontal stripe background or a vertical stripe background inherent in the current scene, and the camera does not need to be adjusted in exposure parameter, so that the exposure parameter is restored to the value before the target value is adjusted, and the image flicker detection accuracy and the processing effect of the camera are effectively improved.
In an embodiment, although the image flicker processing method of the camera shown in fig. 3 and 4 is a processing method for line flicker, column flicker detection may be performed on the camera through a pixel brightness difference between adjacent columns of pixels between the first image frame and the second image frame, and a specific processing procedure may refer to a processing procedure of line flicker, which is not described herein again.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a picture flashing apparatus 500 of a camera, including: an image acquisition module 502, a flicker detection module 504, a target value calculation module 506, and a parameter adjustment module 508, wherein:
an image obtaining module 502, configured to obtain an image frame captured by a camera;
a flicker detection module 504, configured to perform image flicker detection on the camera according to pixel brightness of the image frame;
a target value calculation module 506, configured to determine a target value of an exposure parameter of the camera according to a detection result of the picture flicker detection if it is detected that the camera has a picture flicker phenomenon; and
a parameter adjusting module 508, configured to adjust the exposure parameter to a target value.
In one embodiment, the image frames include a first image frame and a second image frame, and the flicker detection module 504 includes:
the pixel brightness difference counting module is used for counting the pixel brightness difference of adjacent lines of pixels between the first image frame and the second image frame; and
and the flicker detection submodule is used for carrying out image flicker detection on the camera according to the counted pixel brightness difference.
In one embodiment, the pixel luminance difference statistic module comprises:
the first array generating module is used for acquiring the pixel brightness of odd rows on the first image frame and generating a first pixel array;
the second array generating module is used for acquiring the pixel brightness of even lines on a second image frame and generating a second pixel array; and
and the difference value calculation module is used for calculating the difference value of the first pixel array and the second pixel array to obtain the pixel brightness difference of the adjacent rows of pixels between the first image frame and the second image frame.
In one embodiment, the flicker detection sub-module includes:
and the periodicity detection module is used for determining that the camera has a picture flicker phenomenon when the counted pixel brightness difference has periodic regular change.
In one embodiment, the target value calculation module 506 includes:
the current parameter value acquisition module is used for acquiring the current value of the exposure parameter;
and the target value calculation submodule is used for determining a target value according to the current value and the periodic regular change of the pixel brightness difference.
In one embodiment, the exposure parameters include exposure time and gain; the target value calculation submodule includes:
the peak distance acquisition module is used for acquiring the peak distance in the periodic regular change of the pixel brightness difference;
and the exposure gain target value calculation module is used for calculating a target value of the exposure time and a target value of the gain according to the peak distance, the current value of the exposure time and the current value of the gain.
In one embodiment, the image flicker processing apparatus 500 of the camera further includes:
and the exposure parameter recovery module is used for carrying out picture flicker detection on the camera again, and recovering the exposure parameters to the values before the target value is adjusted if the picture flicker phenomenon of the camera is detected.
For specific limitations of the image flicker processing apparatus of the camera, reference may be made to the above limitations on the image flicker processing method of the camera, and details are not described herein again. All or part of each module in the image flicker processing device of the camera can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as videos and images shot by the camera. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method for flicker processing of a picture of a camera.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the above-described method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for processing image flicker of a camera is characterized by comprising the following steps:
acquiring an image frame shot by a camera;
carrying out image flicker detection on the camera according to the pixel brightness of the image frame;
if the camera is detected to have a picture flicker phenomenon, determining a target value of an exposure parameter of the camera according to a detection result of the picture flicker detection;
adjusting the exposure parameter to the target value;
the image frames comprise a first image frame and a second image frame;
the step of detecting the flicker of the camera according to the pixel brightness of the image frame comprises the following steps:
counting pixel brightness differences of adjacent rows of pixels between the first image frame and the second image frame;
and carrying out picture flicker detection on the camera according to the counted pixel brightness difference.
2. The method of claim 1, wherein the row of pixels is at least one row of pixels.
3. The method of claim 1, wherein the step of counting the pixel brightness difference of the adjacent row of pixels between the first image frame and the second image frame comprises:
acquiring the brightness of pixels in odd rows on the first image frame to generate a first pixel array;
acquiring the pixel brightness of even lines on the second image frame to generate a second pixel array;
and calculating the difference value of the first pixel array and the second pixel array to obtain the pixel brightness difference of adjacent rows of pixels between the first image frame and the second image frame.
4. The method of claim 1, wherein the step of detecting flicker of the camera according to the statistical pixel brightness difference comprises:
and when the counted pixel brightness difference has periodic regular change, determining that the camera has a picture flicker phenomenon.
5. The method according to claim 4, wherein the step of determining the target value of the exposure parameter of the camera according to the detection result of the flicker detection comprises
Acquiring the current value of the exposure parameter;
and determining the target value according to the current value and the periodic regular change of the pixel brightness difference.
6. The method of claim 5, wherein the exposure parameters include exposure time and gain; the step of determining the target value according to the current value and the periodic regular change of the pixel brightness difference comprises:
acquiring a peak distance in the periodic regular change of the pixel brightness difference;
and calculating the target value of the exposure time and the target value of the gain according to the peak distance, the current value of the exposure time and the current value of the gain.
7. The method of claim 1, wherein after the step of adjusting the exposure parameter to the target value, the method further comprises:
and carrying out picture flicker detection on the camera again, and if detecting that the camera has a picture flicker phenomenon, restoring the exposure parameter to the value before the target value is adjusted.
8. A picture flicker processing apparatus of a camera, the apparatus comprising:
the image acquisition module is used for acquiring image frames shot by the camera;
the flicker detection module is used for carrying out image flicker detection on the camera according to the pixel brightness of the image frame;
the target value calculation module is used for determining a target value of the exposure parameter of the camera according to a detection result of the picture flicker detection if the picture flicker phenomenon exists in the camera; and
a parameter adjusting module, configured to adjust the exposure parameter to the target value;
the image frames comprise a first image frame and a second image frame;
the flicker detection module is further configured to:
counting pixel brightness differences of adjacent rows of pixels between the first image frame and the second image frame;
and carrying out picture flicker detection on the camera according to the counted pixel brightness difference.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. 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 of any one of claims 1 to 7.
CN201910635797.5A 2019-07-15 2019-07-15 Picture flicker processing method, device, equipment and storage medium of camera Active CN110445952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910635797.5A CN110445952B (en) 2019-07-15 2019-07-15 Picture flicker processing method, device, equipment and storage medium of camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910635797.5A CN110445952B (en) 2019-07-15 2019-07-15 Picture flicker processing method, device, equipment and storage medium of camera

Publications (2)

Publication Number Publication Date
CN110445952A CN110445952A (en) 2019-11-12
CN110445952B true CN110445952B (en) 2021-12-21

Family

ID=68429645

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910635797.5A Active CN110445952B (en) 2019-07-15 2019-07-15 Picture flicker processing method, device, equipment and storage medium of camera

Country Status (1)

Country Link
CN (1) CN110445952B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855901B (en) * 2019-11-28 2021-06-18 维沃移动通信有限公司 Camera exposure time control method and electronic equipment
CN111291620A (en) * 2020-01-14 2020-06-16 北京小马智行科技有限公司 Method, device and system for identifying light source
CN111818271B (en) * 2020-06-30 2021-09-03 浙江大华技术股份有限公司 Method for eliminating image flicker, electronic device and storage medium
CN114143470A (en) * 2020-09-04 2022-03-04 华为技术有限公司 Method, device and program product for adjusting exposure time of camera
CN112565595B (en) * 2020-11-25 2022-07-01 西安闻泰电子科技有限公司 Image jitter eliminating method, device, electronic equipment and storage medium
CN114630054A (en) * 2020-12-14 2022-06-14 瑞昱半导体股份有限公司 Image acquisition device with image flicker detection mechanism and image flicker detection method thereof
CN114268744B (en) * 2021-12-16 2024-03-29 上海研鼎信息技术有限公司 Camera flicker test system and test method
CN115499597A (en) * 2022-09-13 2022-12-20 豪威集成电路(成都)有限公司 Method and device for identifying target frequency light source of imaging system and terminal equipment

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001086401A (en) * 1999-09-16 2001-03-30 Sony Corp Image pickup device and flicker correcting circuit
JP2003060936A (en) * 2001-08-10 2003-02-28 Minolta Co Ltd Image processing program, recording medium thereof, image processing method and image processing apparatus
CN1509069A (en) * 2002-12-17 2004-06-30 Method for eliminating scintilltion of moving picture
CN1226863C (en) * 2003-02-26 2005-11-09 松下电器产业株式会社 Flicker detecting method and flicker detecting apparatus
CN1929562A (en) * 2005-09-08 2007-03-14 索尼株式会社 Flicker reduction method, flicker reduction circuit and image pickup apparatus
CN101009760A (en) * 2005-08-26 2007-08-01 索尼株式会社 Exposure control method, exposure control apparatus, and image pickup apparatus
CN101026694A (en) * 2007-04-06 2007-08-29 北京中星微电子有限公司 Method, device for removing pickup lens image scintillation and pickup lens
CN102006423A (en) * 2010-11-15 2011-04-06 无锡中星微电子有限公司 Camera and method and device for eliminating flicker phenomenon of same
CN102752513A (en) * 2011-04-22 2012-10-24 奥林巴斯映像株式会社 Camera and method for controlling camera
CN102754427A (en) * 2011-02-04 2012-10-24 松下电器产业株式会社 Flicker compensation device, flicker compensation method, and flicker compensation program
CN103516975A (en) * 2012-06-20 2014-01-15 株式会社日立制作所 Imaging apparatus
CN103648007A (en) * 2013-12-23 2014-03-19 乐视致新电子科技(天津)有限公司 Method for performing video communication through remote control and remote control of smart television
CN104104882A (en) * 2013-04-09 2014-10-15 展讯通信(上海)有限公司 Image flicker detection method and device, and image capturing device
CN109274984A (en) * 2018-10-16 2019-01-25 深圳开阳电子股份有限公司 Detect the method, apparatus and image processing equipment of light source scintillation in video sequence
CN109996007A (en) * 2017-12-30 2019-07-09 陈啸 A kind of device for eliminating image flicker

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE59008311D1 (en) * 1990-03-09 1995-03-02 Itt Ind Gmbh Deutsche Method and device for reducing the edge flicker of a television picture.

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001086401A (en) * 1999-09-16 2001-03-30 Sony Corp Image pickup device and flicker correcting circuit
JP2003060936A (en) * 2001-08-10 2003-02-28 Minolta Co Ltd Image processing program, recording medium thereof, image processing method and image processing apparatus
CN1509069A (en) * 2002-12-17 2004-06-30 Method for eliminating scintilltion of moving picture
CN1226863C (en) * 2003-02-26 2005-11-09 松下电器产业株式会社 Flicker detecting method and flicker detecting apparatus
CN101009760A (en) * 2005-08-26 2007-08-01 索尼株式会社 Exposure control method, exposure control apparatus, and image pickup apparatus
CN1929562A (en) * 2005-09-08 2007-03-14 索尼株式会社 Flicker reduction method, flicker reduction circuit and image pickup apparatus
CN101026694A (en) * 2007-04-06 2007-08-29 北京中星微电子有限公司 Method, device for removing pickup lens image scintillation and pickup lens
CN102006423A (en) * 2010-11-15 2011-04-06 无锡中星微电子有限公司 Camera and method and device for eliminating flicker phenomenon of same
CN102754427A (en) * 2011-02-04 2012-10-24 松下电器产业株式会社 Flicker compensation device, flicker compensation method, and flicker compensation program
CN102752513A (en) * 2011-04-22 2012-10-24 奥林巴斯映像株式会社 Camera and method for controlling camera
CN103516975A (en) * 2012-06-20 2014-01-15 株式会社日立制作所 Imaging apparatus
CN104104882A (en) * 2013-04-09 2014-10-15 展讯通信(上海)有限公司 Image flicker detection method and device, and image capturing device
CN103648007A (en) * 2013-12-23 2014-03-19 乐视致新电子科技(天津)有限公司 Method for performing video communication through remote control and remote control of smart television
CN109996007A (en) * 2017-12-30 2019-07-09 陈啸 A kind of device for eliminating image flicker
CN109274984A (en) * 2018-10-16 2019-01-25 深圳开阳电子股份有限公司 Detect the method, apparatus and image processing equipment of light source scintillation in video sequence

Also Published As

Publication number Publication date
CN110445952A (en) 2019-11-12

Similar Documents

Publication Publication Date Title
CN110445952B (en) Picture flicker processing method, device, equipment and storage medium of camera
EP3046320B1 (en) Method for generating an hdr image of a scene based on a tradeoff between brightness distribution and motion
US8374459B2 (en) Dynamic image compression method for human face detection
US20120057029A1 (en) Capture of video with motion-speed determination and variable capture rate
CN108322651B (en) Photographing method and device, electronic equipment and computer readable storage medium
JP2014123914A5 (en)
US20130044964A1 (en) Image processing device, image processing method and program
CN111242128B (en) Object detection method, device, computer readable storage medium and computer equipment
CN110866486B (en) Subject detection method and apparatus, electronic device, and computer-readable storage medium
CN111586292B (en) Camera shooting state switching method and device and computer equipment
CN109327626B (en) Image acquisition method and device, electronic equipment and computer readable storage medium
CN103795920A (en) Photo processing method and device
CN108710837A (en) Cigarette smoking recognition methods, device, computer equipment and storage medium
CN110248101A (en) Focusing method and device, electronic equipment, computer readable storage medium
CN109859142B (en) Image brightness adjusting method and device, computer equipment and storage medium
CN116308992A (en) Image processing method and device, electronic equipment and computer readable storage medium
US11310440B2 (en) Image processing apparatus, surveillance camera system, and image processing method
CN109308704B (en) Background eliminating method, device, computer equipment and storage medium
CN116431857A (en) Video processing method and system for unmanned scene
CN113766114B (en) Image processing method, device, electronic equipment and storage medium
CN114173062B (en) Image processing method, device, equipment and storage medium for image pickup equipment
CN115439386A (en) Image fusion method and device, electronic equipment and storage medium
CN113099107B (en) Video shooting method, device and medium based on terminal and computer equipment
US7760938B1 (en) Algorithm to enhance the contrast of a monochrome image
CN109996062B (en) Video image quality detection method and device, computer equipment and storage medium

Legal Events

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