CN113438386B - Dynamic and static judgment method and device applied to video processing - Google Patents

Dynamic and static judgment method and device applied to video processing Download PDF

Info

Publication number
CN113438386B
CN113438386B CN202110553619.5A CN202110553619A CN113438386B CN 113438386 B CN113438386 B CN 113438386B CN 202110553619 A CN202110553619 A CN 202110553619A CN 113438386 B CN113438386 B CN 113438386B
Authority
CN
China
Prior art keywords
pixel point
frame image
value
pixel
motion state
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
CN202110553619.5A
Other languages
Chinese (zh)
Other versions
CN113438386A (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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner 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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN202110553619.5A priority Critical patent/CN113438386B/en
Publication of CN113438386A publication Critical patent/CN113438386A/en
Application granted granted Critical
Publication of CN113438386B publication Critical patent/CN113438386B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/21Circuitry for suppressing or minimising disturbance, e.g. moiré or halo

Abstract

The invention discloses a dynamic and static judgment method and a device applied to video processing, wherein the method comprises the steps of acquiring at least two parameter sets corresponding to each pixel point in a current frame image; calculating a first motion state quantity value of each pixel point under each corresponding parameter group; for any pixel point, determining the weighted weight of each parameter group corresponding to the pixel point, performing weighted calculation on the first motion state quantity value of the pixel point under all the parameter groups corresponding to the pixel point to obtain the target motion state quantity value of the pixel point, and determining the dynamic and static states of the pixel point according to the target motion state quantity value of the pixel point. Therefore, the method and the device can realize the dynamic and static judgment in the digital video processing process with high precision, effectively reduce the image noise reduction cost, facilitate the acquisition of better noise reduction effect, improve the image definition and further reduce the complexity of the subsequent image processing algorithm and the difficulty of integral debugging.

Description

Dynamic and static judgment method and device applied to video processing
Technical Field
The invention relates to the field of digital video processing, in particular to a dynamic and static judgment method and device applied to video processing.
Background
With the rapid development of digital video processing technology, in the Process of advancing high definition video products, the demand for high quality Image Signal Processors (ISPs) is also increasing. As the digital video is inevitably polluted by noise in the processes of acquisition, transmission and the like, the quality of the final video is influenced, and the subsequent work of image analysis, identification and the like is also influenced. Therefore, image denoising becomes a key part in video processing, and the image denoising process has a relatively high requirement on the accuracy of the image motion and motion determination result.
In the prior art, the image dynamic and static judgment algorithms are divided into two types: 1) The dynamic and static state judgment algorithm based on local features generally judges the dynamic and static states of pixel points in an image according to local information such as gradient and texture direction or in combination with a noise curve; 2) The algorithm is based on the dynamic and static judgment algorithm of global statistical information, and the algorithm judges the dynamic and static states of points in images by calculating the mean value of difference values of front and rear frame images. Compared with the second type of algorithm, the first type of algorithm has higher accuracy of the dynamic and static determination result, but is easily affected by the highlight edge points, so that the dynamic and static state is misjudged, and the accuracy of the dynamic and static determination result is not improved. Therefore, how to realize high-precision motion and static judgment in the digital video processing process is very important.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a motion and motion determination method and device applied to video processing, which can realize motion and motion determination in a digital video processing process with high precision, effectively reduce the cost of image noise reduction, facilitate obtaining a better noise reduction effect, improve the image definition, and further reduce the complexity of a subsequent image processing algorithm and the difficulty of integral debugging.
In order to solve the above technical problem, a first aspect of the present invention discloses a motion and still determination method applied to video processing, where the method includes:
acquiring at least two parameter sets corresponding to each pixel point in a current frame image;
calculating a first motion state quantity value of each pixel point under each corresponding parameter group;
for any pixel point, determining the weighting weight of each parameter group corresponding to the pixel point, performing weighting calculation on the first motion state quantity value of the pixel point under all the parameter groups corresponding to the pixel point to obtain the target motion state quantity value of the pixel point, and determining the motion state and the static state of the pixel point according to the target motion state quantity value of the pixel point.
As an optional implementation manner, in the first aspect of the present invention, the acquiring at least two parameter sets corresponding to each pixel point in the current frame image includes:
and for any pixel point in the current frame image, acquiring a first parameter set and a second parameter set corresponding to the pixel point.
As an optional implementation manner, in the first aspect of the present invention, the acquiring, for any pixel point in the current frame image, a first parameter set and a second parameter set corresponding to the pixel point includes:
for any pixel point in the current frame image, determining a first parameter group corresponding to the pixel point according to an image noise curve, a difference value of the pixel point and an initial motion state quantity value, wherein the image noise curve is a predetermined relation curve for representing the image noise level and the pixel value in the current frame image;
and determining a second parameter group corresponding to the pixel point according to the area difference mean value of the last frame image of the current frame image, the gain coefficient corresponding to the area difference mean value, the difference value of the pixel point, the area information of the pixel point and the initial motion state quantity value.
As an alternative implementation, in the first aspect of the present invention, the initial motion state quantity value includes a first sub motion state quantity value and a second sub motion state quantity value;
for any pixel point in the current frame image, when the target motion state quantity value of the pixel point is equal to the first sub motion state quantity value, the motion state and the static state of the pixel point are motion states; when the target motion state quantity value of the pixel point is equal to the second sub motion state quantity value, the dynamic and static states of the pixel point are completely static states; when the target motion state quantity value of the pixel point is greater than the first sub motion state quantity value and less than the second sub motion state quantity value, the motion state and the static state of the pixel point are in a transition state.
As an optional implementation manner, in the first aspect of the present invention, for any pixel point in the current frame image, the difference value of the pixel point includes an original difference value of the pixel point or a modified difference value corresponding to the original difference value of the pixel point;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image;
the calculation formula of the corrected difference value corresponding to the original difference value of the pixel point is as follows:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value corresponding to the original difference value of the pixel point, diff0 is the original difference value of the pixel point, and diff0_ th is a preset difference threshold.
As an optional implementation manner, in the first aspect of the present invention, before the acquiring at least two parameter sets corresponding to each pixel point in the current frame image, the method further includes:
performing area statistical operation on a previous frame image of the current frame image to obtain an area difference mean value of the previous frame image of the current frame image;
the performing a region statistical operation on a previous frame image of the current frame image to obtain a region difference mean value of the previous frame image of the current frame image includes:
determining difference values of all pixel points in a previous frame image of the current frame image;
according to the regional information and the dynamic and static state information of all pixel points in the last frame image of the current frame image, performing regional division on all pixel points in the last frame image of the current frame image to obtain four combined regions, wherein the four combined regions comprise a moving edge region, a static edge region, a moving flat region and a static flat region;
for each combination area, determining the difference mean value of each combination area according to the difference values of all pixel points in each combination area;
and determining the difference mean value of all the combined areas as the area difference mean value of the last frame image of the current frame image.
As an optional implementation manner, in the first aspect of the present invention, before the acquiring at least two parameter sets corresponding to each pixel point in the current frame image, the method further includes:
carrying out region detection operation on any pixel point in the current frame image to obtain region information of the pixel point;
the performing a region detection operation on any pixel point in the current frame image to obtain region information of the pixel point includes:
calculating an initial noise reduction result of the pixel point, and determining high-frequency information of the pixel point according to the initial noise reduction result of the pixel point;
and determining the normalized high-frequency information of the pixel point according to the high-frequency information of the pixel point, and determining the regional information of the pixel point according to the normalized high-frequency information of the pixel point and a preset regional segmentation threshold.
As an optional implementation manner, in the first aspect of the present invention, after determining the dynamic and static states of any pixel point, the method further includes:
and performing weighted calculation on the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frame image to obtain a noise reduction result weighted value of the pixel point, and determining the noise reduction result weighted value of the pixel point as the target noise reduction result of the pixel value of the pixel point in the current frame image.
The second aspect of the present invention discloses another motion and still determination method applied to video processing, where the method includes:
for any pixel point in the current frame image, determining an original difference value of the pixel point;
determining a corrected difference value of the pixel point according to the original difference value of the pixel point;
and determining the dynamic and static states of the pixel point according to the correction difference value of the pixel point.
As an optional implementation manner, in the second aspect of the present invention, for any pixel in the current frame image, a calculation formula of the corrected difference value of the pixel is:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value of the pixel point, diff0 is an original difference value of the pixel point, and diff0_ th is a preset difference threshold;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image.
The third aspect of the present invention discloses a motion and static determination device applied to video processing, the device comprising:
the parameter set acquisition module is used for acquiring at least two parameter sets corresponding to each pixel point in the current frame image;
a motion state quantity value calculation module, configured to calculate a first motion state quantity value of each pixel under each corresponding parameter group;
and the dynamic and static state determining module is used for determining the weighting weight of each parameter group corresponding to any pixel point, performing weighting calculation on the first motion state quantity value of the pixel point under all the parameter groups corresponding to the pixel point to obtain the target motion state quantity value of the pixel point, and determining the dynamic and static states of the pixel point according to the target motion state quantity value of the pixel point.
As an optional implementation manner, in the third aspect of the present invention, a specific manner of acquiring, by the parameter set acquiring module, at least two parameter sets corresponding to each pixel point in the current frame image is as follows:
and for any pixel point in the current frame image, acquiring a first parameter set and a second parameter set corresponding to the pixel point.
As an optional implementation manner, in the third aspect of the present invention, the parameter set acquiring module includes:
the first parameter group determining submodule is used for determining a first parameter group corresponding to any pixel point in a current frame image according to an image noise curve, a difference value of the pixel point and an initial motion state quantity value, wherein the image noise curve is a predetermined relation curve used for representing the image noise level and the pixel value in the current frame image;
and the second parameter group determining submodule is used for determining a second parameter group corresponding to the pixel point according to the regional difference mean value of the last frame image of the current frame image, the gain coefficient corresponding to the regional difference mean value, the difference value of the pixel point, the regional information of the pixel point and the initial motion state quantity value.
As an optional implementation, in the third aspect of the present invention, the initial motion state quantity value comprises a first sub motion state quantity value and a second sub motion state quantity value;
for any pixel point in the current frame image, when the target motion state quantity value of the pixel point is equal to the first sub motion state quantity value, the motion state and the static state of the pixel point are motion states; when the target motion state quantity value of the pixel point is equal to the second sub motion state quantity value, the dynamic and static states of the pixel point are completely static states; when the target motion state quantity value of the pixel point is greater than the first sub motion state quantity value and less than the second sub motion state quantity value, the motion state and the static state of the pixel point are in a transition state.
As an optional implementation manner, in the third aspect of the present invention, for any pixel in the current frame image, the disparity value of the pixel includes an original disparity value of the pixel or a corrected disparity value corresponding to the original disparity value of the pixel;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image;
the calculation formula of the corrected difference value corresponding to the original difference value of the pixel point is as follows:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value corresponding to the original difference value of the pixel point, diff0 is the original difference value of the pixel point, and diff0_ th is a preset difference threshold.
As an optional implementation manner, in the third aspect of the present invention, the apparatus further includes:
the area difference mean value determining module is used for performing area statistics operation on a previous frame image of the current frame image before the parameter group acquiring module acquires at least two parameter groups corresponding to each pixel point in the current frame image to obtain an area difference mean value of the previous frame image of the current frame image;
the area difference mean value determining module performs area statistics operation on the previous frame image of the current frame image, and the specific mode of obtaining the area difference mean value of the previous frame image of the current frame image is as follows:
determining difference values of all pixel points in a previous frame image of the current frame image;
according to the regional information and the dynamic and static state information of all pixel points in the previous frame image of the current frame image, performing regional division on all pixel points in the previous frame image of the current frame image to obtain four combined regions, wherein the four combined regions comprise a moving edge region, a static edge region, a moving flat region and a static flat region;
for each combination area, determining the difference mean value of each combination area according to the difference values of all pixel points in each combination area;
and determining the difference mean value of all the combined areas as the area difference mean value of the last frame image of the current frame image.
As an optional implementation manner, in the third aspect of the present invention, the apparatus further includes:
the area information determining module is used for carrying out area detection operation on any pixel point in the current frame image before the parameter group acquiring module acquires at least two parameter groups corresponding to each pixel point in the current frame image, so as to obtain the area information of the pixel point;
the region information determining module performs region detection operation on any pixel point in the current frame image, and the specific mode for obtaining the region information of the pixel point is as follows:
calculating an initial noise reduction result of the pixel point, and determining high-frequency information of the pixel point according to the initial noise reduction result of the pixel point;
and determining the normalized high-frequency information of the pixel point according to the high-frequency information of the pixel point, and determining the regional information of the pixel point according to the normalized high-frequency information of the pixel point and a preset regional segmentation threshold.
As an optional implementation manner, in the third aspect of the present invention, the apparatus further includes:
and the target noise reduction result determining module is used for performing weighted calculation on the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frame image after the dynamic and static state determining module determines the dynamic and static states of the pixel point for any pixel point to obtain a noise reduction result weighted value of the pixel point, and determining the noise reduction result weighted value of the pixel point as the target noise reduction result of the pixel value of the pixel point in the current frame image.
The fourth aspect of the present invention discloses another motion and static determination apparatus applied to video processing, the apparatus comprising:
the original difference value determining module is used for determining the original difference value of any pixel point in the current frame image;
the correction difference value determining module is used for determining the correction difference value of the pixel point according to the original difference value of the pixel point;
and the dynamic and static state determining module is used for determining the dynamic and static states of the pixel point according to the corrected difference value of the pixel point.
As an optional implementation manner, in the fourth aspect of the present invention, for any pixel in the current frame image, the calculation formula for determining the corrected disparity value of the pixel by the corrected disparity value determining module is:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value of the pixel point, diff0 is an original difference value of the pixel point, and diff0_ th is a preset difference threshold; the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image.
The fifth aspect of the present invention discloses another motion and static determination apparatus applied to video processing, the apparatus comprising:
a memory storing executable program code;
a processor coupled with the memory;
the processor calls the executable program code stored in the memory to execute part or all of the steps of the motion and static judgment method applied to video processing disclosed by the first aspect or the second aspect of the invention.
A sixth aspect of the present invention discloses a computer storage medium, which stores computer program codes, and when the computer program codes are called, the computer program codes are used for executing part or all of the steps of the motion and static determination method applied to video processing disclosed in the first aspect or the second aspect of the present invention.
Compared with the prior art, the invention has the following beneficial effects:
the invention discloses a dynamic and static judgment method and a device applied to video processing, wherein the method comprises the steps of obtaining at least two parameter groups corresponding to each pixel point in a current frame image; calculating a first motion state quantity value of each pixel point under each corresponding parameter group; for any pixel point, determining the weighted weight of each parameter group corresponding to the pixel point, performing weighted calculation on the first motion state quantity value of the pixel point under all the parameter groups corresponding to the pixel point to obtain the target motion state quantity value of the pixel point, and determining the dynamic and static states of the pixel point according to the target motion state quantity value of the pixel point. Therefore, the method and the device can realize the dynamic and static judgment in the digital video processing process with high precision, effectively reduce the cost of image noise reduction, are beneficial to obtaining better noise reduction effect, improve the image definition, and further reduce the complexity of the subsequent image processing algorithm and the difficulty of integral debugging.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow diagram of a dynamic and static determination method applied to video processing according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of another motion and static determination method applied to video processing according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart of another motion and static determination method applied to video processing according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a motion and static determination apparatus applied to video processing according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another motion and static determination apparatus applied to video processing according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of another motion and static determination apparatus applied to video processing according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of another motion and static determination apparatus applied to video processing according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, apparatus, article, or article that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or article.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
The invention relates to a motion and static judgment method and device applied to video processing, which can realize motion and static judgment in the digital video processing process with high precision. One or more embodiments of the present invention may be applied to any scene that needs to perform motion and still determination, for example, an image and video capturing device (a motion video camera, a motion camera, etc.), an image and video processing device (an image processing chip, an image processing server, etc.), an image and video playing device (a hardware display, a software player, etc.), etc., but it should be noted that the embodiments of the present invention are not limited thereto.
Example one
Referring to fig. 1, fig. 1 is a schematic flow chart of a motion and static determination method applied to video processing according to an embodiment of the present invention. The method may be applied to a motion determination device, which may be an independent device or integrated in a video processing device, and the embodiment of the present invention is not limited. As shown in fig. 1, the motion and still determination method applied to video processing may include the following operations:
101. and acquiring at least two parameter sets corresponding to each pixel point in the current frame image.
In the embodiment of the present invention, in an analysis process of the motion and static determination, a parameter set corresponding to each pixel point in the current frame image is obtained, where the number of the parameter sets corresponding to each pixel point may be the same or different, and in a specific processing process, a plurality of parameter sets may be selected according to actual requirements for analysis.
It should be noted that the pixel points in the embodiment of the present invention include a division lattice of an image, for example, the pixel points may be original pixel points of the image, sub-pixel points in an image processing process, or pixel blocks composed of a plurality of pixel points (original pixel points or sub-pixel points), which is not limited in the embodiment of the present invention.
102. And calculating a first motion state quantity value of each pixel point under each corresponding parameter group.
In the embodiment of the present invention, the method for calculating the first motion state quantity value of each pixel under each corresponding parameter group may directly perform calculation according to the attribute parameters of the pixel in step 101, or perform calculation after dividing the pixels in the image by combining a sampling difference algorithm, an image super-resolution reconstruction algorithm, and the like of the image, which is not limited in the embodiment of the present invention. The first motion state quantity value merely indicates that there is a corresponding first motion state quantity value in each calculated parameter group, and is used to distinguish other motion state quantity values in the embodiment of the present invention, and does not indicate that the corresponding first motion state quantity values in each parameter group are the same value, nor that the method for calculating the first motion state quantity values is the same method.
103. For any pixel point, determining the weighted weight of each parameter group corresponding to the pixel point, performing weighted calculation on the first motion state quantity value of the pixel point under all the parameter groups corresponding to the pixel point to obtain the target motion state quantity value of the pixel point, and determining the dynamic and static states of the pixel point according to the target motion state quantity value of the pixel point.
In the embodiment of the invention, after determining the weighting weight coefficient of each parameter group corresponding to each pixel point for any pixel point in the current frame image, according to the respective weighting coefficient, the first motion state quantity value of the pixel point under all the parameter groups corresponding to the pixel point determined according to the step 102 is subjected to weighting calculation to obtain the target motion state quantity value of the pixel point, and the motion state and the static state of the pixel point are determined according to the target motion state quantity value of the pixel point, so that the motion state and the static state of all the pixel points in the current frame image can be finally determined, and then the motion state and the static state determination in the video processing process can be completed.
In the embodiment of the present invention, for example, two parameter sets are used for analysis, and then the weighted calculation formula of the target motion state quantity value may be:
k(i)=(b*k_avg(i)+(256-b)*k_ref(i))/256;
wherein k (i) is the target motion state quantity value, b is the weight value of one of the two parameter sets, k _ avg (i) is the first motion state quantity value of the parameter set, (256-b) is the weight value of the other of the two parameter sets, and k _ ref (i) is the first motion state quantity value of the parameter set; it should be noted that 256 is only used as an exemplary value, and may be adjusted according to actual situations in practical applications, and the embodiment of the present invention is not limited.
In an optional embodiment, for any pixel point, after determining the dynamic and static states of the pixel point, the method may further include:
and performing weighted calculation on the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frames of images to obtain a noise reduction result weighted value of the pixel point, and determining the noise reduction result weighted value of the pixel point as the target noise reduction result of the pixel value of the pixel point in the current frame image.
In the embodiment of the invention, the final dynamic and static judgment result is used for guiding the final dynamic and static weighting output, and the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frames of images are subjected to weighted calculation to obtain the noise reduction result weighted value of the pixel point. For example, when the noise reduction result of the pixel value in the current frame image and the target noise reduction result of the pixel value in the previous frame image are selected, for the current frame T, the weighted output formula is as follows:
out T =((kmax-k+1)*nlm T +k*out T-1 )/(kmax+1);
among them, out T The target noise reduction result of the pixel point in the current frame image is (kmax-k + 1) the weight of the NLM noise reduction result of the pixel point obtained after the NLM noise reduction treatment, out T-1 And k is the weight corresponding to the target noise reduction result of the pixel point in the previous frame image.
Therefore, the dynamic and static judgment method applied to video processing can be used for distributing different dynamic and static judgment methods based on various dynamic and static judgment methods and different weight ratios, further realizing dynamic and static judgment in the digital video processing process at high precision, effectively avoiding the problem of poor stability caused by single characteristic, and further obtaining a better noise reduction result. Furthermore, a method of only caching one frame of image is adopted, so that the hardware cost is reduced, the processing efficiency is improved, the noise reduction result of the current frame can be stored and transmitted to the next frame of noise reduction as a reference, different weight coefficients are adjusted according to application requirements of different scenes, and a better noise reduction result can be obtained.
Example two
Referring to fig. 2, fig. 2 is a schematic flowchart of another motion and static determination method applied to video processing according to an embodiment of the present disclosure. The method may be applied to a motion and motion determination device, which may be an independent device or integrated in a video processing device, and the embodiment of the present invention is not limited. The embodiment of the invention preferably obtains two parameter sets corresponding to each pixel point in the current frame image, wherein the two parameter sets comprise a first parameter set and a second parameter set, and the two parameter sets can realize the dynamic and static judgment in the digital video processing process with high precision, can also improve the efficiency of the dynamic and static judgment, can effectively avoid the problem of poor stability caused by single characteristics, enhance the stability of the dynamic and static judgment, and further quickly obtain a better noise reduction effect.
As shown in fig. 2, the motion and still determination method applied to video processing may include the following operations:
201. and carrying out region statistical operation on the previous frame image of the current frame image to obtain a region difference mean value of the previous frame image of the current frame image.
In the embodiment of the present invention, performing a region statistics operation on a previous frame image of a current frame image to obtain a region difference average of the previous frame image of the current frame image includes:
determining difference values of all pixel points in a previous frame image of the current frame image;
according to the regional information and the dynamic and static state information of all pixel points in the previous frame image of the current frame image, performing regional division on all pixel points in the previous frame image of the current frame image to obtain four combined regions, wherein the four combined regions comprise a moving edge region, a static edge region, a moving flat region and a static flat region;
for each combination area, determining the difference mean value of each combination area according to the difference values of all pixel points in each combination area;
and determining the difference mean value of all the combined areas as the area difference mean value of the previous frame image of the current frame image.
In the embodiment of the present invention, for each frame of image in a video, different dimensions are first divided into different regions, which are combined into different regions, wherein it is preferable that the four types of difference values obtained by dividing the image into two dimensions, namely edge (edge)/flat (flat), motion (mv)/still (st), are divided into four types of regions. Meanwhile, after the regions are determined, the difference values of all pixel points in each region are respectively counted, the difference values of all pixel points in each region are averaged, difference average value information corresponding to each region is obtained, and all the obtained difference average value information is transmitted to the next frame for reference.
202. And carrying out region detection operation on any pixel point in the current frame image to obtain region information of the pixel point.
In the embodiment of the present invention, performing a region detection operation on any pixel point in a current frame image to obtain region information of the pixel point includes:
calculating an initial noise reduction result of the pixel point, and determining high-frequency information of the pixel point according to the initial noise reduction result of the pixel point;
and determining the normalized high-frequency information of the pixel point according to the high-frequency information of the pixel point, and determining the region information of the pixel point according to the normalized high-frequency information of the pixel point and a preset region segmentation threshold.
In the embodiment of the invention, the edge area mainly comprises the image contour information which mainly comprises the edge area, the gray scale change fluctuation of the edge area and the neighborhood is large, so that the high-frequency component value of the area is high after filtering, and the high-frequency component value of the flat area is relatively low due to the high similarity of the flat area and the neighborhood. Therefore, the preliminary region information of the current frame image can be acquired by combining the high-frequency information after NLM filtering. In conclusion, the regional information can be directly acquired by the intermediate process of airspace NLM noise reduction, and the high-frequency information acquisition formula is as follows:
hp=|nlm-f|;
after high-frequency information is normalized, the specific formula is as follows:
region=(hp-MIN(hp))/(MAX(hp)-MIN(hp));
MAX (hp) and MIN (hp)) respectively carry out maximum value and minimum value operation on the high-frequency information;
for the convenience of calculation, the region information may be usually subjected to some quantization and threshold segmentation process to obtain a flat region and an edge region, and the results are as follows:
Figure BDA0003076275310000131
wherein th _ edge is an edge region division threshold, th _ flat is a flat region division threshold, a preferred region division threshold can be set to 1/4, and the rest regions are not processed. It should be noted that better effects can be obtained by replacing NLM filtering with other non-local filters or noise reduction filters based on a multi-scale pyramid, and which filtering method is specifically selected is not limited in the embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, steps 201 and 202 are not executed sequentially, and step 201 may be executed first and then step 202 may be executed, step 202 may be executed first and then step 201 may be executed, and step 201 and step 202 may also be executed at the same time, which is not limited in the embodiment of the present invention.
203. And for any pixel point in the current frame image, determining a first parameter group corresponding to the pixel point according to an image noise curve, the difference value of the pixel point and the initial motion state quantity value, wherein the image noise curve is a relationship curve which is predetermined and used for representing the image noise level and the pixel value in the current frame image.
In the embodiment of the present invention, for the first parameter set of any pixel, the image noise curve is a function representing a relationship between an image noise level and a pixel value, and may be obtained in advance through calibration by a grayscale card or through real-time calculation. The image noise level of the pixel point, the difference value of the pixel point and the initial motion state quantity value determined by the image noise curve are combined into a first parameter group, and a first motion state quantity value corresponding to the first parameter group can be further determined. For example, for a point with a difference value diff (i) in an image, a motion and motion determination threshold is set, and an example of a result of a first motion state quantity value corresponding to a specific first parameter group is as follows:
Figure BDA0003076275310000141
wherein, k _ ref (i) is a first motion state quantity value corresponding to the first parameter set, diff (i) is a difference value of the pixel point in the current frame image, kmax is a maximum value in the initial state quantity values, 1 is a minimum value of the initial state quantity values, th (i) is an image noise level corresponding to the pixel value of the pixel point determined in the image noise curve, and th _ gain is a gain coefficient for adjusting the specific motion and static determination threshold value.
204. And determining a second parameter group corresponding to the pixel point according to the area difference mean value of the previous frame image of the current frame image, the gain coefficient corresponding to the area difference mean value, the difference value of the pixel point, the area information of the pixel point and the initial motion state magnitude value.
In the embodiment of the present invention, for the second parameter set of any pixel, the second parameter set is composed of the area difference mean of the previous frame image of the current frame image, the gain coefficient corresponding to the area difference mean, the difference value of the pixel, the area information of the pixel, and the initial motion state quantity, and it should be noted that when the first motion state quantity corresponding to the second parameter set is determined, the area difference mean (for example, edge (edge)/flat (flat), motion (mv)/still (st) of the previous frame image of the current frame image is divided into four types of difference values, i.e., the motion edge area difference mean, the still edge area difference mean, the motion flat area difference mean, and the still flat area difference mean) and the gain coefficient corresponding to the area difference mean are selected to be associated with the area information of the pixel in the current frame image. For example, for a point with a difference value diff (i) in an image, taking the region information of the pixel point as an edge region, based on the region difference mean of the previous frame image of the current frame image, an example of the result of the first motion state quantity value corresponding to the specific second parameter group is as follows:
Figure BDA0003076275310000142
wherein, k _ avg (i) is a first motion state magnitude corresponding to the first parameter set, diff (i) is a difference value of the pixel in the current frame image, kmax is a maximum value of the initial state magnitude, 1 is a minimum value of the initial state magnitude, diff _ edge _ mv is a motion edge region difference mean value, diff _ edge _ st is a static edge region difference mean value, th _ gain1 is a gain coefficient corresponding to the motion edge region difference mean value, and th _ gain2 is a gain coefficient corresponding to the static edge region difference mean value.
In the embodiment of the present invention, the calculation methods in step 203 and step 204 are preferable methods, and based on the calculation method derived methods, for example, for a point with a difference value diff (i) in an image, when the area information of the pixel point is a flat area, a calculation formula of a first motion state quantity value corresponding to a specific second parameter group can be easily obtained, and these methods also should fall within the coverage of the present invention.
It should be noted that, in the embodiments of the present invention, it is preferable that the decision is based on the static and dynamic states of the noise curve, and the decision result based on the area statistic is used as an additional reference to correct the static and dynamic states, so that the problem of poor stability caused by a single feature can be effectively avoided.
Therefore, the dynamic and static judgment method applied to video processing, which is described by the invention, is combined with the dynamic and static judgment method based on the noise curve and the dynamic and static judgment method based on the region statistic value, so that the dynamic and static judgment can be more effectively realized in the image processing process with high precision, the gain coefficient can be adjusted and set as required, the adaptability to complex noisy scenes is improved, unnatural phenomena such as more obvious smear or flicker, inconsistent regions and the like are effectively avoided, and the noise reduction effect is improved.
It should be noted that, in the embodiment of the present invention, the step 203 and the step 204 are not executed in sequence, the step 203 may be executed first and then the step 204 is executed, the step 204 may be executed first and then the step 203 may be executed, and the step 203 and the step 204 may also be executed at the same time, which is not limited in the embodiment of the present invention.
205. And calculating a first motion state quantity value of each pixel point under each corresponding parameter group.
206. For any pixel point, determining the weighting weight of each parameter set corresponding to the pixel point, performing weighting calculation on the first motion state quantity value of the pixel point under all the parameter sets corresponding to the pixel point to obtain the target motion state quantity value of the pixel point, and determining the dynamic and static states of the pixel point according to the target motion state quantity value of the pixel point.
In the embodiment of the present invention, for other detailed descriptions of step 205 and step 206, please refer to the detailed descriptions of step 102 and step 103 in the first embodiment, which is not described again in the embodiment of the present invention.
207. And performing weighted calculation on the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frame image to obtain a noise reduction result weighted value of the pixel point, and determining the noise reduction result weighted value of the pixel point as the target noise reduction result of the pixel value of the pixel point in the current frame image.
In the embodiment of the present invention, the final motion and motion determination result is used to guide the final motion and motion weighted output, and the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frame image are weighted and calculated to obtain the noise reduction result weighted value of the pixel point, for the current frame T, the weighted output formula of the noise reduction result weighted value of the pixel point is as follows:
out T =((kmax-k+1)*nlm T +k*out T-1 )/(kmax+1);
out of the T The target noise reduction result of the pixel point in the current frame image is obtained, and the value (kmax-k + 1) is the pixel point obtained after NLM noise reduction treatmentWeight of the NLM noise reduction result of (1), out T-1 And k is the weight corresponding to the target noise reduction result of the pixel point in the previous frame image.
Therefore, the dynamic and static judgment method applied to video processing described in the invention can allocate different dynamic and static judgment methods based on two dynamic and static judgment methods and realize dynamic and static judgment in the digital video processing process with high precision, can effectively avoid the problem of poor stability caused by single characteristic, further reduce software calculated amount and hardware cost, improve processing efficiency, and is beneficial to reducing the complexity and debugging difficulty of a subsequent algorithm.
In this optional embodiment, further optionally, the initial motion state magnitude may comprise a first sub motion state magnitude and a second sub motion state magnitude;
for any pixel point in the current frame image, when the target motion state quantity value of the pixel point is equal to the first sub motion state quantity value, the motion state and the static state of the pixel point are motion states; when the target motion state quantity value of the pixel point is equal to the second sub-motion state quantity value, the motion state and the static state of the pixel point are completely static states; when the target motion state quantity value of the pixel point is greater than the first sub-motion state quantity value and less than the second sub-motion state quantity value, the dynamic and static states of the pixel point are in a transition state. It should be noted that the dynamic and static states respectively represented by the first sub motion state quantity value and the second sub motion state quantity value described in the present invention are a motion state and a completely static state, in an actual application process, the dynamic and static states respectively represented by the first sub motion state quantity value and the second sub motion state quantity value may be exchanged according to an actual situation, meanwhile, the embodiment of the present invention does not limit the numerical interval between the intermediate values of the first sub motion state quantity value and the second sub motion state quantity value, that is, the value greater than the first sub motion state quantity value and less than the second sub motion state quantity value may be continuously changed or discretely changed, and the embodiment of the present invention is not limited.
Therefore, the dynamic and static judgment method applied to video processing provided by the invention adopts a transition state to calibrate the dynamic and static states besides the motion state and the completely static state, avoids the phenomena of errors and inconsistent noise reduction caused by a binary judgment mode of non-motion, namely static, and can effectively improve the fineness of dynamic and static judgment and finally ensure that a better noise reduction effect is obtained.
Optionally, for any pixel point in the current frame image, the difference value of the pixel point includes an original difference value of the pixel point or a corrected difference value corresponding to the original difference value of the pixel point;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image;
the calculation formula of the corrected difference value corresponding to the original difference value of the pixel point is as follows:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value corresponding to the original difference value of the pixel point, diff0 is the original difference value of the pixel point, diff0_ th is a preset difference threshold, MAX (diff 0, diff0_ th) is the maximum value of diff0 and diff0_ th, and MIN (d 2d, rec) is the minimum value of diff0 and diff0_ th.
Therefore, the dynamic and static judgment method applied to video processing can further improve the precision of dynamic and static judgment and finally ensure that a better noise reduction effect is obtained. In the embodiment of the present invention, diff0_ th is a preset difference threshold used for adjusting the final difference value correction result, and the effect of adding multiplication with MAX (diff 0, diff0_ th) is used for protecting the difference value of the white highlight area in the low-illumination scene from being excessively weakened, so as to avoid causing smear. And the dynamic and static judgment is carried out by combining the corrected difference value, so that the influence of the edge can be effectively reduced, particularly the interference (inter-frame flicker and the like) of the highlight edge is reduced, and a better noise reduction effect is realized.
Still further optionally, the method for calculating the NLM noise reduction result of obtaining the pixel value of the pixel point in the image may include:
taking any pixel point i of an image f to be denoised as a center, respectively extracting a neighborhood block omega (i) with a window size of N x N and a matching window P (i) with a window size of M x M and M < N, traversing and detecting an image block P (j) with higher similarity with P (i) in the neighborhood block and calculating a weighting coefficient w (i, j) of the image block P (j), wherein the specific formula is as follows:
Figure BDA0003076275310000171
Figure BDA0003076275310000172
wherein d (i, j) is a Gaussian weighted Euclidean distance between image blocks, h is a preset parameter for controlling the degree of smoothness, G a Is a Gaussian function with standard deviation a;
in summary, the NLM noise reduction of the pixel value f (i) results as follows:
Figure BDA0003076275310000173
wherein the formula for C (i) is
Figure BDA0003076275310000174
Therefore, the dynamic and static judgment method applied to video processing disclosed by the invention can reduce the calculated amount and improve the efficiency of the dynamic and static judgment process by dividing the region information through the noise reduction algorithm, can realize the dynamic and static judgment in the digital video processing process with high precision, can improve the universality and the stability of the dynamic and static judgment method, reduce the complexity of calculation in the dynamic and static judgment process, improve the processing efficiency of image noise reduction, effectively reduce the cost of image noise reduction, is beneficial to obtaining a better noise reduction effect, improves the image definition, and further can reduce the complexity of a subsequent image processing algorithm and the difficulty of integral debugging. Dynamic and static judgment is carried out by combining the corrected difference values, the influence of the edge can be effectively reduced, particularly the interference (inter-frame flicker and the like) of the highlight edge is reduced, different weight coefficients can be adjusted according to the application requirements of different scenes, the universality and the applicability are improved, and further a better noise reduction result can be obtained.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic flow chart of another motion and static determination method applied to video processing according to an embodiment of the present invention. The method may be applied to a motion and motion determination device, which may be an independent device or integrated in a video processing device, and the embodiment of the present invention is not limited. As shown in fig. 3, the motion and still determination method applied to video processing may include the following operations:
301. for any pixel point in the current frame image, determining the original difference value of the pixel point;
in the embodiment of the present invention, for any pixel point in the current frame image, the original difference value of the pixel point is determined, where the difference value may be a difference value between an original pixel value of the pixel point in the current frame and an original pixel value of the pixel point in the previous frame, or a difference value between a noise reduction pixel value of the pixel point in the current frame and a noise reduction pixel value of the pixel point in the previous frame, or a difference value between other pixel values, and the embodiment of the present invention is not limited.
302. Determining a corrected difference value of the pixel point according to the original difference value of the pixel point;
in the embodiment of the invention, for any pixel point in the current frame image, the corrected difference value of the pixel point is calculated according to a preset formula and the original difference value of the pixel point.
303. And determining the dynamic and static states of the pixel point according to the correction difference value of the pixel point.
In the embodiment of the invention, after the correction difference value of the pixel point is calculated, the dynamic and static states of the pixel point are determined according to the drinking relationship between the correction difference value and the dynamic and static states of the pixel point.
Therefore, according to the dynamic and static judgment method applied to video processing, the difference value with higher precision can be obtained through further correcting the difference value of the pixel point, the corresponding relation between the corrected difference value and the dynamic and static states is improved, the influence of the edge area on dynamic and static judgment can be avoided, and the influence of the highlight edge on the noise reduction effect is improved.
In an optional embodiment, for any pixel in the current frame image, a calculation formula of the corrected difference value of the pixel is as follows:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value of the pixel point, diff0 is an original difference value of the pixel point, and diff0_ th is a preset difference threshold;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image.
Therefore, the dynamic and static judgment method applied to video processing disclosed by the invention can further improve the accuracy of dynamic and static judgment and finally ensure that a better noise reduction effect is obtained. In the embodiment of the invention, diff0_ th is a preset difference threshold value and is used for adjusting the final difference value correction result, and the effect of adding multiplication with MAX (diff 0, diff0_ th) is used for protecting the difference value of a white highlight area under a low-illumination scene from being excessively weakened, so that the phenomenon of smear is avoided. The dynamic and static judgment is carried out by combining the corrected difference value, the judgment of the dynamic and static states can be realized with higher precision, the influence of the edge can be effectively reduced, particularly the interference (inter-frame flicker and the like) of the highlight edge is reduced, and the better noise reduction effect is realized.
Example four
Referring to fig. 4, fig. 4 is a schematic structural diagram of a motion and static determination apparatus for video processing according to an embodiment of the present disclosure. It should be noted that, the motion and motion determination apparatus refers to the steps in the motion and motion determination method applied to video processing described in the first embodiment, and detailed description is not repeated in this embodiment, as shown in fig. 4, the motion and motion determination apparatus applied to video processing may include:
a parameter set obtaining module 401, configured to obtain at least two parameter sets corresponding to each pixel point in the current frame image;
a motion state quantity calculation module 402, configured to calculate a first motion state quantity value of each pixel under each corresponding parameter group;
the dynamic and static state determining module 403 is configured to determine, for any pixel point, a weighted weight of each parameter set corresponding to the pixel point, perform weighted calculation on a first motion state quantity value of the pixel point under all the parameter sets corresponding to the pixel point, obtain a target motion state quantity value of the pixel point, and determine the dynamic and static states of the pixel point according to the target motion state quantity value of the pixel point.
Therefore, the dynamic and static judgment device applied to video processing can distribute different dynamic and static judgment methods based on various dynamic and static judgment methods and different weight ratios, further realize dynamic and static judgment in the digital video processing process at high precision, effectively avoid the problem of poor stability caused by single characteristic, and further obtain a better noise reduction result.
In an alternative embodiment, the specific way for the parameter set obtaining module 401 to obtain at least two parameter sets corresponding to each pixel point in the current frame image is as follows:
and for any pixel point in the current frame image, acquiring a first parameter set and a second parameter set corresponding to the pixel point.
The embodiment of the invention preferably obtains two parameter sets corresponding to each pixel point in the current frame image, wherein the two parameter sets comprise a first parameter set and a second parameter set, and the two parameter sets can realize the dynamic and static judgment in the digital video processing process with high precision, can also improve the efficiency of the dynamic and static judgment, can effectively avoid the problem of poor stability caused by single characteristics, enhance the stability of the dynamic and static judgment, and further quickly obtain a better noise reduction effect. It should be noted that, in the embodiments of the present invention, reference is made to the steps in the motion and still determination method applied to video processing described in the second embodiment, and detailed description is not repeated in this embodiment.
In another alternative embodiment, as shown in fig. 5, the parameter group obtaining module 401 includes:
the first parameter set determining submodule 4011 is configured to determine, for any pixel point in the current frame image, a first parameter set corresponding to the pixel point according to an image noise curve, a difference value of the pixel point, and an initial motion state quantity value, where the image noise curve is a predetermined relationship curve used to represent an image noise level and a pixel value in the current frame image;
the second parameter set determining submodule 4012 is configured to determine a second parameter set corresponding to the pixel point according to the area difference average value of the previous frame of image of the current frame of image, the gain coefficient corresponding to the area difference average value, the difference value of the pixel point, the area information of the pixel point, and the initial motion state quantity value.
Therefore, the moving and static judgment device applied to video processing described by the invention can be used for effectively realizing high-precision moving and static judgment in the image processing process by combining the moving and static judgment method based on the noise curve and the moving and static judgment method based on the region statistical value, can be set as required by adjusting the gain coefficient, improves the adaptability to complex noisy scenes, effectively avoids more obvious artifacts such as smear or flicker and region inconsistency and improves the noise reduction effect.
Yet further optionally, the initial motion state magnitude comprises a first sub-motion state magnitude and a second sub-motion state magnitude;
for any pixel point in the current frame image, when the target motion state quantity value of the pixel point is equal to the first sub motion state quantity value, the motion state and the static state of the pixel point are motion states; when the target motion state quantity value of the pixel point is equal to the second sub motion state quantity value, the dynamic and static states of the pixel point are completely static states; and when the target motion state quantity value of the pixel point is greater than the first sub motion state quantity value and less than the second sub motion state quantity value, the dynamic and static states of the pixel point are in a transition state.
Therefore, the dynamic and static judgment device applied to video processing provided by the invention not only adopts the dynamic and static state calibration mode of the motion state and the complete static state, but also introduces the transition state to calibrate the dynamic and static states, avoids the phenomena of errors and inconsistent noise reduction caused by a binary judgment mode of non-dynamic and static states, can effectively improve the fineness of dynamic and static judgment, and finally ensures that a better noise reduction effect is obtained.
Still further optionally, at any pixel point in the current frame image, the difference value of the pixel point includes an original difference value of the pixel point or a corrected difference value corresponding to the original difference value of the pixel point;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image;
the calculation formula of the corrected difference value corresponding to the original difference value of the pixel point is as follows:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value corresponding to the original difference value of the pixel point, diff0 is the original difference value of the pixel point, and diff0_ th is a preset difference threshold.
Therefore, the dynamic and static judgment device applied to video processing can further improve the precision of dynamic and static judgment and finally ensure that a better noise reduction effect is obtained. In the embodiment of the present invention, diff0_ th is a preset difference threshold used for adjusting the final difference value correction result, and the effect of adding multiplication with MAX (diff 0, diff0_ th) is used for protecting the difference value of the white highlight area in the low-illumination scene from being excessively weakened, so as to avoid causing smear. And dynamic and static judgment is carried out by combining the corrected difference values, so that the influence of the edge can be effectively reduced, particularly the interference (inter-frame flicker and the like) of the highlight edge is reduced, and a better noise reduction effect is realized.
Still further optionally, the motion and motion determination apparatus applied to video processing may further include:
a region difference mean determining module 404, configured to perform region statistics on a previous frame image of the current frame image before the parameter set obtaining module obtains at least two parameter sets corresponding to each pixel point in the current frame image, so as to obtain a region difference mean of the previous frame image of the current frame image;
the area difference average value determining module 404 performs area statistics on the previous frame image of the current frame image, and the specific manner of obtaining the area difference average value of the previous frame image of the current frame image is as follows:
determining difference values of all pixel points in a previous frame image of the current frame image;
according to the regional information and the dynamic and static state information of all pixel points in a previous frame image of a current frame image, performing regional division on all the pixel points in the previous frame image of the current frame image to obtain four combined regions, wherein the four combined regions comprise a motion edge region, a static edge region, a motion flat region and a static flat region;
for each combination area, determining the difference mean value of each combination area according to the difference values of all pixel points in each combination area;
and determining the difference mean value of all the combined areas as the area difference mean value of the previous frame image of the current frame image.
Therefore, the dynamic and static judgment device applied to video processing, which is described by the invention, only needs to perform dynamic and static judgment analysis by combining the region statistic value on the basis of caching one frame of image, so that hardware resources and cost are saved, the calculation amount is reduced by pre-dividing the region and then performing the dynamic and static judgment analysis, the complexity of a subsequent algorithm and the adjustment and debugging difficulty are reduced, and the accuracy and precision of the dynamic and static judgment are improved more effectively.
Still further optionally, the motion and motion determination apparatus applied to video processing may further include:
a region information determining module 405, configured to perform region detection operation on any pixel point in the current frame image before the parameter set obtaining module obtains at least two parameter sets corresponding to each pixel point in the current frame image, so as to obtain region information of the pixel point;
the region information determining module 405 performs region detection operation on any pixel point in the current frame image, and the specific manner for obtaining the region information of the pixel point is as follows:
calculating an initial noise reduction result of the pixel point, and determining high-frequency information of the pixel point according to the initial noise reduction result of the pixel point;
and determining the normalized high-frequency information of the pixel point according to the high-frequency information of the pixel point, and determining the region information of the pixel point according to the normalized high-frequency information of the pixel point and a preset region segmentation threshold.
In this embodiment of the present invention, the region information determining module 405 may not only process the current frame image, but also perform a region detection operation on the previous frame image to obtain the region information of the previous frame image, and send the region information of the previous frame image to the region difference average determining module 404, so that the region difference average determining module 404 determines the region difference average of the previous frame image. Correspondingly, the area difference average determining module 404 may also send intermediate information (area information, etc.) generated in the process of determining the area difference average to the area information determining module 405, and then the area information determining module 405 determines final area information of the image, which is not limited in the embodiment of the present invention.
Therefore, the dynamic and static judgment device applied to video processing, which is described by the invention, combines a noise reduction algorithm to obtain the preliminary region information of the frame image, and then counts the average value information of different regions, so that the calculation amount is reduced, the precision of dynamic and static judgment is improved, and the reliability and stability of the dynamic and static judgment method are ensured.
Still further optionally, the motion and motion determination apparatus applied to video processing may further include:
the target noise reduction result determining module 406 is configured to, for any pixel point, perform weighted calculation on the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frame image after the dynamic and static state determining module determines the dynamic and static state of the pixel point, obtain a noise reduction result weighted value of the pixel point, and determine the noise reduction result weighted value of the pixel point as the target noise reduction result of the pixel value of the pixel point in the current frame image.
Therefore, the dynamic and static judgment device applied to video processing stores the noise reduction result of the current frame and transmits the noise reduction result to the next frame as a reference, and different weight coefficients can be adjusted according to application requirements of different scenes, so that a better noise reduction result can be obtained
Still further optionally, the method for calculating the NLM noise reduction result of the area information determining module 405 by obtaining the pixel value of the pixel point in the image may include:
taking any pixel point i of an image f to be denoised as a center, respectively extracting a neighborhood block omega (i) with a window size of N x N and a matching window P (i) with a window size of M x M and M < N, traversing and detecting an image block P (j) with higher similarity with P (i) in the neighborhood block and calculating a weighting coefficient w (i, j) of the image block P (j), wherein the specific formula is as follows:
Figure BDA0003076275310000231
Figure BDA0003076275310000232
where d (i, j) is the Gaussian weighted Euclidean distance between image blocks, h is used to control the degree of smoothing, G a Is a Gaussian function with standard deviation a;
in summary, the NLM noise reduction of the pixel value f (i) results as follows:
Figure BDA0003076275310000233
wherein the formula for C (i) is
Figure BDA0003076275310000234
Therefore, the dynamic and static judgment device applied to video processing disclosed by the invention can reduce the calculated amount and improve the efficiency of the dynamic and static judgment process by dividing the regional information through the noise reduction algorithm, can realize the dynamic and static judgment in the digital video processing process with high precision, can improve the universality and the stability of the dynamic and static judgment method, reduce the complexity of calculation in the dynamic and static judgment process, improve the processing efficiency of image noise reduction, effectively reduce the cost of image noise reduction, is beneficial to obtaining a better noise reduction effect, improves the image definition, and further can reduce the complexity of a subsequent image processing algorithm and the difficulty of integral debugging. The dynamic and static judgment is carried out by combining the corrected difference value, the influence of the edge can be effectively reduced, particularly the interference (inter-frame flicker and the like) of the highlight edge is reduced, different weight coefficients can be adjusted according to the application requirements of different scenes, the universality and the applicability are improved, and further a better noise reduction result can be obtained.
EXAMPLE five
Referring to fig. 6, fig. 6 is a schematic structural diagram of another motion and static determination apparatus applied to video processing according to an embodiment of the present disclosure. The method may be applied to a motion and motion determination device, which may be an independent device or integrated in a video processing device, and the embodiment of the present invention is not limited. It should be noted that, the motion and still determination apparatus refers to the steps in the motion and still determination method applied to video processing described in the third embodiment, and detailed description is not repeated in this embodiment, as shown in fig. 6, the motion and still determination apparatus applied to video processing may include:
an original difference value determining module 501, configured to determine, for any pixel in the current frame image, an original difference value of the pixel;
a modified difference value determining module 502, configured to determine a modified difference value of the pixel according to the original difference value of the pixel;
a dynamic and static state determining module 503, configured to determine the dynamic and static states of the pixel point according to the modified difference value of the pixel point.
Therefore, the dynamic and static judgment device applied to video processing disclosed by the invention can obtain the difference value with higher precision by further correcting the difference value of the pixel point, improve the corresponding relation between the corrected difference value and the dynamic and static states, avoid the influence of the edge area on the dynamic and static judgment and improve the influence of the highlight edge on the noise reduction effect.
In an optional embodiment, for any pixel point in the current frame image, the modified difference value determining module determines that the calculation formula of the modified difference value of the pixel point is as follows:
diff=diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected difference value of the pixel point, diff0 is an original difference value of the pixel point, and diff0_ th is a preset difference threshold; the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, and rec is the time-space domain noise reduction result of the pixel point in the previous frame image.
Therefore, the dynamic and static judgment device applied to video processing disclosed by the invention can further improve the accuracy of dynamic and static judgment and finally ensure that a better noise reduction effect is obtained. In the embodiment of the present invention, diff0_ th is a preset difference threshold used for adjusting the final difference value correction result, and the effect of adding multiplication with MAX (diff 0, diff0_ th) is used for protecting the difference value of the white highlight area in the low-illumination scene from being excessively weakened, so as to avoid causing smear. The dynamic and static judgment is carried out by combining the corrected difference value, the judgment of the dynamic and static states can be realized with higher precision, the influence of the edge is effectively reduced, particularly the interference (inter-frame flicker and the like) of the highlight edge is reduced, and further the better noise reduction effect is realized.
EXAMPLE six
Referring to fig. 7, fig. 7 is a schematic structural diagram of another motion and static determination apparatus applied to video processing according to an embodiment of the present disclosure. As shown in fig. 7, the motion/motion determination apparatus applied to video processing may include:
a memory 601 in which executable program code is stored;
a processor 602 coupled to a memory 601;
the processor 602 calls the executable program code stored in the memory 601 for executing the steps of the motion and static determination method applied to the video processing described in the first embodiment, the second embodiment or the third embodiment.
EXAMPLE seven
The embodiment of the invention discloses a computer-readable storage medium which stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the moving and static judgment method applied to video processing described in the first embodiment, the second embodiment or the third embodiment.
Example eight
The embodiment of the invention discloses a computer program product, which comprises a non-transitory computer readable storage medium storing a computer program, wherein the computer program is operable to make a computer execute the steps of the motion and static determination method applied to video processing described in the first embodiment or the second embodiment or the third embodiment.
The above-described embodiments of the apparatus are merely illustrative, and the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above detailed description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. Based on such understanding, the above technical solutions may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, wherein the storage medium includes a Read-Only Memory (ROM), a Random Access Memory (RAM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), a One-time Programmable Read-Only Memory (OTPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc-Read-Only Memory (CD-ROM) or other Memory capable of storing data, a magnetic tape, or any other computer-readable medium capable of storing data.
It should be noted that the computer program code required for the operation of various portions of this specification can be written in any one or more of a variety of programming languages, including an object oriented programming language such as Java, scala, smalltalk, eiffel, JADE, emerald, C + +, C #, VB.NET, python, and the like, a conventional programming language such as C, visual Basic, fortran2003, perl, COBOL 2002, PHP, ABAP, a dynamic programming language such as Python, ruby, and Groovy, or other programming languages, and the like. The program code may run entirely on a computer (PC, embedded smart device, etc.), as a stand-alone software package on the user's computer, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any network format, such as a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet), or in a cloud computing environment, or as a service, such as a software as a service (SaaS).
Finally, it should be noted that: the method and apparatus for determining motion and still applied to video processing disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used for illustrating the technical solutions of the present invention, rather than limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art; the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A motion and still judgment method applied to video processing is characterized by comprising the following steps:
acquiring two parameter sets corresponding to each pixel point in a current frame image;
calculating a first motion state quantity value of each pixel point under each corresponding parameter group;
for any pixel point, determining the weighting weight of each parameter set corresponding to the pixel point, performing weighting calculation on the first motion state quantity value of the pixel point under all the parameter sets corresponding to the pixel point to obtain a target motion state quantity value of the pixel point, and determining the motion state and the static state of the pixel point according to the target motion state quantity value of the pixel point;
the weighted calculation formula of the target motion state magnitude is as follows:
k(i)=(b*k_avg(i)+(256-b)*k_ref(i))/256;
wherein k (i) is the target motion state quantity value of the ith pixel, b is the weight value of one of the two parameter sets of the ith pixel, k _ avg (i) is the first motion state quantity value of one of the two parameter sets of the ith pixel, (256-b) is the weight value of the other one of the two parameter sets of the ith pixel, and k _ ref (i) is the first motion state quantity value of the other one of the two parameter sets of the ith pixel.
2. The method according to claim 1, wherein the obtaining two parameter sets corresponding to each pixel point in the current frame image comprises:
and for any pixel point in the current frame image, acquiring a first parameter set and a second parameter set corresponding to the pixel point.
3. The motion/motion determination method applied to video processing according to claim 2, wherein the acquiring, for any pixel in the current frame image, the first parameter set and the second parameter set corresponding to the pixel comprises:
for any pixel point in the current frame image, determining a first parameter group corresponding to the pixel point according to an image noise curve, a difference value of the pixel point and an initial motion state quantity value, wherein the image noise curve is a predetermined relation curve for representing the image noise level and the pixel value in the current frame image;
and determining a second parameter group corresponding to the pixel point according to the area difference mean value of the last frame image of the current frame image, the gain coefficient corresponding to the area difference mean value, the difference value of the pixel point, the area information of the pixel point and the initial motion state quantity value.
4. A motion-still decision method applied to video processing according to claim 3, wherein the initial motion state magnitude comprises a first sub motion state magnitude and a second sub motion state magnitude;
for any pixel point in the current frame image, when the target motion state quantity value of the pixel point is equal to the first sub motion state quantity value, the motion state and the static state of the pixel point are motion states; when the target motion state quantity value of the pixel point is equal to the second sub-motion state quantity value, the motion state and the static state of the pixel point are completely static states; when the target motion state quantity value of the pixel point is greater than the first sub motion state quantity value and less than the second sub motion state quantity value, the motion state and the static state of the pixel point are in a transition state.
5. The motion and still determination method applied to video processing according to claim 3, wherein for any pixel in the current frame image, the difference value of the pixel comprises an original difference value of the pixel or a modified difference value corresponding to the original difference value of the pixel;
the calculation formula of the original difference value of the pixel point is as follows:
diff0=abs(d2d-rec);
wherein diff0 is the original difference value of the pixel point, d2d is the space domain noise reduction result of the pixel point in the current frame image, rec is the time-space domain noise reduction result of the pixel point in the previous frame image;
the calculation formula of the corrected difference value corresponding to the original difference value of the pixel point is as follows:
diff= diff0*MAX(diff0,diff0_th)/MIN(d2d,rec);
wherein diff is a corrected disparity value corresponding to the original disparity value of the pixel point, diff0 is the original disparity value of the pixel point, and diff0_ th is a preset disparity threshold.
6. The motion/motion determination method applied to video processing according to any one of claims 3 to 5, wherein before the obtaining of the two parameter sets corresponding to each pixel point in the current frame image, the method further comprises:
performing area statistical operation on a previous frame image of the current frame image to obtain an area difference mean value of the previous frame image of the current frame image;
the performing a region statistics operation on a previous frame image of a current frame image to obtain a region difference average of the previous frame image of the current frame image includes:
determining difference values of all pixel points in a previous frame image of the current frame image;
according to the regional information and the dynamic and static state information of all pixel points in the previous frame image of the current frame image, performing regional division on all pixel points in the previous frame image of the current frame image to obtain four combined regions, wherein the four combined regions comprise a moving edge region, a static edge region, a moving flat region and a static flat region;
for each combination area, determining the difference mean value of each combination area according to the difference values of all pixel points in each combination area;
and determining the difference mean value of all the combined areas as the area difference mean value of the last frame image of the current frame image.
7. The motion/motion determination method applied to video processing according to any one of claims 3 to 5, wherein before the obtaining of the two parameter sets corresponding to each pixel point in the current frame image, the method further comprises:
carrying out region detection operation on any pixel point in the current frame image to obtain region information of the pixel point;
the performing region detection operation on any pixel point in the current frame image to obtain region information of the pixel point includes:
calculating an initial noise reduction result of the pixel point, and determining high-frequency information of the pixel point according to the initial noise reduction result of the pixel point;
and determining the normalized high-frequency information of the pixel point according to the high-frequency information of the pixel point, and determining the region information of the pixel point according to the normalized high-frequency information of the pixel point and a preset region segmentation threshold.
8. The motion and motion determination method applied to video processing according to any one of claims 1 to 5, wherein for any pixel, after determining the motion and motion states of the pixel, the method further comprises:
and performing weighted calculation on the noise reduction result of the pixel value of the pixel point in the current frame image and the target noise reduction result of the pixel value of the pixel point in the previous frame image to obtain a noise reduction result weighted value of the pixel point, and determining the noise reduction result weighted value of the pixel point as the target noise reduction result of the pixel value of the pixel point in the current frame image.
9. A motion and still determination device applied to video processing, the device comprising:
the parameter set acquisition module is used for acquiring two parameter sets corresponding to each pixel point in the current frame image;
a motion state quantity value calculation module, configured to calculate a first motion state quantity value of each pixel under each corresponding parameter group;
a dynamic and static state determining module, configured to determine, for any pixel point, a weighting weight of each parameter set corresponding to the pixel point, perform weighting calculation on a first motion state quantity value of the pixel point under all the parameter sets corresponding to the pixel point, obtain a target motion state quantity value of the pixel point, and determine a dynamic and static state of the pixel point according to the target motion state quantity value of the pixel point;
the weighted calculation formula of the target motion state magnitude is as follows:
k(i)=(b*k_avg(i)+(256-b)*k_ref(i))/256;
wherein k (i) is the target motion state quantity value of the ith pixel, b is the weight value of one of the two parameter sets of the ith pixel, k _ avg (i) is the first motion state quantity value of one of the two parameter sets of the ith pixel, (256-b) is the weight value of the other one of the two parameter sets of the ith pixel, and k _ ref (i) is the first motion state quantity value of the other one of the two parameter sets of the ith pixel.
CN202110553619.5A 2021-05-20 2021-05-20 Dynamic and static judgment method and device applied to video processing Active CN113438386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110553619.5A CN113438386B (en) 2021-05-20 2021-05-20 Dynamic and static judgment method and device applied to video processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110553619.5A CN113438386B (en) 2021-05-20 2021-05-20 Dynamic and static judgment method and device applied to video processing

Publications (2)

Publication Number Publication Date
CN113438386A CN113438386A (en) 2021-09-24
CN113438386B true CN113438386B (en) 2023-02-17

Family

ID=77802548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110553619.5A Active CN113438386B (en) 2021-05-20 2021-05-20 Dynamic and static judgment method and device applied to video processing

Country Status (1)

Country Link
CN (1) CN113438386B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116993626A (en) * 2023-09-26 2023-11-03 成都市晶林科技有限公司 Infrared image noise reduction method and system based on time-space domain

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018290A (en) * 2007-02-16 2007-08-15 北京中星微电子有限公司 An image processing method and device
WO2017181721A1 (en) * 2016-04-18 2017-10-26 深圳市中兴微电子技术有限公司 Image data processing method and apparatus, player, electronic device, and storage medium
WO2017185772A1 (en) * 2016-04-28 2017-11-02 深圳市中兴微电子技术有限公司 Method and device for video image enhancement and computer storage medium
WO2021017809A1 (en) * 2019-07-29 2021-02-04 深圳市中兴微电子技术有限公司 Video denoising method and apparatus, and computer-readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004002135A1 (en) * 2002-06-25 2003-12-31 Matsushita Electric Industrial Co., Ltd. Motion detection device and noise reduction device using that
JP2012231389A (en) * 2011-04-27 2012-11-22 Sony Corp Image processing apparatus, image processing method, and program
KR102584521B1 (en) * 2019-02-15 2023-10-05 한화비전 주식회사 Imaging processing device for motion detection and method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101018290A (en) * 2007-02-16 2007-08-15 北京中星微电子有限公司 An image processing method and device
WO2017181721A1 (en) * 2016-04-18 2017-10-26 深圳市中兴微电子技术有限公司 Image data processing method and apparatus, player, electronic device, and storage medium
WO2017185772A1 (en) * 2016-04-28 2017-11-02 深圳市中兴微电子技术有限公司 Method and device for video image enhancement and computer storage medium
WO2021017809A1 (en) * 2019-07-29 2021-02-04 深圳市中兴微电子技术有限公司 Video denoising method and apparatus, and computer-readable storage medium

Also Published As

Publication number Publication date
CN113438386A (en) 2021-09-24

Similar Documents

Publication Publication Date Title
US10963993B2 (en) Image noise intensity estimation method, image noise intensity estimation device, and image recognition device
CN108694705B (en) Multi-frame image registration and fusion denoising method
US9615039B2 (en) Systems and methods for reducing noise in video streams
US7542600B2 (en) Video image quality
US9202263B2 (en) System and method for spatio video image enhancement
EP3488388B1 (en) Video processing method and apparatus
CN107481271B (en) Stereo matching method, system and mobile terminal
CN109064504B (en) Image processing method, apparatus and computer storage medium
CN107948517A (en) Preview screen virtualization processing method, device and equipment
CN109214996B (en) Image processing method and device
WO2014070273A1 (en) Recursive conditional means image denoising
US20220270266A1 (en) Foreground image acquisition method, foreground image acquisition apparatus, and electronic device
CN110796615A (en) Image denoising method and device and storage medium
CN112529854B (en) Noise estimation method, device, storage medium and equipment
CN109035167B (en) Method, device, equipment and medium for processing multiple faces in image
CN113313626A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113438386B (en) Dynamic and static judgment method and device applied to video processing
CN113744294B (en) Image processing method and related device
CN113674303A (en) Image processing method, image processing device, electronic equipment and storage medium
CN113888438A (en) Image processing method, device and storage medium
CN117408890A (en) Video image transmission quality enhancement method and system
CN111539975B (en) Method, device, equipment and storage medium for detecting moving object
CN113011433B (en) Filtering parameter adjusting method and device
CN110136085B (en) Image noise reduction method and device
CN111833262A (en) Image noise reduction method and device and electronic equipment

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