Video deinterlacing method, system, device and storage medium

By judging the motion scene of the video frame and using appropriate interpolation methods, using space-time fusion values ​​and field data for video deinterlacing processing, the problem of poor results in dynamic and static scenes in the existing technology is solved, and the deinterlacing algorithm is reduced. Complexity improves user experience.

CN113286107BActive Publication Date: 2024-12-03ANYSMART TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202110168947.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-02-07
Publication Date
2024-12-03
Estimated Expiration
2041-02-07

AI Technical Summary

Technical Problem

In the prior art, the video deinterlacing algorithm has poor effect in dynamic and static scenarios and is highly complex, so it cannot achieve a better deinterlacing effect in both scenarios.

Method used

By judging the motion scene of the pixel points to be interpolated in the current frame in the video, if the space-time fusion value is used for interpolation for the dynamic scene, if the field data of the current frame is used for interpolation for the static scene, the space-time fusion is calculated using the time weight and spatial weights. value, reduce the complexity of the deinterlacing algorithm.

Benefits of technology

It achieves a good deinterlacing effect in both dynamic and static scenarios, adapts to the use of embedded devices, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113286107B_ABST
    Figure CN113286107B_ABST
Patent Text Reader

Abstract

The present invention discloses a video deinterlacing method, system, device and storage medium, the method comprising: judging the motion scene of the pixel points to be interpolated in the current frame of the video, if it is a dynamic scene, using the spatiotemporal fusion value of the pixel points to be interpolated to interpolate the pixel values ​​of the pixel points to be interpolated; if it is a static scene, using the field data of the current frame to interpolate. The present invention judges the motion scene of the pixel points to be interpolated in the current frame of the video, distinguishes between static scenes and dynamic scenes, and uses the spatiotemporal fusion value for interpolation in the dynamic scene, and uses the field data of the current frame for interpolation in the static scene, so as to achieve a good deinterlacing effect for the pixel points to be interpolated in the current frame of the video in both dynamic scenes and static scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a video deinterlacing method, system, device and storage medium. Background Art

[0002] At present, most of the cameras used for reversing in vehicle systems use CVBS (Composite Synchronous Video Broadcast Signal) cameras, which output video frames in the form of fields. The current mainstream terminal devices use frame-by-frame display, so interlaced and progressive conversion is one of the indispensable key technologies.

[0003] In the prior art, intra-field line interpolation, inter-field line interpolation, adaptive intra-field and inter-field line interpolation, or a rough motion estimation inter-field interpolation algorithm is usually used to deinterlace the video of the terminal device. However, most of the deinterlacing processing methods only have a good deinterlacing effect in a certain scenario. For example, the intra-field line interpolation deinterlacing algorithm can eliminate the adverse effects of ghosting and ghosting in dynamic scenes, but when this algorithm processes static scenes, it will seriously affect the clarity of the image; the inter-field line interpolation deinterlacing algorithm has a good effect on still images, but for moving images, it will blur the image details and edges, etc.; in short, the algorithm with a good deinterlacing effect for static scenes has a poor deinterlacing effect in dynamic scenes; the algorithm with a good deinterlacing effect for dynamic scenes has a poor deinterlacing effect in static scenes. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the defects in the algorithms in the prior art that they cannot guarantee a good deinterlacing effect in both dynamic and static scenes and can reduce the complexity of the deinterlacing algorithm, and to provide a video deinterlacing method, system, device and storage medium.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] A first aspect of the present invention provides a video deinterlacing method, the video deinterlacing method comprising:

[0007] Determine the motion scene of the pixel to be interpolated in the current frame of the video. If it is a dynamic scene, use the spatiotemporal fusion value of the pixel to be interpolated to interpolate the pixel value of the pixel to be interpolated; if it is a static scene, use the field data of the current frame to interpolate the pixel value of the pixel to be interpolated;

[0008] The time-space fusion value is calculated based on the time weight and the space weight.

[0009] Preferably, before determining the motion scene of the pixel to be interpolated in the current frame of the video, the video deinterlacing method further includes:

[0010] Calculating the motion detection value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated in the current frame, the field data of the current frame and the field data of the previous frame;

[0011] The motion scene of the pixel to be interpolated in the current frame of the video is determined according to the motion detection value of the pixel to be interpolated.

[0012] Preferably, the spatiotemporal fusion value is obtained by:

[0013] Calculate the spatial weight of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated and the field data of the current frame;

[0014] Calculate the time weight of the pixel to be interpolated according to the field data of the current frame and the field data of the previous frame;

[0015] The spatiotemporal fusion value of the pixel point to be interpolated is calculated according to the predicted pixel value of the pixel point to be interpolated, the field data of the current frame, the spatial weight and the temporal weight.

[0016] Preferably, the step of determining the motion scene of the pixel to be interpolated in the current frame of the video according to the motion detection value of the pixel to be interpolated comprises:

[0017] It is determined whether the motion detection value of the pixel to be interpolated is greater than a detection threshold. If so, it is determined that the motion scene of the pixel to be interpolated is a dynamic scene; if not, it is determined that the motion scene of the pixel to be interpolated is a static scene.

[0018] A second aspect of the present invention provides a video deinterlacing system, the video deinterlacing system comprising a determination module, a first interpolation module and a second interpolation module;

[0019] The judgment module is used to judge the motion scene of the pixel point to be interpolated in the current frame of the video, if it is a dynamic scene, the first interpolation module is called; if it is a static scene, the second interpolation module is called;

[0020] The first interpolation module is used to interpolate the pixel value of the pixel to be interpolated using the spatiotemporal fusion value of the pixel to be interpolated;

[0021] The second interpolation module is used to interpolate the pixel value of the pixel to be interpolated using the field data of the current frame;

[0022] The time-space fusion value is calculated based on the time weight and the space weight.

[0023] Preferably, the video deinterlacing system further comprises a first calculation module;

[0024] The first calculation module is used to calculate the motion detection value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated in the current frame, the field data of the current frame and the field data of the previous frame;

[0025] The judgment module is specifically used to judge the motion scene of the pixel to be interpolated in the current frame of the video according to the motion detection value of the pixel to be interpolated.

[0026] Preferably, the video deinterlacing system further includes a second calculation module, a third calculation module and a fourth calculation module;

[0027] The second calculation module is used to calculate the spatial weight of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated and the field data of the current frame;

[0028] The third calculation module is used to calculate the time weight of the pixel to be interpolated according to the field data of the current frame and the field data of the previous frame;

[0029] The fourth calculation module is used to calculate the spatiotemporal fusion value of the pixel point to be interpolated according to the predicted pixel value of the pixel point to be interpolated, the field data of the current frame, the spatial weight and the temporal weight.

[0030] Preferably, the judgment module includes a judgment unit;

[0031] The judgment unit is used to judge whether the motion detection value of the pixel to be interpolated is greater than a detection threshold. If so, the motion scene of the pixel to be interpolated is judged to be a dynamic scene; if not, the motion scene of the pixel to be interpolated is judged to be a static scene.

[0032] A third aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the video deinterlacing method as described in the first aspect when executing the computer program.

[0033] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the video deinterlacing method as described in the first aspect are implemented.

[0034] The positive and progressive effects of the present invention are:

[0035] The present invention judges the motion scene of the pixel to be interpolated in the current frame of the video. When it is judged that the pixel to be interpolated is a dynamic scene, the spatiotemporal fusion value of the pixel to be interpolated is used to interpolate the pixel value of the pixel to be interpolated; when it is judged that the pixel to be interpolated is a static scene, the field data of the current frame is used to interpolate the pixel value of the pixel to be interpolated. By distinguishing between static scenes and dynamic scenes, and using interpolation methods suitable for different scenes, the pixel to be interpolated in the current frame of the video can achieve good deinterlacing effect in both dynamic scenes and static scenes. Furthermore, by calculating the spatiotemporal fusion value through the predicted pixel value of the pixel to be interpolated, the field data of the current frame and the field data of the previous frame, the number of deinterlacing algorithms is reduced, thereby reducing the complexity of the deinterlacing algorithm for the pixel to be interpolated, adapting to the use of embedded devices, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 Flow chart of the video de-interlacing method according to embodiment 1 of the present invention.

[0037] Figure 2 Flow chart of step 101 of the video de-interlacing method according to embodiment 1 of the present invention.

[0038] Figure 3 It is a schematic diagram of calculating the pixel points to be interpolated in the video de-interlacing method according to Embodiment 1 of the present invention.

