CN112218081B - Method and device for de-interlacing video image, electronic equipment and storage medium - Google Patents

Method and device for de-interlacing video image, electronic equipment and storage medium Download PDF

Info

Publication number
CN112218081B
CN112218081B CN202010914724.2A CN202010914724A CN112218081B CN 112218081 B CN112218081 B CN 112218081B CN 202010914724 A CN202010914724 A CN 202010914724A CN 112218081 B CN112218081 B CN 112218081B
Authority
CN
China
Prior art keywords
video frame
interlaced
interlaced video
odd
lines
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
CN202010914724.2A
Other languages
Chinese (zh)
Other versions
CN112218081A (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.)
Ifreecomm Technology Co ltd
Original Assignee
Ifreecomm 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 Ifreecomm Technology Co ltd filed Critical Ifreecomm Technology Co ltd
Priority to CN202010914724.2A priority Critical patent/CN112218081B/en
Publication of CN112218081A publication Critical patent/CN112218081A/en
Application granted granted Critical
Publication of CN112218081B publication Critical patent/CN112218081B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking

Abstract

The application relates to a method, a device, an electronic device and a readable storage medium for de-interlacing a video image, comprising the following steps: acquiring a first interlaced video frame with combined fields, wherein odd lines of the first interlaced video frame correspond to original odd field image content, and even lines correspond to original even field image content; performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines correspond to original odd field image content; performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to corresponding odd line data to obtain a first progressive video frame and a second progressive video frame; the whole image content of the second progressive video frame is moved downwards, and the vacant lines generated by the downward movement of the lines are interpolated to fill the image content, so that an updated second progressive video frame is obtained; and outputting and displaying the first progressive video frame and the updated second progressive video frame. The video frame rate is guaranteed without increasing the cost.

Description

