US9805270B2 - Video segmentation techniques - Google Patents
Video segmentation techniques Download PDFInfo
- Publication number
- US9805270B2 US9805270B2 US15/255,978 US201615255978A US9805270B2 US 9805270 B2 US9805270 B2 US 9805270B2 US 201615255978 A US201615255978 A US 201615255978A US 9805270 B2 US9805270 B2 US 9805270B2
- Authority
- US
- United States
- Prior art keywords
- shot
- frames
- video
- similarity
- frame
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G06K9/00765—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/49—Segmenting video sequences, i.e. computational techniques such as parsing or cutting the sequence, low-level clustering or determining units such as shots or scenes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2323—Non-hierarchical techniques based on graph theory, e.g. minimum spanning trees [MST] or graph cuts
-
- G06K9/00147—
-
- G06K9/00744—
-
- G06K9/46—
-
- G06K9/469—
-
- G06K9/6212—
-
- G06K9/6224—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/762—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
- G06V10/7635—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks based on graphs, e.g. graph cuts or spectral clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
- G06V20/46—Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/69—Microscopic objects, e.g. biological cells or cellular parts
- G06V20/698—Matching; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Definitions
- FIGS. 1A, 1B, and 1C illustrate various examples of video segments that can be used in accordance with various embodiments
- FIG. 2 illustrates a flow diagram for an example approach for video segmentation that can be used in accordance with an embodiment
- FIG. 3 illustrates an example approach for feature extraction that can be used in accordance with an embodiment
- FIG. 4 illustrates an example of a similarity matrix for a segment of video that can be generated in accordance with an embodiment
- FIG. 5 illustrates an example graph representation for a segment of video that can be used in accordance with an embodiment
- FIG. 6 illustrates an example process for video segmentation that can be used in accordance with an embodiment
- FIG. 7 illustrates an example computing device that can be used in accordance with various embodiments.
- FIG. 8 illustrates an environment in which various embodiments can be implemented.
- Systems and methods in accordance with various embodiments of the present disclosure may overcome one or more of the aforementioned and other deficiencies experienced in conventional approaches for video segmentation.
- various embodiments provide for automated segmentation of a digital video by scene.
- features of a digital video including visual, audio, and/or textual characteristics of the video, can be extracted from frames of the video.
- the extracted features of adjacent frames are compared according to a similarity metric to detect a first set of shots or video segments bounded by abrupt transitions or hard cuts.
- the first set of shots is further analyzed to detect a second set of shots bounded by gradual transitions or soft cuts.
- key frames can be extracted from the first and second set of shots.
- the extracted key frames can be used to group the first and second set of shots by scene.
- a graph representation of the video is generated with the extracted key frames as nodes of the graph representation and a cost function, based at least in part on time and visual, audio, and/or textual similarity, as edges of the graph representation.
- a minimum cut algorithm is utilized to segment the graph representation to detect the scenes of the video.
- additional processing can be performed to associate useful and interesting metadata with one or more of the detected scenes.
- face detection can be used to determine whether a face appears in a detected scene and facial recognition can be used to identify the detected face, such as an actor or actress within the detected scene.
- the scene can be annotated or otherwise associated with the actor or actress, and users can search by the actor or actress's name to navigate to the detected scene.
- the metadata may enable users to navigate to a website or web application, such as IMDb.com®, to learn more about the actor or actress.
- music recognition software can be used to identify the title of a song or other music playing in a scene when it is determined that the scene includes music.
- a scene can be annotated with textual data corresponding to the scene.
- an object detection or text recognition service can be used to detect objects and/or text in the scene to determine a location corresponding to the scene.
- the scene can be annotated with information about the objects and/or location.
- speech-to-text translation, closed captioning, subtitles, and other textual data can be associated with the scene to enable users to search videos by keywords corresponding to the textual data.
- Video segmentation generally involves the partitioning of a video into its constituent parts, such as scenes, shots, and frames.
- a video can be segmented by scene.
- a scene comprises a series of consecutive shots grouped together because, for example, they are captured in the same location or they share thematic content.
- Scenes are analogous to chapters of a book.
- a shot can be a sequence of frames recorded contiguously and representing a continuous action in time or space.
- a shot can also be an unbroken sequence of frames captured by a single camera. Shots are analogous to paragraphs of the book.
- a frame is a single still image of a video. For example, a 90 minute film shot at 24 frames per second will contain 1,296,000 frames. Frames are analogous to sentences of the book while regions within a frame are analogous to words of the book.
- Video segmentation by scene typically requires detecting transitions between shots.
- transitions between shots There are generally two types of transitions between shots, (i) abrupt transitions or hard cuts and (ii) gradual transitions or soft cuts.
- An abrupt transition or hard cut generally occurs in a single frame when stopping and restarting the camera or switching to a different camera.
- Gradual transitions or soft cuts are created by combining two shots, such as by a dissolve, fade, or wipe.
- a dissolve involves a first shot super-imposed on a second shot as frames of the first shot decrease in brightness and frames of the second shot increase in brightness.
- a fade is a particular type of dissolve that involves super-imposition of a black image and a shot.
- a fade-in is a gradual increase in brightness beginning from a black frame and a fade-out is a slow decrease in brightness concluding with a black frame.
- a wipe is a set of shot change techniques in which the appearing and disappearing shots coexist in different regions (e.g., top, bottom, left, or right of the frame) of the intermediate frames, and the region occupied by the appearing shot grows until it replaces the disappearing shot entirely.
- FIGS. 1A, 1B, and 1C illustrate examples of video segments 100 , 120 , and 140 .
- the video segment 100 comprises frames 102 , 104 , and 106 .
- a stationary camera (not shown) is utilized to capture video of a moving car when the car is centered within the field of view of the camera, as seen in frame 102 , and as the car moves outside the center of the field of view of the camera, as seen in frames 104 and 106 .
- Video segment 100 follows a pattern of A 1 ⁇ A 2 ⁇ A 3 , where A represents segment 100 being captured by a single camera and the subscripts 1, 2, and 3 indicate that there are only minor variation between frames of the segment. Segment 100 thus represents a single shot because it a contiguous sequence of frames comprising visually similar subject matter.
- FIG. 1A uses a stationary camera to capture a shot, it should be understood that a moving camera can also be used for obtaining a video shot. For example, a shot could be filmed by a camera following the moving car and keeping the car in the center of the field of view of the camera.
- FIG. 1B illustrates a video segment 120 including frames 122 , 124 , and 126 .
- video segment 120 illustrates a scene captured by multiple cameras.
- the scene comprises a couple talking at a restaurant with a first camera capturing a profile view of both the man and the woman, as shown in frame 122 ; a second camera capturing a front view of the man as he speaks, as depicted in frame 124 ; and a third camera capturing a front view of the woman as she speaks, as illustrated in frame 126 .
- Video segment 120 can be represented as pattern A ⁇ B ⁇ C, where A corresponds to frames captured by the first camera, B corresponds to frames captured by the second camera, and C corresponds to frames captured by the third camera.
- A, B, and C represent different shots because different cameras (or one camera located at different locations and capturing multiple takes) are used to capture the different perspectives of the man and woman.
- FIG. 1C illustrates a video segment 140 including frames, 142 , 144 , and 146 .
- Video segment 140 is an example of a dissolve shot, and specifically, a fade out of a bar scene.
- Video segment 140 follows the pattern A 1 ⁇ A 1 B n ⁇ B n-1 A 2 ⁇ . . . ⁇ A n-1 B 2 ⁇ B 1 . That is, segment 140 begins with frames corresponding to camera A, each successive frame of the segment is a combination of frames corresponding to A and B, and the sequence concludes with frames corresponding to B.
- the gradual transition from A to B makes dissolve shots difficult to detect using conventional approaches.
- similarity metrics can readily detect abrupt transitions or hard cuts between frames, as in the example of scene 120 of FIG. 1A , those similarity metrics perform poorly or fail to detect altogether gradual transitions or soft cuts in the case of dissolve, fade, and wipe shots.
- FIG. 2 illustrates a flow diagram 200 for an example approach for video segmentation that can be used in accordance with an embodiment. It should be understood that, for any system discussed herein, there can be additional, fewer, or alternative components performing similar functionality or functionality in alternative orders, or in parallel, within the scope of the various embodiments unless otherwise stated.
- an input video 202 is provided to a feature extraction module 204 (or software application, service, or other element located within at least one working memory device of a system having a processor) for capturing features of the input video 202 .
- Features characterize the content of the video can be extracted from the visual content, audio, text (e.g., speech-to-text translation, closed captioning, subtitles, screenplay or script, etc.), metadata, or other data corresponding to the video.
- Visual features utilized for video segmentation include luminance (e.g., average grayscale luminance or the luminance channel in a color model such as hue-saturation-luminance (HSL)); color histograms; image edges; texture-based features (e.g., Tamura features, simultaneous autoregressive models, orientation features, co-occurrence matrices); features of objects in the video (e.g., faces or color, texture, and/or size of detected objects); transform coefficients (e.g., Discrete Fourier Transform, Discrete Cosine Transform, wavelet); and motion; among others.
- the size of the region from which features are extracted can also vary. For example, features can be extracted on a pixel-by-pixel basis, at a rectangular block level, according to various shaped
- Audio features are generally used to classify audio segments into speech, non-speech, music, or environmental sound. Audio features include zero-crossing rate or short-time energy, which can be used to distinguish between speech and music; spectrum flux, which can be used to distinguish among speech, non-speech or music, and environmental sound; band periodicity and noise frame ratio, which can be used to distinguish between music and environmental sound; and linear spectral pairs, which can be used to distinguish between speech and music or specific speakers.
- visual-based features and audio features can be combined for video segmentation. For example, audio features can be used to detect audio scene changes and visual-based features can be used to detect visual scene changes. A nearest neighbor algorithm can be applied to identify audio breaks and visual breaks that are temporally close to each other.
- audio features can be used as a post-processing step for graph-based segmentation techniques. If one speaker can be identified in two connected nodes, these nodes are merged.
- a visual graph can be generated from visual-based features and an audio-based graph can be constructed from audio features. The audio stream can be segmented according to speaker changes and background conditions. Both graphs can then be merged to detect scenes.
- Text features include speech-to-text translation, closed captioning, subtitles, screenplays associated with a video, among others.
- text features can be combined with visual-based features for detecting scenes. For example, speech translated to text, a screenplay, closed captioning, or subtitles can be parsed to segment a movie into a hierarchy of shots and scenes. These results can be used to validate visual-based segmentation or the results of visual-based segmentation can be verified using the text-based segmentation.
- a shot detection module 206 Various similarity metrics can be utilized by a shot detection module, such as the L-norm cosine similarity, the Euclidean distance, the histogram intersection, the chi-squared similarity, the earth mover's distance, among others.
- respective feature vectors of a pair of adjacent frames are compared using cosine similarity.
- the cosine similarity is simply a dot product of the two vectors.
- shot detection module 206 performs a first pass to partition the video according to abrupt transitions or hard cuts identified in the video. A second pass is then performed by a dissolve detection module 210 to refine the results of the first pass by identifying gradual transitions or soft cuts.
- Approaches for implementing a dissolve detection module are discussed elsewhere herein.
- Various approaches can be implemented to determine the first set of shots, including threshold-based and statistical learning-based techniques. Threshold-based approaches detect shot boundaries by comparing the measured pair-wise similarities between frames according to a threshold. When a similarity metric is less than the threshold, a boundary is detected.
- the threshold can be global or adaptive. Global threshold-based algorithms use the same threshold, which is generally set empirically, over the entire video. Adaptive threshold-based algorithms compute the threshold locally within a sliding window.
- Statistical learning-based approaches treat shot boundary detection as a classification task in which frames can be classified as a shot change or no shot change.
- Examples of statistical learning-based approaches include support vector machines (SVMs), boosting algorithms, decision trees, neural networks, among others.
- SVM is generally a binary classifier. Given labeled training data comprising instances of a first class or a second class, an SVM training algorithm builds a model capable of assigning new instances to one of the first class or the second class by finding an optimal hyperplane, i.e., a hyperplane that separates the training data between the two classes and maximizes the gap or “margin” between instances of the two classes.
- the training data can be projected to a higher-dimensional space using kernel techniques where the training data effectively becomes linearly separable.
- Finding the hyperplane can be formulated as a quadratic optimization problem that can be solved by known techniques.
- An SVM can be used as a two-class classifier to separate hard cuts from non-cuts.
- An SVM can also be combined with other approaches. For example, candidate shot boundaries can be detected using a threshold-based method, and an SVM classifier can be used to verify the shot boundaries (or vice versa).
- Boosting algorithms are based on the premise that a series of “weak” classifiers (e.g., classifiers that may only accurately predict an outcome a little more than half of the time) can be combined to create a “strong” classifier (e.g., a classifier capable of predicting an outcome according to a desired level of accuracy).
- An example of a boosting algorithm is Adaptive boosting or AdaBoost, which is a machine learning boosting algorithm which finds a highly accurate classifier (i.e., low error rate) from a combination of many “weak” classifiers (i.e., substantial error rate).
- AdaBoost Given a data set comprising examples that are within a class and not within the class and weights based on the difficulty of classifying an example and a weak set of classifiers, AdaBoost generates and calls a new weak classifier in each of a series of rounds. For each call, the distribution of weights is updated that indicates the importance of examples in the data set for the classification. On each round, the weights of each incorrectly classified example are increased, and the weights of each correctly classified example is decreased so the new classifier focuses on the difficult examples (i.e., those examples have not been correctly classified). AdaBoost can be used to make cut detection a pattern recognition task.
- Decision trees are trees that classify instances by sorting them based on feature values. Each node in a decision tree represents a feature in an instance to be classified, each branch represents a possible value of the node, and each leaf node represents a classification or decision. Generally, the feature that best divides the training data would be the root node of the tree, and higher-level nodes will typically divide the training data better than lower-level nodes. Decision trees can be used to classify frames as shot changes or no shot change, where similarities between frames within a particular temporal interval are used as input.
- Neural networks are inspired by biological neural networks and consist of an interconnected group of functions or classifiers that process information using a connectionist approach. Neural networks change their structure during training, such as by merging overlapping detections within one network and training an arbitration network to combine the results from different networks. Examples of neural network algorithms that can be used to classify frames as shot changes or no shot change include the multilayer neural network, the autoassociative neural network, the probabilistic decision-based neural network (PDBNN), and the sparse network of winnows (SNoW).
- PDBNN probabilistic decision-based neural network
- SNoW sparse network of winnows
- shots can be annotated, designated, or otherwise classified by a shot classification module 212 .
- Shot classification can be utilized by later processing stages to provide hints about the content of a shot to undergo or forego certain processing. For example, if a shot is classified as “blank,” then face detection, object detection, speech recognition, music recognition, text recognition and/or other video analyses can be skipped.
- classification results are stored as strings having any arbitrary value, such as “blank” for blank shots, “card credit” or “rolling credit” for shots identified as credits of a movie or television show, “dissolve” for shots identified as gradual transitions or soft cuts, “action” for shots including a substantial amount of action, and “static” for shots not including a substantial amount of action.
- one or more key frames are extracted for each detected shot by a key frame selection module 214 .
- Features used for key frame extraction include colors, edges, shapes, optical flow, MPEG-7 motion descriptors (e.g., temporal motion intensity, spatial distribution of motion), MPEG discrete cosine coefficient and motion vectors, among others.
- MPEG-7 motion descriptors e.g., temporal motion intensity, spatial distribution of motion
- MPEG discrete cosine coefficient and motion vectors among others.
- Various techniques can be utilized for key frame selection, including sequential comparison-based, global comparison-based, reference frame-based, clustering-based, curve simplification-based, and object-based algorithms. Sequential comparison-based algorithms sequentially compare frames successive to a previously selected key frame to determine whether the successive frame is different to the previously selected key frame by some threshold.
- Global comparison-based algorithms select key frames according to an objective function, such as distributing key frames equally within a shot or minimizing the sum of correlations between key frames to make key frames as uncorrelated with one another as possible.
- Reference frame-based algorithms select key frames by generating a reference frame and extracting key frames by comparing the frames in the shot with the reference frame. For example, a reference frame can be generated by determining the average histogram for all of the frames in a shot.
- Clustering-based algorithms choose key frames by clustering the frames of a shot and selecting the frames closest to the cluster centers as the key frames.
- Curve simplification-based algorithms extract key frames by mapping each frame of a shot to a point in feature space, linking the points in sequential order to form a trajectory curve, and then identifying the set of points that best represent the shape of the curve.
- Object-based algorithms select key frames to ensure that the key frames contain specified objects.
- the key frames can utilized by a scene detection module 216 to determine the scenes 218 of the input video 202 .
- scene detection including rule-based methods, graph-based methods, stochastic methods, among others.
- Rule-based methods apply certain heuristics for segmenting a video into scenes.
- An example of a rule-based method is to apply a similarity metric to group similar shots within a predefined time interval to segment scenes.
- Other examples of rule-based methods are based on film-editing rules or film grammar, such as the action matching rule, the film tempo rule, the shot/reverse shot rule, the establishment/breakdown rule, among others.
- the action matching rule dictates that motion in the same direction in two consecutive shots belong to a same scene.
- the film tempo rule is based on the premise that the number of shots, sound, and the motion within shots depict the rhythm of a scene, and the rule requires that the rhythm not change within a scene.
- the shot/reverse shot rule determines that alternating shots belong to a same scene.
- a typical example is a dialog between two persons.
- the establishment/breakdown rule defines a scene to include an establishing scene (e.g., the location of a scene where characters and objects and their spatial relations are introduced in an overview shot) and breakdown shots (e.g., close-ups of the characters).
- Graph-based methods treat video segmentation as a graph partitioning problem.
- Graph-based algorithms generally cluster shots based on similarity (and temporal proximity) to generate a graph representation for a video. Nodes of the graph represent shots or clusters of shots and edges indicate similarity and/or temporal proximity between the connected nodes.
- graph segmentation algorithms By applying graph segmentation algorithms, the constructed graphs are divided into sub-graphs, each representing a scene.
- Algorithms based on stochastic methods address the boundary detection problem with stochastic models. An optimal solution is approximated by maximizing the a posteriori probability of the estimated scene boundaries.
- feature extraction module 204 shot detection module 206 , dissolve detection module 210 , shot classification module 212 , key frame selection module 214 , and scene detection module 216 are illustrated as separate components in the example of FIG. 2 , it will be appreciated each of the modules may comprise a single system or some of the components can be combined. For example, a hard cut detection module, a soft cut detection module, and a shot classification module can be combined into a single shot detection module.
- FIG. 3 illustrates an example approach for extracting features in accordance with an embodiment, such as used by the feature extraction module 206 shown in FIG. 2 .
- a frame of video is encoded as a pyramid of histograms 300 comprising a first level histogram 302 over the entire frame, a second level of histograms 304 for each quadrant of the frame, and a third level of histograms 306 for each quarter of each quadrant of the frame.
- I represents the intensity channel and O 1 and O 2 represent the opponent color channels.
- Each level of the pyramid of histograms 300 is encoded in 128 bytes, which is then appended to create the final feature vector (384 bytes in total).
- the number of histograms computed increases four-fold.
- the number of bytes used to describe each channel per segment is quartered as the pyramid is descended.
- the histograms of two frames at the first level must be substantially similar for the frames to match but there can be some dissimilarity between the histograms of lower levels to account for jitter, noise, motion, and other minor deviations between frames.
- Pyramid levels 302 , 304 , and 306 are encoded as byte representations 322 , 324 , and 326 , respectively.
- the amount of data used to store the intensity channel I is double the amount for the opponent color channels O 1 and O 2 because there is generally more useful information in the intensity channel.
- Each histogram is L1 normalized and each bin is encoded as a single byte.
- computing the pyramid of histograms is also very efficient. Only pixels at the first level are explicitly analyzed and histograms for the other levels can be found by summing the histograms from ascending levels. Further, the transformation from RGB to the opponent color model can be calculated using vector integer operations.
- FIG. 4 illustrates an example of a similarity matrix 500 that can be generated in accordance with an embodiment, such as by the dissolve detection module 210 discussed in FIG. 2 , Time, or frame index, runs along both axes as well as the diagonal of similarity matrix 500 .
- the similarity matrix 500 corresponds to a dissolve shot.
- a set of rules is used to identify a second set of shots corresponding to gradual transitions or soft cuts. These rules include:
- a pattern corresponding to similarity matrix 500 is generated and similarity is computed at every valid time point for a discrete set of possible dissolve lengths.
- the pattern is slid along the diagonal of the similarity matrix of the shot to determine whether there is a match.
- the set of window sizes (in frames) used are 18, 24, 30, 36, 42, 48, 54, and 60. This enables detection of dissolves between 0.75 seconds and 2.5 seconds.
- the threshold for detecting a dissolve is set to 0.97.
- the shot is split into three, with the middle shot being classified as a “dissolve” shot, and the first and last shots analyzed recursively to determine whether the first and last shots include additional dissolve shots.
- FIG. 5 illustrates an example graph representation 600 for a segment of video in accordance with an embodiment, such as used by the scene detection module 216 described in FIG. 2 .
- scene detection or scene grouping is treated as a global segmentation problem and solved using dynamic programming on a graph of shot similarity connections.
- the objective function is based on Shi, Jianbo et al. “Normalized Cuts and Image Segmentation.” Pattern Analysis and Machine intelligence, IEEE Transactions on 22, no. 8 (2000): 888-905, which is incorporated herein by reference.
- an input video is represented as a set of shots as nodes in a graph, such as graph 600 .
- Each shot/node is connected to every other shot/node successive to that shot/node. If there are N shots, then there are
- the cost is based on a function of time and visual similarity.
- the time component is defined as:
- t diff is the time difference in seconds
- ⁇ time 54.
- the visual similarity component is defined as:
- volume of a segment is defined as:
- some of the shots may be assigned to a class, such as by shot classification module 212 of FIG. 2 .
- Certain classes such as blank shots and dissolve shots are more likely to be scene breaks, so the costs of making those cuts are favorably weighted by multiplying the cost of those shots by a discount factor.
- the weights are 0.8 for blank shots and 0.995 for dissolve shots.
- dynamic programming is used to compute the cost of all possible cuts through the graph.
- the particular implementation used is Dijkstra's algorithm.
- FIG. 6 illustrates an example process 700 for video segmentation that can be used in accordance with an embodiment, such as by the example system 200 of FIG. 2 .
- the process may begin by obtaining an input digital video 702 .
- the video may be a movie or television show provided by a content provider, such as a film or television studio, digital video broadcaster, or a video-on-demand service, among others; a user-generated video downloaded or streamed from a web-sharing website (or web application) or a distance education provider; or a personal video; among other possibilities.
- a content provider such as a film or television studio, digital video broadcaster, or a video-on-demand service, among others
- a user-generated video downloaded or streamed from a web-sharing website (or web application) or a distance education provider
- a personal video among other possibilities.
- One or more respective features for each frame of the video can be extracted 704 .
- the extracted features include at least one or more visual-based features.
- respective pyramids of histograms are calculated for frames of the input video.
- the features can also include audio features and/or text features corresponding to the video.
- the features of adjacent frames or a window of continuous frames are compared for similarity to determine a first set of shots 706 corresponding to abrupt transitions or hard cuts.
- a threshold-based shot detection algorithm is utilized to detect boundaries of the first set of shots. Measured pair-wise similarities between adjacent frames are compared to a predefined threshold. When the similarity metric is less than the threshold, a boundary or hard cut is identified. In an embodiment, any cut point that is within a time window of a previously detected cut point is masked out. In an embodiment, the time window is set to 8 frames.
- Dissolve shots are characterized by two distinct views between the beginning of a shot and the end of the shot, and the second test ensures visual dissimilarity at the beginning and end of the shot.
- the dissimilarity threshold is set to cosine similarity of less than 0.95. If the shot does not pass the second test, a successive shot is tested until all of the shots of the first set of shots have been exhausted. If the shot passes the second test, the shot is evaluated to search for a specified pattern corresponding to a dissolve shot, such as same gradual change same. In an embodiment, a pattern corresponding to the similarity matrix 500 of FIG. 4 is generated and similarity is computed at every valid time point for a discrete set of possible dissolve lengths.
- the generated pattern is used to slide along the diagonal of the similarity matrix of the shot to determine whether there is a match of the generated pattern and the similarity matrix of the shot.
- the set of window sizes (in frames) used are 18, 24, 30, 36 42, 48, 54, and 60 and enables detection of dissolve shots between 0.75 seconds and 2.5 seconds.
- the threshold for detecting the dissolve pattern is set to 0.97. If the shot fails the third test, a successive shot is processed until all of the shots of the first set of shots have been tested. If the shot passes the third test, the shot is split into three components with the middle component classified as a dissolve shot and the first and last components analyzed recursively 714 to determine whether there are additional dissolve shots in the first and last components.
- one or more respective key frames can be selected for each shot 716 .
- k-means clustering is used to extract one or more respective key frames from each shot, where k is proportional to the length of the shot.
- an undirected graph representing the input video is created 718 , wherein the nodes of the graph correspond to the key frames of the shots and the edges of the graph correspond to a function based on time and visual similarity.
- the cost function can be further based on audio similarity and/or textual similarity.
- the time component of the cost function is defined as what is set forth in Equation 2.
- the visual similarity component of the cost function is defined as what is set forth in Equation 3.
- the cost function is defined as what is set forth in Equation 6.
- the shots may be classified. Certain classes such as blank shots and dissolve shots are likely to be scene breaks, so the costs of these shots are multiplied by a discount factor.
- the weights are 0.8 for blank shots and 0.995 for dissolve shots. In an embodiment, there are penalties for long and short shots.
- dynamic programming is used to compute the cost of all possible cuts through the graph.
- Dijkstra's algorithm is used to optimize the cuts of the graph. After the graph is optimally cut using a minimum cut algorithm, each sub-graph is identified as a scene 720 .
- an input video can be additionally processed to annotate one or more of the detected scenes with useful and interesting information.
- face detection is used to determine whether a face appears in a detected scene and facial recognition can be used to identify the detected face, such as an actor (or actress) within the detected scene.
- the scene can be associated with the actor or actress, and users can search by the actor's name to navigate to the detected scene.
- the metadata may enable users to navigate to a website or web application to learn more about the actor or actress.
- music recognition software can be used to identify the title of a song or other music playing in a scene when it is determined that the scene includes music.
- the metadata can also enable a user to purchase the song or music.
- a scene can be associated with textual data corresponding to the scene.
- an image/object detection and/or text recognition service can be used to detect images/objects (e.g., city skylines, monuments), text (e.g., license plates, location text overlays, street signs), and/or other data associated with the scene to determine a location corresponding to the scene.
- the scene can be associated with metadata about the images, objects and/or location.
- trivia or other information relating to an actor appearing in a scene, music playing in the scene, or a location corresponding to the scene can be associated with the scene to provide a user with a more interactive film-viewing experience.
- speech-to-text translation, closed captioning, subtitles, screenplays, and other textual data can be associated with the scene to enable users to search videos by keywords corresponding to the textual data.
- excerpts or summaries of a video can be generated based on segmented scenes and/or metadata associated with the scenes.
- a video may capture a sporting event, and a user can extract or excerpt only those scenes including an occurrence of a score or other action based on shot and/or scene classifications.
- a video summary or montage can be created by extracting only those scenes including a specified actor and/or specified music and/or set in a specified location.
- videos can be edited to remove or exclude nude scenes, adult language, extreme violence, and/or other material that may be objectionable to some viewers. It should be appreciated that alternate embodiments may have numerous variations from that described above.
- FIG. 7 illustrates a logical arrangement of a set of general components of an example computing device 800 .
- the device includes a processor 802 for executing instructions that can be stored in a memory component 804 .
- the memory component can include many types of memory, data storage, or non-transitory computer-readable storage media, such as a first data storage for program instructions for execution by the processor 802 , a separate storage for images or data, a removable memory for sharing information with other devices, etc.
- the device typically will include some type of display element 806 , such as a touchscreen, electronic ink (e-ink), organic light emitting diode (OLED), liquid crystal display (LCD), etc., although devices such as portable media players might convey information via other means, such as through audio speakers.
- the display screen provides for touch or swipe-based input using, for example, capacitive or resistive touch technology.
- the device in many embodiments will include one or more cameras or image sensors 808 for capturing image or video content.
- a camera can include, or be based at least in part upon any appropriate technology, such as a CCD or CMOS image sensor having a sufficient resolution, focal range, viewable area, to capture an image of the user when the user is operating the device.
- the computing device can also include one or more communication elements or networking sub-systems 812 , such as a Wi-Fi, Bluetooth, RF, wired, or wireless communication system.
- the device in many embodiments can communicate with a network, such as the Internet, and may be able to communicate with other such devices.
- FIG. 8 illustrates an example of an environment 900 for implementing aspects in accordance with various embodiments.
- the system includes an electronic client device 902 , which can include any appropriate device operable to send and receive requests, messages or information over an appropriate network 904 and convey information back to a user of the device.
- client devices include personal computers, cell phones, handheld messaging devices, laptop computers, set-top boxes, personal data assistants, electronic book readers and the like.
- the network can include any appropriate network, including an intranet, the Internet, a cellular network, a local area network or any other such network or combination thereof. Components used for such a system can depend at least in part upon the type of network and/or environment selected. Protocols and components for communicating via such a network are well known and will not be discussed herein in detail. Communication over the network can be enabled via wired or wireless connections and combinations thereof.
- the network includes the Internet, as the environment includes a Web server 906 for receiving requests and serving content in response thereto, although for other networks, an alternative device serving a similar purpose could be used, as would be apparent to one of ordinary skill in the art.
- the application server provides access control services in cooperation with the data store and is able to generate content such as text, graphics, audio and/or video to be transferred to the user, which may be served to the user by the Web server 906 in the form of HTML, XML or another appropriate structured language in this example.
- content such as text, graphics, audio and/or video to be transferred to the user, which may be served to the user by the Web server 906 in the form of HTML, XML or another appropriate structured language in this example.
- the handling of all requests and responses, as well as the delivery of content between the client device 902 and the application server 908 can be handled by the Web server 906 . It should be understood that the Web and application servers are not required and are merely example components, as structured code discussed herein can be executed on any appropriate device or host machine as discussed elsewhere herein.
- a user might submit a search request for a certain type of item.
- the data store might access the user information to verify the identity of the user and can access the catalog detail information to obtain information about items of that type.
- the information can then be returned to the user, such as in a results listing on a Web page that the user is able to view via a browser on the user device 902 .
- Information for a particular item of interest can be viewed in a dedicated page or window of the browser.
- Each server typically will include an operating system that provides executable program instructions for the general administration and operation of that server and typically will include computer-readable medium storing instructions that, when executed by a processor of the server, allow the server to perform its intended functions.
- Suitable implementations for the operating system and general functionality of the servers are known or commercially available and are readily implemented by persons having ordinary skill in the art, particularly in light of the disclosure herein.
- the environment in one embodiment is a distributed computing environment utilizing several computer systems and components that are interconnected via communication links, using one or more computer networks or direct connections.
- the environment in one embodiment is a distributed computing environment utilizing several computer systems and components that are interconnected via communication links, using one or more computer networks or direct connections.
- FIG. 8 it will be appreciated by those of ordinary skill in the art that such a system could operate equally well in a system having fewer or a greater number of components than are illustrated in FIG. 8 .
- the depiction of the system 900 in FIG. 8 should be taken as being illustrative in nature and not limiting to the scope of the disclosure.
- Most embodiments utilize at least one network that would be familiar to those skilled in the art for supporting communications using any of a variety of commercially-available protocols, such as TCP/IP, OSI, FTP, UPnP, NFS, CIFS and AppleTalk.
- the network can be, for example, a local area network, a wide-area network, a virtual private network, the Internet, an intranet, an extranet, a public switched telephone network, an infrared network, a wireless network and any combination thereof.
- the Web server can run any of a variety of server or mid-tier applications, including HTTP servers, FTP servers, CGI servers, data servers, Java servers and business application servers.
- the server(s) may also be capable of executing programs or scripts in response requests from user devices, such as by executing one or more Web applications that may be implemented as one or more scripts or programs written in any programming language, such as Java®, C, C# or C++ or any scripting language, such as Perl, Python or TCL, as well as combinations thereof.
- the server(s) may also include database servers, including without limitation those commercially available from Oracle®, Microsoft®, Sybase® and IBM®.
- each such device can include hardware elements that may be electrically coupled via a bus, the elements including, for example, at least one central processing unit (CPU), at least one input device (e.g., a mouse, keyboard, controller, touch-sensitive display element or keypad) and at least one output device (e.g., a display device, printer or speaker).
- CPU central processing unit
- input device e.g., a mouse, keyboard, controller, touch-sensitive display element or keypad
- at least one output device e.g., a display device, printer or speaker
- Such a system may also include one or more storage devices, such as disk drives, optical storage devices and solid-state storage devices such as random access memory (RAM) or read-only memory (ROM), as well as removable media devices, memory cards, flash cards, etc.
- RAM random access memory
- ROM read-only memory
- Such devices can also include a computer-readable storage media reader, a communications device (e.g., a modem, a network card (wireless or wired), an infrared communication device) and working memory as described above.
- the computer-readable storage media reader can be connected with, or configured to receive, a computer-readable storage medium representing remote, local, fixed and/or removable storage devices as well as storage media for temporarily and/or more permanently containing, storing, transmitting and retrieving computer-readable information.
- the system and various devices also typically will include a number of software applications, modules, services or other elements located within at least one working memory device, including an operating system and application programs such as a client application or Web browser. It should be appreciated that alternate embodiments may have numerous variations from that described above. For example, customized hardware might also be used and/or particular elements might be implemented in hardware, software (including portable software, such as applets) or both. Further, connection to other computing devices such as network input/output devices may be employed.
- Storage media and computer readable media for containing code, or portions of code can include any appropriate media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage and/or transmission of information such as computer readable instructions, data structures, program modules or other data, including RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other medium which can be used to store the desired information and which can be accessed by a system device.
- RAM random access memory
- ROM read only memory
- EEPROM electrically erasable programmable read-only memory
- flash memory electrically erasable programmable read-only memory
- CD-ROM compact disc read-only memory
- DVD digital versatile disk
- magnetic cassettes magnetic tape
- magnetic disk storage magnetic disk storage devices
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Multimedia (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Discrete Mathematics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Medical Informatics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Molecular Biology (AREA)
- Television Signal Processing For Recording (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A video segmentation system can be utilized to automate segmentation of digital video content. Features corresponding to visual, audio, and/or textual content of the video can be extracted from frames of the video. The extracted features of adjacent frames are compared according to a similarity measure to determine boundaries of a first set of shots or video segments distinguished by abrupt transitions. The first set of shots is analyzed according to certain heuristics to recognize a second set of shots distinguished by gradual transitions. Key frames can be extracted from the first and second set of shots, and the key frames can be used by the video segmentation system to group the first and second set of shots by scene. Additional processing can be performed to associate metadata, such as names of actors or titles of songs, with the detected scenes.
Description
This application is a continuation of allowed U.S. application Ser. No. 14/577,277 entitled “VIDEO SEGMENTATION TECHNIQUES,” filed Dec. 19, 2014, which is incorporated herein by reference for all purposes.
As computing devices become progressively sophisticated and the Internet is readily accessible to more and more users, the creation, editing, and consumption of digital video has proliferated. Applications such as video-on-demand, video-sharing, digital video broadcasting, massive open online courses (MOOCs) or distance education, among other uses of digital video, are increasingly popular and have created a need to efficiently describe, organize, and manage video data. A conventional approach is to manually segment a video to generate an index or description of the content of the video. However, such an approach is time-intensive and prohibitively costly. Further, manual video segmentation is highly subjective because it requires a person to make his own judgments on how to index the video. In addition, when a digital video has been manually indexed, the video segmentation can be inconsistent, inaccurate, and/or incomplete.
Various embodiments in accordance with the present disclosure will be described with reference to the drawings, in which:
Systems and methods in accordance with various embodiments of the present disclosure may overcome one or more of the aforementioned and other deficiencies experienced in conventional approaches for video segmentation. In particular, various embodiments provide for automated segmentation of a digital video by scene. In various embodiments, features of a digital video, including visual, audio, and/or textual characteristics of the video, can be extracted from frames of the video. The extracted features of adjacent frames are compared according to a similarity metric to detect a first set of shots or video segments bounded by abrupt transitions or hard cuts. The first set of shots is further analyzed to detect a second set of shots bounded by gradual transitions or soft cuts. In some embodiments, key frames can be extracted from the first and second set of shots. The extracted key frames can be used to group the first and second set of shots by scene. In an embodiment, a graph representation of the video is generated with the extracted key frames as nodes of the graph representation and a cost function, based at least in part on time and visual, audio, and/or textual similarity, as edges of the graph representation. A minimum cut algorithm is utilized to segment the graph representation to detect the scenes of the video.
In some embodiments, additional processing can be performed to associate useful and interesting metadata with one or more of the detected scenes. For example, face detection can be used to determine whether a face appears in a detected scene and facial recognition can be used to identify the detected face, such as an actor or actress within the detected scene. The scene can be annotated or otherwise associated with the actor or actress, and users can search by the actor or actress's name to navigate to the detected scene. Further, the metadata may enable users to navigate to a website or web application, such as IMDb.com®, to learn more about the actor or actress. As another example, music recognition software can be used to identify the title of a song or other music playing in a scene when it is determined that the scene includes music. In addition to associating the song or music with the scene, the metadata can also enable a user to purchase the song or music. As yet another example, a scene can be annotated with textual data corresponding to the scene. For example, an object detection or text recognition service can be used to detect objects and/or text in the scene to determine a location corresponding to the scene. The scene can be annotated with information about the objects and/or location. In addition, speech-to-text translation, closed captioning, subtitles, and other textual data can be associated with the scene to enable users to search videos by keywords corresponding to the textual data.
Various other functions and advantages are described and suggested below as may be provided in accordance with the various embodiments.
Video segmentation generally involves the partitioning of a video into its constituent parts, such as scenes, shots, and frames. In various embodiments, a video can be segmented by scene. A scene comprises a series of consecutive shots grouped together because, for example, they are captured in the same location or they share thematic content. Scenes are analogous to chapters of a book. A shot can be a sequence of frames recorded contiguously and representing a continuous action in time or space. A shot can also be an unbroken sequence of frames captured by a single camera. Shots are analogous to paragraphs of the book. A frame is a single still image of a video. For example, a 90 minute film shot at 24 frames per second will contain 1,296,000 frames. Frames are analogous to sentences of the book while regions within a frame are analogous to words of the book.
Video segmentation by scene typically requires detecting transitions between shots. There are generally two types of transitions between shots, (i) abrupt transitions or hard cuts and (ii) gradual transitions or soft cuts. An abrupt transition or hard cut generally occurs in a single frame when stopping and restarting the camera or switching to a different camera. Gradual transitions or soft cuts are created by combining two shots, such as by a dissolve, fade, or wipe. A dissolve involves a first shot super-imposed on a second shot as frames of the first shot decrease in brightness and frames of the second shot increase in brightness. A fade is a particular type of dissolve that involves super-imposition of a black image and a shot. In particular, a fade-in is a gradual increase in brightness beginning from a black frame and a fade-out is a slow decrease in brightness concluding with a black frame. A wipe is a set of shot change techniques in which the appearing and disappearing shots coexist in different regions (e.g., top, bottom, left, or right of the frame) of the intermediate frames, and the region occupied by the appearing shot grows until it replaces the disappearing shot entirely.
Systems and approaches in accordance with various embodiments enable more precise segmentation of videos, particularly with respect to gradual transitions or soft cuts. FIG. 2 illustrates a flow diagram 200 for an example approach for video segmentation that can be used in accordance with an embodiment. It should be understood that, for any system discussed herein, there can be additional, fewer, or alternative components performing similar functionality or functionality in alternative orders, or in parallel, within the scope of the various embodiments unless otherwise stated. In this example, an input video 202 is provided to a feature extraction module 204 (or software application, service, or other element located within at least one working memory device of a system having a processor) for capturing features of the input video 202. Features characterize the content of the video, and can be extracted from the visual content, audio, text (e.g., speech-to-text translation, closed captioning, subtitles, screenplay or script, etc.), metadata, or other data corresponding to the video. Visual features utilized for video segmentation include luminance (e.g., average grayscale luminance or the luminance channel in a color model such as hue-saturation-luminance (HSL)); color histograms; image edges; texture-based features (e.g., Tamura features, simultaneous autoregressive models, orientation features, co-occurrence matrices); features of objects in the video (e.g., faces or color, texture, and/or size of detected objects); transform coefficients (e.g., Discrete Fourier Transform, Discrete Cosine Transform, wavelet); and motion; among others. The size of the region from which features are extracted can also vary. For example, features can be extracted on a pixel-by-pixel basis, at a rectangular block level, according to various shaped regions, or by a whole frame, among other approaches.
Audio features are generally used to classify audio segments into speech, non-speech, music, or environmental sound. Audio features include zero-crossing rate or short-time energy, which can be used to distinguish between speech and music; spectrum flux, which can be used to distinguish among speech, non-speech or music, and environmental sound; band periodicity and noise frame ratio, which can be used to distinguish between music and environmental sound; and linear spectral pairs, which can be used to distinguish between speech and music or specific speakers. In some embodiments, visual-based features and audio features can be combined for video segmentation. For example, audio features can be used to detect audio scene changes and visual-based features can be used to detect visual scene changes. A nearest neighbor algorithm can be applied to identify audio breaks and visual breaks that are temporally close to each other. As another example, audio features can be used as a post-processing step for graph-based segmentation techniques. If one speaker can be identified in two connected nodes, these nodes are merged. As yet another example, a visual graph can be generated from visual-based features and an audio-based graph can be constructed from audio features. The audio stream can be segmented according to speaker changes and background conditions. Both graphs can then be merged to detect scenes.
Text features include speech-to-text translation, closed captioning, subtitles, screenplays associated with a video, among others. In some embodiments, text features can be combined with visual-based features for detecting scenes. For example, speech translated to text, a screenplay, closed captioning, or subtitles can be parsed to segment a movie into a hierarchy of shots and scenes. These results can be used to validate visual-based segmentation or the results of visual-based segmentation can be verified using the text-based segmentation.
Once features of the video have been extracted, those features are analyzed to determine boundaries of shots 208 by a shot detection module 206. Various similarity metrics can be utilized by a shot detection module, such as the L-norm cosine similarity, the Euclidean distance, the histogram intersection, the chi-squared similarity, the earth mover's distance, among others. In an embodiment, respective feature vectors of a pair of adjacent frames are compared using cosine similarity. When the respective feature vectors are L2 normalized, the cosine similarity is simply a dot product of the two vectors.
In an embodiment, shot detection module 206 performs a first pass to partition the video according to abrupt transitions or hard cuts identified in the video. A second pass is then performed by a dissolve detection module 210 to refine the results of the first pass by identifying gradual transitions or soft cuts. Approaches for implementing a dissolve detection module are discussed elsewhere herein. Various approaches can be implemented to determine the first set of shots, including threshold-based and statistical learning-based techniques. Threshold-based approaches detect shot boundaries by comparing the measured pair-wise similarities between frames according to a threshold. When a similarity metric is less than the threshold, a boundary is detected. The threshold can be global or adaptive. Global threshold-based algorithms use the same threshold, which is generally set empirically, over the entire video. Adaptive threshold-based algorithms compute the threshold locally within a sliding window.
Statistical learning-based approaches treat shot boundary detection as a classification task in which frames can be classified as a shot change or no shot change. Examples of statistical learning-based approaches include support vector machines (SVMs), boosting algorithms, decision trees, neural networks, among others. An SVM is generally a binary classifier. Given labeled training data comprising instances of a first class or a second class, an SVM training algorithm builds a model capable of assigning new instances to one of the first class or the second class by finding an optimal hyperplane, i.e., a hyperplane that separates the training data between the two classes and maximizes the gap or “margin” between instances of the two classes. When a linear separator cannot be found, the training data can be projected to a higher-dimensional space using kernel techniques where the training data effectively becomes linearly separable. Finding the hyperplane can be formulated as a quadratic optimization problem that can be solved by known techniques. An SVM can be used as a two-class classifier to separate hard cuts from non-cuts. An SVM can also be combined with other approaches. For example, candidate shot boundaries can be detected using a threshold-based method, and an SVM classifier can be used to verify the shot boundaries (or vice versa).
Boosting algorithms are based on the premise that a series of “weak” classifiers (e.g., classifiers that may only accurately predict an outcome a little more than half of the time) can be combined to create a “strong” classifier (e.g., a classifier capable of predicting an outcome according to a desired level of accuracy). An example of a boosting algorithm is Adaptive boosting or AdaBoost, which is a machine learning boosting algorithm which finds a highly accurate classifier (i.e., low error rate) from a combination of many “weak” classifiers (i.e., substantial error rate). Given a data set comprising examples that are within a class and not within the class and weights based on the difficulty of classifying an example and a weak set of classifiers, AdaBoost generates and calls a new weak classifier in each of a series of rounds. For each call, the distribution of weights is updated that indicates the importance of examples in the data set for the classification. On each round, the weights of each incorrectly classified example are increased, and the weights of each correctly classified example is decreased so the new classifier focuses on the difficult examples (i.e., those examples have not been correctly classified). AdaBoost can be used to make cut detection a pattern recognition task.
Decision trees are trees that classify instances by sorting them based on feature values. Each node in a decision tree represents a feature in an instance to be classified, each branch represents a possible value of the node, and each leaf node represents a classification or decision. Generally, the feature that best divides the training data would be the root node of the tree, and higher-level nodes will typically divide the training data better than lower-level nodes. Decision trees can be used to classify frames as shot changes or no shot change, where similarities between frames within a particular temporal interval are used as input.
Neural networks are inspired by biological neural networks and consist of an interconnected group of functions or classifiers that process information using a connectionist approach. Neural networks change their structure during training, such as by merging overlapping detections within one network and training an arbitration network to combine the results from different networks. Examples of neural network algorithms that can be used to classify frames as shot changes or no shot change include the multilayer neural network, the autoassociative neural network, the probabilistic decision-based neural network (PDBNN), and the sparse network of winnows (SNoW).
Returning to FIG. 2 , once shots have been detected, they can be annotated, designated, or otherwise classified by a shot classification module 212. Shot classification can be utilized by later processing stages to provide hints about the content of a shot to undergo or forego certain processing. For example, if a shot is classified as “blank,” then face detection, object detection, speech recognition, music recognition, text recognition and/or other video analyses can be skipped. In an embodiment, classification results are stored as strings having any arbitrary value, such as “blank” for blank shots, “card credit” or “rolling credit” for shots identified as credits of a movie or television show, “dissolve” for shots identified as gradual transitions or soft cuts, “action” for shots including a substantial amount of action, and “static” for shots not including a substantial amount of action.
In some embodiments, one or more key frames are extracted for each detected shot by a key frame selection module 214. Features used for key frame extraction include colors, edges, shapes, optical flow, MPEG-7 motion descriptors (e.g., temporal motion intensity, spatial distribution of motion), MPEG discrete cosine coefficient and motion vectors, among others. Various techniques can be utilized for key frame selection, including sequential comparison-based, global comparison-based, reference frame-based, clustering-based, curve simplification-based, and object-based algorithms. Sequential comparison-based algorithms sequentially compare frames successive to a previously selected key frame to determine whether the successive frame is different to the previously selected key frame by some threshold. Global comparison-based algorithms select key frames according to an objective function, such as distributing key frames equally within a shot or minimizing the sum of correlations between key frames to make key frames as uncorrelated with one another as possible. Reference frame-based algorithms select key frames by generating a reference frame and extracting key frames by comparing the frames in the shot with the reference frame. For example, a reference frame can be generated by determining the average histogram for all of the frames in a shot. Clustering-based algorithms choose key frames by clustering the frames of a shot and selecting the frames closest to the cluster centers as the key frames. Curve simplification-based algorithms extract key frames by mapping each frame of a shot to a point in feature space, linking the points in sequential order to form a trajectory curve, and then identifying the set of points that best represent the shape of the curve. Object-based algorithms select key frames to ensure that the key frames contain specified objects.
The key frames can utilized by a scene detection module 216 to determine the scenes 218 of the input video 202. Various approaches can be used for scene detection, including rule-based methods, graph-based methods, stochastic methods, among others. Rule-based methods apply certain heuristics for segmenting a video into scenes. An example of a rule-based method is to apply a similarity metric to group similar shots within a predefined time interval to segment scenes. Other examples of rule-based methods are based on film-editing rules or film grammar, such as the action matching rule, the film tempo rule, the shot/reverse shot rule, the establishment/breakdown rule, among others. The action matching rule dictates that motion in the same direction in two consecutive shots belong to a same scene. The film tempo rule is based on the premise that the number of shots, sound, and the motion within shots depict the rhythm of a scene, and the rule requires that the rhythm not change within a scene. The shot/reverse shot rule determines that alternating shots belong to a same scene. A typical example is a dialog between two persons. The establishment/breakdown rule defines a scene to include an establishing scene (e.g., the location of a scene where characters and objects and their spatial relations are introduced in an overview shot) and breakdown shots (e.g., close-ups of the characters).
Graph-based methods treat video segmentation as a graph partitioning problem. Graph-based algorithms generally cluster shots based on similarity (and temporal proximity) to generate a graph representation for a video. Nodes of the graph represent shots or clusters of shots and edges indicate similarity and/or temporal proximity between the connected nodes. By applying graph segmentation algorithms, the constructed graphs are divided into sub-graphs, each representing a scene.
Algorithms based on stochastic methods address the boundary detection problem with stochastic models. An optimal solution is approximated by maximizing the a posteriori probability of the estimated scene boundaries.
Although feature extraction module 204, shot detection module 206, dissolve detection module 210, shot classification module 212, key frame selection module 214, and scene detection module 216 are illustrated as separate components in the example of FIG. 2 , it will be appreciated each of the modules may comprise a single system or some of the components can be combined. For example, a hard cut detection module, a soft cut detection module, and a shot classification module can be combined into a single shot detection module.
I=(R+G+B)/3
O 1=(R+G−2B)/4+0.5
O 2=(R−2G+B)/4+0.5,
where I represents the intensity channel and O1 and O2 represent the opponent color channels.
Each level of the pyramid of histograms 300 is encoded in 128 bytes, which is then appended to create the final feature vector (384 bytes in total). At each descending level of the pyramid of histograms, the number of histograms computed increases four-fold. To maintain the 128-byte constraint for each level, the number of bytes used to describe each channel per segment is quartered as the pyramid is descended. As a result, the histograms of two frames at the first level must be substantially similar for the frames to match but there can be some dissimilarity between the histograms of lower levels to account for jitter, noise, motion, and other minor deviations between frames.
In addition to providing a compact encoding for a frame of video, computing the pyramid of histograms is also very efficient. Only pixels at the first level are explicitly analyzed and histograms for the other levels can be found by summing the histograms from ascending levels. Further, the transformation from RGB to the opponent color model can be calculated using vector integer operations.
The pyramid of histograms is discussed in Chum, Ond{hacek over (r)}ej et al. “Scalable Near Identical Image and Shot Detection.” Proceedings of the 6th ACM International Conference on Image and Video Retrieval, pp. 549-556. ACM, 2007, which is incorporated herein by reference.
-
- 1. Does the shot meet a time threshold? In an embodiment, the time threshold is set to 60 frames (about 2.5 seconds).
- 2. Do the first set of frames of the shot and the last set of frames of the shot meet a dissimilarity threshold? A dissolve shot comprises two different looking shots. Thus, in an embodiment, the dissimilarity threshold between features from the first and last frames is set to cosine similarity of less than 0.95.
- 3. Does the similarity matrix of the shot include the pattern, same→gradual change→same? That is, does the similarity matrix of the shot include the pattern corresponding to
similarity matrix 500?
In an embodiment, a pattern corresponding to similarity matrix 500 is generated and similarity is computed at every valid time point for a discrete set of possible dissolve lengths. In effect, the pattern is slid along the diagonal of the similarity matrix of the shot to determine whether there is a match. The set of window sizes (in frames) used are 18, 24, 30, 36, 42, 48, 54, and 60. This enables detection of dissolves between 0.75 seconds and 2.5 seconds. The threshold for detecting a dissolve is set to 0.97.
If a shot passes these three tests, the shot is split into three, with the middle shot being classified as a “dissolve” shot, and the first and last shots analyzed recursively to determine whether the first and last shots include additional dissolve shots.
To perform the segmentation, an input video is represented as a set of shots as nodes in a graph, such as graph 600. Each shot/node is connected to every other shot/node successive to that shot/node. If there are N shots, then there are
edges that require a cost computation. In an embodiment, the cost is based on a function of time and visual similarity. The time component is defined as:
where tdiff is the time difference in seconds, σtime=54. The visual similarity component is defined as:
where σvisual=0.036.
If a volume of a segment is defined as:
and a cut is defined as:
then the cost function is defined as:
where the first term has a parameter α=1.11 to control how aggressively to cut by adding a non-linear cost to longer scenes, while the second term represents the normalized cut.
As discussed above, some of the shots may be assigned to a class, such as by shot classification module 212 of FIG. 2 . Certain classes such as blank shots and dissolve shots are more likely to be scene breaks, so the costs of making those cuts are favorably weighted by multiplying the cost of those shots by a discount factor. In an embodiment, the weights are 0.8 for blank shots and 0.995 for dissolve shots. In an embodiment, there are penalties for long and short shots.
In an embodiment, to optimize scene segmentation, dynamic programming is used to compute the cost of all possible cuts through the graph. The particular implementation used is Dijkstra's algorithm.
After the features are extracted from the input video, the features of adjacent frames or a window of continuous frames are compared for similarity to determine a first set of shots 706 corresponding to abrupt transitions or hard cuts. In an embodiment, a threshold-based shot detection algorithm is utilized to detect boundaries of the first set of shots. Measured pair-wise similarities between adjacent frames are compared to a predefined threshold. When the similarity metric is less than the threshold, a boundary or hard cut is identified. In an embodiment, any cut point that is within a time window of a previously detected cut point is masked out. In an embodiment, the time window is set to 8 frames.
In some embodiments, the first set of shots are further analyzed to refine shot detection by detecting second shots corresponding to dissolve shots or cut points corresponding to gradual transitions or soft cuts. In an embodiment, each of the first set of shots is first tested to determine whether a shot meets a time threshold 708. In an embodiment, the time threshold is set to 60 frames (about 2.5 seconds). If the shot does not pass the first test, a successive shot is tested until all of the shots of the first set of shots have been tested. If the shot passes the first test, the shot is analyzed to determine whether the first frames of the shot and the last frames of the shot meet a dissimilarity threshold 710. Dissolve shots are characterized by two distinct views between the beginning of a shot and the end of the shot, and the second test ensures visual dissimilarity at the beginning and end of the shot. In an embodiment, the dissimilarity threshold is set to cosine similarity of less than 0.95. If the shot does not pass the second test, a successive shot is tested until all of the shots of the first set of shots have been exhausted. If the shot passes the second test, the shot is evaluated to search for a specified pattern corresponding to a dissolve shot, such as same gradual change same. In an embodiment, a pattern corresponding to the similarity matrix 500 of FIG. 4 is generated and similarity is computed at every valid time point for a discrete set of possible dissolve lengths. The generated pattern is used to slide along the diagonal of the similarity matrix of the shot to determine whether there is a match of the generated pattern and the similarity matrix of the shot. In an embodiment, the set of window sizes (in frames) used are 18, 24, 30, 36 42, 48, 54, and 60 and enables detection of dissolve shots between 0.75 seconds and 2.5 seconds. In an embodiment, the threshold for detecting the dissolve pattern is set to 0.97. If the shot fails the third test, a successive shot is processed until all of the shots of the first set of shots have been tested. If the shot passes the third test, the shot is split into three components with the middle component classified as a dissolve shot and the first and last components analyzed recursively 714 to determine whether there are additional dissolve shots in the first and last components.
Once the first and second set of shots have been detected, one or more respective key frames can be selected for each shot 716. In an embodiment, k-means clustering is used to extract one or more respective key frames from each shot, where k is proportional to the length of the shot.
In some embodiments, an undirected graph representing the input video is created 718, wherein the nodes of the graph correspond to the key frames of the shots and the edges of the graph correspond to a function based on time and visual similarity. In at least some embodiments, the cost function can be further based on audio similarity and/or textual similarity. In an embodiment, the time component of the cost function is defined as what is set forth in Equation 2. In an embodiment, the visual similarity component of the cost function is defined as what is set forth in Equation 3. In an embodiment, if the volume of a segment is defined as what is set forth in Equation 4, and a cut is defined as what is set forth in Equation 5, then the cost function is defined as what is set forth in Equation 6.
As mentioned, at least some of the shots may be classified. Certain classes such as blank shots and dissolve shots are likely to be scene breaks, so the costs of these shots are multiplied by a discount factor. In an embodiment, the weights are 0.8 for blank shots and 0.995 for dissolve shots. In an embodiment, there are penalties for long and short shots.
In an embodiment, to optimize scene segmentation, dynamic programming is used to compute the cost of all possible cuts through the graph. In an embodiment, Dijkstra's algorithm is used to optimize the cuts of the graph. After the graph is optimally cut using a minimum cut algorithm, each sub-graph is identified as a scene 720.
In at least some embodiments, an input video can be additionally processed to annotate one or more of the detected scenes with useful and interesting information. In an embodiment, face detection is used to determine whether a face appears in a detected scene and facial recognition can be used to identify the detected face, such as an actor (or actress) within the detected scene. The scene can be associated with the actor or actress, and users can search by the actor's name to navigate to the detected scene. Further, the metadata may enable users to navigate to a website or web application to learn more about the actor or actress.
In an embodiment, music recognition software can be used to identify the title of a song or other music playing in a scene when it is determined that the scene includes music. In addition to associating the song or music with the scene, the metadata can also enable a user to purchase the song or music.
In an embodiment, a scene can be associated with textual data corresponding to the scene. For instance, an image/object detection and/or text recognition service can be used to detect images/objects (e.g., city skylines, monuments), text (e.g., license plates, location text overlays, street signs), and/or other data associated with the scene to determine a location corresponding to the scene. The scene can be associated with metadata about the images, objects and/or location. In some embodiments, trivia or other information relating to an actor appearing in a scene, music playing in the scene, or a location corresponding to the scene can be associated with the scene to provide a user with a more interactive film-viewing experience. Further, speech-to-text translation, closed captioning, subtitles, screenplays, and other textual data can be associated with the scene to enable users to search videos by keywords corresponding to the textual data.
In some embodiments, excerpts or summaries of a video can be generated based on segmented scenes and/or metadata associated with the scenes. For example, a video may capture a sporting event, and a user can extract or excerpt only those scenes including an occurrence of a score or other action based on shot and/or scene classifications. As another example, a video summary or montage can be created by extracting only those scenes including a specified actor and/or specified music and/or set in a specified location. As yet another example, videos can be edited to remove or exclude nude scenes, adult language, extreme violence, and/or other material that may be objectionable to some viewers. It should be appreciated that alternate embodiments may have numerous variations from that described above.
Further, a device can include the ability to start and/or stop image capture, such as when receiving a command from a user, application, or other device. The example device can include at least one audio component 810, such as a mono or stereo microphone or microphone array, operable to capture audio information from at least one primary direction. A microphone can be a uni- or omni-directional microphone as known for such devices. In some embodiments, a computing device can alternatively or additionally include other input elements to receive conventional input from a user. This conventional input can include, for example, a push button, touch pad, touchscreen, wheel, joystick, keyboard, mouse, keypad, or any other such component or element whereby a user can input a command to the device. In some embodiments, however, such a device might not include any buttons at all, and might be controlled only through a combination of visual and audio commands, such that a user can control the device without having to be in contact with the device.
The computing device can also include one or more communication elements or networking sub-systems 812, such as a Wi-Fi, Bluetooth, RF, wired, or wireless communication system. The device in many embodiments can communicate with a network, such as the Internet, and may be able to communicate with other such devices.
As discussed, different approaches can be implemented in various environments in accordance with the described embodiments. For example, FIG. 8 illustrates an example of an environment 900 for implementing aspects in accordance with various embodiments. As will be appreciated, although a Web-based environment is used for purposes of explanation, different environments may be used, as appropriate, to implement various embodiments. The system includes an electronic client device 902, which can include any appropriate device operable to send and receive requests, messages or information over an appropriate network 904 and convey information back to a user of the device. Examples of such client devices include personal computers, cell phones, handheld messaging devices, laptop computers, set-top boxes, personal data assistants, electronic book readers and the like. The network can include any appropriate network, including an intranet, the Internet, a cellular network, a local area network or any other such network or combination thereof. Components used for such a system can depend at least in part upon the type of network and/or environment selected. Protocols and components for communicating via such a network are well known and will not be discussed herein in detail. Communication over the network can be enabled via wired or wireless connections and combinations thereof. In this example, the network includes the Internet, as the environment includes a Web server 906 for receiving requests and serving content in response thereto, although for other networks, an alternative device serving a similar purpose could be used, as would be apparent to one of ordinary skill in the art.
The illustrative environment includes at least one application server 908 and a data store 910. It should be understood that there can be several application servers, layers or other elements, processes or components, which may be chained or otherwise configured, which can interact to perform tasks such as obtaining data from an appropriate data store. As used herein, the term “data store” refers to any device or combination of devices capable of storing, accessing and retrieving data, which may include any combination and number of data servers, databases, data storage devices and data storage media, in any standard, distributed or clustered environment. The application server 908 can include any appropriate hardware and software for integrating with the data store 910 as needed to execute aspects of one or more applications for the client device and handling a majority of the data access and business logic for an application. The application server provides access control services in cooperation with the data store and is able to generate content such as text, graphics, audio and/or video to be transferred to the user, which may be served to the user by the Web server 906 in the form of HTML, XML or another appropriate structured language in this example. The handling of all requests and responses, as well as the delivery of content between the client device 902 and the application server 908, can be handled by the Web server 906. It should be understood that the Web and application servers are not required and are merely example components, as structured code discussed herein can be executed on any appropriate device or host machine as discussed elsewhere herein.
The data store 910 can include several separate data tables, databases or other data storage mechanisms and media for storing data relating to a particular aspect. For example, the data store illustrated includes mechanisms for storing content (e.g., production data) 912 and user information 916, which can be used to serve content for the production side. The data store is also shown to include a mechanism for storing log or session data 914. It should be understood that there can be many other aspects that may need to be stored in the data store, such as page image information and access rights information, which can be stored in any of the above listed mechanisms as appropriate or in additional mechanisms in the data store 910. The data store 910 is operable, through logic associated therewith, to receive instructions from the application server 908 and obtain, update or otherwise process data in response thereto. In one example, a user might submit a search request for a certain type of item. In this case, the data store might access the user information to verify the identity of the user and can access the catalog detail information to obtain information about items of that type. The information can then be returned to the user, such as in a results listing on a Web page that the user is able to view via a browser on the user device 902. Information for a particular item of interest can be viewed in a dedicated page or window of the browser.
Each server typically will include an operating system that provides executable program instructions for the general administration and operation of that server and typically will include computer-readable medium storing instructions that, when executed by a processor of the server, allow the server to perform its intended functions. Suitable implementations for the operating system and general functionality of the servers are known or commercially available and are readily implemented by persons having ordinary skill in the art, particularly in light of the disclosure herein.
The environment in one embodiment is a distributed computing environment utilizing several computer systems and components that are interconnected via communication links, using one or more computer networks or direct connections. However, it will be appreciated by those of ordinary skill in the art that such a system could operate equally well in a system having fewer or a greater number of components than are illustrated in FIG. 8 . Thus, the depiction of the system 900 in FIG. 8 should be taken as being illustrative in nature and not limiting to the scope of the disclosure.
The various embodiments can be further implemented in a wide variety of operating environments, which in some cases can include one or more user computers or computing devices which can be used to operate any of a number of applications. User or client devices can include any of a number of general purpose personal computers, such as desktop or laptop computers running a standard operating system, as well as cellular, wireless and handheld devices running mobile software and capable of supporting a number of networking and messaging protocols. Such a system can also include a number of workstations running any of a variety of commercially-available operating systems and other known applications for purposes such as development and database management. These devices can also include other electronic devices, such as dummy terminals, thin-clients, gaming systems and other devices capable of communicating via a network.
Most embodiments utilize at least one network that would be familiar to those skilled in the art for supporting communications using any of a variety of commercially-available protocols, such as TCP/IP, OSI, FTP, UPnP, NFS, CIFS and AppleTalk. The network can be, for example, a local area network, a wide-area network, a virtual private network, the Internet, an intranet, an extranet, a public switched telephone network, an infrared network, a wireless network and any combination thereof.
In embodiments utilizing a Web server, the Web server can run any of a variety of server or mid-tier applications, including HTTP servers, FTP servers, CGI servers, data servers, Java servers and business application servers. The server(s) may also be capable of executing programs or scripts in response requests from user devices, such as by executing one or more Web applications that may be implemented as one or more scripts or programs written in any programming language, such as Java®, C, C# or C++ or any scripting language, such as Perl, Python or TCL, as well as combinations thereof. The server(s) may also include database servers, including without limitation those commercially available from Oracle®, Microsoft®, Sybase® and IBM®.
The environment can include a variety of data stores and other memory and storage media as discussed above. These can reside in a variety of locations, such as on a storage medium local to (and/or resident in) one or more of the computers or remote from any or all of the computers across the network. In a particular set of embodiments, the information may reside in a storage-area network (SAN) familiar to those skilled in the art. Similarly, any necessary files for performing the functions attributed to the computers, servers or other network devices may be stored locally and/or remotely, as appropriate. Where a system includes computerized devices, each such device can include hardware elements that may be electrically coupled via a bus, the elements including, for example, at least one central processing unit (CPU), at least one input device (e.g., a mouse, keyboard, controller, touch-sensitive display element or keypad) and at least one output device (e.g., a display device, printer or speaker). Such a system may also include one or more storage devices, such as disk drives, optical storage devices and solid-state storage devices such as random access memory (RAM) or read-only memory (ROM), as well as removable media devices, memory cards, flash cards, etc.
Such devices can also include a computer-readable storage media reader, a communications device (e.g., a modem, a network card (wireless or wired), an infrared communication device) and working memory as described above. The computer-readable storage media reader can be connected with, or configured to receive, a computer-readable storage medium representing remote, local, fixed and/or removable storage devices as well as storage media for temporarily and/or more permanently containing, storing, transmitting and retrieving computer-readable information. The system and various devices also typically will include a number of software applications, modules, services or other elements located within at least one working memory device, including an operating system and application programs such as a client application or Web browser. It should be appreciated that alternate embodiments may have numerous variations from that described above. For example, customized hardware might also be used and/or particular elements might be implemented in hardware, software (including portable software, such as applets) or both. Further, connection to other computing devices such as network input/output devices may be employed.
Storage media and computer readable media for containing code, or portions of code, can include any appropriate media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage and/or transmission of information such as computer readable instructions, data structures, program modules or other data, including RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other medium which can be used to store the desired information and which can be accessed by a system device. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art will appreciate other ways and/or methods to implement the various embodiments.
The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that various modifications and changes may be made thereunto without departing from the broader spirit and scope of the invention as set forth in the claims.
Claims (20)
1. A computer-implemented method, comprising:
determining a feature for a frame of a plurality of frames of a video;
analyzing a similarity between the feature and at least one feature associated with adjacent frames to the frame to determine a first shot of the video;
determining that the first shot meets a time threshold;
determining that a similarity metric between a first frame of the first shot and a second frame of the first shot meets a dissimilarity threshold;
determining that a similarity matrix of at least a subset of frames of the first shot corresponds to a dissolve pattern, the subset of frames corresponding to at least one second shot of the video;
generating a graph of the video, the graph comprising nodes corresponding to the first shot and the at least one second shot; and
determining a grouping of the first shot and the at least one second shot by performing one or more cuts of the graphs.
2. The computer-implemented method of claim 1 , wherein analyzing similarity between the respective features for adjacent frames further includes:
determining respective cosine similarity between the respective features for the adjacent frames; and
comparing the respective cosine similarity between the respective features for the adjacent frames to a similarity threshold.
3. The computer-implemented method of claim 1 , wherein determining that the similarity matrix of at least the subset of frames of the first shot corresponds to the dissolve pattern further includes:
generating the dissolve pattern;
sliding the dissolve pattern along a diagonal of the similarity matrix; and
matching the dissolve pattern to at least one portion of the diagonal.
4. The computer-implemented method of claim 1 , wherein determining the respective features for each frame further includes:
determining a first histogram for the frame;
determining a first plurality of histograms for first portions of the frame; and
determining a second plurality of histograms for second portions of the frame.
5. The computer-implemented method of claim 1 , wherein determining the grouping of the first shot and the at least one second shot includes:
obtaining one or more respective key frames for the first shot and the at least one second shot, wherein the nodes of the graph correspond to the respective key frames.
6. The computer-implemented method of claim 5 , wherein edges of the graph correspond to a respective cost between the nodes, and wherein the respective cost is based on a function of time and visual similarity.
7. The computer-implemented method of claim 1 , further comprising:
obtaining one of an audio feature corresponding to the video or a text feature corresponding to the video, wherein the grouping is further based at least in part on one of the audio feature or video feature.
8. The computer-implemented method of claim 1 , further comprising:
detecting a face in the grouping;
determining an identity of the face; and
associating the identity with the grouping.
9. The computer-implemented method of claim 1 , further comprising:
detecting one of textual data corresponding to the grouping or music in the grouping, the music associated with a title; and
associating one of the textual data or the title with the grouping.
10. The computer-implemented method of claim 1 , further comprising:
analyzing visual content of the first shot; and
classifying the first shot as one of a dissolve shot, a blank shot, a card credit, a rolling credit, an action shot, or a static shot.
11. A non-transitory computer-readable storage medium comprising instructions that, upon being executed by a processor of a computing device, cause the computing device to:
determine a feature for a frame of a plurality of frames of a video;
analyze a similarity between the feature and at least one feature associated with adjacent frames to the frame to determine a first shot of the video;
determine that the first shot meets a time threshold;
determine that a similarity metric between a first frame of the first shot and a second frame of the first shot meets a dissimilarity threshold;
determine that a similarity matrix of at least a subset of frames of the first shot corresponds to a dissolve pattern, the subset of frames corresponding to at least one second shot of the video;
generate a graph of the video, the graph comprising nodes corresponding to the first shot and the at least one second shot; and
determine a grouping of the first shot and the at least one second shot by performing one or more cuts of the graphs.
12. The non-transitory computer-readable storage medium of claim 11 , wherein the instructions, upon being executed, further cause the computing device to:
associate metadata with the grouping; and
enable a user to navigate to the grouping based on the metadata.
13. The non-transitory computer-readable storage medium of claim 12 , wherein the metadata corresponds to at least one of an identity of an actor appearing in the at least one grouping, title of music playing in the at least one grouping, a representation of an object in the at least one grouping, a location corresponding to the at least one grouping, or textual data corresponding to the at least one grouping.
14. The non-transitory computer-readable storage medium of claim 11 , wherein the instructions, upon being executed to determine that the similarity matrix of at least the subset of frames of the first shot corresponds to the dissolve pattern, further cause the computing device to:
generate the dissolve pattern;
slide the dissolve pattern along a diagonal of the similarity matrix; and
match the dissolve pattern to at least one portion of the diagonal.
15. The non-transitory computer-readable storage medium of claim 11 , wherein the instructions, upon being executed to analyze similarity between the respective features for adjacent frames, further cause the computing device to:
determine respective cosine similarity between the respective features for the adjacent frames; and
compare the respective cosine similarity between the respective features for the adjacent frames to a similarity threshold.
16. A computing device, comprising:
a processor;
memory including instructions that, upon being executed by the processor, cause the computing device to:
determine a feature for a frame of a plurality of frames of a video;
analyze a similarity between the feature and at least one feature associated with adjacent frames to the frame to determine a first shot of the video;
determine that the first shot meets a time threshold;
determine that a similarity metric between a first frame of the first shot and a second frame of the first shot meets a dissimilarity threshold;
determine that a similarity matrix of at least a subset of frames of the first shot corresponds to a dissolve pattern, the subset of frames corresponding to at least one second shot of the video;
generate a graph of the video, the graph comprising nodes corresponding to the first shot and the at least one second shot; and
determine a grouping of the first shot and the at least one second shot by performing one or more cuts of the graphs.
17. The computing device of claim 16 , wherein the instructions, upon being executed include causing the computing device to:
determine respective cosine similarity between the respective features for the adjacent frames; and
compare the respective cosine similarity between the respective features for the adjacent frames to a similarity threshold.
18. The computing device of claim 16 , wherein the instructions, upon being executed to determine that a similarity matrix of at least the subset of frames of the first shot corresponds to the dissolve pattern include causing the computing device to:
generate the dissolve pattern;
slide the dissolve pattern along a diagonal of the similarity matrix; and
match the dissolve pattern to at least one portion of the diagonal.
19. The computing device of claim 16 , wherein the instructions, upon being executed to determine the respective features for each frame include causing the computing device to:
determine a first histogram for the frame;
determine a first plurality of histograms for first portions of the frame; and
determine a second plurality of histograms for second portions of the frame.
20. The computing device of claim 16 , wherein the instructions, upon being executed to determine the grouping of the first shot and the at least one second shot include causing the computing device to:
obtain one or more respective key frames for the first shot and the at least one second shot, wherein the nodes of the graph correspond to the respective key frames, wherein edges of the graph correspond to a respective cost between the nodes, and wherein the respective cost is based on a function of time and visual similarity.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US15/255,978 US9805270B2 (en) | 2014-12-19 | 2016-09-02 | Video segmentation techniques |
US15/689,193 US10528821B2 (en) | 2014-12-19 | 2017-08-29 | Video segmentation techniques |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US14/577,277 US9436876B1 (en) | 2014-12-19 | 2014-12-19 | Video segmentation techniques |
US15/255,978 US9805270B2 (en) | 2014-12-19 | 2016-09-02 | Video segmentation techniques |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/577,277 Continuation US9436876B1 (en) | 2014-12-19 | 2014-12-19 | Video segmentation techniques |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/689,193 Continuation US10528821B2 (en) | 2014-12-19 | 2017-08-29 | Video segmentation techniques |
Publications (2)
Publication Number | Publication Date |
---|---|
US20170083770A1 US20170083770A1 (en) | 2017-03-23 |
US9805270B2 true US9805270B2 (en) | 2017-10-31 |
Family
ID=56878227
Family Applications (3)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/577,277 Active US9436876B1 (en) | 2014-12-19 | 2014-12-19 | Video segmentation techniques |
US15/255,978 Active US9805270B2 (en) | 2014-12-19 | 2016-09-02 | Video segmentation techniques |
US15/689,193 Active 2035-03-18 US10528821B2 (en) | 2014-12-19 | 2017-08-29 | Video segmentation techniques |
Family Applications Before (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/577,277 Active US9436876B1 (en) | 2014-12-19 | 2014-12-19 | Video segmentation techniques |
Family Applications After (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US15/689,193 Active 2035-03-18 US10528821B2 (en) | 2014-12-19 | 2017-08-29 | Video segmentation techniques |
Country Status (1)
Country | Link |
---|---|
US (3) | US9436876B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10528821B2 (en) | 2014-12-19 | 2020-01-07 | Amazon Technologies, Inc. | Video segmentation techniques |
US12050830B2 (en) | 2019-04-25 | 2024-07-30 | Dolby Laboratories Licensing Corporation | Content-aware PQ range analyzer and tone mapping in live feeds |
Families Citing this family (53)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3591651A1 (en) * | 2014-08-14 | 2020-01-08 | Samsung Electronics Co., Ltd. | Method and apparatus for providing image contents |
US10438131B1 (en) * | 2015-12-14 | 2019-10-08 | Google Llc | Spherical random features for polynomial kernels |
CN105760238B (en) * | 2016-01-29 | 2018-10-19 | 腾讯科技(深圳)有限公司 | The treating method and apparatus and system of graphics instructional data |
US10127824B2 (en) * | 2016-04-01 | 2018-11-13 | Yen4Ken, Inc. | System and methods to create multi-faceted index instructional videos |
US11853884B2 (en) | 2017-02-10 | 2023-12-26 | Synaptics Incorporated | Many or one detection classification systems and methods |
US11100932B2 (en) * | 2017-02-10 | 2021-08-24 | Synaptics Incorporated | Robust start-end point detection algorithm using neural network |
CN107087211B (en) * | 2017-03-30 | 2020-12-11 | 北京奇艺世纪科技有限公司 | Method and device for detecting lens of host |
US10572767B2 (en) | 2017-04-12 | 2020-02-25 | Netflix, Inc. | Scene and shot detection and characterization |
US10123058B1 (en) * | 2017-05-08 | 2018-11-06 | DISH Technologies L.L.C. | Systems and methods for facilitating seamless flow content splicing |
US10555036B2 (en) * | 2017-05-30 | 2020-02-04 | AtoNemic Labs, LLC | Transfer viability measurement system for conversion of two-dimensional content to 360 degree content |
CN107682744B (en) * | 2017-09-29 | 2021-01-08 | 惠州Tcl移动通信有限公司 | Video clip output method, storage medium and mobile terminal |
US11115717B2 (en) | 2017-10-13 | 2021-09-07 | Dish Network L.L.C. | Content receiver control based on intra-content metrics and viewing pattern detection |
US10628486B2 (en) * | 2017-11-15 | 2020-04-21 | Google Llc | Partitioning videos |
KR102535411B1 (en) | 2017-11-16 | 2023-05-23 | 삼성전자주식회사 | Apparatus and method related to metric learning based data classification |
US10417501B2 (en) * | 2017-12-06 | 2019-09-17 | International Business Machines Corporation | Object recognition in video |
CN107977461A (en) * | 2017-12-21 | 2018-05-01 | 厦门美图之家科技有限公司 | A kind of video feature extraction method and device |
CN108289244B (en) * | 2017-12-28 | 2021-05-25 | 努比亚技术有限公司 | Video subtitle processing method, mobile terminal and computer readable storage medium |
CN108763515B (en) * | 2018-05-31 | 2021-12-17 | 天津理工大学 | Time-sensitive personalized recommendation method based on probability matrix decomposition |
CN108984678A (en) * | 2018-06-29 | 2018-12-11 | 百度在线网络技术(北京)有限公司 | wearable device, information processing method, device and system |
CN108810620B (en) * | 2018-07-18 | 2021-08-17 | 腾讯科技(深圳)有限公司 | Method, device, equipment and storage medium for identifying key time points in video |
CN108966042B (en) * | 2018-09-10 | 2020-12-18 | 合肥工业大学 | Video abstract generation method and device based on shortest path |
CN109344780A (en) * | 2018-10-11 | 2019-02-15 | 上海极链网络科技有限公司 | A kind of multi-modal video scene dividing method based on sound and vision |
CN109413510B (en) * | 2018-10-19 | 2021-05-18 | 深圳市商汤科技有限公司 | Video abstract generation method and device, electronic equipment and computer storage medium |
US10848791B1 (en) * | 2018-10-30 | 2020-11-24 | Amazon Technologies, Inc. | Determining portions of video content based on artificial intelligence model |
CN109151615B (en) * | 2018-11-02 | 2022-01-25 | 湖南双菱电子科技有限公司 | Video processing method, computer device, and computer storage medium |
JP7172472B2 (en) * | 2018-11-09 | 2022-11-16 | 富士通株式会社 | RULE GENERATION DEVICE, RULE GENERATION METHOD AND RULE GENERATION PROGRAM |
KR102215285B1 (en) * | 2018-12-26 | 2021-02-15 | 건국대학교 산학협력단 | Method of selecting key prame and apparatuses performing the same |
US20200213662A1 (en) * | 2018-12-31 | 2020-07-02 | Comcast Cable Communications, Llc | Environmental Data for Media Content |
CN110569702B (en) * | 2019-02-14 | 2021-05-14 | 创新先进技术有限公司 | Video stream processing method and device |
CN114041165A (en) * | 2019-07-18 | 2022-02-11 | 华为技术有限公司 | Video similarity detection method, device and equipment |
US10929677B1 (en) | 2019-08-07 | 2021-02-23 | Zerofox, Inc. | Methods and systems for detecting deepfakes |
CN110460908B (en) * | 2019-08-30 | 2022-07-26 | 上海互盾信息科技有限公司 | Method for generating each frame of picture when video is generated |
FR3103302B1 (en) * | 2019-11-14 | 2021-11-26 | Thales Sa | IMAGE SEGMENTATION BY OPTICAL FLOW |
CN111062395B (en) * | 2019-11-27 | 2020-12-18 | 北京理工大学 | Real-time video semantic segmentation method |
CN110996021A (en) * | 2019-11-30 | 2020-04-10 | 咪咕文化科技有限公司 | Director switching method, electronic device and computer readable storage medium |
US11302095B2 (en) * | 2020-01-09 | 2022-04-12 | International Business Machines Corporation | Cognitive motion picture analysis |
CN111294646B (en) * | 2020-02-17 | 2022-08-30 | 腾讯科技(深圳)有限公司 | Video processing method, device, equipment and storage medium |
US11756301B2 (en) * | 2020-04-20 | 2023-09-12 | Prime Focus Technologies Limited | System and method for automatically detecting and marking logical scenes in media content |
CN111711771B (en) * | 2020-05-20 | 2022-09-30 | 北京奇艺世纪科技有限公司 | Image selection method and device, electronic equipment and storage medium |
CN111652678B (en) * | 2020-05-27 | 2023-11-14 | 腾讯科技(深圳)有限公司 | Method, device, terminal, server and readable storage medium for displaying article information |
CN111491180B (en) * | 2020-06-24 | 2021-07-09 | 腾讯科技(深圳)有限公司 | Method and device for determining key frame |
EP3944234A1 (en) * | 2020-07-24 | 2022-01-26 | Atos Global IT Solutions and Services Private Limited | Method for processing a video file comprising audio content and visual content comprising text content |
CN112464814A (en) * | 2020-11-27 | 2021-03-09 | 北京百度网讯科技有限公司 | Video processing method and device, electronic equipment and storage medium |
CN112818906B (en) * | 2021-02-22 | 2023-07-11 | 浙江传媒学院 | Intelligent cataloging method of all-media news based on multi-mode information fusion understanding |
US20220286744A1 (en) * | 2021-03-08 | 2022-09-08 | At&T Intellectual Property I, L.P. | Methods, systems, and devices to enhance user viewing experience of media content based on media content analysis |
US11881233B2 (en) * | 2021-04-08 | 2024-01-23 | Rovi Guides, Inc. | Methods and systems for generating meme content |
CN113470123B (en) * | 2021-05-08 | 2024-07-23 | 广州观止文化科技有限公司 | Video toning processing method and device, storage medium and shooting equipment |
CN113327628B (en) * | 2021-05-27 | 2023-12-22 | 抖音视界有限公司 | Audio processing method, device, readable medium and electronic equipment |
CN113810765B (en) * | 2021-09-17 | 2023-08-29 | 北京百度网讯科技有限公司 | Video processing method, device, equipment and medium |
US11785314B2 (en) * | 2021-11-04 | 2023-10-10 | Rovi Guides, Inc. | Systems and methods to enhance segment during trick play |
US11935300B2 (en) * | 2021-11-05 | 2024-03-19 | Netflix, Inc. | Techniques for generating candidate match cuts |
CN115359409B (en) * | 2022-10-19 | 2023-01-17 | 腾讯科技(深圳)有限公司 | Video splitting method and device, computer equipment and storage medium |
CN116405745B (en) * | 2023-06-09 | 2023-11-17 | 深圳市信润富联数字科技有限公司 | Video information extraction method and device, terminal equipment and computer medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7016540B1 (en) * | 1999-11-24 | 2006-03-21 | Nec Corporation | Method and system for segmentation, classification, and summarization of video images |
US20090083790A1 (en) * | 2007-09-26 | 2009-03-26 | Tao Wang | Video scene segmentation and categorization |
US20100092037A1 (en) * | 2007-02-01 | 2010-04-15 | Yissum Research Develpoment Company of the Hebrew University of Jerusalem | Method and system for video indexing and video synopsis |
US9514536B2 (en) * | 2012-10-10 | 2016-12-06 | Broadbandtv, Corp. | Intelligent video thumbnail selection and generation |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7143434B1 (en) * | 1998-11-06 | 2006-11-28 | Seungyup Paek | Video description system and method |
WO2000045603A1 (en) * | 1999-01-29 | 2000-08-03 | Sony Corporation | Signal processing method and video/voice processing device |
EP1067786B1 (en) * | 1999-01-29 | 2011-03-09 | Sony Corporation | Data describing method and data processor |
US7075591B1 (en) * | 1999-09-22 | 2006-07-11 | Lg Electronics Inc. | Method of constructing information on associate meanings between segments of multimedia stream and method of browsing video using the same |
US7296231B2 (en) * | 2001-08-09 | 2007-11-13 | Eastman Kodak Company | Video structuring by probabilistic merging of video segments |
DE102007028175A1 (en) * | 2007-06-20 | 2009-01-02 | Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. | Automated method for temporal segmentation of a video into scenes taking into account different types of transitions between image sequences |
US8239359B2 (en) * | 2008-09-23 | 2012-08-07 | Disney Enterprises, Inc. | System and method for visual search in a video media player |
US8463051B2 (en) * | 2008-10-16 | 2013-06-11 | Xerox Corporation | Modeling images as mixtures of image models |
EP2224357A1 (en) * | 2009-02-27 | 2010-09-01 | BRITISH TELECOMMUNICATIONS public limited company | Video segmentation |
KR20110032610A (en) * | 2009-09-23 | 2011-03-30 | 삼성전자주식회사 | Apparatus and method for scene segmentation |
US8467611B2 (en) * | 2010-12-10 | 2013-06-18 | Eastman Kodak Company | Video key-frame extraction using bi-level sparsity |
WO2012137493A1 (en) * | 2011-04-07 | 2012-10-11 | パナソニック株式会社 | Image processing device, image processing method, image processing program, and integrated circuit |
US8958645B2 (en) * | 2012-04-19 | 2015-02-17 | Canon Kabushiki Kaisha | Systems and methods for topic-specific video presentation |
US9047376B2 (en) * | 2012-05-01 | 2015-06-02 | Hulu, LLC | Augmenting video with facial recognition |
US9116924B2 (en) * | 2013-01-14 | 2015-08-25 | Xerox Corporation | System and method for image selection using multivariate time series analysis |
US9436876B1 (en) | 2014-12-19 | 2016-09-06 | Amazon Technologies, Inc. | Video segmentation techniques |
-
2014
- 2014-12-19 US US14/577,277 patent/US9436876B1/en active Active
-
2016
- 2016-09-02 US US15/255,978 patent/US9805270B2/en active Active
-
2017
- 2017-08-29 US US15/689,193 patent/US10528821B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7016540B1 (en) * | 1999-11-24 | 2006-03-21 | Nec Corporation | Method and system for segmentation, classification, and summarization of video images |
US20100092037A1 (en) * | 2007-02-01 | 2010-04-15 | Yissum Research Develpoment Company of the Hebrew University of Jerusalem | Method and system for video indexing and video synopsis |
US20090083790A1 (en) * | 2007-09-26 | 2009-03-26 | Tao Wang | Video scene segmentation and categorization |
US9514536B2 (en) * | 2012-10-10 | 2016-12-06 | Broadbandtv, Corp. | Intelligent video thumbnail selection and generation |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10528821B2 (en) | 2014-12-19 | 2020-01-07 | Amazon Technologies, Inc. | Video segmentation techniques |
US12050830B2 (en) | 2019-04-25 | 2024-07-30 | Dolby Laboratories Licensing Corporation | Content-aware PQ range analyzer and tone mapping in live feeds |
Also Published As
Publication number | Publication date |
---|---|
US20180082127A1 (en) | 2018-03-22 |
US20170083770A1 (en) | 2017-03-23 |
US10528821B2 (en) | 2020-01-07 |
US9436876B1 (en) | 2016-09-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10528821B2 (en) | Video segmentation techniques | |
US10262239B2 (en) | Video content contextual classification | |
Del Fabro et al. | State-of-the-art and future challenges in video scene detection: a survey | |
Rasheed et al. | On the use of computable features for film classification | |
Kumar et al. | Deep event learning boost-up approach: Delta | |
Zhou et al. | Movie genre classification via scene categorization | |
US8804999B2 (en) | Video recommendation system and method thereof | |
CN111428088A (en) | Video classification method and device and server | |
Asghar et al. | Video indexing: a survey | |
CN113766330A (en) | Method and device for generating recommendation information based on video | |
Li et al. | Videography-based unconstrained video analysis | |
Hoai et al. | Thread-safe: Towards recognizing human actions across shot boundaries | |
Zlitni et al. | Automatic topics segmentation for TV news video using prior knowledge | |
Tapu et al. | DEEP-AD: a multimodal temporal video segmentation framework for online video advertising | |
Ionescu et al. | An audio-visual approach to web video categorization | |
Guo et al. | Who produced this video, amateur or professional? | |
Haroon et al. | Video scene detection using compact bag of visual word models | |
Ben et al. | Unsupervised mining of audiovisually consistent segments in videos with application to structure analysis | |
Ionescu et al. | A color-action perceptual approach to the classification of animated movies | |
Darabi et al. | User-centred personalised video abstraction approach adopting SIFT features | |
Vrochidis et al. | A multi-modal audience analysis system for predicting popularity of online videos | |
Tapu et al. | TV news retrieval based on story segmentation and concept association | |
Dash et al. | A domain independent approach to video summarization | |
Shambharkar et al. | Automatic classification of movie trailers using data mining techniques: A review | |
Dong et al. | Automatic and fast temporal segmentation for personalized news consuming |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 4 |