[0039] Figure 4 The figure is a schematic diagram of interpolating pixel values ​​of pixels to be interpolated in the video deinterlacing method according to the first embodiment of the present invention.

[0040] Figure 5 It is a module schematic diagram of a video de-interlacing system according to Embodiment 2 of the present invention.

[0041] Figure 6 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0042] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0043] Example 1

[0044] This embodiment provides a video deinterlacing method, such as Figure 1 As shown, the video deinterlacing method includes:

[0045] Step 101 , determine the motion scene of the pixel to be interpolated in the current frame of the video. If it is a dynamic scene, execute step 102 ; if it is a static scene, execute step 103 .

[0046] Step 102: interpolate the pixel value of the pixel to be interpolated using the spatiotemporal fusion value of the pixel to be interpolated.

[0047] In this implementation, the spatiotemporal fusion value is calculated based on the time weight and the space weight.

[0048] Step 103: Use the field data of the current frame to interpolate the pixel values ​​of the pixels to be interpolated.

[0049] This implementation determines the motion scene of the pixel to be interpolated in the current frame of the video. When it is determined that the pixel to be interpolated is a dynamic scene, the spatiotemporal fusion value of the pixel to be interpolated is used to interpolate the pixel value of the pixel to be interpolated; when it is determined that the pixel to be interpolated is a static scene, the field data of the current frame is used to interpolate the pixel value of the pixel to be interpolated. Since static scenes and dynamic scenes are distinguished, and different scenes use interpolation methods suitable for the scenes, the pixel to be interpolated in the current frame of the video can achieve better de-interlacing effects in both dynamic scenes and static scenes.

[0050] In an optional embodiment, Figure 1 As shown, the spatiotemporal fusion value in the above step 102 is obtained through steps 1011 to 1013.

[0051] Step 1011: Calculate the spatial weight of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated and the field data of the current frame.

[0052] In this implementation, the formula for calculating the spatial weight of the pixel to be interpolated is:

[0053] W1=|(Even'(n)–Even(n))|*α1;

[0054] Wherein, W1 is the spatial weight of the pixel to be interpolated, Even'(n) is the predicted pixel value of the pixel to be interpolated in the current frame, Even(n) is the field data of the current frame (for example, it can be the even field data of the current frame), and α1 represents the weight correction factor.

[0055] Among them, the predicted pixel value Even'(n) of the pixel to be interpolated in the current frame is calculated by the edge detection algorithm. Specifically, the edge detection algorithm detects the near-domain surrounding information of the pixel to be interpolated, determines whether the pixel to be interpolated has edge information and the direction of the edge, and then completes the missing rows of the frame by averaging interpolation in the edge direction. Figure 3 As shown in the figure, the solid circle is the original pixel of the current frame, and the hollow circle is the pixel to be interpolated. First, the surrounding pixels of the interpolated pixel value F(i, j) are judged. The absolute difference between two pixels in each diagonal direction is calculated by the following formula:

[0056] A = |F(i – 1, j – 2, n) - F(i + 1, j + 2, n)|; B = |F(i – 1, j – 1, n) - F(i + 1, j + 1, n)|

[0057] C = |F(i – 1, j, n) - F(i + 1, j, n)|; D = |F(i – 1, j + 1, n) - F(i + 1, j – 1, n)|

[0058] E = |F(i – 1, j + 2, n) - F(i + 1, j – 2, n)|, where n represents the nth frame, i represents the row, and j represents the column.

[0059] In this embodiment, first, the absolute difference C between the adjacent pixels in the upper and lower rows of the pixel to be interpolated is used to determine whether there is edge information for the pixel to be interpolated. Specifically, if C < T (T is the edge threshold, and the range of the edge threshold T is preferably 0 - 255, or it can also be other values), it is considered that there is no edge information for the pixel to be interpolated, and the predicted pixel value of the pixel to be interpolated is processed by the method of spatial row averaging. If C > T, it is considered that there is edge information for the pixel to be interpolated, and then the edge direction of the pixel to be interpolated is determined. For edge information, there is a large difference in the predicted pixel values of the pixels to be interpolated on both sides of the edge information, while the predicted pixel values of the pixels to be interpolated in the edge direction should be relatively close. Therefore, find the minimum value MIN(A, B, C, D, E) among A, B, C, D, and E. The two pixels to be interpolated in the direction of the minimum value should be the most relevant points, and this direction is the edge direction. Then, according to the edge direction, the predicted pixel value Even’(n) of the pixel to be interpolated F(i, j, n) is obtained by average interpolation through the following formula.

[0060]

[0061] Among them,

[0062]

[0063]

[0064]

[0065]

[0066] F(i, j, n) is used as the pixel point to be interpolated and interpolated line by line on the edge. For deinterlaced video images, the video image information after deinterlacing comes from the original information of the video image itself. The more the information, the better the deinterlacing effect. The interpolation pixel points of the edge detection method come from the average of the most relevant pixel points in the upper and lower rows of the frame, which is similar to the row average in the linear algorithm. The generated missing row filling information is mainly obtained from the interlaced video image with only half of the information.

[0067] Step 1012: Calculate the time weight of the pixel to be interpolated based on the field data of the current frame and the field data of the previous frame.

[0068] In this implementation, the formula for calculating the time weight of the pixel to be interpolated is:

[0069] W2=|(Even(n-1)–Even(n))|*α2;

[0070] Wherein, W2 is the time weight of the pixel to be interpolated, α2 represents the weight correction factor, and Even(n-1) is the field data of the previous frame (for example, it can be the even field data of the previous frame).

[0071] It should be noted that both α1 and α2 can be any value between 0 and 1, as long as the sum of α1 and α2 is 1.

[0072] Step 1013: Calculate the spatiotemporal fusion value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated, the field data of the current frame, the spatial weight and the temporal weight.

[0073] In this implementation, the formula for calculating the spatiotemporal fusion value of the pixel to be interpolated is:

[0074] STPV=(W2*Even'(n)+W1*Even(n)) / (W1+W2);

[0075] Among them, STPV is the spatiotemporal fusion value of the pixel to be interpolated.

[0076] Compared with the algorithm in the prior art that only uses the spatial domain information in the field for interpolation and cannot guarantee the deinterlacing effect in static scenes, the present embodiment not only uses the spatial domain information in the field, but also introduces the information of the previous frame as the time domain information, and combines the predicted pixel value of the pixel to be interpolated obtained by the edge detection algorithm and the field data of the current frame to interpolate the pixel value of the pixel to be interpolated, thereby satisfying the requirement that the pixel to be interpolated in the current frame in the video can achieve a good deinterlacing effect in both dynamic scenes and static scenes.

[0077] In an optional embodiment, Figure 1As shown, before determining the motion scene of the pixel to be interpolated in the current frame of the video, the video deinterlacing algorithm further includes step 1014.

[0078] Step 1014: Calculate the motion detection value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated in the current frame, the field data of the current frame, and the field data of the previous frame.

[0079] In this implementation, the formula for calculating the motion detection value of the pixel to be interpolated is:

[0080] MDV=|(Even'(n)–Even(n))|+|(Even(n-1)–Even(n))|;

[0081] Wherein, MDV is the motion detection value of the pixel to be interpolated.

[0082] In this embodiment, the field data of the current frame is odd field data or even field data. The field data of the previous frame is consistent with the field data of the current frame, that is, when the field data of the current frame is odd field data, the field data of the previous frame is the odd field data of the previous frame; when the field data of the current frame is even field data, the field data of the previous frame is the even field data of the previous frame.

[0083] After step 1014, the above step 101 specifically includes: judging the motion scene of the pixel to be interpolated in the current frame of the video according to the motion detection value of the pixel to be interpolated.

[0084] Specifically, Figure 2 As shown, step 101 includes the following steps 101a to 101c.

[0085] Step 101a, determine whether the motion detection value of the pixel to be interpolated is greater than the detection threshold, if so, execute step 101b; if not, execute step 101c.

[0086] Step 101b: determine whether the motion scene of the pixel to be interpolated is a dynamic scene.

[0087] Step 101c: determine whether the motion scene of the pixel to be interpolated is a static scene.

[0088] In this embodiment, when the motion detection value MDV of the pixel to be interpolated is less than or equal to the detection threshold MT, the pixel to be interpolated is in a static scene, and the spatiotemporal fusion value STPV of the pixel to be interpolated is used to interpolate the pixel value of the pixel to be interpolated; when the motion detection value MDV of the pixel to be interpolated is greater than the detection threshold MT, the pixel to be interpolated is in a dynamic scene, and the field data Even(n) of the current frame is used to interpolate the pixel value of the pixel to be interpolated.

[0089] It should be noted that when it is determined that the interpolation pixel is in a dynamic scene, the pixel value of the interpolation pixel can be interpolated using the even field data of the current frame, or the pixel value of the interpolation pixel can be interpolated using the odd field data of the current frame. The value of the detection threshold MT is preferably 80, and the value of the detection threshold MT can also be other values, which are not specifically limited here.

[0090] In the specific implementation, Figure 4 As shown, the present embodiment first obtains the predicted pixel value Even'(n) of the pixel to be interpolated in the current frame through an edge detection algorithm, and then calculates the spatial weight, time weight, spatiotemporal fusion value and motion detection value of the pixel to be interpolated according to the field data Even(n) of the current frame, the field data Even(n-1) of the previous frame and the predicted pixel value Even'(n) of the pixel to be interpolated in the current frame, respectively, and judges the motion scene of the pixel to be interpolated through the motion detection value of the pixel to be interpolated, and uses the spatiotemporal fusion value to interpolate the pixel value of the pixel to be interpolated in the dynamic scene, and uses the field data of the current frame to interpolate the pixel value of the pixel to be interpolated in the static scene. The spatiotemporal fusion value is calculated by the predicted pixel value of the pixel to be interpolated, the field data of the current frame and the field data of the previous frame, thereby reducing the number of de-interlacing algorithms, thereby reducing the complexity of the de-interlacing algorithm for the pixel to be interpolated, adapting to the use of embedded devices, and improving the user experience.

[0091] Example 2

[0092] This embodiment provides a video deinterlacing system, such as Figure 5 As shown, the video de-interlacing system includes a determination module 1 , a first interpolation module 2 and a second interpolation module 3 .

[0093] The judgment module 1 is used to judge the motion scene of the pixel points to be interpolated in the current frame of the video. If it is a dynamic scene, the first interpolation module 2 is called; if it is a static scene, the second interpolation module 3 is called.

[0094] The first interpolation module 2 is used to interpolate the pixel value of the pixel to be interpolated by using the spatiotemporal fusion value of the pixel to be interpolated.

[0095] In this implementation, the spatiotemporal fusion value is calculated based on the time weight and the space weight.

[0096] The second interpolation module 3 is used to interpolate the pixel value of the pixel to be interpolated using the field data of the current frame.

[0097] This implementation determines the motion scene of the pixel to be interpolated in the current frame of the video. When it is determined that the pixel to be interpolated is a dynamic scene, the spatiotemporal fusion value of the pixel to be interpolated is used to interpolate the pixel value of the pixel to be interpolated; when it is determined that the pixel to be interpolated is a static scene, the field data of the current frame is used to interpolate the pixel value of the pixel to be interpolated. Since static scenes and dynamic scenes are distinguished, and different scenes use interpolation methods suitable for the scenes, the pixel to be interpolated in the current frame of the video can achieve better de-interlacing effects in both dynamic scenes and static scenes.

[0098] In an optional embodiment, Figure 5 As shown, the above-mentioned video deinterlacing system further includes a second calculation module 5 , a third calculation module 6 and a fourth calculation module 7 .

[0099] The second calculation module 5 is used to calculate the spatial weight of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated and the field data of the current frame.

[0100] In this implementation, the formula for calculating the spatial weight of the pixel to be interpolated is:

[0101] W1=|(Even'(n)–Even(n))|*α1;

[0102] Wherein, W1 is the spatial weight of the pixel to be interpolated, Even'(n) is the predicted pixel value of the pixel to be interpolated in the current frame, Even(n) is the field data of the current frame (for example, it can be the even field data of the current frame), and α1 represents the weight correction factor.

[0103] Among them, the predicted pixel value Even'(n) of the pixel to be interpolated in the current frame is calculated by the edge detection algorithm. Specifically, the edge detection algorithm detects the near-domain surrounding information of the pixel to be interpolated, determines whether the pixel to be interpolated has edge information and the direction of the edge, and then completes the missing rows of the frame by averaging interpolation in the edge direction. Figure 3 As shown in the figure, the solid circle is the original pixel of the current frame, and the hollow circle is the pixel to be interpolated. First, the surrounding pixels of the interpolated pixel value F(i, j) are judged. The absolute difference between two pixels in each diagonal direction is calculated by the following formula:

[0104] A=|F(i–1,j–2,n)-F(i+1,j+2,n)|; B=|F(i–1,j–1,n)-F(i+1,j+1,n)|

[0105] C=|F(i–1,j,n)-F(i+1,j,n)|; D=|F(i–1,j+1,n)-F(i+1,j–1,n)|

[0106] E = |F(i–1,j+2,n)-F(i+1,j–2,n)|, where n represents the nth frame, i represents the row, and j represents the column.

[0107] In this embodiment, first, the absolute difference C of the adjacent pixels in the upper and lower rows of the pixel to be interpolated is used to determine whether there is edge information. Specifically, if C < T (T is the edge threshold, and the range of the edge threshold T is preferably 0 - 255, and it can also be other values), it is considered that there is no edge information for the pixel to be interpolated, and the predicted pixel value of the pixel to be interpolated is processed by the method of spatial row averaging. If C > T, it is considered that there is edge information for the pixel to be interpolated, and then the edge direction of the pixel to be interpolated is determined. For edge information, there is a large difference in the predicted pixel values of the pixels to be interpolated on both sides of the edge information, and the predicted pixel values of the pixels to be interpolated in the edge direction should be relatively close. Therefore, find the minimum value MIN(A, B, C, D, E) among A, B, C, D, and E. The two pixels to be interpolated in the direction where the minimum value is located should be the most relevant points, and this direction is the edge direction. Then, according to the edge direction, the predicted pixel value Even’(n) of the pixel to be interpolated is obtained by averaging and interpolating the pixel to be interpolated F(i, j, n) through the following formula.

[0108]

[0109] Among them,

[0110]

[0111]

[0112]

[0113]

[0114] F(i, j, n) is interpolated row by row on the edge as the pixel to be interpolated. For the deinterlaced video image, the more the information of the deinterlaced video image comes from the original information of the video image itself, the better the deinterlacing effect. The interpolated pixels of the edge detection method come from the mean value of the most relevant pixels in the upper and lower rows within the frame, similar to the row averaging in the linear algorithm. The missing row filling information is mainly obtained from the interlaced video image with only half of the information.

[0115] The third calculation module 6 is used to calculate the temporal weight of the pixel to be interpolated according to the field data of the current frame and the field data of the previous frame.

[0116] In this embodiment, the formula for calculating the temporal weight of the pixel to be interpolated is:

[0117] W2=|(Even(n-1)–Even(n))|*α2;

[0118] Wherein, W2 is the time weight of the pixel to be interpolated, α2 represents the weight correction factor, and Even(n-1) is the field data of the previous frame (for example, it can be the even field data of the previous frame).

[0119] It should be noted that both α1 and α2 can be any value between 0 and 1, as long as the sum of α1 and α2 is 1.

[0120] The fourth calculation module 7 is used to calculate the spatiotemporal fusion value of the pixel point to be interpolated according to the predicted pixel value of the pixel point to be interpolated, the field data of the current frame, the spatial weight and the temporal weight.

[0121] In this implementation, the formula for calculating the spatiotemporal fusion value of the pixel to be interpolated is:

[0122] STPV=(W2*Even'(n)+W1*Even(n)) / (W1+W2);

[0123] Among them, STPV is the spatiotemporal fusion value of the pixel to be interpolated.

[0124] Compared with the algorithm in the prior art that only uses the spatial domain information in the field for interpolation and cannot guarantee the de-interlacing effect in static scenes, the present embodiment not only uses the spatial domain information in the field, but also introduces the information of the previous frame as the time domain information, and combines the predicted pixel value of the pixel to be interpolated obtained by the edge detection algorithm and the field data of the current frame to interpolate the pixel value of the pixel to be interpolated, thereby satisfying the requirement that the pixel to be interpolated in the current frame in the video can achieve a good de-interlacing effect in both dynamic scenes and static scenes.

[0125] In an optional embodiment, Figure 5 As shown, the above-mentioned video de-interlacing system also includes a first calculation module 4.

[0126] The first calculation module 4 is used to calculate the motion detection value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated in the current frame, the field data of the current frame and the field data of the previous frame.

[0127] In this implementation, the formula for calculating the motion detection value of the pixel to be interpolated is:

[0128] MDV=|(Even'(n)–Even(n))|+|(Even(n-1)–Even(n))|;

[0129] Wherein, MDV is the motion detection value of the pixel to be interpolated.

[0130] In this embodiment, the field data of the current frame is odd field data or even field data. The field data of the previous frame is consistent with the field data of the current frame, that is, when the field data of the current frame is odd field data, the field data of the previous frame is the odd field data of the previous frame; when the field data of the current frame is even field data, the field data of the previous frame is the even field data of the previous frame.

[0131] In an optional implementation manner, the judgment module 1 is specifically configured to judge the motion scene of the pixel to be interpolated in the current frame of the video according to the motion detection value of the pixel to be interpolated.

[0132] Specifically, Figure 5 As shown, the judging module 1 includes a judging unit 11 .

[0133] The judging unit 11 is used to judge whether the motion detection value of the pixel to be interpolated is greater than the detection threshold. If so, the motion scene of the pixel to be interpolated is judged to be a dynamic scene; if not, the motion scene of the pixel to be interpolated is judged to be a static scene.

[0134] In this embodiment, when the motion detection value MDV of the pixel to be interpolated is less than or equal to the detection threshold MT, the pixel to be interpolated is in a static scene, and the spatiotemporal fusion value STPV of the pixel to be interpolated is used to interpolate the pixel value of the pixel to be interpolated; when the motion detection value MDV of the pixel to be interpolated is greater than the detection threshold MT, the pixel to be interpolated is in a dynamic scene, and the field data Even(n) of the current frame is used to interpolate the pixel value of the pixel to be interpolated.

[0135] It should be noted that when it is determined that the interpolation pixel is in a dynamic scene, the pixel value of the interpolation pixel can be interpolated using the even field data of the current frame, or the pixel value of the interpolation pixel can be interpolated using the odd field data of the current frame. The value of the detection threshold MT is preferably 80, and the value of the detection threshold MT can also be other values, which are not specifically limited here.

[0136] In the specific implementation, Figure 4As shown, the present embodiment first obtains the predicted pixel value Even'(n) of the pixel to be interpolated in the current frame through an edge detection algorithm, and then calculates the spatial weight, time weight, spatiotemporal fusion value and motion detection value of the pixel to be interpolated according to the field data Even(n) of the current frame, the field data Even(n-1) of the previous frame and the predicted pixel value Even'(n) of the pixel to be interpolated in the current frame, respectively, and judges the motion scene of the pixel to be interpolated through the motion detection value of the pixel to be interpolated, and uses the spatiotemporal fusion value to interpolate the pixel value of the pixel to be interpolated in the dynamic scene. The spatiotemporal fusion value is calculated by the predicted pixel value of the pixel to be interpolated, the field data of the current frame and the field data of the previous frame, thereby reducing the number of de-interlacing algorithms, thereby reducing the complexity of the de-interlacing algorithm for the pixel to be interpolated, adapting to the use of embedded devices, and improving the user experience.

[0137] Example 3

[0138] Figure 6 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the video deinterlacing method in Embodiment 1 is implemented. Figure 6 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0139] like Figure 6 As shown, the electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0140] The bus 33 includes a data bus, an address bus, and a control bus.

[0141] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .

[0142] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0143] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the video de-interlacing method provided in the first embodiment of the present invention.

[0144] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the generated device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. Figure 6 As shown, the network adapter 36 communicates with other modules of the model-generated device 30 via the bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0145] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0146] Example 4

[0147] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the video deinterlacing method provided in Embodiment 1 are implemented.

[0148] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0149] In a possible implementation manner, the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the video deinterlacing method described in Example 1.

