CN111510708A - Image stroboscopic detection method and device, storage medium and terminal - Google Patents

Image stroboscopic detection method and device, storage medium and terminal Download PDF

Info

Publication number
CN111510708A
CN111510708A CN202010336943.7A CN202010336943A CN111510708A CN 111510708 A CN111510708 A CN 111510708A CN 202010336943 A CN202010336943 A CN 202010336943A CN 111510708 A CN111510708 A CN 111510708A
Authority
CN
China
Prior art keywords
value
diff
image
luminance
strobe
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
CN202010336943.7A
Other languages
Chinese (zh)
Other versions
CN111510708B (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.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai 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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202010336943.7A priority Critical patent/CN111510708B/en
Priority to CN202210069448.3A priority patent/CN114401396A/en
Publication of CN111510708A publication Critical patent/CN111510708A/en
Application granted granted Critical
Publication of CN111510708B publication Critical patent/CN111510708B/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

Abstract

An image stroboscopic detection method and device, a storage medium and a terminal are provided, and the method comprises the following steps: providing at least three consecutive images; extracting a brightness column vector of each frame of image, wherein each brightness vector in the brightness column vector is used for indicating the brightness value of the minimum unit of each line in the image; determining a strobe statistic value based on luminance column vectors of the at least three frames of images, the strobe statistic value indicating a number of strobes for each of the luminance vectors; and determining whether stroboflash exists in the at least three frames of images at least according to the stroboflash statistic value. The invention can effectively reduce the calculation complexity.

Description

Image stroboscopic detection method and device, storage medium and terminal
Technical Field
The present invention relates to the field of image detection technologies, and in particular, to an image strobe detection method and apparatus, a storage medium, and a terminal.
Background
Because the energy of the alternating current power supply changes periodically with time, when the light source works under the power supply, if the exposure information of the shooting equipment is not matched with the frequency of the light source, the light and shade change caused by the light intensity difference in the exposure process exists when the image is shot. And the exposure strategy of the Complementary Metal Oxide Semiconductor (CMOS) element is line-by-line exposure and there is a time difference between lines, which causes the rolling phenomenon of the brightness change, which is the fundamental cause of stroboflash in the captured image.
The processing object of the current commonly used image stroboscopic detection method is a difference image of two adjacent frames in the shooting process, so that stroboscopic features in the image can be well reserved on the basis of effectively removing image background information.
However, the prior art is computationally complex.
The inventor of the present invention has found through research that, in the prior art, it is necessary to calculate, for a difference image, one-dimensional discrete fourier transform coefficients corresponding to 100Hz and 120Hz for all pixels in each line in a row unit, and determine which frequency is dominant from a frequency domain result to guide adjustment of current exposure information, that is, a conversion operation from a pixel domain to a frequency domain is required in a processing process, resulting in high calculation complexity.
Disclosure of Invention
The invention aims to provide an image stroboscopic detection method and device, a storage medium and a terminal, which can effectively reduce the calculation complexity.
To solve the above technical problem, an embodiment of the present invention provides an image strobe detection method, including the following steps: providing at least three consecutive images; extracting a brightness column vector of each frame of image, wherein each brightness vector in the brightness column vector is used for indicating the brightness value of the minimum unit of each line in the image; determining a strobe statistic value based on luminance column vectors of the at least three frames of images, the strobe statistic value indicating a number of strobes for each of the luminance vectors; and determining whether stroboflash exists in the at least three frames of images at least according to the stroboflash statistic value.
Optionally, the at least three frames of images are all bayer array images; extracting a luminance column vector of each frame image includes: extracting the R value, the Gr value, the Gb value and the B value of each minimum unit in each frame of image; determining a brightness vector matrix of each frame of image according to the R value, the Gr value, the Gb value and the B value; and determining a brightness column vector of each frame of image based on the brightness vector matrix.
Optionally, determining a luminance vector matrix of each frame of image according to the R value, the Gr value, the Gb value, and the B value by using the following formula:
Y=(77×R+75×(Gr+Gb)+29×B)>>10
wherein, Y is used for representing a brightness vector matrix, R is used for representing an R value matrix, Gr is used for representing a Gr value matrix, Gb is used for representing a Gb value matrix, and B is used for representing a B value matrix.
Optionally, determining a luminance column vector of each frame of image based on the luminance vector matrix includes: down-sampling each frame of image to obtain a sampled image with a preset size, wherein the preset size comprises a preset number of lines and a preset number of columns; and performing summation operation on the brightness vectors of each row of the sampled image to generate the brightness column vector of the preset column number.
Optionally, the following formula is adopted to perform summation operation on the brightness vector of each line of the sampled image:
Figure BDA0002465969570000021
wherein, Y (p, q) is used to represent the qth row and the qth column luminance vector of the sampled image, Y _ acc (p) is used to represent the pth row luminance vector of the sampled image, and width is used to represent the number of minimum units in each row of the sampled image.
Optionally, determining the strobe statistic value based on the luminance column vector of at least three frames of images comprises: subtracting the luminance column vectors of every two adjacent frames of images in the at least three frames of images to obtain at least a first 2-frame differential luminance column vector diff1 and a second 2-frame differential luminance column vector diff 2; normalizing the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 to obtain a first normalized 2 frame differential luminance column vector and a second normalized 2 frame differential luminance column vector; determining flag bit information; and determining a stroboscopic statistic value at least according to the flag bit information.
Optionally, normalizing the first 2-frame differential luminance column vector diff1 and the second 2-frame differential luminance column vector diff2 includes: determining an average value diff _ mean, a maximum value diff _ max and a minimum value diff _ min of each frame of differential brightness column vectors; the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 are normalized using the following equations:
max_sq_range=max(diff_max2-diff_min2,diff_max1-diff_min1)
Figure BDA0002465969570000031
Figure BDA0002465969570000032
where max _ sq _ range is used to represent the maximum sequence range, Diff _ nm1 is used to represent the first normalized 2-frame differential luminance column vector after normalization, Diff _ nm2 is used to represent the second normalized 2-frame differential luminance column vector after normalization, Diff _ mean1 is used to represent the average of the first differential luminance column vector, Diff _ mean2 is used to represent the average of the second differential luminance column vector, Diff _ max1 is used to represent the maximum of the first differential luminance column vector, Diff _ max2 is used to represent the maximum of the second differential luminance column vector, Diff _ min1 is used to represent the minimum of the first differential luminance column vector, and Diff _ min2 is used to represent the minimum of the second differential luminance column vector.
23. Optionally, the flag bit information is determined by using the following formula:
Figure BDA0002465969570000033
where n is used to indicate the number of luma vectors in the luma column vectors, Diff _ sign (i) is used to indicate flag information for the ith luma vector, Diff _ nm1(i) is used to indicate the ith luma vector of the first normalization-process 2-frame differential luma column vector, and Diff _ nm2(i) is used to indicate the ith luma vector of the second normalization-process 2-frame differential luma column vector.
Optionally, the first 2-frame differential luminance column vector Diff1 employs a first filtered differential luminance column vector Diff _ ft 1; and said second 2 frame differential luminance column vector Diff2 employs a second filtered differential luminance column vector Diff _ ft 2.
Optionally, each filtered differential luminance column vector Diff _ ft is determined using the following formula:
Figure BDA0002465969570000041
wherein, Diff _ ft (j) is used to represent the jth filtered differential luma column vector, filt _ len is used to represent the window length of filtering, and Diff _ nm (k + j) is used to represent the (k + j) th luma vector of each normalized 2-frame differential luma column vector.
Optionally, the flag bit information is determined by using the following formula:
Figure BDA0002465969570000042
wherein Diff _ ft _ sign (i) is used to indicate the filter flag information of the ith luma vector, n is used to indicate the number of luma vectors in the luma column vectors, Diff _ ft1 is used to indicate the first filtered differential luma column vector, and Diff _ ft2 is used to indicate the second filtered differential luma column vector.
Optionally, determining the strobe statistic value at least according to the flag bit information includes: determining one or more points where Diff _ ft1(i) and Diff _ ft2(i) intersect, denoted as filter transition points; sequentially taking each filtering jump point as an origin, adopting each preset search window in a preset search window group, and searching the times with the value of 0 and the value of 1 in the diff _ ft _ sign (i) in the first direction and the second direction respectively, wherein the times are respectively marked as the times of taking 0 in the first direction, the times of taking 0 in the second direction, the times of taking 1 in the first direction and the times of taking 0 in the second direction; determining the stroboscopic statistic value according to the 0 times of the first direction, the 0 times of the second direction, the 1 times of the first direction and the 0 times of the second direction obtained from each filtering transition point and each preset search window; the first direction and the second direction are different, and the first direction and the second direction are selected from directions in which the sequence numbers of the luminance vectors in the luminance column vectors increase or decrease.
Optionally, determining the strobe statistic value according to the number of 0 times in the first direction, the number of 0 times in the second direction, the number of 1 times in the first direction, and the number of 0 times in the second direction, which are obtained from each filtering transition point and each preset search window, includes: for each preset search window of each filtering jump point, if | pos _ l-peak _ dist | and | neg _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x or | neg _ l-peak _ dist | and | pos _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x, determining that the count of a stroboscopic statistic value flicker _ val is increased by a preset stroboscopic weight value; traversing each preset search window of each filtering transition point until the traversal is finished or the counted stroboscopic statistic value flicker _ val reaches a preset upper limit value; the search window comprises pos _ l, neg _ l, peak _ dist, and x, wherein pos _ l is used for indicating that the first direction takes 1 time, pos _ r is used for indicating that the second direction takes 1 time, neg _ l is used for indicating that the first direction takes 0 time, pos _ r is used for indicating that the second direction takes 0 time, peak _ dist is used for indicating the window length of each preset search window, and x is used for indicating a preset integer value.
Optionally, the initial value of the stroboscopic statistic value is 0, and the preset stroboscopic weight value is 1.
Optionally, the number of the images is at least five frames, and the first filtered differential luma column vector Diff _ ft1 and the second filtered differential luma column vector Diff _ ft2 are obtained from the first three frames of images; before determining whether a strobe exists in the image according to at least the strobe statistic, the image strobe detection method further comprises: determining a third filtered differential luma column vector Diff _ ft1 'and a fourth filtered differential luma column vector Diff _ ft 2' from the third through fifth frame images; performing modular operation on Diff _ ft1 and Diff _ ft2, and then cascading to generate a first cascaded luminance column vector with the length of 2n, and performing modular operation on Diff _ ft1 'and Diff _ ft 2', and then cascading to generate a second cascaded luminance column vector with the length of 2 n; cascading the first cascaded luminance column vector and the second cascaded luminance column vector to obtain a cascaded column vector diff _ long with the length of 4 n; selecting one part or a plurality of parts of the brightness vector in the cascade column vector with the length of 4n, uniformly sampling m values for each part in sequence, and carrying out subtraction operation between every two adjacent values to obtain m-1 gradient values; determining a weight value of a stroboscopic statistic value according to the m-1 gradient values of each part; where n is used to represent the number of luminance vectors in the luminance column vector.
Optionally, selecting a part of the luminance vectors in the concatenated column vectors with length of 4n includes: in the cascaded column vector diff _ long with the length of 4n, screening a luminance vector by adopting the following conditions, and recording the luminance vector as a luminance vector set:
diff_still_ft(s+t)≥diff_still_ft(s)&&
diff_still_ft(s-t)≥diff_still_ft(S)&&
diff_still_ft≤300(t=1,2,...,T)
determining the sequence number difference of adjacent luminance vectors in the luminance vector set, and if the sequence number difference is between 40-150, selecting diff _ long between the sequence numbers to which the sequence number difference belongs as a part of the luminance vectors in the cascaded column vectors with the length of 4 n; traversing the set of luminance vectors to obtain a portion or portions of luminance vectors in the cascaded column vectors of length 4 n; wherein s is used to represent the s-th luminance vector traversed, T is a preset positive integer value, and T is a positive integer selected from the range from 1 to T.
Optionally, determining a weight value of the stroboscopic statistic value according to the m-1 gradient values of each portion includes: counting the number of gradient values which are negative numbers in the m-1 gradient values of each part; determining the weight value of the stroboscopic statistic value according to the number of the gradient values which are negative numbers; wherein, the larger the number of the gradient values which are negative numbers is, the larger the weight value of the stroboscopic statistic value is.
Optionally, determining whether a strobe exists in the image according to at least the strobe statistic value includes: determining a stroboscopic characteristic quantization value Flk _ val according to the stroboscopic statistic value and the weighted value of the stroboscopic statistic value by adopting the following formula;
Flk_val=flicker_val×WEIGHT(flicker_long,thrd_n)/4
Figure BDA0002465969570000061
determining whether the image has stroboflash or not according to at least the stroboflash characteristic quantization value; wherein Flk _ val is used to represent a strobe characteristic quantization value, thrd _ n is used to represent a preset strobe threshold value, WEIGHT (x, y) function is used to indicate a WEIGHT value of the strobe statistical value, and x, y are used to represent input variables of the WEIGHT (x, y) function; the larger the strobe feature quantization value, the greater the probability that a strobe exists in the image.
Optionally, determining whether a strobe exists in the image according to at least the strobe-characteristic quantization value Flk _ val includes: determining a long-sequence strobe characteristic value Flk _ v _ val according to the strobe characteristic quantized value Flk _ val by adopting the following formula:
Figure BDA0002465969570000062
determining that the image has stroboflash according to the fact that the long-sequence stroboflash characteristic value Flk _ v _ val is larger than a preset long-sequence stroboflash characteristic threshold; wherein, Flk _ v _ val is used to indicate a long-sequence strobe characteristic value, thrd _ v is used to represent a preset strobe threshold value.
To solve the above technical problem, an embodiment of the present invention provides an image strobe detection apparatus, including: a providing module for providing at least three continuous frames of images; the extraction module is used for extracting a brightness column vector of each frame of image, wherein each brightness vector in the brightness column vector is used for indicating the brightness value of the minimum unit of each row in the image; a strobe statistic determination module for determining a strobe statistic based on the luminance column vectors of the at least three frames of images, the strobe statistic indicating the number of strobes of each of the luminance vectors; a strobe determination module, configured to determine whether a strobe exists in the at least three frames of images at least according to the strobe statistics.
To solve the above technical problem, an embodiment of the present invention provides a storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the image strobe detection method.
To solve the above technical problem, an embodiment of the present invention provides a terminal, including a memory and a processor, where the memory stores a computer program capable of running on the processor, and the processor executes the steps of the image strobe detection method when running the computer program
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
in the embodiment of the invention, by setting and extracting the brightness column vector of each frame of image, determining the stroboscopic statistic value based on the brightness column vectors of the at least three frames of images, and setting the stroboscopic statistic value to indicate the stroboscopic frequency of each brightness vector, whether the image has stroboscopic can be determined only by calculating in the range of a pixel domain, and compared with the prior art that conversion operation from the pixel domain to a frequency domain needs to be involved in the processing process, the calculation complexity is higher.
Further, in the embodiment of the present invention, the luminance vector matrix is determined according to the R value, the Gr value, the Gb value, and the B value, and then the luminance column vector of each frame of image is determined, so that the accuracy of determining the luminance column vector of each frame of image can be improved.
Further, by normalizing the first 2-frame differential luminance column vector diff1 and the second 2-frame differential luminance column vector diff2 to obtain a first normalized 2-frame differential luminance column vector and a second normalized 2-frame differential luminance column vector, the accuracy of determining flag bit information can be improved.
Further, a first filtered differential luminance column vector Diff _ ft1 is employed by setting the first 2-frame differential luminance column vector Diff 1; and the second 2-frame differential luminance column vector Diff2 adopts a second filtered differential luminance column vector Diff _ ft2, which can eliminate waveform noise through filtering, thereby further improving the accuracy of determining the information of the filtering flag bit.
Further, by cascading the brightness column vectors and then determining the weight value of the stroboscopic statistic value, stroboscopic detection can be performed according to more images with more frames and the brightness column vectors with longer length, and the stroboscopic detection is effectively adjusted by adopting the weight value, so that the detection accuracy is effectively improved.
Further, a long-sequence stroboscopic characteristic value Flk _ v _ val is determined, and then the stroboscopic characteristic value Flk _ v _ val is determined to exist based on the fact that the long-sequence stroboscopic characteristic value Flk _ v _ val is larger than a preset long-sequence stroboscopic characteristic threshold value, the stroboscopic can be further detected by adopting a luminance column vector with a longer length, and the detection accuracy is further effectively improved.
Drawings
FIG. 1 is a flowchart of an image strobe detection method according to an embodiment of the present invention;
FIG. 2 is a schematic illustration of a Bayer array image in an embodiment of the invention;
FIG. 3 is a flowchart of one embodiment of step S13 of FIG. 1;
FIG. 4 is a partial flow chart of another image strobe detection method in an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an image strobe detection apparatus according to an embodiment of the present invention.
Detailed Description
With the rapid iteration of consumer and industrial electronic devices, cameras have become a standard configuration for many embedded devices. The imaging element of the current mainstream embedded image pickup apparatus is a combination of a Complementary Metal Oxide Semiconductor (CMOS) and a rolling shutter, and such an element is easily affected by stroboflash when operated under an ac power source lighting device, resulting in a sharp reduction in preview image quality.
As described above, stroboflash occurs in a captured image, and a processing object of a current commonly used image stroboflash detection method is a difference image of two adjacent frames in a capturing process, so that stroboflash features in the image can be well retained on the basis of effectively removing image background information. However, the prior art is computationally complex.
Specifically, in an existing embodiment, a processing object of a currently commonly used image strobe detection method is a difference image of two adjacent frames in a shooting process, so that strobe features in an image can be well retained on the basis of effectively removing image background information. The main means is to calculate one-dimensional discrete Fourier transform coefficients corresponding to 100Hz and 120Hz for all pixels in each line of a difference image in a row unit by using discrete Fourier transform, and determine which frequency is dominant from a frequency domain result so as to guide the adjustment of the current exposure information.
The inventor of the present invention has found through research that, in the prior art, it is necessary to calculate, for a difference image, one-dimensional discrete fourier transform coefficients corresponding to 100Hz and 120Hz for all pixels in each line in a row unit, and determine which frequency is dominant from a frequency domain result to guide adjustment of current exposure information, that is, a conversion operation from a pixel domain to a frequency domain is required in a processing process, resulting in high calculation complexity.
More specifically, the conventional image strobe detection method can ensure a relatively ideal detection accuracy for an ideal strobe phenomenon. The definition of ideal stroboscopic here means that the bright and dark intervals in the preview image are clearly visible, the number of the bright and dark intervals is between 3 and 5, and the bright and dark stripes roll at a proper speed. However, due to the property difference of the imaging sensors (sensors) (for example, whether the imaging sensors are in zoom mode (Binning) output or in different resolution sizes), stroboscopic phenomena occur in different models of imaging devices, especially the stroboscopic phenomena that are stationary or have extremely slow scrolling speed. There is no sign of "flicker" in visual perception, but a mere superposition of image background information and light and dark stripes. The performance of the common image strobe detection method in the case of such stroboscopic phenomena no longer meets expectations, and the frequency domain algorithm represented by the discrete fourier transform requires mapping each pixel point to the frequency domain, resulting in a higher computational complexity of such algorithms.
In the embodiment of the invention, by setting and extracting the brightness column vector of each frame of image, determining the stroboscopic statistic value based on the brightness column vectors of the at least three frames of images, and setting the stroboscopic statistic value to indicate the stroboscopic frequency of each brightness vector, whether the image has stroboscopic can be determined only by calculating in the range of a pixel domain, and compared with the prior art that conversion operation from the pixel domain to a frequency domain needs to be involved in the processing process, the calculation complexity is higher.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
Referring to fig. 1, fig. 1 is a flowchart of an image strobe detection method according to an embodiment of the present invention. The image strobe detection method may include steps S11 to S14:
step S11: providing at least three consecutive images;
step S12: extracting a brightness column vector of each frame of image, wherein each brightness vector in the brightness column vector is used for indicating the brightness value of the minimum unit of each line in the image;
step S13: determining a strobe statistic value based on luminance column vectors of the at least three frames of images, the strobe statistic value indicating a number of strobes for each of the luminance vectors;
step S14: and determining whether stroboflash exists in the at least three frames of images at least according to the stroboflash statistic value.
In a specific implementation of step S11, at least three consecutive frames of images are provided.
Further, the at least three frames of images may each be a bayer array image.
Referring to fig. 2, fig. 2 is a schematic diagram of a bayer array image according to an embodiment of the present invention. The bayer array image may include a plurality of minimum cells (cells), such as the area encircled by the circle in fig. 2.
Each Cell may include a blue pixel (B), a green-blue pixel (Gb), a green-red pixel (Gr), and a red pixel (R), and each Cell may have an R value, a Gr value, a Gb value, and a B value.
In a specific implementation of step S12, a luminance column vector for each frame of image may be extracted, each of the luminance column vectors being used to indicate a luminance value of a minimum unit of each row in the image.
Further, the step of extracting the luminance column vector of each frame image may include: extracting the R value, the Gr value, the Gb value and the B value of each minimum unit in each frame of image; determining a brightness vector matrix of each frame of image according to the R value, the Gr value, the Gb value and the B value; and determining a brightness column vector of each frame of image based on the brightness vector matrix.
Further, the following formula can be used to determine the luminance vector matrix of each frame image according to the R value, Gr value, Gb value, and B value:
Y=(77×R+75×(Gr+Gb)+29×B)>>10
wherein, Y is used for representing a brightness vector matrix, R is used for representing an R value matrix, Gr is used for representing a Gr value matrix, Gb is used for representing a Gb value matrix, and B is used for representing a B value matrix.
It should be noted that by setting a right shift of 10 bits (> 10), the number of bits of the luminance value can be controllably reduced, thereby reducing the effect of different colors on the luminance value and further improving the accuracy of the strobe detection in the subsequent operation.
In the embodiment of the invention, the brightness vector matrix is determined according to the R value, the Gr value, the Gb value and the B value, so that the brightness column vector of each frame of image is determined, and the accuracy of determining the brightness column vector of each frame of image can be improved.
It should be noted that the processed image format of the present invention is not limited to Bayer (Bayer) array images, and can be applied to various types of digital image domains capable of counting luminance information, including but not limited to RAW image (RAW) domain, YCrCb color coding (YUV) domain, and full color (RGB) domain.
Further, determining a luminance column vector for each frame of image based on the luminance vector matrix comprises: down-sampling each frame of image to obtain a sampled image with a preset size, wherein the preset size comprises a preset number of lines and a preset number of columns; and performing summation operation on the brightness vectors of each row of the sampled image to generate the brightness column vector of the preset column number.
Further, the following formula can be used to perform a summation operation on the luminance vectors of each line of the sampled image:
Figure BDA0002465969570000111
wherein, Y (p, q) is used to represent the qth row and the qth column luminance vector of the sampled image, Y _ acc (p) is used to represent the pth row luminance vector of the sampled image, and width is used to represent the number of minimum units in each row of the sampled image.
In a specific implementation manner of the embodiment of the present invention, according to a ratio between an input image size and a preset resolution, a corresponding sampling coefficient may be calculated and the current image is down-sampled to a preset size, taking the preset size as 640 (pixels) × 480 (pixels) as an example, at this time, the sampled images are added one by one in a row direction, and a column vector with a height of 480 may be generated.
In a specific implementation of step S13, the strobe statistics may be determined based on the luminance column vectors of at least three frames of images.
Referring to fig. 3, fig. 3 is a flowchart of an embodiment of step S13 in fig. 1. The step of determining the strobe statistics may include steps S31 through S34, each of which is described below.
In step S31, the luminance column vectors of each two adjacent frames of the at least three frames of images are subtracted to obtain at least a first 2-frame differential luminance column vector diff1 and a second 2-frame differential luminance column vector diff 2.
In step S32, the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 are normalized to obtain a first normalized 2 frame differential luminance column vector and a second normalized 2 frame differential luminance column vector.
Further, the step of normalizing the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 may include: determining an average value diff _ mean, a maximum value diff _ max and a minimum value diff _ min of each frame of differential brightness column vectors; the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 are normalized using the following equations:
max_sq_range
=max(diff_max2-diff_min2,diff_max1-diff_min1)
Figure BDA0002465969570000121
Figure BDA0002465969570000122
where max _ sq _ range is used to represent the maximum sequence range, Diff _ nm1 is used to represent the first normalized 2-frame differential luminance column vector after normalization, Diff _ nm2 is used to represent the second normalized 2-frame differential luminance column vector after normalization, Diff _ mean1 is used to represent the average of the first differential luminance column vector, Diff _ mean2 is used to represent the average of the second differential luminance column vector, Diff _ max1 is used to represent the maximum of the first differential luminance column vector, Diff _ max2 is used to represent the maximum of the second differential luminance column vector, Diff _ min1 is used to represent the minimum of the first differential luminance column vector, and Diff _ min2 is used to represent the minimum of the second differential luminance column vector.
In step S33, flag bit information is determined.
In the embodiment of the present invention, the flag bit information may be determined according to the first normalization processing 2-frame differential luminance column vector and the second normalization processing 2-frame differential luminance column vector; the normalized 2-frame differential statistical information may also be filtered, and the flag bit information may then be determined based on the first filtered differential luma column vector and the second filtered differential luma column vector.
In a first specific implementation manner of the embodiment of the present invention, the flag bit information may be determined by using the following formula:
Figure BDA0002465969570000131
where n is used to indicate the number of luma vectors in the luma column vectors, Diff _ sign (i) is used to indicate flag information for the ith luma vector, Diff _ nm1(f) is used to indicate the ith luma vector of the first normalization-process 2-frame differential luma column vector, and Diff _ nm2(i) is used to indicate the ith luma vector of the second normalization-process 2-frame differential luma column vector.
In the embodiment of the present invention, flag bit information diff _ sign may be set to represent the relative relationship of the 2-frame difference statistical information after the normalization processing.
In the embodiment of the present invention, the first 2-frame differential luminance column vector diff1 and the second 2-frame differential luminance column vector diff2 may be normalized to obtain a first normalized 2-frame differential luminance column vector and a second normalized 2-frame differential luminance column vector, so as to improve the accuracy of determining the flag bit information.
In a second specific implementation manner of the embodiment of the present invention, the first 2-frame differential luminance column vector Diff1 employs a first filtered differential luminance column vector Diff _ ft 1; and said second 2 frame differential luminance column vector Diff2 employs a second filtered differential luminance column vector Diff _ ft 2.
Specifically, the 2-frame difference statistical information after the standardization processing can be filtered by using the sliding window, so that the waveform noise is effectively eliminated, and the accuracy of subsequent judgment is improved.
Further, each filtered differential luminance column vector Diff _ ft may be determined using the following equation:
Figure BDA0002465969570000132
wherein, Diff _ ft (j) is used to represent the jth filtered differential luma column vector, filt _ len is used to represent the window length of filtering, and Diff _ nm (k + j) is used to represent the (k + j) th luma vector of each normalized 2-frame differential luma column vector.
Further, the flag bit information may be determined using the following equation:
Figure BDA0002465969570000133
wherein Diff _ ft _ sign (i) is used to indicate the filter flag information of the ith luma vector, n is used to indicate the number of luma vectors in the luma column vectors, Diff _ ft1 is used to indicate the first filtered differential luma column vector, and Diff _ ft2 is used to indicate the second filtered differential luma column vector.
In an embodiment of the present invention, a first filtered differential luma column vector Diff _ ft1 may be employed by setting the first 2-frame differential luma column vector Diff 1; and the second 2-frame differential luminance column vector Diff2 adopts a second filtered differential luminance column vector Diff _ ft2, which can eliminate waveform noise through filtering, thereby further improving the accuracy of determining the information of the filtering flag bit.
In step S34, a strobe count value is determined based on at least the flag information.
Wherein, the transition information of Diff _2nd being Diff _ sign (i) can be defined to characterize the intersection condition of Diff _ nm1(i) and Diff _ nm2 (i); transition information defining Diff _ ft _2nd as Diff _ ft _ sign (i) characterizes the intersection of Diff _ ft1(i) and Diff _ ft2 (i).
Further, the step of determining a strobe statistic based at least on the flag bit information may comprise: determining one or more points where Diff _ ft1(i) and Diff _ ft2(i) intersect, denoted as filter transition points; sequentially taking each filtering jump point as an origin, adopting each preset search window in a preset search window group, and searching the times with the value of 0 and the value of 1 in the diff _ ft _ sign (i) in the first direction and the second direction respectively, wherein the times are respectively marked as the times of taking 0 in the first direction, the times of taking 0 in the second direction, the times of taking 1 in the first direction and the times of taking 0 in the second direction; determining the stroboscopic statistic value according to the 0 times of the first direction, the 0 times of the second direction, the 1 times of the first direction and the 0 times of the second direction obtained from each filtering transition point and each preset search window; the first direction and the second direction are different, and the first direction and the second direction are selected from directions in which the sequence numbers of the luminance vectors in the luminance column vectors increase or decrease.
Specifically, by setting only each filter transition point as the origin, the number of times of calculation can be effectively reduced, and the calculation complexity can be effectively reduced.
Further, the step of determining the strobe statistic value according to the number of 0 in the first direction, the number of 0 in the second direction, the number of 1 in the first direction, and the number of 0 in the second direction obtained from each filtering transition point and each preset search window may include: for each preset search window of each filtering jump point, if | pos _ l-peak _ dist | and | neg _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x or | neg _ l-peak _ dist | and | pos _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x, determining that the count of a stroboscopic statistic value flicker _ val is increased by a preset stroboscopic weight value; traversing each preset search window of each filtering transition point until the traversal is finished or the counted stroboscopic statistic value flicker _ val reaches a preset upper limit value; the search window comprises pos _ l, neg _ l, peak _ dist, and x, wherein pos _ l is used for indicating that the first direction takes 1 time, pos _ r is used for indicating that the second direction takes 1 time, neg _ l is used for indicating that the first direction takes 0 time, pos _ r is used for indicating that the second direction takes 0 time, peak _ dist is used for indicating the window length of each preset search window, and x is used for indicating a preset integer value.
In a specific implementation, a preset strobe weight value is added to the count of the strobe statistic flicker _ val whenever | pos _ l-peak _ dist | and | neg _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x, or | neg _ l-peak _ dist | and | pos _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x.
As a non-limiting example, x can be set to 4-6, such as x is 5. It is also possible to set a 1/x ratio of 15% to 35%, for example a 1/x ratio of 20%.
Further, the initial value of the strobe count value may be 0, and the preset strobe weight value may be 1.
In the embodiment of the present invention, 1 may be added only when the above condition is satisfied, thereby effectively reducing the amount of computation.
Further, the image strobe detection method may further include a scheme of detecting a strobe according to an image with a larger number of frames and a luminance column vector with a longer length.
Referring to fig. 4, fig. 4 is a partial flowchart of another image strobe detection method in an embodiment of the present invention. The other image strobe detection method may include steps S11 to S14 shown in fig. 1, and may include steps S41 to S45, each of which is described below.
The number of the images may be at least five frames, the first filtered differential luminance rank vector Diff _ ft1 and the second filtered differential luminance rank vector Diff _ ft2 are obtained from the first three frames of images, and the steps S41 to S45 may be before the step S14, or before or after other suitable steps.
In step S41, a third filtered differential luma column vector Diff _ ft1 'and a fourth filtered differential luma column vector Diff _ ft 2' are determined from the third through fifth frame images.
Wherein the difference between the fourth frame image and the third frame image may be used to determine a third filtered differential luma column vector Diff _ ft1 ', and the difference between the fifth frame image and the fourth frame image may be used to determine a fourth filtered differential luma column vector Diff _ ft 2'.
In step S42, after performing the modulo operation on Diff _ ft1 and Diff _ ft2, a first concatenated luminance column vector of length 2n is generated by concatenation, and after performing the modulo operation on Diff _ ft1 'and Diff _ ft 2', a second concatenated luminance column vector of length 2n is generated by concatenation.
Where n is used to represent the number of luminance vectors in the luminance column vector.
It should be noted that, taking n as 480 as an example, a first concatenated luma column vector of length 2n may be 960, and the vector may be temporarily stored in a memory space for concatenation with a subsequent second concatenated luma column vector of length 960.
In step S43, the first cascaded luma column vector and the second cascaded luma column vector are cascaded to obtain a cascaded column vector diff _ long with a length of 4 n.
It should be noted that, taking n as 480 as an example, the length of the cascaded column vector diff _ long with length 4n is 1920.
In step S44, a part or parts of the luminance vector in the 4 n-length concatenated column vector are selected, each part is sampled with m values uniformly in turn, and a subtraction operation is performed between every two adjacent values to obtain m-1 gradient values.
Specifically, in the cascaded column vector with the length of 4n, screening is required to select a part of points satisfying the condition to form a point set valley, so that the computation amount of subsequent operations is effectively reduced, and the computation complexity is further reduced.
Further, the step of selecting a portion of the luminance vectors in the 4 n-length concatenated column vectors may comprise: in the cascaded column vector diff _ long with the length of 4n, screening a luminance vector by adopting the following conditions, and recording the luminance vector as a luminance vector set:
diff_still_ft(s+t)≥diff_still_ft(s)&&
diff_still_ft(s-t)≥diff_still_ft(s)&&
diff_still_ft≤300(t=1,2,...,T)
determining the sequence number difference of adjacent luminance vectors in the luminance vector set, and if the sequence number difference is between 40-150, selecting diff _ long between the sequence numbers to which the sequence number difference belongs as a part of the luminance vectors in the cascaded column vectors with the length of 4 n; traversing the set of luminance vectors to obtain a portion or portions of luminance vectors in the cascaded column vectors of length 4 n; wherein s is used to represent the s-th luminance vector traversed, T is a preset positive integer value, and T is a positive integer selected from the range from 1 to T.
In the embodiment of the present invention, in the cascaded column vector with the length of 4n, the above formula is used to screen and select a part of points satisfying the condition, so as to form a point set valley, thereby effectively reducing the computation load of subsequent operations and further reducing the computation complexity.
In step S45, a weight value of the stroboscopic statistic is determined according to the m-1 gradient values of each portion.
Further, determining a weight value of a stroboscopic statistic value according to the m-1 gradient values of each portion comprises: counting the number of gradient values which are negative numbers in the m-1 gradient values of each part; determining the weight value of the stroboscopic statistic value according to the number of the gradient values which are negative numbers; wherein, the larger the number of the gradient values which are negative numbers is, the larger the weight value of the stroboscopic statistic value is.
In a specific implementation, for example, m — 13 may be taken as an example, all points in valley are traversed, and the points are sequentially given to peak _ l and peak _ r in the traversal process, and when the peak _ r-peak _ l is between 40 and 150, the peak _ l is given to diff _ long (peak _ l)-13 values are evenly sampled between diff _ long (peak _ r), the difference between two adjacent values is made to obtain the gradient, then the number of 12 gradient values, namely the number of the values of the gradient values, which is smaller than the number of the values of the gradient values, is counted, and the number is used as the weight term of cascade stroboscopic statistic value flicker _ long accumulation.
Still further, determining whether the image has strobes based at least on the stroboscopic statistics may include: determining a stroboscopic characteristic quantization value Flk _ val according to the stroboscopic statistic value and the weighted value of the stroboscopic statistic value by adopting the following formula;
Flk_val=flicker_val×WEIGHT(flicker_long,thrd_n)/4
Figure BDA0002465969570000171
determining whether the image has stroboflash or not according to at least the stroboflash characteristic quantization value; wherein Flk _ val is used to represent a strobe characteristic quantization value, thrd _ n is used to represent a preset strobe threshold value, WEIGHT (x, y) function is used to indicate a WEIGHT value of the strobe statistical value, and x, y are used to represent input variables of the WEIGHT (x, y) function; the larger the strobe feature quantization value, the greater the probability that a strobe exists in the image.
In the embodiment of the invention, by cascading the brightness column vectors and then determining the weight value of the stroboscopic statistic value, stroboscopic can be detected according to the brightness column vectors with more frames and longer length, and the stroboscopic detection is effectively adjusted by adopting the weight value, so that the detection accuracy is effectively improved.
Further, the step of determining whether the image has a strobe or not according to at least the strobe-characteristic quantization value Flk _ val may include: determining a long-sequence strobe characteristic value Flk _ v _ val according to the strobe characteristic quantized value Flk _ val by adopting the following formula:
Figure BDA0002465969570000181
determining that the image has stroboflash according to the fact that the long-sequence stroboflash characteristic value Flk _ v _ val is larger than a preset long-sequence stroboflash characteristic threshold; wherein, Flk _ v _ val is used to indicate a long-sequence strobe characteristic value, thrd _ v is used to represent a preset strobe threshold value.
In the embodiment of the invention, the existence of the stroboflash is determined by determining the long-sequence stroboflash characteristic value Flk _ v _ val and further based on the fact that the long-sequence stroboflash characteristic value Flk _ v _ val is larger than the preset long-sequence stroboflash characteristic threshold value, the stroboflash can be further detected by adopting the longer-length luminance column vector, and the detection accuracy is further effectively improved.
In the embodiment of the invention, by setting and extracting the brightness column vector of each frame of image, determining the stroboscopic statistic value based on the brightness column vectors of the at least three frames of images, and setting the stroboscopic statistic value to indicate the stroboscopic frequency of each brightness vector, whether the image has stroboscopic can be determined only by calculating in the range of a pixel domain, and compared with the prior art that conversion operation from the pixel domain to a frequency domain needs to be involved in the processing process, the calculation complexity is higher.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an image strobe detection apparatus according to an embodiment of the present invention. The image strobe detection apparatus may include:
a providing module 51 for providing at least three consecutive frames of images;
an extracting module 52, configured to extract a luminance column vector of each frame of image, where each luminance vector in the luminance column vector is used to indicate a luminance value of a minimum unit in each row of the image;
a strobe statistic determination module 53, configured to determine a strobe statistic based on the luminance column vectors of the at least three frames of images, wherein the strobe statistic indicates the number of strobes of each of the luminance vectors;
a strobe determination module 54, configured to determine whether a strobe exists in the at least three frames of images at least according to the strobe statistics.
For the principle, specific implementation and beneficial effects of the image strobe detection apparatus, please refer to the related description of the image strobe detection method shown in the foregoing and fig. 1 to 4, and details thereof are not repeated herein.
Embodiments of the present invention also provide a storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the above method. The storage medium may be a computer-readable storage medium, and may include, for example, a non-volatile (non-volatile) or non-transitory (non-transitory) memory, and may further include an optical disc, a mechanical hard disk, a solid state hard disk, and the like.
The embodiment of the invention also provides a terminal, which comprises a memory and a processor, wherein the memory is stored with a computer program capable of running on the processor, and the processor executes the steps of the method when running the computer program. The terminal includes, but is not limited to, a mobile phone, a computer, a tablet computer and other terminal devices.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (22)

1. An image strobe detection method, comprising the steps of:
providing at least three consecutive images;
extracting a brightness column vector of each frame of image, wherein each brightness vector in the brightness column vector is used for indicating the brightness value of the minimum unit of each line in the image;
determining a strobe statistic value based on luminance column vectors of the at least three frames of images, the strobe statistic value indicating a number of strobes for each of the luminance vectors;
and determining whether stroboflash exists in the at least three frames of images at least according to the stroboflash statistic value.
2. The image strobe detection method according to claim 1, wherein each of the at least three frames of images is a bayer array image;
extracting a luminance column vector of each frame image includes:
extracting the R value, the Gr value, the Gb value and the B value of each minimum unit in each frame of image;
determining a brightness vector matrix of each frame of image according to the R value, the Gr value, the Gb value and the B value;
and determining a brightness column vector of each frame of image based on the brightness vector matrix.
3. The image strobe detection method of claim 2, wherein the luminance vector matrix of each frame image is determined according to the R value, Gr value, Gb value, and B value using the following formula:
Y=(77×R+75×(Gr+Gb)+29×B)>>10
wherein, Y is used for representing a brightness vector matrix, R is used for representing an R value matrix, Gr is used for representing a Gr value matrix, Gb is used for representing a Gb value matrix, and B is used for representing a B value matrix.
4. The image strobe detection method of claim 2, wherein determining a luminance column vector for each frame of image based on the luminance vector matrix comprises:
down-sampling each frame of image to obtain a sampled image with a preset size, wherein the preset size comprises a preset number of lines and a preset number of columns;
and performing summation operation on the brightness vectors of each row of the sampled image to generate the brightness column vector of the preset column number.
5. The image strobe detection method of claim 4, wherein the summation operation is performed on the luminance vectors of each row of the sampled image using the following formula:
Figure FDA0002465969560000021
wherein, Y (p, q) is used to represent the qth row and the qth column luminance vector of the sampled image, Y _ acc (p) is used to represent the pth row luminance vector of the sampled image, and width is used to represent the number of minimum units in each row of the sampled image.
6. The image strobe detection method of claim 1 wherein determining the strobe statistic based on the luminance column vector of at least three frames of images comprises:
subtracting the luminance column vectors of every two adjacent frames of images in the at least three frames of images to obtain at least a first 2-frame differential luminance column vector diff1 and a second 2-frame differential luminance column vector diff 2;
normalizing the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 to obtain a first normalized 2 frame differential luminance column vector and a second normalized 2 frame differential luminance column vector;
determining flag bit information;
and determining a stroboscopic statistic value at least according to the flag bit information.
7. The image strobe detection method of claim 6, wherein normalizing the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 comprises:
determining an average value diff _ mean, a maximum value diff _ max and a minimum value diff _ min of each frame of differential brightness column vectors;
the first 2 frame differential luminance column vector diff1 and the second 2 frame differential luminance column vector diff2 are normalized using the following equations:
max_sq_range
=max(diff_max2-diff_min2,diff_max1-diff_min1)
Figure FDA0002465969560000022
Figure FDA0002465969560000023
where max _ sq _ range is used to represent the maximum sequence range, Diff _ nm1 is used to represent the first normalized 2-frame differential luminance column vector after normalization, Diff _ nm2 is used to represent the second normalized 2-frame differential luminance column vector after normalization, Diff _ mean1 is used to represent the average of the first differential luminance column vector, Diff _ mean2 is used to represent the average of the second differential luminance column vector, Diff _ max1 is used to represent the maximum of the first differential luminance column vector, Diff _ max2 is used to represent the maximum of the second differential luminance column vector, Diff _ min1 is used to represent the minimum of the first differential luminance column vector, and Diff _ min2 is used to represent the minimum of the second differential luminance column vector.
8. The image strobe detection method of claim 7, wherein the flag bit information is determined using the following formula:
Figure FDA0002465969560000031
where n is used to indicate the number of luma vectors in the luma column vectors, Diff _ sign (i) is used to indicate flag information for the ith luma vector, Diff _ nm1(i) is used to indicate the ith luma vector of the first normalization-process 2-frame differential luma column vector, and Diff _ nm2(i) is used to indicate the ith luma vector of the second normalization-process 2-frame differential luma column vector.
9. The image strobe detection method as claimed in claim 6 wherein the first 2 frame differential luma column vector Diff1 employs a first filtered differential luma column vector Diff _ ft 1; and said second 2 frame differential luminance column vector Diff2 employs a second filtered differential luminance column vector Diff _ ft 2.
10. The image strobe detection method as set forth in claim 9, characterized in that each filtered differential luminance column vector Diff _ ft is determined using the following formula:
Figure FDA0002465969560000032
wherein, Diff _ ft (j) is used to represent the jth filtered differential luma column vector, filt _ len is used to represent the window length of filtering, and Diff _ nm (k + j) is used to represent the (k + j) th luma vector of each normalized 2-frame differential luma column vector.
11. The image strobe detection method of claim 9, wherein the flag bit information is determined using the following formula:
Figure FDA0002465969560000041
wherein Diff _ ft _ sign (i) is used to indicate the filter flag information of the ith luma vector, n is used to indicate the number of luma vectors in the luma column vectors, Diff _ ft1 is used to indicate the first filtered differential luma column vector, and Diff _ ft2 is used to indicate the second filtered differential luma column vector.
12. The image strobe detection method of claim 11, wherein determining the strobe statistic based at least on the flag bit information comprises:
determining one or more points where Diff _ ft1(i) and Diff _ ft2(i) intersect, denoted as filter transition points;
sequentially taking each filtering jump point as an origin, adopting each preset search window in a preset search window group, and searching the times with the value of 0 and the value of 1 in the diff _ ft _ sign (i) in the first direction and the second direction respectively, wherein the times are respectively marked as the times of taking 0 in the first direction, the times of taking 0 in the second direction, the times of taking 1 in the first direction and the times of taking 0 in the second direction;
determining the stroboscopic statistic value according to the 0 times of the first direction, the 0 times of the second direction, the 1 times of the first direction and the 0 times of the second direction obtained from each filtering transition point and each preset search window;
the first direction and the second direction are different, and the first direction and the second direction are selected from directions in which the sequence numbers of the luminance vectors in the luminance column vectors increase or decrease.
13. The image strobe detection method of claim 12, wherein determining the strobe statistics based on the 0 th, 1 st and 0 th of the first direction, the 0 th, the 1 st and the 0 th of the second direction obtained from each filtering transition point and each preset search window comprises:
for each preset search window of each filtering jump point, if | pos _ l-peak _ dist | and | neg _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x or | neg _ l-peak _ dist | and | pos _ r-peak _ dist | are simultaneously less than or equal to peak _ dist/x, determining that the count of a stroboscopic statistic value flicker _ val is increased by a preset stroboscopic weight value;
traversing each preset search window of each filtering transition point until the traversal is finished or the counted stroboscopic statistic value flicker _ val reaches a preset upper limit value;
the search window comprises pos _ l, neg _ l, peak _ dist, and x, wherein pos _ l is used for indicating that the first direction takes 1 time, pos _ r is used for indicating that the second direction takes 1 time, neg _ l is used for indicating that the first direction takes 0 time, pos _ r is used for indicating that the second direction takes 0 time, peak _ dist is used for indicating the window length of each preset search window, and x is used for indicating a preset integer value.
14. The image strobe detection method of claim 13, wherein an initial value of the strobe statistic value is 0, and the preset strobe weight value is 1.
15. The image strobe detection method as claimed in any of claims 9 to 14, characterized in that the number of images is at least five frames, and the first filtered differential luminance column vector Diff _ ft1 and the second filtered differential luminance column vector Diff _ ft2 are derived from the first three frame images;
before determining whether a strobe exists in the image according to at least the strobe statistic, the image strobe detection method further comprises:
determining a third filtered differential luma column vector Diff _ ft1 'and a fourth filtered differential luma column vector Diff _ ft 2' from the third through fifth frame images;
performing modular operation on Diff _ ft1 and Diff _ ft2, and then cascading to generate a first cascaded luminance column vector with the length of 2n, and performing modular operation on Diff _ ft1 'and Diff _ ft 2', and then cascading to generate a second cascaded luminance column vector with the length of 2 n;
cascading the first cascaded luminance column vector and the second cascaded luminance column vector to obtain a cascaded column vector diff _ long with the length of 4 n;
selecting one part or a plurality of parts of the brightness vector in the cascade column vector with the length of 4n, uniformly sampling m values for each part in sequence, and carrying out subtraction operation between every two adjacent values to obtain m-1 gradient values;
determining a weight value of a stroboscopic statistic value according to the m-1 gradient values of each part;
where n is used to represent the number of luminance vectors in the luminance column vector.
16. The image strobe detection method of claim 15, wherein selecting a portion of the luma vectors in the concatenated 4 n-length column vectors comprises:
in the cascaded column vector diff _ long with the length of 4n, screening a luminance vector by adopting the following conditions, and recording the luminance vector as a luminance vector set:
diff_still_ft(s+t)≥diff_still_ft(s)&&
diff_still_ft(s-t)≥diff_still_ft(s)&&
diff_still_ft≤300(t=1,2,...,T)
determining the sequence number difference of adjacent luminance vectors in the luminance vector set, and if the sequence number difference is between 40-150, selecting diff _ long between the sequence numbers to which the sequence number difference belongs as a part of the luminance vectors in the cascaded column vectors with the length of 4 n;
traversing the set of luminance vectors to obtain a portion or portions of luminance vectors in the cascaded column vectors of length 4 n;
wherein s is used to represent the s-th luminance vector traversed, T is a preset positive integer value, and T is a positive integer selected from the range from 1 to T.
17. The image strobe detection method of claim 15, wherein determining a weight value of a strobe statistic from the m-1 gradient values of each portion comprises:
counting the number of gradient values which are negative numbers in the m-1 gradient values of each part;
determining the weight value of the stroboscopic statistic value according to the number of the gradient values which are negative numbers;
wherein, the larger the number of the gradient values which are negative numbers is, the larger the weight value of the stroboscopic statistic value is.
18. The image strobe detection method of claim 17, wherein determining whether the image has a strobe based at least on the strobe statistics comprises:
determining a stroboscopic characteristic quantization value Flk _ val according to the stroboscopic statistic value and the weighted value of the stroboscopic statistic value by adopting the following formula;
Flk_val=flicker_val×WEIGHT(flicker_long,thrd_n)/4
Figure FDA0002465969560000071
determining whether the image has stroboflash or not according to at least the stroboflash characteristic quantization value;
wherein Flk _ val is used to represent a strobe characteristic quantization value, thrd _ n is used to represent a preset strobe threshold value, WEIGHT (x, y) function is used to indicate a WEIGHT value of the strobe statistical value, and x, y are used to represent input variables of the WEIGHT (x, y) function;
the larger the strobe feature quantization value, the greater the probability that a strobe exists in the image.
19. The image strobe detection method according to claim 18,
determining whether the image has a strobe or not according to at least the strobe feature quantization value Flk _ val includes: determining a long-sequence strobe characteristic value Flk _ v _ val according to the strobe characteristic quantized value Flk _ val by adopting the following formula:
Figure FDA0002465969560000072
determining that the image has stroboflash according to the fact that the long-sequence stroboflash characteristic value Flk _ v _ val is larger than a preset long-sequence stroboflash characteristic threshold;
wherein, Flk _ v _ val is used to indicate a long-sequence strobe characteristic value, thrd _ v is used to represent a preset strobe threshold value.
20. An image strobe detection apparatus, comprising:
a providing module for providing at least three continuous frames of images;
the extraction module is used for extracting a brightness column vector of each frame of image, wherein each brightness vector in the brightness column vector is used for indicating the brightness value of the minimum unit of each row in the image;
a strobe statistic determination module for determining a strobe statistic based on the luminance column vectors of the at least three frames of images, the strobe statistic indicating the number of strobes of each of the luminance vectors;
a strobe determination module, configured to determine whether a strobe exists in the at least three frames of images at least according to the strobe statistics.
21. A storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to perform the steps of the image strobe detection method according to any one of claims 1 to 19.
22. A terminal comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, wherein the processor executes the computer program to perform the steps of the image strobe detection method according to any one of claims 1 to 19.
CN202010336943.7A 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal Active CN111510708B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010336943.7A CN111510708B (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal
CN202210069448.3A CN114401396A (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010336943.7A CN111510708B (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202210069448.3A Division CN114401396A (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN111510708A true CN111510708A (en) 2020-08-07
CN111510708B CN111510708B (en) 2022-02-01

Family

ID=71878016

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202210069448.3A Pending CN114401396A (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal
CN202010336943.7A Active CN111510708B (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202210069448.3A Pending CN114401396A (en) 2020-04-24 2020-04-24 Image stroboscopic detection method and device, storage medium and terminal

Country Status (1)

Country Link
CN (2) CN114401396A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114354138A (en) * 2021-12-30 2022-04-15 杭州电子科技大学 Screen stroboscopic detection system and method based on image processing
CN114513609A (en) * 2020-11-17 2022-05-17 浙江大华技术股份有限公司 Camera exposure time adjusting method, image stroboscopic detection method and device
CN114513609B (en) * 2020-11-17 2024-05-10 浙江大华技术股份有限公司 Camera exposure time adjusting method, image stroboscopic detection method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346793A (en) * 2013-07-25 2015-02-11 浙江大华技术股份有限公司 Video flicker detection method and device thereof
CN104427210A (en) * 2013-08-23 2015-03-18 浙江大华技术股份有限公司 A method and device for detecting a random abnormal blinking dot
WO2018101092A1 (en) * 2016-11-30 2018-06-07 オリンパス株式会社 Imaging device and flicker determination method
CN109274984A (en) * 2018-10-16 2019-01-25 深圳开阳电子股份有限公司 Detect the method, apparatus and image processing equipment of light source scintillation in video sequence

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346793A (en) * 2013-07-25 2015-02-11 浙江大华技术股份有限公司 Video flicker detection method and device thereof
CN104427210A (en) * 2013-08-23 2015-03-18 浙江大华技术股份有限公司 A method and device for detecting a random abnormal blinking dot
WO2018101092A1 (en) * 2016-11-30 2018-06-07 オリンパス株式会社 Imaging device and flicker determination method
CN109274984A (en) * 2018-10-16 2019-01-25 深圳开阳电子股份有限公司 Detect the method, apparatus and image processing equipment of light source scintillation in video sequence

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114513609A (en) * 2020-11-17 2022-05-17 浙江大华技术股份有限公司 Camera exposure time adjusting method, image stroboscopic detection method and device
CN114513609B (en) * 2020-11-17 2024-05-10 浙江大华技术股份有限公司 Camera exposure time adjusting method, image stroboscopic detection method and device
CN114354138A (en) * 2021-12-30 2022-04-15 杭州电子科技大学 Screen stroboscopic detection system and method based on image processing

Also Published As

Publication number Publication date
CN114401396A (en) 2022-04-26
CN111510708B (en) 2022-02-01

Similar Documents

Publication Publication Date Title
US8149336B2 (en) Method for digital noise reduction in low light video
CN110602467B (en) Image noise reduction method and device, storage medium and electronic equipment
US7965323B2 (en) Flicker detecting circuit and method in image sensor
US8363123B2 (en) Image pickup apparatus, color noise reduction method, and color noise reduction program
CN111741290B (en) Image stroboscopic detection method and device, storage medium and terminal
CN107395991B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
CN110365920B (en) Image processing
CN113168669B (en) Image processing method, device, electronic equipment and readable storage medium
WO2011011445A1 (en) System and method for random noise estimation in a sequence of images
CN111510709B (en) Image stroboscopic detection method and device, storage medium and terminal
KR20100048856A (en) A device, a method, and a computer-readable storage medium for reducing noise
CN111612725A (en) Image fusion method based on contrast enhancement of visible light image
WO2008119228A1 (en) Low complexity color de-noising filter
CN111510708B (en) Image stroboscopic detection method and device, storage medium and terminal
CN116823628A (en) Image processing method and image processing device
KR101257946B1 (en) Device for removing chromatic aberration in image and method thereof
EP3363193B1 (en) Device and method for reducing the set of exposure times for high dynamic range video imaging
US20230043761A1 (en) Focus setting determination
US11861814B2 (en) Apparatus and method for sensing image based on event
KR101946946B1 (en) Apparatus and method for processing image
JP5091880B2 (en) Moving image noise removing apparatus and moving image noise removing program
CN111147693A (en) Noise reduction method and device for full-size photographed image
GB2623241A (en) Focus setting determination
US11153467B2 (en) Image processing
GB2616109A (en) Focus setting determination

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