Method and device for de-interlacing video image, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for deinterlacing a video image, an electronic device, and a computer-readable storage medium.
Background
In recent years, with the rapid development of computer technology, video image processing technology is increasingly diversified, and an interlaced video signal, which contains two fields of video frames captured at two different times, appears.
Under the condition that interlaced video coding is not supported, interlaced video needs to be de-interlaced, for some chips, after de-interlacing, the frame rate can be reduced, for example, a 1080I50 video is actually changed into a 1080P25 progressive video after de-interlacing, so that the image fluency is reduced, if a software algorithm is adopted to insert frames to ensure the frame rate, the requirement on the CPU performance is high, and the cost can be very high.
Disclosure of Invention
Embodiments of the present application provide a method and an apparatus for deinterlacing a video image, an electronic device, and a computer-readable storage medium, so that an effect of inserting an image frame can be achieved after deinterlacing a video in an interlaced scanning format, and a video frame rate and image quality are ensured without increasing cost.
A method of de-interlacing a video image, comprising:
acquiring a field-combined first interlaced video frame, wherein odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content;
performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content;
performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to corresponding odd line data respectively to obtain a corresponding first non-interlaced video frame and a corresponding second non-interlaced video frame;
the image content of the second progressive video frame is wholly moved downwards, and the vacant lines generated by the downward movement are interpolated to fill the image content, so that an updated second progressive video frame is obtained;
and outputting and displaying the first progressive video frame and the updated second progressive video frame.
An apparatus for de-interlacing a video image, comprising:
an obtaining module, configured to obtain a field-merged first interlaced video frame, where odd-numbered lines of the first interlaced video frame correspond to original odd-field image content, and even-numbered lines of the first interlaced video frame correspond to original even-field image content;
the conversion module is used for carrying out line number conversion on the first interlaced video frame to form a second interlaced video frame, the odd lines of the second interlaced video frame correspond to original even field image content, and the even lines of the first interlaced video frame correspond to original odd field image content;
the de-interlacing module is used for performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data to obtain a corresponding first progressive video frame and a corresponding second progressive video frame;
the downward moving module is used for performing downward moving on the whole image content of the second progressive video frame, and performing interpolation on vacant lines generated by the downward moving to fill up the image content to obtain an updated second progressive video frame;
and the output module is used for outputting and displaying the first progressive video frame and the updated second progressive video frame.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a field-merged first interlaced video frame, wherein odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content;
performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content;
performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to corresponding odd line data respectively to obtain a corresponding first non-interlaced video frame and a corresponding second non-interlaced video frame;
the image content of the second progressive video frame is wholly moved downwards, and the vacant lines generated by the downward movement are interpolated to fill the image content, so that an updated second progressive video frame is obtained;
and outputting and displaying the first progressive video frame and the updated second progressive video frame.
A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, causes the processor to perform the steps of:
acquiring a field-combined first interlaced video frame, wherein odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content;
performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content;
performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to corresponding odd line data respectively to obtain a corresponding first progressive video frame and a corresponding second progressive video frame;
the image content of the second progressive video frame is wholly moved downwards, and the vacant lines generated by the downward movement are interpolated to fill the image content, so that an updated second progressive video frame is obtained;
and outputting and displaying the first progressive video frame and the updated second progressive video frame.
The method, the device, the electronic equipment and the computer readable storage medium for de-interlacing the video image acquire a field-merged first interlaced video frame, wherein odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content; performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content; performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data to obtain a corresponding first progressive video frame and a corresponding second progressive video frame; the image content of the second progressive video frame is wholly moved downwards, and vacant lines generated by downward movement are interpolated to fill the image content, so that an updated second progressive video frame is obtained; the first progressive video frame and the updated second progressive video frame are output and displayed, even field images are also utilized through line number conversion, after the odd field and the even field are successively subjected to de-interlacing, image frames with the same field number are respectively obtained, and then the even field de-interlaced images are adjusted, so that the effect after image frame insertion can be achieved after the video in the interlaced scanning format is de-interlaced, and the image quality is ensured. The common low-cost CPU does not have the capacity of executing a frame interpolation algorithm, the de-interlacing modules of some chips only use odd lines for de-interlacing, and do not use even lines, and by adopting the method, the effect after image frame interpolation can be achieved after the video in an interlaced scanning format is de-interlaced, for example, 1080I50 can achieve the video effect of 1080P50 after the video is de-interlaced by using the method, on the premise of not increasing the cost, the effect of de-interlacing and frame interpolation is achieved, and the method has great advantages in practical application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an exemplary implementation of a method for deinterlacing a video image;
FIG. 2 is a flow diagram illustrating a method for deinterlacing a video image, in accordance with an embodiment;
FIG. 3 is a schematic diagram of a storage manner of an image inside an acquisition module in one embodiment;
FIG. 4 is a schematic diagram of content overlay to form captured video frames in another embodiment;
FIG. 5 is a diagram illustrating separately obtaining a first progressive video frame and a second progressive video frame, in one embodiment;
FIG. 6 is a block diagram of an apparatus for deinterlacing a video image according to an embodiment;
fig. 7 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
FIG. 1 is a diagram illustrating an exemplary embodiment of a method for deinterlacing a video image. As shown in fig. 1, the application environment includes a terminal 110 and a server 120, where the terminal 110 collects a video in an interlaced scanning format from an input port, each video frame in the video is a field-merged first interlaced video frame, the first interlaced video frame is subjected to line number conversion to form a second interlaced video frame, the first interlaced video frame and the second interlaced video frame are subjected to de-interlacing processing according to corresponding odd line data, respectively, to obtain corresponding first progressive video frame and second progressive video frame, the image content of the second progressive video frame is wholly subjected to line down shifting, the missing line generated by the line down shifting is subjected to interpolation to fill up the image content, so as to obtain an updated second progressive video frame, the first progressive video frame and the updated second progressive video frame are output and displayed, the terminal 110 may further encode the first progressive video frame and the updated second progressive video frame, then transmit the encoded first progressive video frame to the server 120, and the server 120 forwards the encoded first progressive video frame and the encoded second progressive video frame to a receiving terminal for decoding and display. The above-described method of video image de-interlacing may also be implemented at the server 120. The terminal 110 may be a terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a vehicle-mounted computer, a wearable device, and the like. Where the server 120 may be a server or a cluster of servers.
FIG. 2 is a flow diagram of a method for video image de-interlacing in an embodiment. The method for deinterlacing the video image shown in fig. 2 may be applied to the terminal 110 or the server 120, and includes:
step 202, a field-merged first interlaced video frame is obtained, where odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content.
Specifically, the field-merged first interlaced video frame refers to progressive image data formed by odd and even fields in the same video memory, and is equivalent to that all odd lines in the first interlaced video frame are original odd field images, and all even lines are original even field images. If the I-format video 1920 × 1080I50 is acquired from the input port, the actual image data is 25 frames of progressive image data, and odd and even fields are in the same video memory.
Step 204, performing line number conversion on the first interlaced video frame to form a second interlaced video frame, where odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content.
In particular, the way the line number conversion is performed can be customized, for example, the original 1 line and 2 lines of the first interlaced video frame are exchanged, and the original 3 line and 4 line are exchanged. Or the converted original lines are respectively sequentially ordered by 4 lines, 1 line, 6 lines, 3 lines, 8 lines, 5 lines and the like, and the content of the original 2 lines is discarded to form a new converted second interlaced video frame. It is only necessary to ensure that the odd lines of the second interlaced video frame correspond to the original even field image content and the even lines of the second interlaced video frame correspond to the original odd field image content.
And step 206, performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data to obtain a corresponding first progressive video frame and a corresponding second progressive video frame.
Specifically, the first interlaced video frame is sent to the deinterlace processing unit, and deinterlace is performed using the image data of the odd field, so that the progressive image obtained by deinterlacing the odd field, that is, the first progressive video frame is obtained. After the second interlaced video frame is sent to the de-interlacing processing unit, de-interlacing operation is actually performed on the even field of the originally acquired image, and the obtained image is a progressive image obtained after de-interlacing of the even field, namely the second progressive video frame.
And step 208, moving down the image content of the second progressive video frame as a whole, and interpolating the vacant lines generated by the downward movement to fill the image content to obtain an updated second progressive video frame.
Specifically, even fields are converted to odd field positions for de-interlacing once, which is equivalent to even fields being used, for example, when interlaced video is a still image, the video content is a slant line from the top left corner to the bottom right corner, and according to the odd and even field scanning principle, the slant line scanned by each odd field is above the adjacent even field in the vertical direction Y. And (3) de-interlacing the whole even field to obtain a frame of image, which is actually equivalent to that the preset pixels are raised in the vertical direction Y of the whole oblique line, and for the same position, the image obtained after de-interlacing the odd field is in the normal position, and the preset pixels are raised in the image obtained after de-interlacing the even field. When the images obtained by de-interlacing the odd field and the even field are displayed circularly, the position of a frame obtained by the odd field and the position of a frame obtained by the even field at the same position are inconsistent, so that the image is jittered. Therefore, the image obtained by de-interlacing the even field needs to be wholly moved down, the same position is ensured, and the image obtained by de-interlacing the odd field and the even field is at the same horizontal position, so that the jitter is eliminated. The distance of the shift of the line down shift is matched to the transformation of the line number transformation in step 204. After the integral downward movement, the preset lines are vacated, and the black lines exist without filling, so that interpolation is selected to fill the image content, wherein the interpolation mode can be customized, if the image data of the adjacent lines with the image content are directly filled, namely, after the integral downward movement, the images of the uppermost preset line and the adjacent lines with the preset lines are the same, and the images are watched by naked eyes, so that the influence is hardly caused.
And step 210, outputting and displaying the first progressive video frame and the updated second progressive video frame.
Specifically, the first progressive video frame and the updated second progressive video frame are sequentially output and displayed, the first progressive video frame is output first, and then the updated second progressive video frame is output. Through the above steps, when an image of 1920 × 1080I50 is input, a 50-frame de-interlaced image is obtained, constituting a progressive P50 frame, that is, an image of 1920 × 1080P50 is output. It will be appreciated that all I formats are applicable to the above method, and I50 is merely an example. It is understood that the interlaced scan format may also be referred to as an I format, or an interlaced format.
In the method for de-interlacing a video image in the embodiment, a first interlaced video frame with combined fields is obtained, odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content; performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content; performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data to obtain a corresponding first progressive video frame and a corresponding second progressive video frame; the image content of the second progressive video frame is wholly moved downwards, and the vacant lines generated by the downward movement are interpolated to fill the image content, so that an updated second progressive video frame is obtained; the first progressive video frame and the updated second progressive video frame are output and displayed, even field images are utilized through line number conversion, the odd and even fields are sequentially subjected to de-interlacing to obtain image frames with the same field number, and then the even field de-interlaced images are adjusted, so that the effect after image frame interpolation can be achieved after the I-format video is de-interlaced, and the image quality is ensured. The video in the interlaced scanning format can achieve the effect after image frame insertion after being de-interlaced, for example, 1080I50 can achieve the video effect of 1080P50 after being de-interlaced by using the method, and the effect of de-interlacing frame insertion is achieved on the premise of not increasing the cost, so that the method has great advantages in practical application.
In one embodiment, step 204 comprises: sequentially acquiring odd lines and even lines which are adjacent in position in a first interlaced video frame according to the scanning sequence of the video frame; and exchanging adjacent odd lines and even lines to form a second interlaced video frame.
Specifically, for a 1920 × 1080I50 image, for example, lines 1, 2, 3, 4, 5, \8230 \ 8230 \ 1919, 1920 in the original first interlaced video frame are one frame of image data, of which lines 1, 3, 5, 7 \8230 \ 8230:1919 is the image content of the odd field and lines 2, 4, 6, 8, \8230 \ 8230:1920 is the image content of the even field. The second interlaced video frame is formed by reversing the parity fields in the video frame, i.e. the actual number of lines is changed to 2, 1, 4, 3, 6, 5, \ 8230 \ 8230, 1920, 1919. In order to send the even field as the odd field for de-interlacing, the hardware de-interlacing module only uses the odd field of one frame for de-interlacing, and after the second interlaced video frame is sent to the de-interlacing module, the de-interlacing operation is actually carried out on the even field of the originally collected image, and the progressive image after de-interlacing of the even field is obtained.
In the embodiment, the odd lines and the even lines adjacent to each other are exchanged to form the second interlaced video frame, so that the odd lines of the second interlaced video frame correspond to the original even field image content, and the even lines of the second interlaced video frame correspond to the original odd field image content, so that the video frame meeting the de-interlacing condition can be quickly obtained, and the method is efficient and convenient.
In one embodiment, step 208 includes: shifting down the image content of the second progressive video frame by one line; and filling the image content of the original first line of the second progressive video frame into the vacant line generated by line down-shifting.
Specifically, the second interlaced video frame is deinterlaced to obtain a second progressive video frame, the content of the second progressive video frame is shifted down by one line according to the line as a whole, the content of the shifted first line is copied to the content of the original first line, namely, the second progressive video frame is obtained by deinterlacing the even field after the down shift, the first and second line contents of the second progressive video frame are the same, and the problem of shaking of the static image can be solved.
In the embodiment, the image content of the second progressive video frame is wholly shifted down by one line; and filling the image content of the original first line of the second progressive video frame into the vacant line generated by line downward movement to obtain an updated second progressive video frame, wherein the position of the image content of the updated second progressive video frame accords with the position of the original image content when the updated second progressive video frame is played, and the problem of shaking is avoided.
In one embodiment, step 202 comprises: collecting a video in an interlaced scanning format from an input port; and taking each video frame in the video as the first interlaced video frame.
Specifically, the video input port collects 1 path of video, for example, the collected video is collected in a high-definition video format of 1080I50, the collected video is 50 fields of an interlaced line, and the video is stored in the memory by frames, that is, 1 field and 2 fields are stored in one frame, and 3 field and 4 field are stored in one frame through 25 frames.
In this embodiment, each video frame in the video is processed as a first interlaced video frame, so that each first interlaced video frame forms a corresponding first progressive video frame and an updated second progressive video frame, and the processed video is output and displayed.
In one embodiment, step 206 includes: respectively inputting the first interlaced video frame and the second interlaced video frame into a hardware de-interlacing processing unit in a chip; the hardware de-interlacing processing unit performs de-interlacing processing according to odd line data corresponding to the first interlaced video frame to obtain a first progressive video frame; and the hardware de-interlacing processing unit performs de-interlacing processing according to the odd line data corresponding to the second interlaced video frame to obtain a second progressive video frame.
Specifically, by using the characteristic that only an odd field is used for deinterlacing during deinterlacing on hardware, a frame of image is respectively obtained after the odd field and an even field of an interlaced video frame obtained by collection are respectively deinterlaced, the 1080I50 image of original collection, the 25 frames per second and the 50 frames are obtained after deinterlacing are carried out, namely the 1080I50 image is deinterlaced to obtain the 1080P50 image, and because each field is subjected to deinterlacing processing, the image fluency is not different from that of the 1080P50 image on the premise of not increasing the cost.
In the embodiment, under the condition that the hardware de-interlacing has conditional limitation, the image fluency can be ensured.
In a specific embodiment, a method for de-interlacing a video image is provided, which comprises the following steps:
1. the Video input port collects 1 path of Video which is marked as Video #1, and the high-definition Video formats are 1080I50.
2. The acquired Video #1 is 50 interlaced fields, which are stored in the memory by frames, that is, 1 and 2 fields are in one frame, and 3 and 4 fields are in one frame, which is called the first interlaced Video frame of field merging, as shown in fig. 3 and 4, the storage mode of images in 1080I50 format inside the acquisition module is schematically illustrated, when the acquisition module is a haisi chip, the internal frame data is overlapped by the adjacent odd and even 2 field contents, that is, the odd row odd field contents and the even row even field contents.
3. In the hi3531dv100, a frame of image acquired in Video #1, actually including adjacent front and rear 2 fields, is sent to a de-interlacing module of hardware as it is to obtain a de-interlaced frame of image, i.e. a first progressive Video frame, as shown in fig. 5, which shows that the first progressive Video frame is obtained after being sent to hardware as it is to be de-interlaced.
4. The odd and even lines adjacent to the first interlaced video frame are exchanged to form a new frame image, that is, the second interlaced video frame is sent to a de-interlacing module of hardware, and a de-interlaced frame image, that is, the second progressive video frame is obtained, as shown in fig. 5, it is shown that the second interlaced video frame is sent to the hardware for de-interlacing to obtain the second progressive video frame, and the pixels of the frame image are shifted down by one line as a whole, and the empty first line is filled with the pixel data of the original first line.
5. The 3 rd step and the 4 th step are carried out on each frame, one frame of image is respectively obtained after an odd field and an even field of the acquired frame of image are respectively subjected to deinterlacing, the originally acquired 1080I50 image is acquired, 25 frames per second are acquired after deinterlacing, 50 frames are acquired and are represented as Video #2, namely the 1080I50 image is subjected to deinterlacing to obtain a 1080P50 image, and the image fluency and the original image are not different from that of 1080P50 because each field is subjected to deinterlacing.
In this embodiment, a first progressive Video frame and a second progressive Video frame are respectively obtained after an odd field and an even field of a first interlaced Video frame combined by fields are respectively deinterlaced, the image content of the second progressive Video frame is wholly moved down, an interpolation is performed on a vacant line generated by the movement down to fill up the pixel data of the original first line, so as to obtain an updated second progressive Video frame, each frame image is deinterlaced to obtain two frames of progressive images, the input interlaced Video #1 is changed into a progressive Video #2 through deinterlacing operation, and the frame rate and the quality of the images are ensured on the premise of not increasing the cost. The method of the invention can solve the problem that the video frame rate is reduced by half after the interlaced input conversion on the common products with the characteristics similar to Haisi video processing chips.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 6 is a block diagram of an apparatus 500 for de-interlacing video images according to an embodiment. As shown in fig. 6, an apparatus 500 for de-interlacing a video image includes: an obtaining module 502, a transforming module 504, a de-interlacing module 506, a downshifting module 508, and an outputting module 510, wherein:
an obtaining module 502, configured to obtain a field-merged first interlaced video frame, where odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content.
A converting module 504, configured to perform line number conversion on the first interlaced video frame to form a second interlaced video frame, where odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the first interlaced video frame correspond to original odd field image content.
And a de-interlacing module 506, configured to perform de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data, respectively, to obtain a corresponding first progressive video frame and a corresponding second progressive video frame.
And a downward shifting module 508, configured to perform downward shifting on the entire image content of the second progressive video frame, perform interpolation on a vacant line generated by the downward shifting to fill up the image content, and obtain an updated second progressive video frame.
And an output module 510, configured to output and display the first progressive video frame and the updated second progressive video frame.
The video image de-interlacing device 500 in this embodiment obtains a first interlaced video frame with merged fields, where odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content; performing line number conversion on the first interlaced video frame to form a second interlaced video frame, wherein odd lines of the second interlaced video frame correspond to original even field image content, and even lines of the second interlaced video frame correspond to original odd field image content; performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data to obtain a corresponding first progressive video frame and a corresponding second progressive video frame; the image content of the second progressive video frame is wholly moved downwards, and the vacant lines generated by the downward movement are interpolated to fill the image content, so that an updated second progressive video frame is obtained; the first progressive video frame and the updated second progressive video frame are output and displayed, even field images are also utilized through line number conversion, after the odd field and the even field are successively subjected to de-interlacing, image frames with the same field number are respectively obtained, and then the even field de-interlaced images are adjusted, so that the effect after image frame insertion can be achieved after the I-format video is de-interlaced, and the image quality is ensured. The video in the interlaced scanning format can achieve the effect after image frame insertion after being de-interlaced, for example, 1080I50 can achieve the video effect of 1080P50 after being de-interlaced by using the method, and the effect of de-interlacing frame insertion is achieved on the premise of not increasing the cost, so that the method has great advantages in practical application.
In one embodiment, the transformation module 504 is further configured to sequentially obtain odd lines and even lines adjacent to each other in the first interlaced video frame according to the scanning order of the video frame, and exchange the odd lines and the even lines adjacent to each other to form the second interlaced video frame.
In the embodiment, the odd lines and the even lines adjacent to each other are exchanged to form the second interlaced video frame, so that the odd lines of the second interlaced video frame correspond to the original even field image content, and the even lines of the second interlaced video frame correspond to the original odd field image content, so that the video frame meeting the de-interlacing condition can be quickly obtained, and the method is efficient and convenient.
In one embodiment, the downshifting module 508 is further configured to downshift the image content of the second progressive video frame by one line as a whole, and to pad the image content of the original first line of the second progressive video frame to the empty line generated by the downshifting.
In the embodiment, the image content of the second progressive video frame is wholly shifted down by one line; and filling the image content of the original first line of the second progressive video frame to the vacant line generated by line descending to obtain an updated second progressive video frame, wherein the position of the image content of the updated second progressive video frame accords with the position of the original image content when the updated second progressive video frame is played, and the problem of shaking is avoided.
In one embodiment, the acquisition module 502 is further configured to capture video in interlaced scan format from the input port; each video frame in the video is taken as a first interlaced video frame.
In this embodiment, each video frame in the video is processed as a first interlaced video frame, so that each first interlaced video frame forms a corresponding first progressive video frame and an updated second progressive video frame, and the processed video is output and displayed, thereby ensuring the video frame rate and the image quality without increasing the cost.
In one embodiment, the de-interlacing module 506 is further configured to input the first interlaced video frame and the second interlaced video frame into a hardware de-interlacing processing unit in the chip, respectively; the hardware de-interlacing processing unit performs de-interlacing processing according to odd line data corresponding to the first interlaced video frame to obtain a first progressive video frame; and the hardware de-interlacing processing unit performs de-interlacing processing according to the odd line data corresponding to the second interlaced video frame to obtain a second progressive video frame.
In the embodiment, under the condition that the hardware de-interlacing has conditional limitation, the image fluency can be ensured.
For specific limitations of the video image de-interlacing device, reference may be made to the above limitations of the video image de-interlacing method, which are not described herein again. The modules in the video image deinterlacing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 7 is a schematic diagram of an internal structure of an electronic device in one embodiment. As shown in fig. 7, the electronic apparatus includes a processor and a memory connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole electronic equipment. The memory may include non-volatile storage media and internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program is executable by a processor for implementing the method for de-interlacing a video image provided in the above embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The electronic device may be a mobile phone, a server, etc.
The implementation of each module in the video image de-interlacing device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of a method of video image de-interlacing.
A computer program product comprising instructions which, when run on a computer, cause the computer to perform a method of de-interlacing video images.
Any reference to memory, storage, database or other medium used herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A method for deinterlacing a video image, comprising:
acquiring a field-combined first interlaced video frame, wherein odd lines of the first interlaced video frame correspond to original odd field image content, and even lines of the first interlaced video frame correspond to original even field image content;
performing line number conversion on the first interlaced video frame to form a second interlaced video frame, including: sequentially acquiring odd lines and even lines which are adjacent in position in a first interlaced video frame according to the scanning sequence of the video frame; exchanging the adjacent odd lines and even lines to form a second interlaced video frame, wherein the odd lines of the second interlaced video frame correspond to original even field image content, and the even lines of the second interlaced video frame correspond to original odd field image content;
performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to corresponding odd line data respectively to obtain a corresponding first progressive video frame and a corresponding second progressive video frame;
the whole image content of the second progressive video frame is moved downwards, and the vacant lines generated by the downward movement of the lines are interpolated to fill the image content, so as to obtain an updated second progressive video frame, wherein the method comprises the following steps: shifting down the image content of the second progressive video frame by one line; filling the image content of the original first line of the second progressive video frame to the vacant line generated by the line downward movement;
and outputting and displaying the first progressive video frame and the updated second progressive video frame.
2. The method of claim 1, wherein the field-merged first interlaced video frame is progressive image data of odd and even fields formed in the same video memory.
3. The method of claim 1, wherein the manner of interpolating the missing lines resulting from the line downshifting to fill in the interpolation of the image content is customized.
4. The method of claim 1, wherein obtaining the field-merged first interlaced video frame comprises:
collecting a video in an interlaced scanning format from an input port;
and taking each video frame in the video as the first interlaced video frame.
5. The method of claim 1, wherein de-interlacing the first and second interlaced video frames according to the corresponding odd line data comprises:
inputting the first interlaced video frame and the second interlaced video frame into a hardware de-interlacing processing unit in a chip respectively;
the hardware de-interlacing processing unit performs de-interlacing processing according to odd line data corresponding to the first interlaced video frame to obtain the first progressive video frame;
and the hardware de-interlacing processing unit performs de-interlacing processing according to the odd line data corresponding to the second interlaced video frame to obtain the second progressive video frame.
6. An apparatus for de-interlacing a video image, comprising:
an obtaining module, configured to obtain a field-merged first interlaced video frame, where odd-numbered lines of the first interlaced video frame correspond to original odd-field image content, and even-numbered lines of the first interlaced video frame correspond to original even-field image content;
a transform module, configured to perform line number transform on the first interlaced video frame to form a second interlaced video frame, including: sequentially acquiring odd lines and even lines which are adjacent in position in a first interlaced video frame according to the scanning sequence of the video frame; exchanging the odd lines and the even lines adjacent to the positions to form a second interlaced video frame, wherein the odd lines of the second interlaced video frame correspond to original even field image content, and the even lines of the first interlaced video frame correspond to original odd field image content;
the de-interlacing module is used for performing de-interlacing processing on the first interlaced video frame and the second interlaced video frame according to the corresponding odd line data to obtain a corresponding first progressive video frame and a corresponding second progressive video frame;
a downward shifting module, configured to perform downward shifting on the entire image content of the second progressive video frame, perform interpolation on a vacant line generated by the downward shifting to fill up the image content, and obtain an updated second progressive video frame, where the downward shifting module includes: shifting down the image content of the second progressive video frame by one line; filling the image content of the original first line of the second progressive video frame to the vacant line generated by the line downward movement;
and the output module is used for outputting and displaying the first progressive video frame and the updated second progressive video frame.
7. The apparatus of claim 6, wherein the field-merged first interlaced video frame is progressive image data of odd and even fields formed in a same video memory.
8. The apparatus of claim 6, wherein the manner of interpolating the missing lines generated by the line-down shifting is customized.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN202010914724.2A 2020-09-03 2020-09-03 Method and device for de-interlacing video image, electronic equipment and storage medium Active CN112218081B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010914724.2A CN112218081B (en) 2020-09-03 2020-09-03 Method and device for de-interlacing video image, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010914724.2A CN112218081B (en) 2020-09-03 2020-09-03 Method and device for de-interlacing video image, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112218081A CN112218081A (en) 2021-01-12
CN112218081B true CN112218081B (en) 2022-10-21