[0150] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0151] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A video deinterlacing method, characterized in that: The video deinterlacing method comprises: Determine the motion scene of the pixel to be interpolated in the current frame of the video. If it is a dynamic scene, use the spatiotemporal fusion value of the pixel to be interpolated to interpolate the pixel value of the pixel to be interpolated; if it is a static scene, use the field data of the current frame to interpolate the pixel value of the pixel to be interpolated; Wherein, the time-space fusion value is calculated according to the time weight and the space weight; The spatiotemporal fusion value is obtained by: Calculate the spatial weight of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated and the field data of the current frame; The predicted pixel value of the pixel to be interpolated is calculated by an edge detection algorithm, including: Obtaining the surrounding pixels of the pixel to be interpolated to determine whether there is edge information; If edge information exists, determining the edge direction of the pixel to be interpolated; Based on the edge direction, calculating the average difference of the pixel point to be interpolated to obtain the predicted pixel value of the pixel point to be interpolated; Calculate the time weight of the pixel to be interpolated according to the field data of the current frame and the field data of the previous frame; The spatiotemporal fusion value of the pixel point to be interpolated is calculated according to the predicted pixel value of the pixel point to be interpolated, the field data of the current frame, the spatial weight and the temporal weight.

2. The video deinterlacing method according to claim 1, characterized in that: Before determining the motion scene of the pixel to be interpolated in the current frame of the video, the video deinterlacing method further includes: Calculating the motion detection value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated in the current frame, the field data of the current frame and the field data of the previous frame; The motion scene of the pixel to be interpolated in the current frame of the video is determined according to the motion detection value of the pixel to be interpolated.

