The present invention relates to method and apparatus for determining the shot type of an image.
Video content is built up from different kind of shot types, which are intended by the director to bring across different kinds of information. Typically, these shots are classified into three types, namely a long shot, a medium shot and a close-up shot or short shot. A long shot shows an entire area of action including the place, the people, and the objects in their entirety. In a medium shot the subject and its setting occupies roughly equal areas in the frame. A close-up shot or short shot shows a small part of a scene, such as a character's face, in detail, so it fills the scene.
Automatic classification of shots (or even individual frames) into long shots, medium shots and close-ups provides useful information for video content analysis applications like scene chaptering. It also proves useful in several video signal processing approaches, for example rendering on 3D screens, where a long shot may be rendered differently from a close-up, for instance by rendering the foreground in a close-up close to the screen plane in order to have it as sharp as possible, whereas for a long shot larger fractions of the scene may be rendered in front of the screen.
For automatic classification, a feature which is computable from the frame or shot is required. This feature needs to be able to distinguish between long shots and medium shots and close-ups. One known technique uses several types of information for determining the shot type. This includes motion, focus, texture, camera motion, field of view and many others. However, this technique is complex and can be inaccurate in distinguishing between the types of shots.
It is desirable to provide automatic classification of shots which is computationally simple with improved accuracy.
This is achieved according to an aspect of the present invention, by providing a method for determining the type of shot of an image, the method comprising the step of: assigning portions of the image to at least a first cluster or a second cluster, the clusters having different ranges of depth values associated therewith; determining the shot type of the image on the basis of whether both said first and second clusters have been assigned at least one portion or whether there is a stepped or gradual change in the difference between the depth of said first and second clusters.
This is also achieved according to a further aspect of the present invention, by providing apparatus for determining the type of shot of an image, the apparatus comprising: interface means for input of an image; and a processor for assigning portions of the image to at least a first cluster or a second cluster, the clusters having different ranges of depth values associated therewith and for determining the shot type of the image on the basis of whether both said first and second clusters have been assigned at least one portion or whether there is a stepped or gradual change in the difference between the depth of said first and second clusters.
The basic concept is that if at least two clusters of depth values can be distinguished, i.e. there is a marked or stepped difference in the depth, the video frame is a close-up or medium shot type, whereas if no such distinction in the cluster is present, a gradual profile, or there is only one cluster, this indicates a long shot. In a preferred embodiment, as the depth signal has a very direct relation to the scene, it can directly be used, simply, as a scene classifier.
Preferably, the decision of whether there is a marked or stepped difference in depth values is based on statistical properties of said clusters. These may include at least one of a difference in the means of said depth values between said first and second clusters, a standard deviation of depth values in a cluster and the area of a cluster.
These provide a simple computational method which is fast, effective and accurate.
The step of determining whether there is a stepped or gradual change in the difference between the depth of the first and second clusters may comprise the steps of: comparing the standard deviation of the depth values in one of the first and second clusters with the difference in the mean depth values between the first and second clusters; and if the standard deviation is relatively small compared to the difference in the mean depth values, there is a stepped change in the difference between the depth of the first and second clusters and the image is classified as a short shot type.
The medium or short shot type, or close-up, is then easily identified by a simple test of the statistical properties of the clusters.
The step of determining whether there is a gradual change in difference between the depth of the first and second clusters may comprise the steps of: comparing the difference in the mean depth values between the first and second clusters; determining if the difference between the mean depth values is less than a threshold value; and if the difference between the mean depth values is less than the threshold value, there is a gradual change in the difference between the depth of the first and second clusters and it is determined that the image is a long shot.
Further, the method may comprise the step of: comparing the areas of each of the first and second clusters; and if one of the first and second clusters is small, or zero, or if the difference in area is greater than a threshold value, the image is determined as a long shot type.
The first and second clusters may comprise the background and the foreground of the image.
Portions of the image which are on the border between the first and second clusters may be identified and the difference of the depth of the pixels to the identified portion of the mean depth value of each of the first and second clusters may be computed; and the portion may then be assigned to the cluster to which it has the smallest depth difference.
In this way, portions which are on the boundary can be assigned more accurately.
If the image is a 3-D image, a depth profile map associated therewith may be utilised and the depth values can be derived from the depth profile map. Thus the computation of the preferred embodiment makes use of data which is already available or can easily be derived.
If the image is 2-D, the depth values may be derived from an estimated depth profile map of the 2-D image and the processing is the same as for a 3-D image.
In the event that a depth profile map is not estimated or would be difficult to compute for the 2-D image the first and second clusters may be taken from a plurality of different cues, such as, for example, motion and focus.
Therefore, in the preferred embodiment, given a depth profile, the fit of this profile can be compared to two different depth models: a smooth depth profile (e.g. linear depth variation with vertical image coordinate), and a profile consisting of two clusters (e.g. foreground and background depth). For a long shot, a smooth profile is expected to result in a better fit, whereas for a medium shot or close-up, a cluster profile is expected to result in a better fit.
For a more complete understanding of the present invention, reference is made to the following description taken in conjunction with the accompanying drawings, in which:
a and 1b are examples of a long shot video frame and a medium shot video frame, respectively;
Although the description refers to distinction of long shot types and close-ups, it can be understood that the embodiments are also equally applicable to classifying a medium shot by merely appropriate settings of the thresholds.
The method of the first preferred embodiment is applicable to classification of either a 2-D or 3-D image.
As normally in 2D video no depth profile is present, this can be computed from the video itself. For 2D-to-3D video conversion, depth cues are used which are computed from the image data. These techniques are well known in the art and will not be described in detail here. In the case of a 3-D video a depth profile may be present. For example if a 3D camera has been used, apart from a normal video stream, a direct depth stream is also recorded. Furthermore, stereo material may be available, from which depth information can be extracted.
With reference to
Apparatus according to a preferred embodiment of the present invention comprises interface means for the input of an image. The interface means is connected to a processor which is adapted to carry out the method steps of
Details of step 205, compute test statistic, are shown in
First the video frame is depth clustered, step 301. The pixels of the video frame are divided into two clusters of depth values, namely the foreground and background. The initial clustering consists of assigning image portions or blocks of pixels on the left, top and right border (say ¼ of the image) to the ‘background’ cluster, and the other pixels to the ‘foreground’ cluster. Then an iterative procedure, steps 303 to 307, is carried out to refine this cluster:
In step 303, for each of the two clusters, an average cluster depth is computed. Then in step 305, the image is swept, and for each portion on a cluster boundary, it is assigned to the cluster which has the smallest difference to the mean depth of the cluster. These steps are repeated until convergence occurs, step 307. It has been observed that this, typically, takes 4 iterations.
Having generated two clusters, the various statistics used to test the clusters are computed, step 308.
The statistics computed are, for example, the difference of their means, their standard deviations, and their areas.
In general, a small difference in mean, or a small area for one of the clusters indicates that there is no evidence for a cluster, i.e. the frame is a long shot whereas a small standard deviation (compared to the difference in means) indicates that the clustering is significant, i.e. a close-up shot.
The test statistic which is used to distinguish the shot types is given as:
where α1 and α2 are the fractions of the area of each cluster (such that α1+α2=1), is the difference between the cluster means, and is the standard deviation of the depth signal.
For the case that each cluster occupies half of the image, this expression is the conventional test to test whether a difference in mean is significant. Hence, for a 95% confidence interval,
tm>1.96 (2)
This would signify the existence of two different clusters; a close-up shot. As the fraction of foreground, and background depth is typically not exactly 50%, one may choose the threshold a bit smaller. Another approach would be an empirical determination of a threshold based on statistics of large amounts of video content, for instance based on a precision/recall curve.
If the depth is computed from 2D videos, the above embodiment can be carried out directly. However, an alternative is described below with reference to
In the current depth estimation process, the depth signals derived from the different cues are (linearly) merged. Hence, instead of using the combined depth profile, a limited subset of cues may be used. Depth cues may be physiological or psychological in nature. In this embodiment of the present invention only the depth signal derived from motion and focus analysis is used. Table 1 below distinguishes the different situations.
Basically, if a depth signal consisting of two clearly distinguishable clusters (in either of the depth cues) is obtained, this indicates a close-up; if there are no depth cue with distinct clustering, this indicates a long shot. However, in the case of a static scene (no camera or object movement), a distinction cannot be made.
With reference to
Firstly the incoming video signal is read, step 401. Next, the motion estimation is computed, step 403. This is carried out using a conventional 3DRS motion estimation, for example, as described in G de Haan and P. W. A. C. Biezen, “An efficient true-motion estimator using candidate vectors from a parametric motion model, IEEE Transactions on Circuits and Systems for Video Technology, vol. 8, p. 85-91, 1998. A less preferred alternative (since the motion field is less smooth) would be to use MPEG motion vectors.
In step 405, the motion detection test statistic is computed. To detect whether there is motion or not, the following test statistic is used:
where b labels all blocks, Nb is the number of blocks and m(b) is the motion vector. Hence tc is the average magnitude of the motion.
This is then compared to a motion detection threshold, step 407. If
tV<1 pixel, (4)
the frame is classified as having no motion.
In step 409 the depth from motion is computed. To compute a depth signal from the motion field, the background motion is subtracted. Estimation of background motion consists of estimating a pan-zoom model (consisting of translation and zoom parameters). This is known in the art. Subsequently, the depth-from-motion signal dm is computed as:
d
m(b)=∥m(b)−mbg(b)∥ (5)
where mbg is the predicted background motion vector in the specified block.
Next, in step 411, the depth-from-motion clustering, test statistic is computed and compared to a threshold in step 413 similar to the method described above and given by equations (1) and (2).
Further, in step 415, depth from focus is computed. Focus can be computed for instance using the method disclosed by J. H. Elder and S. W. Zucker, “Local scale control for edge detection and blur estimation”, IEEE Transactions on Pattern Analysis and Machine Intelligence”, vol. 20, p. 689-716, 1998.
Next, in step 417, the depth-from-focus clustering, test statistic is computed and compared to a threshold in step 419 similar to the method described above and given in equations (1) and (2).
According to table 1, a decision is taken as to the shot type, step 421. This can be done on an individual frame basis, or as a majority vote over all frames in a shot. In an alternative embodiment a probability to a certain shot type given the values of the test statistics may be assigned and from this the shot type is derived.
Although preferred embodiments of the present invention have been illustrated in the accompanying drawings and described in the foregoing detailed description, it will be understood that the invention is not limited to the embodiments disclosed but is capable of numerous modifications without departing from the scope of the invention set out in the following claims.
Number | Date | Country | Kind |
---|---|---|---|
05109019.9 | Sep 2005 | EP | regional |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/IB2006/053211 | 9/11/2006 | WO | 00 | 3/25/2008 |