Family

ID=74048985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010914724.2A Active CN112218081B (en) 2020-09-03 2020-09-03 Method and device for de-interlacing video image, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112218081B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114125346B (en) * 2021-12-24 2023-08-29 成都索贝数码科技股份有限公司 Video conversion method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442649A (en) * 2009-01-08 2009-05-27 杭州华三通信技术有限公司 Processing method and apparatus for removing alternate line and FPGA chip
US20090219439A1 (en) * 2008-02-28 2009-09-03 Graham Sellers System and Method of Deinterlacing Interlaced Video Signals to Produce Progressive Video Signals
CN101621652A (en) * 2009-07-21 2010-01-06 上海华平信息技术股份有限公司 Method for transmitting interlaced picture in high quality and changing the interlaced picture into non-interlaced picture in picture transmission system
CN104683855A (en) * 2014-12-29 2015-06-03 杰发科技(合肥)有限公司 Line-by-line display terminal, video displaying method and image processing device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090219439A1 (en) * 2008-02-28 2009-09-03 Graham Sellers System and Method of Deinterlacing Interlaced Video Signals to Produce Progressive Video Signals
CN101442649A (en) * 2009-01-08 2009-05-27 杭州华三通信技术有限公司 Processing method and apparatus for removing alternate line and FPGA chip
CN101621652A (en) * 2009-07-21 2010-01-06 上海华平信息技术股份有限公司 Method for transmitting interlaced picture in high quality and changing the interlaced picture into non-interlaced picture in picture transmission system
CN104683855A (en) * 2014-12-29 2015-06-03 杰发科技(合肥)有限公司 Line-by-line display terminal, video displaying method and image processing device

Also Published As

Publication number Publication date
CN112218081A (en) 2021-01-12

Similar Documents

Publication Publication Date Title
US6556193B1 (en) De-interlacing video images using patch-based processing
CN1758743B (en) Image processing apparatus using judder-map and method thereof
US8115864B2 (en) Method and apparatus for reconstructing image
CN101621652A (en) Method for transmitting interlaced picture in high quality and changing the interlaced picture into non-interlaced picture in picture transmission system
JPH089341A (en) Digital output image forming method
CN112218081B (en) Method and device for de-interlacing video image, electronic equipment and storage medium
CN100518288C (en) Adaptive vertical temporal flitering method of de-interlacing
US20050270415A1 (en) Apparatus and method for deinterlacing video images
CN112218096B (en) Video image encoding method and apparatus, electronic device, and storage medium
CN109005341B (en) Camera image signal processing method and device
US8866967B2 (en) Method and apparatus for motion adaptive deinterlacing
WO2000011612A1 (en) Methods and apparatus for reducing the amount of buffer memory required for decoding mpeg data and for performing scan conversion
JP3875286B2 (en) Motion vector generation method
CN107071326B (en) Video processing method and device
EP1418754B1 (en) Progressive conversion of interlaced video based on coded bitstream analysis
KR20030019244A (en) Methods and apparatus for providing video still frame and video capture features from interlaced video signals
Braun et al. Motion-compensating real-time format converter for video on multimedia displays
EP1560427B1 (en) Method and system for minimizing both on-chip memory size and peak dram bandwitch requirements for multifield deinterlacers
US10015513B2 (en) Image processing apparatus and image processing method thereof
US9578280B2 (en) Progressive displaying terminal and video playing method and image processing apparatus thereof
CN111476803B (en) Video processing method and related equipment
JP3587188B2 (en) Digital image signal processing apparatus and processing method
KR100706994B1 (en) A Method and Apparatus of FRC with field based for de-interlacing
KR100518477B1 (en) HDTV Down Conversion System
JP2002300537A (en) Video frequency converter

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Method and device for deinterlacing video images, electronic devices, and storage media

Effective date of registration: 20230912

Granted publication date: 20221021

Pledgee: Guangxi Guangtou Zhanxin Investment Fund Partnership Enterprise (L.P.)

Pledgor: IFREECOMM TECHNOLOGY Co.,Ltd.

Registration number: Y2023980056247

PE01 Entry into force of the registration of the contract for pledge of patent right