CN108495073B - Video image frame field detection method, storage medium and computer - Google Patents
Video image frame field detection method, storage medium and computer Download PDFInfo
- Publication number
- CN108495073B CN108495073B CN201810272008.1A CN201810272008A CN108495073B CN 108495073 B CN108495073 B CN 108495073B CN 201810272008 A CN201810272008 A CN 201810272008A CN 108495073 B CN108495073 B CN 108495073B
- Authority
- CN
- China
- Prior art keywords
- field
- solution
- image
- frame
- characteristic
- 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
Links
- 238000001514 detection method Methods 0.000 title claims description 11
- 238000000034 method Methods 0.000 claims abstract description 18
- 238000004590 computer program Methods 0.000 claims description 7
- 238000004422 calculation algorithm Methods 0.000 abstract description 3
- 238000012216 screening Methods 0.000 abstract description 2
- 101100309447 Caenorhabditis elegans sad-1 gene Proteins 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 238000001914 filtration Methods 0.000 description 2
- 230000000750 progressive effect Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/01—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
- H04N7/0112—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level one of the standards corresponding to a cinematograph film standard
- H04N7/0115—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level one of the standards corresponding to a cinematograph film standard with details on the detection of a particular field or frame pattern in the incoming video signal, e.g. 3:2 pull-down pattern
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/142—Edging; Contouring
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Television Systems (AREA)
Abstract
A method for detecting image frame field, storage medium and computer, wherein the method includes the following steps, count the number of macro blocks that the moving object edge of the present picture takes up, whether the ratio of the number of all macro blocks in the present picture is greater than the first preset value, if not, judge the present picture is the frame characteristic, if yes, continue judging the macro blocks that the moving object edge takes up, if the macro block greater than the second preset value has the field characteristic, judge the present picture is the field characteristic, otherwise, judge the present picture is the frame characteristic; and de-interleaving the current image judged as the field characteristic. The invention solves the problem of deinterlacing the image by screening the characteristics of the frame field through an algorithm with moderate complexity.
Description
Technical Field
The present invention relates to the field of image processing, and in particular, to a method, a storage medium, and a computer for detecting an image frame field of each frame of a global video.
Background
Early devices replaced progressive signals with interlaced signals due to limitations in processing speed and bandwidth. Modern display devices, such as liquid crystal displays, plasma displays, digital projectors, etc., all support progressive scan signals only. When the upper and lower fields are combined into one frame, because there is a time difference between the fields, if there is a movement of the picture object in the two fields, the combined image of the frame may generate a "jaggy" and "horizontal streak" phenomenon. Therefore, it is necessary to detect and calibrate such a phenomenon, and then to perform processing to remove such a phenomenon.
The de-interlacing firstly needs to detect whether the current frame is a frame obtained by combining two fields or a frame per se, and only the frame obtained by combining two fields needs to be de-interlaced and then the phenomena of 'saw tooth' and 'transverse stripe' are removed, so that the phenomenon cannot be generated under the condition that the frame per se is a frame. At present, a plurality of algorithms for frame field detection are provided, but the calculation complexity is high, so that more calculation resources are consumed, and the real-time performance is influenced by different degrees; or the detection algorithm is simple, which results in inaccurate detection.
Disclosure of Invention
For this reason, it is desirable to provide a global field detection method that is algorithmically simple to de-interlace the image by determining field characteristics;
in order to achieve the above object, the inventor provides a method for detecting image frame field, comprising the following steps of counting the number of macro blocks occupied by the edge of a moving object in a current image, wherein the ratio of the number of the macro blocks occupied by the edge of the moving object in the current image to the number of all the macro blocks in the current image is greater than a first preset value, if not, the current image is judged to be the frame characteristic, if yes, the macro blocks occupied by the edge of the moving object are continuously judged, if the macro blocks greater than a second preset value have the field characteristic, the current image is judged to be the field characteristic, otherwise;
and de-interleaving the current image judged as the field characteristic.
Specifically, the method further includes the step of judging that the current image is the field characteristic if the macro block with the field characteristic larger than the second preset value has the field characteristic, and judging that the current image is the frame characteristic if the number of the images with the field characteristic is larger than the third preset value.
Specifically, the method further comprises the step of judging the field sequence, wherein the step of judging the field sequence specifically comprises the steps of subtracting the bottom field of the previous frame of image from the top field of the current image to obtain a first solution, subtracting the top field of the previous frame of image from the bottom field of the current image to obtain a second solution, judging the relative size between the first solution and the second solution if the absolute value of the difference between the first solution and the second solution is greater than a fourth preset value, and adding one to the priority number of the top field if the first solution is smaller than the second solution; if the first solution is larger than the second solution, adding one to the bottom field priority number;
and judging whether the top field priority number is smaller than the bottom field priority number or not until the current image, if so, judging the field sequence as bottom field priority, and otherwise, judging the top field priority.
A kind of image frame field storage medium, store the computer program, the said computer program is carried out when being run and includes the following steps, count the number of macroblock that the moving object edge of the present picture takes up, take up the ratio of all macroblock numbers of the present picture and is greater than the first preset value, if not, judge the present picture is the frame characteristic, if continue judging in the macroblock that the edge of the moving object takes up, if the macroblock greater than the second preset value has field characteristic, judge the present picture is the field characteristic, otherwise judge the present picture is the frame characteristic;
and de-interleaving the current image judged as the field characteristic.
Specifically, the computer program further executes a step when being executed, and the step is further included if the macro block larger than the second preset value has the field characteristic, and the step is further included if the number of the images having the field characteristic is judged to be larger than the third preset value, and the current image is judged to be the field characteristic, otherwise, the current image is judged to be the frame characteristic.
Specifically, the computer program further executes a step when executed, and the field sequence determination specifically includes that the top field of the current image is subtracted from the bottom field of the previous frame image to obtain a first solution, the bottom field of the current image is subtracted from the top field of the previous frame image to obtain a second solution, if an absolute value of a difference between the first solution and the second solution is greater than a fourth preset value, a relative size between the first solution and the second solution is determined, and if the first solution is smaller than the second solution, a top field priority number is increased by one; if the first solution is larger than the second solution, adding one to the bottom field priority number;
and judging whether the top field priority number is smaller than the bottom field priority number or not until the current image, if so, judging the field sequence as bottom field priority, and otherwise, judging the top field priority.
An image frame field detection computer comprising the storage medium as described above.
The top and bottom field sequence is determined by the scheme, and the field characteristics and the filtering of the texture edge of the moving object after deinterlacing are detected by the frame field, so that the saw teeth and the transverse stripes are further reduced, and the technical effect of image optimization is achieved.
Drawings
Fig. 1 is a flowchart of a method for detecting a field of a video image according to an embodiment of the present invention.
Detailed Description
To explain technical contents, structural features, and objects and effects of the technical solutions in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
Referring to fig. 1, a method for detecting a frame field of a global video image according to the present invention includes steps of S100 counting the number of macro blocks occupied by the edges of a moving object in a current image, determining whether a ratio of the number of the macro blocks occupied by the moving object in the current image to the number of all the macro blocks in the current image is greater than a first preset value, if not, determining that the current image is a frame characteristic, if yes, performing step S102 to continue determining the macro blocks occupied by the edges of the moving object, and if the macro blocks greater than a second preset value have a field characteristic, determining that the current image is a; specifically, the number M of macroblocks occupied by the edge of the moving object is counted for the current image, which is a proportion of the number N of macroblocks counted as a whole, if M/N is greater than a first threshold (assumed to be T1), the field characteristic needs to be further determined, and if M/N is less than the threshold, the image is determined to be the frame characteristic. Then, in the further judgment, the image is judged to be the field characteristic if more than K macro blocks have the field characteristic in M macro blocks occupied by the edge of the moving object of the current image.
Then, the process proceeds to step S108 to de-interleave the current image determined as the field characteristic. Deinterlacing is used to remove "jaggies" and "lateral stripes" in the image. The invention has the advantages of moderate complexity and effective and accurate frame field detection.
In a further specific embodiment, as shown in fig. 1, if the macro block having the field characteristic is larger than the second preset value, the method further includes a step of determining that the current image has the field characteristic if the number of images having the field characteristic is larger than the third preset value in step S104, otherwise, determining that the current image has the frame characteristic. The specific determination steps may be as follows: if it is determined through the step S100 that the current picture is a frame and the number of pictures num _ field of the previously counted field property is greater than 0, num _ field is cleared to zero and the picture count num _ frame of the frame property is counted to 1, num _ frame is accumulated by 1 and num _ field is set to 0 if the picture count of the previous frame property is greater than 0. If the current picture is decided as a field by step S102 and the num _ field is greater than 0 before, num _ field is accumulated by 1 and the picture count of the frame characteristic is set to 0. If the picture count num _ frame of the frame characteristic of the previous technique is greater than 0, it is set to 0 and num _ field is set to 1. Num _ field and num _ frame remain unchanged if the field properties of the current picture cannot be judged. By the method, the continuous frame characteristic images and the continuous field characteristic images are counted respectively, for each frame image, only if the image count of the frame characteristic continuously judged in the previous step exceeds the set threshold and is judged as the frame characteristic image, the current image is determined to be the frame characteristic image under the double conditions, and similarly, only if the image count of the field characteristic continuously judged in the previous step exceeds the set threshold and is judged as the field characteristic image, the current image is determined to be the field characteristic image under the double conditions. By designing the steps, the field characteristics of each frame image in the current video can be more accurately determined, and the judgment conversion between the frame characteristic image and the field characteristic image on the time line of the current video can be more stable by the judgment after the double screening condition, so that the judgment result cannot be frequently jumped. Facilitating image processing in subsequent steps.
In some other specific embodiments, the method further includes step S106, where the field order determination specifically includes subtracting the bottom field of the previous frame of image from the top field of the current image to obtain a first solution, subtracting the top field of the previous frame of image from the bottom field of the current image to obtain a second solution, determining a relative size between the first solution and the second solution if an absolute value of a difference between the first solution and the second solution is greater than a fourth preset value, and adding one to the top field priority number if the first solution is smaller than the second solution; if the first solution is larger than the second solution, adding one to the bottom field priority number; for example, subtracting the bottom field solution sad0 of the previous frame image from the top field of the current image, subtracting the top field solution sad1 from the bottom field of the current image, if the absolute value abs (sad0-sad1) of the difference between sad0 and sad1 is greater than the fourth preset value T3, determining the field order, determining the relative size between the first solution and the second solution, and if sad0< sad1, adding one to the top field priority count num 0; if sad0> sad1, the bottom field priority count is incremented by one. If the absolute value of the difference is smaller than the threshold value, counting is not carried out.
And judging whether the top field priority number is smaller than the bottom field priority number or not until the current image, if so, judging the field sequence as bottom field priority, and otherwise, judging the top field priority. By the method, the frame sequence and the field sequence of the current video can be determined, and convenience can be provided for better hardware de-interleaving in subsequent steps.
By the method, the invention effectively determines the field characteristics of each image in the video series;
a top-bottom field order of the images is also provided for detecting field characteristics. In the de-interlacing process, the texture edge of the moving object is determined, and only the edge area is processed, so that the operation amount is reduced and the accuracy is improved. And finally, detecting the de-interlacing effect of the texture edge of the moving object, and further smoothing and filtering the poor effect.
It should be noted that, although the above embodiments have been described herein, the invention is not limited thereto. Therefore, based on the innovative concepts of the present invention, the technical solutions of the present invention can be directly or indirectly applied to other related technical fields by making changes and modifications to the embodiments described herein, or by using equivalent structures or equivalent processes performed in the content of the present specification and the attached drawings, which are included in the scope of the present invention.
Claims (5)
1. A video image frame field detection method is characterized by comprising the following steps of counting the number of macro blocks occupied by the edge of a moving object in a current image, judging whether the ratio of the number of the macro blocks occupied by the edge of the moving object in the current image to the number of all the macro blocks in the current image is greater than a first preset value, if not, judging that the current image is in a frame characteristic, if so, continuing to judge the macro blocks occupied by the edge of the moving object, if the macro blocks greater than a second preset value have the field characteristic and the number of the images with the field characteristic determined before is greater than a third preset value, judging that the current image is in a field characteristic image, and if not;
and de-interleaving the current image which is judged to be the field characteristic image.
2. The method according to claim 1, further comprising the step of determining the field order, which specifically includes subtracting the top field of the previous frame from the top field of the current frame to obtain a first solution, subtracting the top field of the previous frame from the bottom field of the current frame to obtain a second solution, determining the relative size between the first solution and the second solution if the absolute value of the difference between the first solution and the second solution is greater than a fourth predetermined value, and adding one to the top field priority if the first solution is smaller than the second solution; if the first solution is larger than the second solution, adding one to the bottom field priority number;
and judging whether the top field priority number is smaller than the bottom field priority number or not until the current image, if so, judging the field sequence as bottom field priority, and otherwise, judging the top field priority.
3. A storage medium is characterized in that a computer program is stored, the computer program executes a video image frame field detection step when being executed, the number of macro blocks occupied by the edge of a moving object of a current image is counted, whether the ratio of the number of the macro blocks occupied by the edge of the current image to the number of all the macro blocks of the current image is greater than a first preset value or not is counted, if not, the current image is judged to be a frame characteristic, if yes, the macro blocks occupied by the edge of the moving object are continuously judged, if the macro blocks greater than a second preset value have a field characteristic, and the number of the images judged to have the field characteristic before is greater than a third preset value, the current image is judged to be a field characteristic image, otherwise;
and de-interleaving the current image which is judged to be the field characteristic image.
4. The storage medium of claim 3, wherein the computer program when executed further performs the steps of determining a field order, including subtracting a top field of a previous frame of image from a top field of a current frame of image to obtain a first solution, subtracting a top field of a previous frame of image from the bottom field of the current frame of image to obtain a second solution, determining a relative magnitude between the first solution and the second solution if an absolute value of a difference between the first solution and the second solution is greater than a fourth predetermined value, and adding one to a top field priority if the first solution is less than the second solution; if the first solution is larger than the second solution, adding one to the bottom field priority number;
and judging whether the top field priority number is smaller than the bottom field priority number or not until the current image, if so, judging the field sequence as bottom field priority, and otherwise, judging the top field priority.
5. A video image field detection computer, characterized in that it comprises a storage medium according to claim 3 or 4.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810272008.1A CN108495073B (en) | 2018-03-29 | 2018-03-29 | Video image frame field detection method, storage medium and computer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810272008.1A CN108495073B (en) | 2018-03-29 | 2018-03-29 | Video image frame field detection method, storage medium and computer |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108495073A CN108495073A (en) | 2018-09-04 |
| CN108495073B true CN108495073B (en) | 2020-11-06 |
Family
ID=63316929
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810272008.1A Active CN108495073B (en) | 2018-03-29 | 2018-03-29 | Video image frame field detection method, storage medium and computer |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108495073B (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111885335B (en) * | 2020-06-19 | 2022-03-29 | 成都东方盛行电子有限责任公司 | Ultrahigh-definition down-conversion rendering method |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1477870A (en) * | 2002-07-25 | 2004-02-25 | ���ǵ�����ʽ���� | Deinterlacing device and method |
| CN1599446A (en) * | 2004-07-26 | 2005-03-23 | 西安交通大学 | Adaptive Motion Detection Method Based on Digital TV Post-processing and De-interlacing Technology |
| CN1738431A (en) * | 2005-09-08 | 2006-02-22 | 上海广电(集团)有限公司中央研究院 | Frame field self-adaptive detection method |
| CN1889673A (en) * | 2006-06-12 | 2007-01-03 | 北京中星微电子有限公司 | Motion detecting and uninterlacing method for digital video frequency processing and apparatus thereof |
| CN101420615A (en) * | 2008-11-18 | 2009-04-29 | 华为技术有限公司 | Method and device for detecting video field sequence and video processing system |
| CN102509311B (en) * | 2011-11-21 | 2015-01-21 | 华亚微电子(上海)有限公司 | Motion detection method and device |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7965770B2 (en) * | 2004-03-31 | 2011-06-21 | Intel Corporation | Shared logic for decoding and deinterlacing of compressed video |
| US8483282B2 (en) * | 2007-10-12 | 2013-07-09 | Qualcomm, Incorporated | Entropy coding of interleaved sub-blocks of a video block |
| CN101309385B (en) * | 2008-07-09 | 2010-09-08 | 北京航空航天大学 | A Deinterlacing Method Based on Motion Detection |
| CN101534445B (en) * | 2009-04-15 | 2011-06-22 | 杭州华三通信技术有限公司 | A video processing method and system and deinterleaving processor |
| CN102263956B (en) * | 2011-07-21 | 2013-03-20 | 福建星网视易信息系统有限公司 | Mobile detecting method based on motion vector |
| CN103458237B (en) * | 2012-05-29 | 2016-09-21 | 北京数码视讯科技股份有限公司 | The determination method and apparatus of Video coding mode and method for video coding and device |
| CN103763501B (en) * | 2014-01-14 | 2015-09-23 | 合一网络技术(北京)有限公司 | A kind of anti-alternate algorithm of adaptive video and device thereof |
| CN105898179A (en) * | 2015-12-14 | 2016-08-24 | 乐视云计算有限公司 | Deinterlace method and device for interlaced video |
-
2018
- 2018-03-29 CN CN201810272008.1A patent/CN108495073B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1477870A (en) * | 2002-07-25 | 2004-02-25 | ���ǵ�����ʽ���� | Deinterlacing device and method |
| CN1599446A (en) * | 2004-07-26 | 2005-03-23 | 西安交通大学 | Adaptive Motion Detection Method Based on Digital TV Post-processing and De-interlacing Technology |
| CN1738431A (en) * | 2005-09-08 | 2006-02-22 | 上海广电(集团)有限公司中央研究院 | Frame field self-adaptive detection method |
| CN1889673A (en) * | 2006-06-12 | 2007-01-03 | 北京中星微电子有限公司 | Motion detecting and uninterlacing method for digital video frequency processing and apparatus thereof |
| CN101420615A (en) * | 2008-11-18 | 2009-04-29 | 华为技术有限公司 | Method and device for detecting video field sequence and video processing system |
| CN102509311B (en) * | 2011-11-21 | 2015-01-21 | 华亚微电子(上海)有限公司 | Motion detection method and device |
Non-Patent Citations (1)
| Title |
|---|
| 一种新型基于运动矢量检测的去隔行算法;堵国樑;《电子器件》;20071225;第30卷(第6期);全文 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108495073A (en) | 2018-09-04 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7982798B2 (en) | Edge detection | |
| EP1585326A1 (en) | Motion vector estimation at image borders for frame rate conversion | |
| US8023041B2 (en) | Detection of moving interlaced text for film mode decision | |
| US7663701B2 (en) | Systems, methods, and apparatus for noise reduction | |
| US8054381B2 (en) | Apparatus and method for frame rate up conversion | |
| US20080246885A1 (en) | Image-processing method and device | |
| EP2107521B1 (en) | Detecting a border region in an image | |
| KR20070116717A (en) | METHOD AND APPARATUS FOR MEP noise noise intensity of compressed digital image | |
| TWI504248B (en) | Image processing apparatus and image processing method | |
| CN108495073B (en) | Video image frame field detection method, storage medium and computer | |
| CN111294545B (en) | Image data interpolation method and device, storage medium and terminal | |
| CN102497525B (en) | A Motion Compensated Deinterlacing Method | |
| US20120288001A1 (en) | Motion vector refining apparatus | |
| CN101808190B (en) | Image processing device and image processing method | |
| JP4732068B2 (en) | Pull-down detection apparatus and pull-down detection method | |
| US20090167939A1 (en) | Video signal processor and video signal processing method | |
| US20040114055A1 (en) | Apparatus, method, and medium including computer readable code for measuring noise of an image signal | |
| JP4289170B2 (en) | Noise amount measuring apparatus and video receiver | |
| KR100909032B1 (en) | Motion adaptive deinterlacing method and apparatus | |
| JP4699776B2 (en) | Pull-down detection apparatus and pull-down detection method | |
| JPWO2013150824A1 (en) | Image processing apparatus and method, and image processing program | |
| KR100252943B1 (en) | scan converter | |
| JP2010166349A (en) | Noise reduction apparatus and program therefor | |
| JP2006237696A (en) | Pull-down detection apparatus and pull-down detection method | |
| US8040437B2 (en) | Method and system for analog video noise detection |
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 | ||
| CB02 | Change of applicant information |
Address after: 350003 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China Applicant after: Ruixin Microelectronics Co., Ltd Address before: 350003 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China Applicant before: Fuzhou Rockchips Electronics Co.,Ltd. |
|
| CB02 | Change of applicant information | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |