CN101179747B - Multimedia video intercepting method and device - Google Patents

Multimedia video intercepting method and device Download PDF

Info

Publication number
CN101179747B
CN101179747B CN2007101990653A CN200710199065A CN101179747B CN 101179747 B CN101179747 B CN 101179747B CN 2007101990653 A CN2007101990653 A CN 2007101990653A CN 200710199065 A CN200710199065 A CN 200710199065A CN 101179747 B CN101179747 B CN 101179747B
Authority
CN
China
Prior art keywords
change
pictures
picture
rate
color
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.)
Expired - Fee Related
Application number
CN2007101990653A
Other languages
Chinese (zh)
Other versions
CN101179747A (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.)
Shenzhen Xunlei Network Technology Co Ltd
Original Assignee
Shenzhen Xunlei Network 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 Shenzhen Xunlei Network Technology Co Ltd filed Critical Shenzhen Xunlei Network Technology Co Ltd
Priority to CN2007101990653A priority Critical patent/CN101179747B/en
Publication of CN101179747A publication Critical patent/CN101179747A/en
Application granted granted Critical
Publication of CN101179747B publication Critical patent/CN101179747B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a method and device for multimedia video interception, which is used as the method and device for automatically identifying the high quality video fragment in multimedia video files. The method in the invention comprises the following steps: intercepting at least two pictures within a period of time from the video files, then computing the average rate of change in color of the two pictures, and intercepting the video files within a period of time when the average rate of change is larger than or equal to the predetermined value.

Description

A kind of method of multimedia video intercepting and device
Technical field
The present invention relates to the multimedia video field, refer to a kind of method and device that is applicable to multimedia video intercepting especially.
Background technology
Along with Development of Multimedia Technology, many kinds of videos have appearred on the network, most video, as film, offer that the user is online to watch or download, the many servers chamber of commerce in the user's download prerequisite for a video preview, this video preview is to finish by corresponding whole video is intercepted, but current video preview intercepting technology, the intercepting duration is generally very short, such as about 15 seconds, the intercepting strategy is at random or fixes certain time intercepting, because each video resource is different, often be complete black picture such as the beginning or the ending of the film that has, what perhaps only occur is the manufacturing company's information and the captions of film.10 seconds even 30 seconds of beginning all is complete black picture, 10 minutes of film that perhaps has even beginning all is and the irrelevant advertisement of film.If adopt 15 seconds strategies of intercepting film at random as preview, be easy to just be truncated to these black full images, or even advertisement.So only adopt present video intercepting technology to be easy to be truncated to some insignificant video segments, or it is meaningful, but can do nothing to help the user and determine video quality, captions, the fragment of information such as sound, such video segment does not have help to the user, has wasted the hard disk and the bandwidth that store video segment yet.
Summary of the invention
The embodiment of the invention provides a kind of method and device of multimedia video intercepting, can effectively intercept the high-quality video fragment.
The embodiment of the invention provides a kind of method of multimedia video intercepting, comprising:
At least two pictures from video file in intercepting a period of time;
Calculate the average rate of change of described at least two pictures colors;
During more than or equal to predetermined value, intercept the video file in described a period of time in the described average rate of change, during less than predefined value, continue to carry out the step that from video file, intercepts the video file picture in other a period of time in the described average rate of change.
The embodiment of the invention provides a kind of device of multimedia video intercepting, comprising:
The sectional drawing module is used for from least two pictures of video file in intercepting a period of time;
Computing module is used to calculate the average rate of change of described at least two pictures colors;
Interception module, be used in the described average rate of change during more than or equal to predetermined value, intercept the video file in described a period of time, during less than predefined value, continue to carry out the step that from video file, intercepts the video file picture in other a period of time in the described average rate of change.
The embodiment of the invention is by calculating the average rate of change of at least two pictures colors in a period of time of being cut, in the described average rate of change during more than or equal to predetermined value, intercept the video file in described a period of time, thereby guaranteed the quality of intercepting video, avoided being truncated to that some are meaningless or do not have a video clips of help.
Description of drawings
Fig. 1 is an embodiment of the invention method flow diagram;
Fig. 2 is the execution in step of embodiment of the invention method;
Fig. 3 is one group of two adjacent pictures in the embodiment of the invention intercepting video;
Fig. 4 is the picture block A and the A1 of same position on one group of adjacent two pictures in the embodiment of the invention intercepting video;
Fig. 5 is an embodiment of the invention structure drawing of device.
Embodiment
In embodiments of the present invention, many video file pictures of intercepting in a period of time from video file calculate the average rate of change of plurality of pictures color, when the average rate of change of calculating during more than or equal to set point, and the video file in intercepting a period of time.
Referring to shown in Figure 1, the method for the embodiment of the invention may further comprise the steps:
Step 101: at least two pictures from video file in intercepting a period of time.
Can intercept video pictures forward or backward from any one time point of video file.Preferably, can begin intercepting from any one time point of the interlude section of video file.
Step 102: the average rate of change of calculating described at least two pictures colors.
The specific implementation process of the described calculating average rate of change is: the picture of intercepting is divided into groups, every group at least two pictures, calculate every picture group sheet change in color rate then respectively, obtain the described average rate of change with the summation of the rate of change that calculated and divided by the quantity of grouping again.
Wherein, the mode of described grouping can be multiple, such as, from video file, intercepted three pictures A, B, C can be divided into one group of AB with described three pictures, and one group totally two groups of BC also can be three one group of ABC.Such as from video file, having intercepted four pictures A, B, C and D, described four pictures can be divided into one group totally two groups of one group of AB and CD again, described four pictures can also be divided into one group totally two groups of one group of ABC, BCD.
Following illustrative example illustrates the described calculating average rate of change, such as, four pictures A, B, C and D from described video file, have been intercepted, with the every two adjacent pictures grouping of four pictures, be respectively AB group, BC group and CD group, calculate three picture group sheet change in color rates respectively,, obtain the average rate of change of four pictures colors three rate of change additions of calculating respectively quantity divided by group.For another example, from described video file, intercepted five pictures a, b, c, d, e then can be divided into one group totally two groups of one group of ab, cde, calculates every picture group sheet change in color rate respectively and obtains five pictures change in color rates divided by the quantity of group again.
Wherein, the mode of calculating every picture group sheet change in color rate can realize like this, such as one group three pictures a are arranged, b, c, at first calculate adjacent two pictures change in color rates in this group, just change in color rate between the ab and between the bc adds up these two rates of change then and just can obtain this picture group sheet change in color rate divided by 2 again.Calculate adjacent two pictures change in color rates and comprise the color value that can directly calculate every pictures in this two pictures, the difference of calculating described color value then obtains adjacent two pictures change in color rates.
Preferably, select the picture block on a plurality of same positions on the picture in every picture group sheet, the equal and opposite in direction of picture block on corresponding same position, calculate the difference of the color value of the picture block on each same position on per two adjacent pictures, the difference of the color value of the picture block on each same position is added the General Logistics Department ask again on average, obtain the mean difference of the color value of the picture block on each same position.For the mean difference of the color value of the picture block on each same position is set corresponding weight coefficient, mean difference and corresponding weight coefficient according to the color value of picture block calculate every picture group sheet change in color rate.
Step 103: during more than or equal to predetermined value, intercept the video file in described a period of time in the described average rate of change.
Preestablish a value,, intercept the video file in described a period of time when the described average rate of change during more than or equal to this predetermined value; And, continue to carry out the step of the video file picture in other a period of time of intercepting from video file when the described average rate of change during less than this predetermined value.
Below in conjunction with Figure of description the embodiment of the invention is described in further detail.
Referring to Fig. 2, the concrete steps of the method for the embodiment of the invention are as follows:
Step 201: from any one time point of video file, select the video segment of a period of time, the video segment in described a period of time intercepts at least two video pictures.Such as the centre position of first positioning video file,, begin frame by frame (perhaps with 2 frames, multiframes such as 3 frames are unit) then from middle position and intercept video pictures forward or afterwards to guarantee away from many places of rubbish fragment such as beginning and ends.Wherein, NTSC format video file comprised 30 frames in 1 second, and PAL format video file comprised 25 frames in 1 second.
Step 202: with the picture grouping that step 201 intercepted, every group comprises two pictures, calculates the rate of change of every picture group sheet.
Fig. 3 is a picture group sheet in the embodiment of the invention intercepting video file, comprise two adjacent pictures, this two pictures size is equally big, at first select the picture block of 3 (also can be a plurality of) identical sizes of two pictures relevant positions, contrast this three picture block A and A1 more respectively, B and B1, the corresponding average color of C and C1.
Fig. 4 is the picture block A and the A1 of same position on one group of adjacent two pictures in the embodiment of the invention intercepting video, A is big or small identical with A1's, all be to constitute by 20*18=360 pixel, get the pixel clusters that a pixel or a plurality of pixel are formed, each pixel has a color, different colors has different values, so each pixel clusters all has an average color, this value is the numeric string of one 16 system.Such as: the average color of certain pixel clusters a1 is cc008a among the A, and being converted into 10 systems is 13369482; The average color of corresponding pixel clusters a2 is 800080 among the A1, and being converted into 10 systems is 8388736; For the value that color differs, suppose to come correspondence with 10 class, as shown in Table 1:
Form 1
Class Difference (hypothesis)
1 Greater than-16777215
2 Greater than-13421772
3 Greater than-10066329
4 Greater than-6710886
5 Greater than-3355443 less than 0
6 Greater than 0 less than 3355443
7 Less than 6710886
8 Less than 10066329
9 Less than 13421772
10 Less than 16777215
A2-a1=-4980746, belong to the 4th class, and the like, suppose that a4-a3 belongs to the 1st class ... a8-a7 belongs to the 9th class, and a10-a9 belongs to the 6th class ..., after all pixel clusters contrasts are finished, quantity divided by pixel clusters obtains mean difference, and promptly the difference of the color value of the picture block A of same position supposes it is A=8 (form 1 middle-grade sub-value 8).This group has only two pictures, so the difference of the color value of picture block A is the mean difference of the color value of picture block A.If this group has three pictures, selected picture block has A1, A2, A3 can calculate the difference of the color value between A1 and the A2 earlier, calculates the difference of the color value between A2 and the A3 then, described two differences are added the General Logistics Department average, obtain the mean difference of the color value of picture block A.
Contrast B and B1 successively according to said method in the present embodiment, C and C1 obtain picture block B equally, and the mean difference of the color value of C supposes it is respectively B=9, C=10.
Formula below utilizing at last calculates two pictures change in color rates,
αMax(A,B,C)+βMid(A,B,C)+γMin(A,B,C)
The pass of coefficient value is α>β>γ in this formula, can be different at the video file coefficient value of different-format, before calculating, small-scale test is carried out to the video file of this kind form in the capital, with the debugging coefficient, after determining optimum coefficient, can large-scale application.Max (A, B C) promptly get A, B, and the maximum among the C means that the value of maximum is given maximum weight, changes with the maximum of guaranteeing picture, avoids panchromatic video.
Step 203: the average rate of change of calculating selected plurality of pictures.In the time be that two adjacent pictures of many groups are selected by unit with the second cutting in the present embodiment, calculate every picture group sheet change in color rate, the rate of change summation with being calculated divided by the quantity of group, obtains the average rate of change then.For example: in the 1st second, select one group of two adjacent pictures, can calculate rate of change X according to step 202 1In like manner, can calculate rate of change X in the 2nd second 2By that analogy, n can calculate rate of change X second nWith X 1+ X 2...+X nObtain an average rate of change V divided by n again x
Step 204: set a rate of change value, the average rate of change V that step 203 is calculated xCompare with set point, work as V xDuring more than or equal to set point, video file in the intercepting during this period of time; Otherwise return step 201 and intercept picture in other a period of time from another time point.
The rate of change value of setting in the present embodiment is 9, and the concrete implementation of one section high-quality video segment of 15 seconds of intercepting is as follows:
1: from video intercepting initial point (0 second), be truncated to 15 seconds, two of per second interceptings are totally 30 video pictures, described 30 pictures are divided into one group mode according to per second two pictures divide into groups, be divided into is 15 groups, the datum point rate of change of all groupings in 15 seconds backward calculates the 0-15 average rate of change of second then successively, and calculating finishes, value is 6, with set point 9 relatively, the average rate of change of preceding 0-15 second does not reach standard, continuing backward, sectional drawing calculates;
2: from the 1st second of video intercepting, calculate the rate of change of 15 seconds videos backward according to the method described above successively, the average rate of change of 1-16 second just, calculating finishes, and value is 5, does not reach standard with set point 9, and continuing backward, sectional drawing calculates;
3:......;
4: from the 5th second of video intercepting, calculate the rate of change of 15 seconds videos backward successively, the average rate of change of 5-20 second just, calculating finishes, value is 9, compares with set point 9, and the average rate of change just in time reaches standard, so determine intercepting the 5th second, finished this section by the 20th second as the high-quality video segment from video file.
Can also realize like this in the embodiment of the invention: two or three video file pictures in intercepting a period of time from video file, calculate the every adjacent two pictures change in color rates in these several pictures of cutting, calculate the average rate of change then, when the average rate of change during, intercept the video file in this section period more than or equal to set point.
Said method can make up a kind of device of multimedia video intercepting according to the present invention, as shown in Figure 5, is embodiment of the invention structure drawing of device: comprise sectional drawing module 10, computing module 20 and interception module 30.
Sectional drawing module 10 is connected with computing module 20, is to be used for any one time point from video file, selects the video segment of a period of time, video segment intercepting at least two pictures in described a period of time.Wherein, sectional drawing module 10 can first positioning video file the centre position, to guarantee away from many places of rubbish fragment such as beginning and ends, begin frame by frame (perhaps with 2 frames from the middle period then, multiframes such as 3 frames are unit) forward or after get video interception, in the picture that is intercepted, select at least two pictures.
Computing module 20 is connected with interception module 30 with sectional drawing module 10, is used to calculate the average rate of change of at least two pictures colors that sectional drawing module 10 intercepted.
Interception module 30 is connected with computing module 20, is used in the average rate of change that draws according to computing module 20 during more than or equal to predetermined value the video file in intercepting a period of time.
Wherein, computing module 20 can also comprise: picture grouping module 200, the first computing modules 210 and second computing module 220.
Picture grouping module 200 is used for institute's intercepting picture is divided into groups every group at least two pictures.The mode of grouping can be multiple, such as, from video file, intercepted three pictures A, B, C can be divided into one group of AB with described three pictures, and one group totally two groups of BC also can be three one group of ABC.Such as from video file, having intercepted four pictures A, B, C and D, described four pictures can be divided into one group totally two groups of one group of AB and CD again, described four pictures can also be divided into one group totally two groups of one group of ABC, BCD.
First computing module 210 is used to calculate the interconversion rate of every picture group sheet color that picture grouping module 200 told.
Second computing module 220 is used for every picture group sheet change in color rate that first computing module 210 calculates is added up the average rate of change that obtains described at least two pictures colors divided by the quantity of grouping.
Wherein, first computing module 210 also comprises: picture block selected cell 211, mean difference computing unit 212 and rate of change computing unit 213.
Picture block selected cell 211 is used for the picture block at least one same position of selection on each pictures in every picture group sheet, the equal and opposite in direction of described picture block on corresponding same position.
Mean difference computing unit 212 is used to calculate the mean difference of the color value of the picture block on each same position that picture block selected cell 211 selects.
Rate of change computing unit 213, the mean difference of the color value of the picture block on each same position that is used for drawing according to mean difference computing unit 212 calculate every picture group sheet change in color rate.
Wherein, rate of change computing unit 213 further comprises:
Setup unit 2130 is used to the mean difference of the color value of the picture block on each same position that mean difference computing unit 212 draws to set corresponding weight coefficient.
Computing unit 2131, the mean difference of the color value of the picture block on each same position that is used for drawing according to setup unit 2130 weight coefficient that obtains and mean difference computing unit 212 calculates the interconversion rate of every picture group sheet color.
In sum, the embodiment of the invention is calculated the average rate of change of institute's sectional drawing sheet color, and the described average rate of change and preset value are compared, and obtains the high-quality video segment in the video file automatically.The embodiment of the invention provides the video intercepting method to guarantee the quality of video intercepting technology, effective informations such as the captions of help acquisition video file, sound, image, these are meaningless or do not have the video clips of help to avoid being truncated to complete black or even advertisement etc., have saved the resource that stores video clips.
Though described the present invention by embodiment, those of ordinary skills know, without departing from the spirit and substance in the present invention, just can make the present invention that many distortion and variation are arranged, and scope of the present invention is limited to the appended claims.

Claims (8)

1. the method for a multimedia video intercepting is characterized in that, may further comprise the steps:
At least two pictures from video file in intercepting a period of time;
Calculate the average rate of change of described at least two pictures colors;
During more than or equal to predetermined value, intercept the video file in described a period of time in the described average rate of change, during less than predefined value, continue to carry out the step that from video file, intercepts the video file picture in other a period of time in the described average rate of change.
2. the method for claim 1 is characterized in that, the average rate of change of the described at least two pictures colors of described calculating comprises:
With described at least two pictures grouping, every group comprises at least two pictures;
Calculate every picture group sheet change in color rate;
Described rate of change is added up and obtains divided by the quantity of grouping the average rate of change of described at least two pictures colors.
3. method as claimed in claim 2 is characterized in that, the every picture group sheet of described calculating change in color rate comprises:
Select the picture block at least one same position on each pictures in described every picture group sheet, the equal and opposite in direction of described picture block on corresponding same position;
Calculate the difference of the color value of the picture block on each same position on per two adjacent pictures, the difference of the color value of the picture block on described each same position is added the General Logistics Department average, obtain the mean difference of the color value of the picture block on each same position;
Mean difference according to the color value of the picture block on described each same position calculates every picture group sheet change in color rate.
4. method as claimed in claim 3 is characterized in that, the mean difference of described color value according to the picture block on each same position calculates every picture group sheet change in color rate and comprises:
For the mean difference of the color value of the picture block on described each same position is set corresponding weight coefficient;
Mean difference and corresponding weight coefficient according to the color value of described picture block calculate every picture group sheet change in color rate.
5. the device of a multimedia video intercepting is characterized in that, comprising:
The sectional drawing module is used for from least two pictures of video file in intercepting a period of time;
Computing module is used to calculate the average rate of change of described at least two pictures colors;
Interception module, be used in the described average rate of change during more than or equal to predetermined value, intercept the video file in described a period of time, during less than predefined value, continue to carry out the step that from video file, intercepts the video file picture in other a period of time in the described average rate of change.
6. device as claimed in claim 5 is characterized in that, described computing module comprises:
The picture grouping module is used for described two pictures grouping at least, and every group comprises at least two pictures;
First computing module is used to calculate every picture group sheet change in color rate;
Second computing module is used for described rate of change is added up and obtains divided by the quantity of grouping the average rate of change of described at least two pictures colors.
7. device as claimed in claim 6 is characterized in that, described first computing module comprises:
The picture block selected cell is used for the picture block at least one same position of selection on each pictures in described every picture group sheet, the equal and opposite in direction of described picture block on corresponding same position;
The mean difference computing unit is used to calculate the mean difference of the color value of the picture block on described each same position;
The rate of change computing unit is used for calculating every picture group sheet change in color rate according to the mean difference of the color value of the picture block on described each same position.
8. device as claimed in claim 7 is characterized in that, described rate of change computing unit comprises:
Setup unit is used to the mean difference of the color value of the picture block on described each same position to set corresponding weight coefficient;
Computing unit is used for mean difference and described weight coefficient according to the color value of the picture block of described each same position, calculates every picture group sheet change in color rate.
CN2007101990653A 2007-12-12 2007-12-12 Multimedia video intercepting method and device Expired - Fee Related CN101179747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007101990653A CN101179747B (en) 2007-12-12 2007-12-12 Multimedia video intercepting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007101990653A CN101179747B (en) 2007-12-12 2007-12-12 Multimedia video intercepting method and device

Publications (2)

Publication Number Publication Date
CN101179747A CN101179747A (en) 2008-05-14
CN101179747B true CN101179747B (en) 2010-08-18

Family

ID=39405800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007101990653A Expired - Fee Related CN101179747B (en) 2007-12-12 2007-12-12 Multimedia video intercepting method and device

Country Status (1)

Country Link
CN (1) CN101179747B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101527690B (en) * 2009-04-13 2012-03-21 腾讯科技(北京)有限公司 Method for intercepting dynamic image, system and device thereof
CN102467552B (en) * 2010-11-16 2014-01-22 Tcl集团股份有限公司 Internet device with copyright protection function and copyright protection method
CN108540852A (en) * 2015-07-23 2018-09-14 海信集团有限公司 A kind of screenshotss method
CN112288618B (en) * 2020-12-22 2021-05-11 北京联想协同科技有限公司 Picture processing method and device
CN113038218B (en) * 2021-03-19 2022-06-10 厦门理工学院 Video screenshot method, device, equipment and readable storage medium

Also Published As

Publication number Publication date
CN101179747A (en) 2008-05-14

Similar Documents

Publication Publication Date Title
CN101340523B (en) Method and apparatus for exposure compensating digital image
CN101179747B (en) Multimedia video intercepting method and device
US9992445B1 (en) Systems and methods for identifying a video aspect-ratio frame attribute
CN1156151C (en) Automatic determining preset position corresponding to television conference attendance
CN102387371B (en) Image adjusting device, method and camera system
CN104639911B (en) A kind of panoramic video joining method and device
CN109889882A (en) A kind of video clipping synthetic method and system
CN101354745A (en) Method and apparatus for recognizing video document
CN110706151B (en) Video-oriented non-uniform style migration method
CN105898413A (en) Television program recommendation method, television and recommendation server
US20050270427A1 (en) Apparatus and method of controlling saturation of color image
US9035965B2 (en) Metadata for use in color grading
CN105159983B (en) Picture method for pushing and device
CN110392295A (en) Multi-channel video plays the implementation method of automatic split screen in a kind of video monitoring system
CN116761017B (en) High availability method and system for video real-time rendering
CN113556504A (en) Video conference display image processing method and device and video conference system
TWI234998B (en) Method and related circuit for detecting black frames in video signals
CN113052765A (en) Panoramic image splicing method based on optimal grid density model
CN105472255B (en) Video playing control method and device
CN109788311B (en) Character replacement method, electronic device, and storage medium
CN110365927B (en) Video recording method, video recording device, storage medium and computer equipment
CN109508911A (en) Row's vehicle method and system of car rental
CN108389208B (en) Intelligent image adaptive display method based on semantic segmentation
CN103716676B (en) The video program play method and device of intelligent television
CN105307044A (en) Method and apparatus for displaying interaction information on video program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20100818

Termination date: 20111212