3. The video deinterlacing method according to claim 2, characterized in that: The step of determining the motion scene of the pixel to be interpolated in the current frame of the video according to the motion detection value of the pixel to be interpolated comprises: It is determined whether the motion detection value of the pixel to be interpolated is greater than a detection threshold. If so, it is determined that the motion scene of the pixel to be interpolated is a dynamic scene; if not, it is determined that the motion scene of the pixel to be interpolated is a static scene.

4. A video deinterlacing system, characterized in that: The video deinterlacing system comprises a determination module, a first interpolation module and a second interpolation module; The judgment module is used to judge the motion scene of the pixel to be interpolated in the current frame of the video, and if it is a dynamic scene, the first interpolation module is called; if it is a static scene, the second interpolation module is called; The first interpolation module is used to interpolate the pixel value of the pixel to be interpolated using the spatiotemporal fusion value of the pixel to be interpolated; The second interpolation module is used to interpolate the pixel value of the pixel to be interpolated using the field data of the current frame; Wherein, the time-space fusion value is calculated according to the time weight and the space weight; The video deinterlacing system further includes a second computing module, a third computing module and a fourth computing module; The second calculation module is used to calculate the spatial weight of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated and the field data of the current frame; The predicted pixel value of the pixel to be interpolated is calculated by an edge detection algorithm, including: Obtaining the surrounding pixels of the pixel to be interpolated to determine whether there is edge information; If edge information exists, determining the edge direction of the pixel to be interpolated; Based on the edge direction, calculating the average difference of the pixel point to be interpolated to obtain the predicted pixel value of the pixel point to be interpolated; The third calculation module is used to calculate the time weight of the pixel to be interpolated according to the field data of the current frame and the field data of the previous frame; The fourth calculation module is used to calculate the spatiotemporal fusion value of the pixel point to be interpolated according to the predicted pixel value of the pixel point to be interpolated, the field data of the current frame, the spatial weight and the temporal weight.

5. The video deinterlacing system of claim 4, wherein: The video deinterlacing system further includes a first computing module; The first calculation module is used to calculate the motion detection value of the pixel to be interpolated according to the predicted pixel value of the pixel to be interpolated in the current frame, the field data of the current frame and the field data of the previous frame; The judgment module is specifically used to judge the motion scene of the pixel to be interpolated in the current frame of the video according to the motion detection value of the pixel to be interpolated.

6. The video deinterlacing system of claim 5, wherein: The judgment module includes a judgment unit; The judgment unit is used to judge whether the motion detection value of the pixel to be interpolated is greater than a detection threshold. If so, the motion scene of the pixel to be interpolated is judged to be a dynamic scene; if not, the motion scene of the pixel to be interpolated is judged to be a static scene.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the video deinterlacing method according to any one of claims 1 to 3 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the video deinterlacing method according to any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • De-interlacing apparatus using motion detection and adaptive weighted filter

    CN101014086A

  • Alternate line eliminating process method based on motion detection

    CN101309385A

  • De-interlacing method and device for monitoring video

    CN101895674A

  • Method and device for detecting three-field motion of de-interlacing processing and de-interlacing system

    CN102148953A

  • Video image de-interlacing scanning method and device

    CN102186046A