A method for identifying commercials within a video data stream divided into a plurality of frames through detection of at least one of average cut frame distance, average cut frame distance trend, brand name, black frame, cut and black frame, frame similarity, character detection, and static image, wherein:
- average cut frame distance detection includes:
- a. calculating a quotient which includes a numerator representing the number of frames between a first frame with a cut and a previous frame with a cut and a denominator representing the number of cuts between said previous and first frames,
- b. comparing said quotient to a cut frame distance threshold, and
- c. identifying the occurrence of a portion of a commercial based upon said step of comparing;
- average cut frame distance trend detection is a determination of a change in the number of cuts in a plurality of frames, detection of a portion of a commercial being based on said change;
- brand name detection includes the steps of
- a. processing said data stream through at least one of an audio processor, a video processor, and a closed captioning processor to produce text,
- b. comparing said text to a bank of product and trade names, and
- c. identifying a portion of a commercial based upon said step of comparing;
- black frame detection includes the steps of
- a. dividing an analyzed frame of said frames into a plurality of regions;
- b. calculating an average maximum luminance value for said regions;
- c. calculating an average minimum luminance value for said regions;
- d. comparing said average maximum luminance value and said average minimum luminance value with a black frame threshold, and
- e. identifying the occurrence of beginning or an ending of a commercial based on said step of comparing;
- cut and black frame detection identifies a portion of a commercial based on whether a series of black frames has occurred within a cut and black frame time period before an analyzed cut, said analyzed cut occurring within a sequence of cuts, said sequence occurring within a cut rate time period;
- frame similarity detection is a determination of whether a present frame is similar to a previous frame, a portion of a commercial being when a frame within a time period is similar to the present frame;
- character detection includes the steps of
- a. finding letters within an analyzed frame of said frames,
- b. creating a box around said letters,
- c. determining dimensions of said box,
- d. determining a location of said box within said analyzed frame,
- e. analyzing said dimensions and said location of said analyzed frame with subsequent analyzed frames, and
- f. detecting a portion of a commercial based upon said step of analyzing;
- and
- static image detection identifies a portion of a commercial when a number of static frames has occurred within a time period.