CN102572289A - Method and device for detecting and processing movie mode - Google Patents
Method and device for detecting and processing movie mode Download PDFInfo
- Publication number
- CN102572289A CN102572289A CN2011102200314A CN201110220031A CN102572289A CN 102572289 A CN102572289 A CN 102572289A CN 2011102200314 A CN2011102200314 A CN 2011102200314A CN 201110220031 A CN201110220031 A CN 201110220031A CN 102572289 A CN102572289 A CN 102572289A
- Authority
- CN
- China
- Prior art keywords
- detection
- sequence
- mode
- processing
- field
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000005096 rolling process Methods 0.000 claims abstract description 65
- 230000009191 jumping Effects 0.000 claims abstract description 11
- 238000001514 detection method Methods 0.000 claims description 179
- 238000003672 processing method Methods 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 20
- 238000006243 chemical reaction Methods 0.000 claims description 18
- 238000012163 sequencing technique Methods 0.000 claims description 17
- 230000007246 mechanism Effects 0.000 claims description 4
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 230000000875 corresponding effect Effects 0.000 description 30
- 230000000694 effects Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 7
- 230000000750 progressive effect Effects 0.000 description 5
- 230000007547 defect Effects 0.000 description 3
- 230000032669 eclosion Effects 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 2
- 230000000903 blocking effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Studio Devices (AREA)
- Television Systems (AREA)
Abstract
The invention discloses a method and a device for detecting and processing a movie mode. The method comprises the steps of: dividing a screen into a zone where subtitles may be displayed and a non-subtitle zone; detecting the divided screen zones; making statistics on pixels of moving/rolling subtitles in the zone where subtitles may be displayed and rules of the detecting sequence of the non-subtitle zone and judging whether subtitles exists; and selectively performing de-interlacing processing of a television and/or processing a movie mode and/or processing the above two ways in a mixed manner according to a detecting result. The method and the device for detecting and processing the movie mode have the advantages and beneficial effects that: a movie mode with moving/rolling subtitles can be simply and rapidly detected and processed to prevent from subtitles feathering or jumping out of the movie mode caused by failing to detect the moving/rolling subtitles, and avoid the shortcoming of lowered image quality caused by processing the subtitles only by the de-interlacing technology of a television.
Description
Technical Field
The invention relates to a detection and processing method and a device of a film mode, in particular to a detection and processing method and a device of a 3-2 pull-down film mode with moving/rolling subtitles.
Background
At present, with the coming of the digital television era and the popularization of progressive scanning television, the television deinterlacing technology is urgently needed to be applied to the film, and the method is applied to the common interlaced scanning video stream of odd fields or even fields with half of data volume and has good effect. But if applied to movie video, the effect is not ideal. This is because movies are typically filmed at 24 frames per second. In order to smoothly play a movie on a television, the movie must be converted to 60 fields per second interlaced (NTSC) during the telecine process, referred to as the 3-2 pull down method. That is, the 3-2 pull-down is to convert 2 24Hz frames into 5 60Hz fields, i.e., the first frame is divided into two fields, the 1 st field is repeated to make 3 fields, the 2 nd frame is divided into two fields to make 2 fields, and so on. Since 2 fields or 3 fields from the same frame are from the same frame, if the inserted copy field is picked out and removed, the other two fields are combined into a frame only by using a merging method, and the effect of the original shooting is certainly better than that of the television deinterlacing technology.
Of course, since the telecine video stream and other kinds of video streams are mixed video streams formed by interleaving with each other, real-time detection of the mixed video stream is required, so that when a movie signal is found, the movie mode is switched to the deinterlace movie mode in time, and the movie picture quality can be recovered to the maximum extent. This technique of detecting telecine signals in a mixed video stream is referred to as film mode detection. After detecting such 3-2 pulldown video de-interlacing, the best processing method is to determine from which frame each field signal came, and restore it to the original progressive frame by the "weave" method, which is commonly referred to as film mode processing.
However, for distributing special cases such as breaking news, interlaced subtitles are often frequently added to video sequences. As shown in fig. 1, a 3-2 movie mode with move/scroll subtitles is split into fields. Each picture comprises the two fields below it, for a total of 5 pictures in a sequence of 10 fields. The added subtitles often scroll horizontally under the picture, the text being in different positions at each field. The figure is a circle which is scrolled to the right and is processed by 3-2 pull-down, the positions of the circles of the 1 st field, the 2 nd field and the 3 rd field are the same, and characters which are scrolled to the left in the direction are changed every field. Specifically, in fig. 1A, two fields in one frame in the movie shot are shown, the first field in fig. 1B is actually a copy of the first field in fig. 1A, the second field in fig. 1B is actually two fields belonging to the same frame as the first field in fig. 1C, the second field in fig. 1C is actually two fields in one frame as the first field in fig. 1D, the second field in fig. 1D is actually a copy of the second field in fig. 1C, and 2 fields in fig. 1E are from the same frame. The correct film mode processing should be to cull the duplicate field (the second field in fig. 1B and the second field in fig. 1D), merging the two fields from the same frame. If the field sequence with moving/rolling subtitles is detected as regular 3-2 pull down fields, and two fields from the same frame are merged using the "weave" method, then significant interlace feathering will appear around the moving/rolling subtitles, with the effect of subtitle feathering as shown in the upper graph of fig. 1A. This is absolutely not allowed in the current high-demand, high-definition visual display age; of course, if the movie mode is not detected, the user will jump out of the movie mode and enter the normal de-interlacing processing method, which is good for scrolling the text, but the effect is far from good for the above video. Fig. 2 shows the effect of direct "see" when movie mode is detected, and it can be seen that the effect of the upper part of the area circle is very good, while the lower part of the subtitle area has obvious feathering, and the enlargement effect is as shown in fig. 1A.
A method for detecting moving interlaced subtitles in a video sequence is proposed in patent 200710006202.7. The detection of moving interlaced subtitles is provided for film mode decision, which can correctly detect moving interlaced subtitles in a video sequence from a film by telecine and solves the problems of 3-2 pull-down detection and 2-2 pull-down detection, however, the calculation method in the patent method is complicated and the accuracy of correctly detecting the scanned subtitles is not high.
In addition, there are 3-2 pull-down film mode detection methods that typically focus on detecting standard 3-2 pull-down field sequences without taking into account the presence of the move/scroll subtitles. For example, 200810306453.X, 200610060810.1 each propose a 3-2 pull-down film mode detection method, which detects the film mode according to the characteristic that the odd field and even field images generated by the same frame are highly correlated, if they are used to detect the moving/rolling caption condition, the caption eclosion will appear in the processing, if it is not, the film mode will jump out, and the film mode will be processed according to the TV de-interlacing technique. Either processing result will seriously affect the picture quality.
In summary, in order to avoid the above situation and improve the detection and processing accuracy of the tv-movie video stream, the invention of a new detection and processing method and device for detecting and processing the 3-2 movie mode of the moving/rolling caption in the fixed area and performing the corresponding processing is imperative.
Disclosure of Invention
The invention aims to solve the following technical problems:
first, for various NTSC-system videos converted from a film source by using a 3-2 pull-down method, a 3-2 film mode can be accurately detected, and a correct processing method and a correct processing device are provided.
Secondly, when the 3-2 pull-down method is used for converting the movie source into the NTSC system video, if the moving subtitles exist, whether the moving subtitles exist in the 3-2 movie mode can be detected, and if the moving subtitles exist in the 3-2 pull-down movie mode, the regional processing is required.
The invention provides a 3-2 pull-down film mode detection and processing method and device considering moving/rolling subtitles; the method comprises the steps of dividing a screen into a region where subtitles can appear and a non-subtitle region, judging whether moving/rolling subtitles exist in the region where the subtitles can appear on the screen, if so, performing television de-interlacing processing on the region, and performing film mode processing on other regions. After the processing, the resolution of most screens can be restored without distortion, and the flowing subtitles can not be jagged or feathered.
The purpose of the invention is realized by the following technical scheme:
a detection and processing method of film mode includes the following steps:
dividing a screen area, and dividing the screen into an area where subtitles can appear and a non-subtitle area;
and detecting the divided screen area, respectively counting rules of detection sequences of pixel points of moving/rolling captions and non-caption areas in the area where the captions possibly appear, and judging whether the captions exist or not and whether the captions belong to a 3-2 movie mode or not.
And selectively performing television de-interlacing processing and/or movie mode processing and/or processing in a mixed mode of the television de-interlacing processing and/or the movie mode processing according to the detection result.
The detection and processing method of the movie mode is a detection and processing method of a 3-2 movie mode with moving/rolling subtitles; the detection of the 3-2 film mode is based on that every 2 fields or 3 fields of the 3-2 pull-down film mode interlaced signal come from one frame, and the detection sequence is performed according to the rule of large size.
The method for detecting the telecine signal in the non-subtitle area comprises the following steps:
A. calculating the absolute difference between the n +2 th field and the same polarity field of the interlaced scanning signal of the nth field in the non-caption area, and obtaining a 3-2 conversion detection sequence according to the obtained same polarity field difference;
B. and judging whether the obtained detection sequence accords with a corresponding standard detection sequence, if so, determining the detection sequence is a movie signal corresponding to the standard detection sequence, and otherwise, determining the detection sequence is a television signal.
And if the moving/rolling subtitles are judged according to the detection result, performing television de-interlacing processing on the area, and performing film mode processing on other areas.
The film mode detection sequence of the non-subtitle area is not the 3-2 film mode according to the detection result, and is the television mode, and television de-interlacing processing is carried out; or,
if the film mode detection sequence of the non-caption area is in a 3-2 film mode and moving/rolling captions exist, performing film mode processing on the non-caption area and performing television de-interlacing processing on the caption area; or,
and if the full screen is in the movie mode, performing movie mode processing on the full screen.
The step of obtaining the detection sequence group of the non-caption area comprises the following steps: if the homopolar field difference of the current field of the non-caption area is the minimum of five fields and is smaller than a certain proportion of the previous field, and the homopolar field difference of the current field is smaller than a certain threshold value, the element corresponding to the current field is considered to be 0, otherwise, the element is considered to be 1; sequentially arranging the continuous 10 sequence values, and combining the currently generated sequence value and the previously generated continuous nine sequence values to obtain a 3-2 conversion detection sequence group when each element is received; comparing the obtained detection sequence group with the standard detection sequence group, and when the sequence in the detection sequence group is the same as the sequence value in the standard detection sequence group, determining that the detection state is in a 3-2 film mode
The method also comprises the error correction step of the detection sequence column group of the non-caption area: when the detected sequence does not conform to the standard sequence and the homopolar field difference of the field is less than the threshold value of the still image, the detected sequence is regarded as the still image in the film mode, and the detected sequence is set to the standard mode without jumping out of the film mode.
The step of judging whether the moving/rolling caption exists comprises the following steps: in the region where subtitles may appear, if the difference between fields of the same polarity is large and three consecutive fields have a movement of N pixels in the same direction of motion, and if the number of points of moving/scrolling subtitles is greater than a predetermined threshold, it is considered that there is moving/scrolling subtitles, where N takes a value of 2-5.
The jump-in and jump-out mechanism of the TV de-interlacing process and/or the movie mode process and/or the mixed process of the two processes comprises: when the sequence values of the detection sequence group and the sequence values of the standard detection sequence group are sequentially compared, when the times of continuous mutual coincidence reach a cut-in threshold value, the mode of converting the television film into 3-2 is judged, and the deinterlacing processing of converting into 3-2 is switched; and comparing the sequence value of the sequencing detection column group with the sequence value of the standard sequencing detection column group in sequence, and jumping out of a 3-2 conversion de-interlacing mode when the continuous inconsistent times reach a cut-out threshold value.
Film mode detection detects only the luminance channel, and the other chrominance channels are processed according to the processing of the luminance channel.
A film mode detection and processing device, comprising:
the memory module is used for storing interlaced scanning signals of an n-2 field, an n-1 field, an n field and an n +1 field which are input sequentially and sending the stored interlaced scanning signals to the statistic module;
a statistic module: the system comprises a screen area and a statistical data, wherein the screen area is used for dividing the screen area and counting the data, the divided screen area comprises an area where subtitles can appear and a non-subtitle area, and the statistical data comprises the number of pixel points of horizontal movement/rolling subtitles of the subtitle area and the homopolar field difference of the non-subtitle area;
a mode judging module: and detecting the divided screen areas, and respectively judging whether the areas where the subtitles possibly appear have the rule of detection sequences of moving/rolling subtitles and non-subtitle areas to obtain a moving/rolling subtitle mark Txt _ Flag and whether the non-subtitle areas belong to a 3-2 movie mode.
Different mode processing module: and selectively performing television de-interlacing processing and/or movie mode processing and/or the aforesaid mixed mode of regional processing according to the detection result.
The step of judging whether the mode module detects moving/rolling captions comprises the following steps: in the area where the caption may appear, if the difference between fields with the same polarity is large, and the continuous three fields have the movement of N pixel points in the same movement direction, and if the number of the pixel points of the moving/rolling caption is greater than a predetermined threshold value, the moving/rolling caption is considered to be present; otherwise, it is not.
The different mode processing module carries out television de-interlacing processing according to the received film mode signal output by the film mode detection module, if the film mode detection sequence of the non-caption area is not the 3-2 film mode, the film mode detection sequence is the television mode; or,
if the film mode detection sequence of the non-caption area is in a 3-2 film mode and moving/rolling captions exist, performing 3-2 film mode processing on the non-caption area and performing television de-interlacing processing on the caption area; or,
and if the full screen is in the movie mode, performing movie mode processing on the full screen.
The step of obtaining the detection sequence group of the non-caption area by the judgment mode module comprises the following steps: if the same polarity field difference of the current field of the non-caption area is the minimum of five fields in total, and is smaller than the previous field by a certain proportion, and the same polarity field difference of the current field is smaller than a certain threshold value, the current field is considered as being small corresponding to the detection sequence, and otherwise, the current field is considered as being large; sequentially arranging the continuous 10 sequence values, and combining the currently generated sequence value and the previously generated continuous nine sequence values to obtain a 3-2 conversion detection sequence group when each element is received; and comparing the obtained detection sequence group with the standard detection sequence group, and when the sequence in the detection sequence group is the same as the sequence value in the standard detection sequence group, determining that the detection state is in a 3-2 movie mode.
The different mode processing module also comprises an error correction step of the detection sequence of the non-caption area: when the detection sequence does not conform to the standard sequence and the homopolar field difference of the field is smaller than the preset threshold value of the still image, the still image in the film mode is considered, the detection sequence is set as the standard detection sequence, and the film mode is not jumped out.
The jump-in and jump-out mechanism of TV de-interlacing processing and/or film mode processing and/or the mixed processing of the two in different mode processing modules comprises the following steps: when the sequence values of the detection sequence group and the sequence values of the standard detection sequence group are sequentially compared, when the times of continuous mutual coincidence reach a cut-in threshold value, the mode of converting the television film into 3-2 is judged, and the deinterlacing processing of converting into 3-2 is switched; and comparing the sequence value of the sequencing detection column group with the sequence value of the standard sequencing detection column group in sequence, and jumping out of a 3-2 conversion de-interlacing mode when the continuous inconsistent times reach a cut-out threshold value.
Compared with the prior art, the invention has the following advantages and beneficial effects: the method can simply and quickly detect and process the film mode with the moving/rolling caption, and prevents the defect that the picture quality is reduced because the caption eclosion phenomenon or the film mode jumping out of the film mode which is caused by the fact that the moving/rolling caption cannot be detected has to be processed according to the television deinterlacing technology.
Description of the drawings:
the objects, specific structural features and advantages of the present invention will be further understood from the following description of the embodiments of the present invention taken in conjunction with the accompanying drawings. Wherein, the attached drawings are as follows:
FIGS. 1A-E are schematic diagrams of a 3-2 MOVIE mode with MOTION/ROLLING subtitling broken into fields;
FIG. 2 is a diagram illustrating the effect of the 3-2 MOVIE mode direct view' with subtitles in the prior art;
FIG. 3 is a basic flow diagram of the method for detecting and processing the 3-2 MOVIE mode with MOVING/ROLLING subtitling according to the present invention;
FIG. 4 is a schematic diagram of the same polarity field difference of a standard 3-2 film mode;
FIG. 5 is a schematic diagram of the area where subtitles would be located during standard 3-2 MOVIE mode detection in accordance with the present invention;
FIG. 6 is a flowchart illustrating the steps of detecting the 3-2 MOVIE mode with MOTION/ROLLING subtitling according to the present invention;
fig. 7 is a flowchart of the steps of the 3-2 movie mode process with move/scroll subtitles of the present invention.
FIG. 8 is a schematic diagram of the detection and processing device for 3-2 MOVIE mode with MOVING/ROLLING subtitling according to the present invention;
the specific implementation mode is as follows:
the invention will be further described with reference to examples in the drawings.
The film mode detection of the present invention only detects the luminance channel, and the other two chrominance channels are processed according to the processing of the luminance channel.
In order to distribute the problem that interlaced scanning subtitles are frequently added into a video sequence under special conditions such as breaking news, the invention divides a screen area into an area where subtitles can appear and a non-subtitle area; and continuously detecting the divided screen regions, respectively counting the number of pixel points of moving/rolling captions in the regions where the captions possibly appear and the rule of the detection sequence of the non-caption regions, and judging whether the captions exist. Furthermore, the TV de-interlacing process and/or the film mode process and/or the mixed process of the two processes are selectively carried out according to the detection result.
A method for detecting a telecine signal in a non-subtitle region, comprising the steps of:
A. calculating the absolute difference between the n +2 th field and the same polarity field of the interlaced scanning signal of the nth field in the non-caption area, and obtaining a 3-2 conversion detection sequence according to the obtained same polarity field difference;
B. judging whether the obtained detection sequence accords with a corresponding standard detection sequence, if so, determining the detection sequence is a movie signal corresponding to the standard detection sequence, and otherwise, determining the detection sequence is a television signal; wherein n is greater than 0.
Checking the principle of 3-2 conversion of film signals as shown in fig. 4, the pixels at corresponding positions of two fields adjacent in time and having the same parity are subtracted to obtain the field difference with the same polarity, for example, in fig. 4, the field a1 is subtracted from the field A3, the field B1 is subtracted from the field a2, and the absolute value of the difference is used as the field difference with the same polarity; if the obtained pixel absolute difference is the minimum value in the latest 5 fields and is smaller than a noise threshold, the value of the detection sequence corresponding to the pixel absolute difference is taken as 0; otherwise it is 1.
As can be seen from fig. 4, the 3-2 conversion film mode is characterized in that the 1 st field and the 3 rd field of the odd field and the 6 th field and the 8 th field of the even field in the ten consecutive fields of data are identical, so that the resulting detection sequence has the obvious characteristic of being cycled through in "large and small". If such a feature is found to be present in the detection sequence, a 3-2 pulldown film signal may be determined.
Of course, since the typical tv station is editing with the move/scroll subtitles generally below, the movie mode detection is considered in sub-regions — the present invention sets the detection region to a rectangular region below the screen, which means that the detection of 3-2 movie mode will only be performed in a blank region above the rectangular region of the screen. Fig. 3 is a schematic diagram showing the subtitle region at the bottom.
Judging whether the moving/rolling caption appears in the shadow rectangular area A, and finding out the characteristics of the horizontally moving/rolling caption: the error between fields with the same polarity is larger (the judgment can shield the static background), while the field with different polarity has the characteristic of horizontal motion vector in the horizontal direction, the number of points of moving/rolling captions is found, if the number is larger than a certain threshold value, the rolling captions are considered. If moving/rolling caption, the shadow area all uses the processing method of TV signal; if not, the entire area is processed in a movie mode.
The following steps will be described in detail:
step one, counting data
Reading in four fields of data, wherein the current data is the 3 rd field, and then calculating the field separation difference of the fields with the same polarity.
Step 1A, absolute difference of pixel points in same polarity field
Step 1a 1: calculating corresponding pixel point differences of like-polarity fields
Calculating i row and j column pixel values f of the n field and the n-2 field in the area where non-caption may appearn(i, j) and fn-2(i, j) corresponding pixel point difference:
pixel_err_f(i,j)=|fn(i,j)-fn-2(i,j)|
Where pixel _ err _ f (i, j) is the difference between the corresponding pixel points of the current field and the previous field of the same polarity.
Step 1B: counting the same-polarity field difference same _ err _ txt of the non-caption area
The initial value of the same-polarity field difference same _ err _ txt of the non-caption area is set to be 0, and the initial value is respectively used for counting the number of the areas, i.e. pixel _ err _ f (i, j), in the range of [ Noise _ th, 255 ]. Wherein Noise _ th is a threshold considered as Noise, is a number between 16 and 32, and usually selects 20, to obtain the same polarity field difference of the non-caption area same as the color field difference of same _ err _ txt:
equation 2
And obtaining the same-polarity field difference same _ err _ txt of the non-caption area. Here, txt _ th is the distance of the block region from the bottom side in the field. Is a number between 40 and 60, typically 45 is chosen.
Step two, 3-2 converted telecine mode detection
Step 2A: 3-2 detection sequence for non-caption region
Step 2a 1: comparing the obtained same _ err _ txt with a preset threshold value Noise _ Th and Th _ b _ txt:
equation 3
element _ txt is an element of the detection sequence set Seq _32_ txt of the non-caption region. Noise _ th is a threshold value, which is considered to be the minimum multiple of the number corresponding to "large" and "small", and is usually selected to be 0.5. Th _ b _ txt is a larger same polarity field difference threshold, and if the same polarity field difference is larger than the threshold, the same polarity field difference is considered to be larger, and the same polarity field difference is not the copy field, and 675 is selected. The same _ txt _ f4 is the statistic of the fourth field before the current field, the same _ txt _ f3 is the statistic of the third field before the current field, the same _ txt _ f2 is the statistic of the second field before the current field, the same _ txt _ f1 is the statistic of the previous field before the current field, and the same _ err _ txt is the statistic of the current field.
Step 2a 2: and (3) sequentially arranging 10 continuous sequence values, and combining the currently generated sequence value and the previously generated continuous nine sequence values every time an element _ txt is received to obtain a 3-2 conversion detection sequence array group Seq _32_ txt.
And step 2B: seq _32_ txt is compared to the set of standard sequencing sequences Seq _32_ S
Step 2B 1: setting the prediction initial value as 0, and setting prediction as 0; comparing the obtained sequencing detection array group Seq _32_ txt with the standard sequencing detection array group Seq _32_ S, entering a detection state when the sequence in the sequencing detection array group is the same as the first sequence value in the standard sequencing detection array group, and setting a prediction as 1;
wherein Seq _32_ S is 0111101111, 1111011110, 1110111101, 1101111011, 1011110111.
Step 2B 2: error correction processing is performed on the Still picture in the movie mode, and if the element _ txt of the received sequence is smaller than the threshold Th _ Still, the standard detection sequence Seq _32_ S is output.
Equation 4
bitxor is an exclusive or operation between bits, and the formula means that when several bits are different between Seq _32_ txt and Seq _32_ S, the bits are set to 1, and if the field difference of the same polarity of the field is smaller than the threshold of the still image at the same time, the still image is considered to be in the film mode, and the detection sequence is set to the standard detection sequence without jumping out of the film mode.
Step 2B 3: and when the prediction is 1, comparing the sequence value of the sequence detection array group Seq _32_ txt with the sequence value of the standard sequence detection array group Seq _32_ S, and when the field conforms to the standard sequence detection array group, continuing to execute the step 2D.
And step 2C: judging whether the subtitle belongs to the 3-2 subtitle situation or not, and solving Txt _ Flag
Step 2C1, statistics of horizontal movement/rolling caption points
Below the area, according to the characteristics of the horizontally moving move/scroll caption: namely, the difference between the same polarity field pixel _ err _ f and pixel _ err _ b is larger, and the continuous three fields have the movement of N (N is 2-5) pixels in the same movement direction, the number of points of the moving/rolling subtitles is found, and if the number is larger than a certain threshold value, the moving/rolling subtitles are considered.
Taking N as an example, firstly, the difference between the current point and the point having two pixel horizontal position differences in the near field is counted:
equation 5
pixel_diff_fl2(i,j)=|fn(i,j)-fn-1(i,j+2)|
pixel_diff_bl2(i,j)=|fn(i,j)-fn+1(i,j-2)|
pixel_diff_fr2(i,j)=|fn(i,j)-fn-1(i,j-2)|
pixel_diff_br2(i,j)=|fn(i,j)-fn+1(i,j+2)|
Where pixel _ diff _ fl2(i, j) is the difference between the corresponding pixel points of the two pixel points to the horizontal right of the current field and the previous field. pixel _ diff _ bl2(i, j) is the difference between the corresponding two pixel points horizontally left of the current field and the next field. pixel _ diff _ fr2(i, j) is the difference between the corresponding pixel points of the two pixel points to the left of the horizontal of the current field and the previous field. pixel _ diff _ br2(i, j) is the difference between the corresponding two pixel points to the horizontal right of the current field and the next field.
Equation 6
Here, Th _ txt _ b is a threshold value that is considered to be different from the background for moving/rolling subtitles, and is usually selected to be 50, and Th _ txt _ s is a threshold value that is considered to be similar for moving/rolling subtitles. Typically 32 is selected. Here Num txt is the number of points of a pixel considered as a horizontal move/scroll caption.
Step 2C 2: judging whether the subtitle belongs to the 2-2 subtitle situation
According to the obtained Num _ txt, if the Num _ txt is larger than a certain threshold value and the number of continuous fields is equal to that, the subtitle mode is considered as follows:
equation 7
Where Th _ txt _ num is the pixel count threshold for horizontal move/scroll subtitles, usually 40. Txt _ flag _ Num is the count of consecutive fields where Num _ txt is greater than a certain threshold, and if the middle field Txt _ flag is equal to 0, the count is interrupted and the process is restarted. This equation shows that when there are 3 fields where Num _ txt is greater than the threshold, then the move/scroll mode is considered to be entered, which can effectively avoid some pixels that are originally moving (but not move/scroll).
Txt _ Flag is a move/scroll Flag, such as 0, and may be a standard 3-2 mode without move/scroll, and a pure 3-2 movie mode process may be performed; or in a non-film mode, using a television deinterlacing method. If Txt _ Flag is 1, then there is moving/rolling caption, then the non-caption area adopts the processing method of film mode, and the caption area adopts the processing method of television de-interlacing.
Step 2D: skip-in and skip-out film mode
And comparing the sequence value of the sequencing detection array group Seq _32 with the sequence value of the standard sequencing detection array group Seq _32_ S in sequence, and jumping out of the 3-2 conversion de-interlacing mode when the number of continuous mismatch Nofilm _ counter reaches the cut-out threshold Th _ out.
Here Th _ out is 15 and Th _ in is 15;
the jump-in and jump-out formula pseudo code is as follows:
equation 8
Here, Film _ finalresult is the final judgment result, and indicates 3-2 movie mode if 1, and indicates television mode if 0.
The above expression indicates that, when the prediction is 1, when the sequence value of the detection sequence array group Seq _32 and the sequence value of the standard detection sequence group Seq32_ S are sequentially compared, when the number of consecutive times of mutual matching, filter _ counter, reaches the cut-in threshold Th _ in, it is determined as the 3-2 pull-down film mode, and the processing is switched to the step three 3-2 film mode;
and comparing the sequence value of the sequencing detection array group seq _32 with the sequence value of the standard sequencing detection array group seq _32_ S in sequence, jumping out of a 3-2 pull-down film mode when the number Nofilm _ counter of continuous inconsistency reaches a cut-out threshold Th _ out, clearing the number film _ counter of consistency with the film mode, leaving a detection state, and performing television deinterlacing, wherein the flow chart of the detection steps is shown in FIG. 6.
Step three, 3-2 film mode processing algorithm implementation
After the Film mode detection module detects that the signal is a 3-2 signal (Film _ final _ result is 1), the interlaced signal enters the Film mode 3-2 processing module. The following steps are carried out:
step 3A: is Txt _ Flag 1 judged? If yes, the region is required to be processed in a blocking mode during processing, a television de-interlacing algorithm is applied to the lower half portion, and the upper half portion is processed as follows:
the sequence group element corresponding to the current field, the field corresponding to the first 0, is searched, and the field is merged with the previous field. The process of searching for the field before 0 adopts the television deinterlacing process, and the fields corresponding to the subsequent 1 are respectively merged with the next field and the previous field. When the field corresponding to 0 is searched again, the field is merged with the previous field. And so on.
And step 3B: if Txt _ Flag is 0, the entire screen area is processed as follows:
the sequence group element corresponding to the current field, the field corresponding to the first 0, is searched, and the field is merged with the previous field. The process of searching for the field before 0 adopts the television deinterlacing process, and the fields corresponding to the subsequent 1 are respectively merged with the next field and the previous field. When the field corresponding to 0 is searched again, the field is merged with the previous field. And so on. A specific movie mode processing flowchart is shown in fig. 7. And will not be described in detail.
The detection and processing device corresponding to the method comprises: the memory module is used for storing interlaced scanning signals of an n-2 field, an n-1 field, an n field and an n +1 field which are input sequentially and sending the stored interlaced scanning signals to the statistic module; a statistic module: the system comprises a screen area and a statistical data, wherein the screen area is used for dividing the screen area and counting the data, the divided screen area comprises an area where subtitles can appear and a non-subtitle area, and the statistical data comprises the number of pixel points of horizontal movement/rolling subtitles of the subtitle area and the homopolar field difference of the non-subtitle area; a mode judging module: and detecting the divided screen areas, and respectively judging whether the areas where the subtitles possibly appear have the rule of detection sequences of moving/rolling subtitles and non-subtitle areas to obtain a moving/rolling subtitle mark Txt _ Flag and whether the non-subtitle areas belong to a 3-2 movie mode. Different mode processing module: and selectively performing television de-interlacing processing and/or movie mode processing and/or the aforesaid mixed mode of regional processing according to the detection result.
That is, the film mode detecting and processing device is used for receiving the interlaced scanning signal, detecting the telecine mode of the interlaced scanning signal and performing corresponding processing, and is divided into 4 basic modules:
the memory module is used for storing interlaced scanning signals of an n-2 field, an n-1 field, an n field and an n +1 field which are input sequentially and sending the stored interlaced scanning signals to the statistic module;
a statistic module: inputting: interlaced data of the (n-2) field to the (n + 1) field; and (3) outputting: the number of pixel points Num _ txt of the horizontal moving/rolling caption and the same polarity field difference same _ err _ txt;
a mode judging module: inputting: the number of pixel points Num _ txt of the horizontal moving/rolling caption and the same polarity field difference same _ err _ txt; and the homopolar field difference of the first four fields. It includes caption judging unit and non-matrix area film mode detecting unit. The non-matrix area film mode detection unit generates a 3:2 conversion detection sequence, and compares the 3:2 conversion detection sequence with a standard sequence to judge whether the field signal is a 3:2 conversion television film signal; the caption judging unit obtains a moving/rolling caption Flag Txt _ Flag; both the jump-in and jump-out movie modes are done here. And (3) outputting: an indication signal Film _ finalresult indicating whether it is a 3:2 Film mode signal or a television signal; txt _ Flag indicating whether it belongs to the move/scroll caption Flag.
Different mode processing module: inputting: film mode indication signal Film _ finalresult, move/scroll Flag Txt _ Flag, and interlaced signal from the source. The module comprises a television de-interlacing processing unit and a film mode 3-2 processing unit. Wherein the film mode 3-2 processing unit comprises two parts of a mixed mode of partitioned area processing and full screen 3-2 film mode processing. Converting interlaced scanning signals from a signal source into progressive scanning signals by adopting corresponding different modes according to the received film mode indication signals and outputting the progressive scanning signals; and (3) outputting: refers to a progressive scanning signal. Other corresponding functions and processing manners are the same as those described in the foregoing method, and are not described again here.
In summary, the following steps: the invention discloses a detection and processing method of a 3-2 pull-down film mode considering moving/rolling subtitles and a corresponding device thereof, aiming at the defect that the moving/rolling subtitles are added in editing so as to cause the film mode not to be detected or the subtitles to appear feathering in the prior art. The invention discloses a method for detecting a film mode, which is based on that every 2 fields or 3 fields of a 3-2 pull-down film mode interlaced signal come from a frame, and a detection sequence has a rule of 'big and big size'. Dividing the screen, counting the rule of the detection sequence of the non-caption area, judging whether the mobile/rolling caption exists according to the characteristics of the mobile/rolling caption, if so, performing television de-interlacing processing on the area, and performing film mode processing on other areas. The method is characterized in that a screen is divided into two parts, one part is an area where subtitles can appear, the other part is an area where subtitles can not appear, and the number of pixels of moving/rolling subtitles in the area where subtitles can appear and the rule of a detection sequence of a non-subtitle area are counted respectively. Firstly, the film mode detection of 3-2 pull-down is based on that every 2 fields or 3 fields of the film mode interlaced signal of 3-2 pull-down come from one frame, the correlation is high, and the detection sequence is regular with 'big size', so as to judge whether the film mode belongs to the 3-2 pull-down mode. Firstly, the 3-2 pull-down film mode detection is carried out on the area where the caption is not possible to appear, and only the television de-interlacing processing is carried out without judging the caption under the condition that the non-caption area does not belong to the 3-2 pull-down mode. If the non-caption area belongs to the 3-2 pull-down mode, continuously counting the number of pixel points of the moving/rolling caption in the area where the caption possibly appears, if the moving/rolling caption is judged, performing television de-interlacing processing on the caption area, and performing film mode processing on other areas; if it is judged that the subtitles are not moved/scrolled, the movie mode processing is performed for the entire area. Therefore, the film mode with the moving/rolling caption can be simply and quickly detected and processed, and the defect of reduced picture quality caused by processing according to a television deinterlacing technology because the caption eclosion phenomenon or the film mode jumping out due to the fact that the moving/rolling caption cannot be detected is avoided.
It should be understood by those skilled in the art that the above embodiments are for illustrative purposes only and are not intended to limit the present invention, and that changes and modifications to the above embodiments may fall within the scope of the appended claims.
Claims (14)
1. A detection and processing method of a film mode is characterized by comprising the following steps:
dividing a screen area, wherein the divided screen area comprises an area where subtitles can appear and a non-subtitle area;
and detecting the divided screen regions, respectively counting the rules of detection sequences of pixel points of the subtitles in the regions where the subtitles possibly appear and the non-subtitle regions, and judging whether the subtitles exist or not.
And selectively performing television de-interlacing processing and/or movie mode processing and/or the aforesaid mixed mode of regional processing according to the detection result.
2. The film mode detecting and processing method according to claim 1, wherein the film mode detecting and processing method is a moving/rolling caption 3-2 film mode detecting and processing method; the 3-2 film mode detection is based on that every 2 fields or 3 fields of 3-2 pull-down film mode interlaced signals come from one frame, and the detection sequence is performed according to the rule of 'big and big size';
the method for detecting the telecine signal in the non-subtitle area comprises the following steps:
A. calculating the absolute difference between the n +2 th field and the same polarity field of the interlaced scanning signal of the nth field in the non-caption area, and obtaining a 3-2 conversion detection sequence according to the obtained same polarity field difference;
B. and judging whether the obtained detection sequence accords with a corresponding standard detection sequence, if so, determining the detection sequence is a movie signal corresponding to the standard detection sequence, and otherwise, determining the detection sequence is a television signal.
3. The movie mode detection and processing method as claimed in claim 2, wherein the step of determining whether there is any moving/scrolling subtitle comprises: in the area where the caption may appear, if the difference between fields with the same polarity is large, and the continuous three fields have the movement of N pixel points in the same movement direction, and if the number of the pixel points of the moving/rolling caption is greater than a predetermined threshold value, the moving/rolling caption is considered to be present; otherwise, it is not.
4. The film mode detection and processing method according to any one of claims 1 or 2, wherein:
the film mode detection sequence of the non-subtitle area is not the 3-2 film mode according to the detection result, and is the television mode, and television de-interlacing processing is carried out; or,
if the film mode detection sequence of the non-caption area is in a 3-2 film mode and moving/rolling captions exist, performing 3-2 film mode processing on the non-caption area and performing television de-interlacing processing on the caption area; or,
and if the full screen is in the movie mode, performing movie mode processing on the full screen.
5. The method for detecting and processing movie modes as claimed in claim 2, wherein the step of obtaining the detection sequence set of non-caption areas comprises: if the same-polarity field difference of the current field of the non-caption area is the minimum of five fields in the total, and is smaller than the previous field by a certain proportion, and the same-polarity field difference of the current field is smaller than a certain threshold value, the current field is considered as being small corresponding to the detection sequence, and otherwise, the current field is considered as being large; sequentially arranging the continuous 10 sequence values, and combining the currently generated sequence value and the previously generated continuous nine sequence values to obtain a 3-2 conversion detection sequence group when each element is received; and comparing the obtained detection sequence group with the standard detection sequence group, and when the sequence in the detection sequence group is the same as the sequence value in the standard detection sequence group, determining that the detection state is in a 3-2 movie mode.
6. The film mode detection and processing method according to claim 5, further comprising an error correction step of the detection sequence of the non-subtitle region: when the detection sequence does not conform to the standard sequence and the homopolar field difference of the field is smaller than the preset threshold value of the still image, the still image in the film mode is considered, the detection sequence is set as the standard detection sequence, and the film mode is not jumped out.
7. The film mode detection and processing method according to claim 1, wherein the skip-in and skip-out mechanism of the television de-interlacing process and/or the film mode process and/or the hybrid process of the two comprises the following steps: when the sequence values of the detection sequence group and the sequence values of the standard detection sequence group are sequentially compared, when the times of continuous mutual coincidence reach a cut-in threshold value, the mode of converting the television film into 3-2 is judged, and the deinterlacing processing of converting into 3-2 is switched; and comparing the sequence value of the sequencing detection column group with the sequence value of the standard sequencing detection column group in sequence, and jumping out of a 3-2 conversion de-interlacing mode when the continuous inconsistent times reach a cut-out threshold value.
8. The film mode detection and processing method as claimed in any of claims 1 or 2, wherein the film mode detection is performed only for the luminance channel, and other chrominance channels are processed according to the processing of the luminance channel.
9. A film mode detection and processing apparatus, comprising:
the memory module is used for storing interlaced scanning signals of an n-2 field, an n-1 field, an n field and an n +1 field which are input sequentially and sending the stored interlaced scanning signals to the statistic module;
a statistic module: the system comprises a screen area and a statistical data, wherein the screen area is used for dividing the screen area and counting the data, the divided screen area comprises an area where subtitles can appear and a non-subtitle area, and the statistical data comprises the number of pixel points of horizontal movement/rolling subtitles of the subtitle area and the homopolar field difference of the non-subtitle area;
a mode judging module: and detecting the divided screen areas, and respectively judging whether the areas where the subtitles possibly appear have the rule of the detection sequences of the moving/rolling subtitles and the non-subtitle areas to obtain moving/rolling subtitle marks and whether the non-subtitle areas belong to a 3-2 movie mode.
Different mode processing module: and selectively performing television de-interlacing processing and/or movie mode processing and/or the aforesaid mixed mode of regional processing according to the detection result.
10. The apparatus for detecting and processing movie modes as claimed in claim 9, wherein the step of determining whether the mode module detects moving/scrolling subtitles comprises: in the area where the caption may appear, if the difference between fields with the same polarity is large, and the continuous three fields have the movement of N pixel points in the same movement direction, and if the number of the pixel points of the moving/rolling caption is greater than a predetermined threshold value, the moving/rolling caption is considered to be present; otherwise, it is not.
11. The apparatus for detecting and processing movie modes as claimed in claim 9, wherein: the different mode processing module carries out television de-interlacing processing according to the received film mode signal output by the film mode detection module, if the film mode detection sequence of the non-caption area is not the 3-2 film mode, the film mode detection sequence is the television mode; or,
if the film mode detection sequence of the non-caption area is in a 3-2 film mode and moving/rolling captions exist, performing 3-2 film mode processing on the non-caption area and performing television de-interlacing processing on the caption area; or,
and if the full screen is in the movie mode, performing movie mode processing on the full screen.
12. The apparatus for detecting and processing movie modes as claimed in claim 9, wherein the step of obtaining the detection sequence set of non-caption areas by the mode determination module comprises: if the same-polarity field difference of the current field of the non-caption area is the minimum of five fields in the total, and is smaller than the previous field by a certain proportion, and the same-polarity field difference of the current field is smaller than a certain threshold value, the current field is considered as being small corresponding to the detection sequence, and otherwise, the current field is considered as being large; sequentially arranging the continuous 10 sequence values, and combining the currently generated sequence value and the previously generated continuous nine sequence values to obtain a 3-2 conversion detection sequence group when each element is received; and comparing the obtained detection sequence group with the standard detection sequence group, and when the sequence in the detection sequence group is the same as the sequence value in the standard detection sequence group, determining that the detection state is in a 3-2 movie mode.
13. The apparatus for detecting and processing movie modes as claimed in claim 9, wherein the different mode processing module further comprises an error correction step for the detection sequence of the non-caption area: when the detection sequence does not conform to the standard sequence and the homopolar field difference of the field is smaller than the preset threshold value of the still image, the still image in the film mode is considered, the detection sequence is set as the standard detection sequence, and the film mode is not jumped out.
14. Film mode detection and processing device according to claim 9, characterized in that the jump-in and jump-out mechanism for television de-interlacing processing and/or film mode processing and/or mixed processing of both in different mode processing modules comprises the following steps: when the sequence values of the detection sequence group and the sequence values of the standard detection sequence group are sequentially compared, when the times of continuous mutual coincidence reach a cut-in threshold value, the mode of converting the television film into 3-2 is judged, and the deinterlacing processing of converting into 3-2 is switched; and comparing the sequence value of the sequencing detection column group with the sequence value of the standard sequencing detection column group in sequence, and jumping out of a 3-2 conversion de-interlacing mode when the continuous inconsistent times reach a cut-out threshold value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102200314A CN102572289A (en) | 2011-08-02 | 2011-08-02 | Method and device for detecting and processing movie mode |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011102200314A CN102572289A (en) | 2011-08-02 | 2011-08-02 | Method and device for detecting and processing movie mode |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102572289A true CN102572289A (en) | 2012-07-11 |
Family
ID=46416635
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011102200314A Pending CN102572289A (en) | 2011-08-02 | 2011-08-02 | Method and device for detecting and processing movie mode |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102572289A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105282475A (en) * | 2014-06-27 | 2016-01-27 | 澜起科技(上海)有限公司 | Mobile subtitle detection and compensation method and system |
CN107666560A (en) * | 2016-07-28 | 2018-02-06 | 北京数码视讯科技股份有限公司 | A kind of video interlace-removing method and device |
CN111107414A (en) * | 2018-10-25 | 2020-05-05 | 中国电信股份有限公司 | Video processing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1917597A (en) * | 2005-08-16 | 2007-02-21 | 乐金电子(沈阳)有限公司 | The display device for offering movie modes and method for controlling the same |
CN101453608A (en) * | 2007-12-07 | 2009-06-10 | 瑞昱半导体股份有限公司 | Video data processing method and device |
CN101938620A (en) * | 2010-09-16 | 2011-01-05 | 上海高清数字科技产业有限公司 | Movie-mode video signal processing method and device |
-
2011
- 2011-08-02 CN CN2011102200314A patent/CN102572289A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1917597A (en) * | 2005-08-16 | 2007-02-21 | 乐金电子(沈阳)有限公司 | The display device for offering movie modes and method for controlling the same |
CN101453608A (en) * | 2007-12-07 | 2009-06-10 | 瑞昱半导体股份有限公司 | Video data processing method and device |
CN101938620A (en) * | 2010-09-16 | 2011-01-05 | 上海高清数字科技产业有限公司 | Movie-mode video signal processing method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105282475A (en) * | 2014-06-27 | 2016-01-27 | 澜起科技(上海)有限公司 | Mobile subtitle detection and compensation method and system |
CN105282475B (en) * | 2014-06-27 | 2019-05-28 | 澜至电子科技(成都)有限公司 | Crawl detection and compensation method and system |
CN107666560A (en) * | 2016-07-28 | 2018-02-06 | 北京数码视讯科技股份有限公司 | A kind of video interlace-removing method and device |
CN111107414A (en) * | 2018-10-25 | 2020-05-05 | 中国电信股份有限公司 | Video processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7349029B1 (en) | Method and apparatus for de-interlacing interlaced video fields originating from a progressive video source | |
US7170562B2 (en) | Apparatus and method for deinterlace video signal | |
US8063984B2 (en) | Subtitle detection apparatus, subtitle detection method and pull-down signal detection apparatus | |
KR101462455B1 (en) | Source-adaptive video deinterlacer | |
US7612827B2 (en) | Image processing apparatus and method | |
US20060209957A1 (en) | Motion sequence pattern detection | |
US7405766B1 (en) | Method and apparatus for per-pixel motion adaptive de-interlacing of interlaced video fields | |
US6897903B1 (en) | Apparatus for detecting mixed interlaced and progressive original sources in a video sequence | |
KR100722773B1 (en) | Method and apparatus for detecting graphics region in video | |
JP4510874B2 (en) | Composite image detector | |
CN100394793C (en) | Pixel interpolating apparatus, pixel interpolating method, and program and recording medium | |
US8363160B2 (en) | Caption detection device, caption detection method, and pull-down signal detection apparatus | |
US8345148B2 (en) | Method and system for inverse telecine and scene change detection of progressive video | |
US7528887B2 (en) | System and method for performing inverse telecine deinterlacing of video by bypassing data present in vertical blanking intervals | |
US20050259950A1 (en) | Film mode correction in still areas | |
USRE45306E1 (en) | Image processing method and device thereof | |
CN102572289A (en) | Method and device for detecting and processing movie mode | |
US9100531B1 (en) | Method and apparatus for performing robust cadence detection in a video deinterlacer | |
CN101076104B (en) | Method for inspecting film mode | |
CN113727176B (en) | Video motion subtitle detection method | |
KR101140442B1 (en) | Image status information correction | |
US7796189B2 (en) | 2-2 pulldown signal detection device and a 2-2 pulldown signal detection method | |
JP5691609B2 (en) | Film mode conversion device, film mode conversion method, and program | |
US8237860B2 (en) | Poor video editing detection system | |
US8233084B1 (en) | Method and system for detecting video field parity pattern of an interlaced video signal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20120711 |