CA2267545A1 - Image processing - Google Patents
Image processing Download PDFInfo
- Publication number
- CA2267545A1 CA2267545A1 CA 2267545 CA2267545A CA2267545A1 CA 2267545 A1 CA2267545 A1 CA 2267545A1 CA 2267545 CA2267545 CA 2267545 CA 2267545 A CA2267545 A CA 2267545A CA 2267545 A1 CA2267545 A1 CA 2267545A1
- Authority
- CA
- Canada
- Prior art keywords
- region
- computer
- softness
- colour
- space
- 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.)
- Abandoned
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/222—Studio circuitry; Studio devices; Studio equipment
- H04N5/262—Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
- H04N5/2622—Signal amplitude transition in the zone between image portions, e.g. soft edges
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/64—Circuits for processing colour signals
- H04N9/74—Circuits for processing colour signals for obtaining special effects
- H04N9/75—Chroma key
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Image Generation (AREA)
Abstract
Image data is processed to produce control data in which the control data has a region in which varying values define softness. Within said softness region a sub-region is defined in which control values are set to values equal to those outside the softness region.
Description
Image Processing Field of The Invention The present invention relates to processing image data to produce control data in which said control data has varying values to define softness.
Introduction to the Invention Many compositing techniques are known in which a first image is combined with a second image selectively at positions throughout the image.
The technique is known in cinematographic post production in which silhouettes or mattes are used to blank out portions of the image. Similar techniques have been used in broadcast video applications in which a control signal or a key signal is used to selectively derive images from a first video source or from a second image source. Such key signals may also be represented as images or, during the transmission of video data, control signals may be distributed in parallel with image signals in which the control channel is often referred to as the alpha channel.
In cinematographic film it is possible to produce hard edged mattes 2o given the very high spatial definition of the media. However, when images are transmitted as video signals, at broadcast definition or at a higher definition, it is necessary to quantise the spatial images, thereby significantly reducing the availability of spatial definition.
It has been known for some time that the reduced spatial definition of 25 a video image may be compensated by increased depth such that sub-pixel boundaries may be perceived by the eye by averaging colours at the actual position of the pixels. Similarly, control signals or key signal may be produced which provide for soft blending between the value representing a hard-key-on and a value representing a hard-key-off. Typically, such signals are recorded to a depth of eight bits with a similar eight bits being allocated for the red green and blue colour components.
In a process of chroma-keying, soft values for keys may be produced at image edges where pixels will be quantised with colour components being partially derived from a foreground image and partially derived from the background key colour. Thus, it is possible to derive soft-edge keys automatically which may then be used to smoothly blend a foreground image against a new background image. Furthermore, characteristics of the blending edge may be referred to as the softness of the edge and the key ~o values may be modified in order to enhance the properties of softness.
Soft keys can also be used to key transparent and translucent objects against new backgrounds. Soft keys allow the new background colour to be partially mixed with the new foreground and the blue components present within the original foreground image are suppressed by a process of colour ~5 suppression; as is well known in the chroma-keying art. However, many translucent and transparent objects are not uniformly transparent and may achieve their transparency by being made up from very small regions which are either very opaque or very transparent. Thus, when used to produce a soft key signal in a chroma-keying process, it is likely that the transparent 2o region will be perceived as noise and will not achieve the required effect.
A system in which each pixel is represented by three colour components defining a position within colour-space is disclosed in International patent publication WO 98/11510. A base colour is identified and a distance in colour-space between an input colour and said base colour is 25 calculated. The control value, which may be used as a basis for chroma suppress or a chroma-key, is produced in response to the calculated distance.
The system disclosed in this publication provides improved procedures for producing a chroma-key, thereby achieving improved chroma-keying results. However, a problem with the system is that it is difficult for users to control operational parameters so as to make optimum use of the processing facilities available.
A system for processing image data taking the form of a plurality of s image pixels forms the subject matter for the applicant's co-pending British patent application 98 06 975Ø A three-dimensional representation of colour-space is displayed and the colour of pixels within an image is analysed.
Thereafter, the analysed pixels are displayed at colour related positions within the displayed colour-space.
An advantage of this improved approach is that a user is provided with a graphic visualisation of colour-space regions, thereby allowing colours defined in colour-space to be graphically identified as forming part of a tolerance region or a softness region within colour-space.
A problem associated with defining softness regions is that some ~ 5 textures within an image, such as translucent textures, may produce adverse affects. The development of a chroma-key involves non-linear processes in order to extract the key signal whereupon it is possible for the texture, perceived as noise, to become amplified in parts of the image where intermediate values are generated. This results in clearly visible processing 2o artefacts which could severely restrict the application of the process when textures of this type are present.
A system is described in the applicant's co-pending British patent application 98 06 976.8 in which image data representing a matte, key or control signal is processed. A transitional or softness portion of the matte is 2s identified in which undesirable transitions occur in a form displayed as noise artefacts. The position of the softness region in colour-space is adjusted so as to reduce the relative amplitudes of variations within the identified portion.
Preferably, the softness region is defined in colour-space as a three-dimensional ellipsoid and a process of enlarging the ellipsoid tends to result in additional colour points being included in the softness region which were previously excluded. Thus, a problem may exist in terms of defining softness regions in that the overall selectivity of the region for defining a key may be degraded if the shape of the region is modified in order to mitigate the effect s of noise artefacts.
Summary of The Invention According to a first aspect of the present invention, there is provided a method of processing image data to produce control data, including a region in which said control data has varying values to define softness, comprising steps of defining a sub-region within said softness region in which said control data is set to a values substantially equal to values outside said softness region.
Preferably, the control data is generated by a process of chroma-15 keying and the sub-region may be defined with respect to a bounded region of colour-space. Preferably, the bounded region in colour-space has an internal tolerance region and its own surrounding softness region. The sub-region may be defined after the shape of the softness region has been modified to reduce noise artefacts.
2o According to a second aspect of the present invention, there is provided image processing apparatus configured to produce control data, including a region in which said control data has varying values to define softness, comprising processing means configured to define a sub-region within said softness region in which said control data is set to values 25 substantially equal to values outside said softness region.
In a preferred embodiment, the apparatus includes display means for displaying an image frame and selecting means for manually selecting colours from said image frame, wherein said processing means is configured to define said sub-region in response to a manual selection of colours. The processing means may be configured to determine a bounding volume in response to selected colour co-ordinates and the bounding volume may take the form of a convex hull. An ellipsoid may be derived from the convex hull and the geometry of the ellipsoid may be modified in response to manual s operations.
Brief Description of the Drawings Figure 1 shows a compositing station arranged to combine images using a process of chroma-keying, including a processing system;
Figure 2 shows an example of a foreground image to be composited against a new background image, using the equipment identified in Figure 1, and including foreground talent;
Figure 3 illustrates a key, matte or alpha signal generated from the image shown in Figure 2;
Figure 4 illustrates a new background image, such that the foreground image shown in Figure 2 will be composited against a new background image shown in Figure 4 using the key signal illustrated in Figure 3;
Figure 5 illustrates a compositing process used for combining the 2o foreground image of Figure 1 against the background image of Figure 4 by generating and using the key signal illustrated in Figure 3, and which operates on the processing system shown in Figure 7;
Figure 6 illustrates pixels occupying in a volume of colour-space that represent a blue colour predominant in the foreground image shown in 2s Figure 2, and which is to be replaced by the background image shown in Figure 4;
Figure 7 illustrates a cross section of colour-space including the pixels identified in Figure 6, including a line connecting the outermost of the identified pixels;
Figure 8 illustrates the three dimensional equivalent of connecting the outermost pixels shown in Figure 7, thereby forming a tessellated surface of a convex hull in colour-space;
Figure 9 illustrates a bounding box in colour-space which most efficiently bounds the convex hull shown in Figure 8;
Figure 10 illustrates the equations used to determine the centre of the bounding box shown in Figure 9;
Figure 11 illustrates the equations used to determine scaling factors in colour-space to normalise the box shown in Figure 9 to a cube;
Figure 12 illustrates a normalised, rotated cube derived from the rectangular box shown in Figure 9;
Figure 13 details preliminary equations used to determine eigenvectors from the convex hull shown in Figure 8;
Figure 14 details additional equations including eigenvectors for determining a rotation matrix required to locate the cube as shown in Figure 12;
Figure 15 details a cross section of the cube shown in Figure 12, including a cross section of a unit sphere and a pixel furthest away from the centre of the unit sphere;
2o Figure 16 shows the expansion of the unit sphere to include all pixels shown in Figure 15;
Figure 17 details processes performed by the processing system shown in Figure 1 in order to determine a scaling factor required to effect the unit sphere expansion shown in Figure 16;
Figure 18 illustrates the resulting three-dimensional tolerance ellipse when the unit sphere shown in Figure 16 is viewed in RGB colour-space;
Figure 19 illustrates the unit sphere in modified colour-space;
Figure 20 details processes performed by the processing system to test whether a given pixel is located inside, outside or on the tolerance ellipse shown in Figure 18;
Figure 21 illustrates a softness ellipse for improving the quality of border and intermediate colour regions of a composited image, and the tolerance ellipse shown in Figure 18;
s Figure 22 details a mathematical procedure for determining a softness value for colour co-ordinates of a pixel between the tolerance ellipse and softness ellipse shown in Figure 21;
Figure 23 details processes performed by the processing system to determine a control, matte, key or alpha value in response to a pixel RGB
co-ordinate in colour-space containing the tolerance and softness ellipse shown in Figure 21;
Figure 24 illustrates pixel detail of foreground talent shown in Figure 2;
Figure 25 illustrates a user-interactive display of the convex hull ~ 5 shown in Figure 8;
Figure 26 illustrates user-interactive views of a control arrow on an ellipse of the type shown in Figure 18;
Figure 27 illustrates the result of user manipulation of the control arrow and ellipse shown in Figure 26;
2o Figure 28 illustrates the result of a user-defined stretch function applied to an ellipse of the type shown in Figure 18;
Figure 29 shows a histogram display quantised by dividing each of the Red, Green and Blue axes into eight sections;
Figure 30 shows a close-up of a texture that has been distorted due to 25 a process of key extraction;
Figure 31 shows a two-dimensional representation of colour-space;
Figure 32 illustrates the selection of sets of scaling values to achieve a three-dimensional stretch of a softness ellipse;
Figure 33 details processes performed in order to obtain optimal stretch factors;
Figure 34 shows a graphical representation of processes identified in Figure 33;
Figure 35 identifies procedures performed in order to measure variance;
Figure 36 shows four examples of frequency graphs;
Figure 37 shows the effect of stretching a softness ellipse;
Figure 38 represents a two-dimensional representation of an enlarged ellipse;
Figure 39 shows a patch placed around newly included pixels;
Figure 40 shows an elliptical patch surrounding a collection of points;
Figure 41 shows multiple patches; and Figure 42 shows patches with their own softness ellipses.
Detailed Description of the Preferred Embodiments The invention will now be described by way of example only, with reference to the drawings identified above.
An image processing station is shown in Figure 7, in which an image processing system 101 includes interface circuitry arranged to receive 2o indications of the position of a user operated stylus 102 with respect to a position in two dimensions upon a graphics tablet 103. Video signals are supplied from the processing system 101 to a visual display unit 104. A
keyboard 105 may be operated by the user in order to facilitate additional control operations. A high definition image recorder 106 supplies image 2s data to the processing system 101, and may also receive processed image data back from the processing system 101. Image data may also be supplied to and from a data network.
Operating instructions executable by the processing system 101 are received by means of a computer-readable medium such as a CD ROM
111 receivable within a CD ROM player 112.
By operating the stylus 102, or keyboard 105, the user may command the processing system 101 to perform a sequence of processing events for compositing frames of image data. An image clip consists of a sequence of frames, and each frame is considered as a two dimensional array of image pixels at a resolution appropriate to the destination medium.
Thus, for image data that will be transferred to cinematographic film, a resolution of two thousand by two thousand pixels would be used. Each pixel in the image contains red, green and blue (RGB) components, thereby defining the luminance of each of the three primary colours for each pixel.
In addition to displaying image frames, the monitor 104 also provides the user with a graphical user interface (GUI) such that various image processing commands may be activated by movement of a stylus-controlled cursor on the screen, in combination with pressing a button on the stylus, or appropriate commands, simultaneous or otherwise, from the keyboard 105. In this way a comprehensive image processing environment is provided, in which a user may perform image processing operations upon source image data, the results of which may be stored once the desired result has been achieved. In the environment shown in Figure 1, the 2o processing system is typically required to perform similar or identical image processing operations upon consecutive frames of image data. A group of consecutive frames is considered as a clip.
Compositing is a primary task of the image processing station shown in Figure 1. Compositing involves the combination of images, one of which 2s may represent a foreground, while another may represent a background. In order to combine the images automatically, it is necessary for the foreground image to include a background having clearly definable properties. Typically, this means shooting the foreground against a blue background. An example of a foreground image shot in this way is shown in Figure 2. The foreground talent 201, in this example a guitarist, is clearly visible against a blue background 202. The blue background is created in a studio by painted board covering the walls and floors and all other angles visible to the camera. Additional foreground items may be included such as s a wine bottle 202, a wine glass 203 upon a table 204.
A process may be used to detect the blue colour in the foreground image in order to create a matte, in which all the blue is replaced by a pure black colour value, and all the foreground is replaced by a pure white colour value. A matte is not a collection of RGB pixels like the main image data, as each individual matte pixel only needs to be represented by a value of zero, for black, through to 1.0 for white. A matte resulting from the foreground image shown in Figure 2 is shown in Figure 3. The talent 201 has been replaced by a plain white silhouette 301 against a plain black background, represented by shading 302.
Generation of the matte shown in Figure 3 is complicated by border regions. Clearly the border between the background and foreground images will not cross exact pixel boundaries and for this reason an intermediate region for the matte along a border is defined by intermediate matte pixel values between black and white, represented by values in the 2o range between 0.0 and 1Ø It is difficult to define a clear linear transition at a border region because the precise variation in RGB values is complex;
due in part to the natural variation in the precise colour of the blue sheet used as a background and also the possibility of a degree of blue component being included within valid parts of a foreground image. Even 2s more difficult are translucent objects, such as the wine bottle 202 and glass 203.
After a matte of the type shown in Figure 3 has been generated from an image of the type shown Figure 2, the matte may be used to combine the image shown in Figure 2 against the new background, such as background 401 shown in Figure 4.
A summary of the processes performed by the processing system 101 is shown in Figure 5. RGB pixel data for the foreground image 501 is supplied to a colour suppression process 502. When an image is shot against a blue background, bleeding occurs due to reflection of the blue light, and an unnatural predominance of blue can result. The colour suppression process 502 facilitates removal of such unwanted colour artefacts in the resulting image. The foreground image data 501 is also supplied to a matte generation process 503, which performs processing steps to generate matte pixel data, as indicated in Figure 3. External matte data 505 may be selected via switch 504, if such data has already been prepared, for example, during a previous image processing session.
A blending process 506 receives colour-suppressed RGB foreground image pixel data, RGB background pixel data 502 and matte data. For each pixel in the matte a blend is performed) such that the proportion of each of the red, green and blue components in the foreground is proportional to the matte value, and the proportion of the red, green and blue components of the background is inversely proportional to the matte value. The resulting blended pixels form a composite image 507, which includes the foreground 2o and the background in the required parts of the image.
The quality of the resulting composite image 507 is largely dependent upon the quality of the matte generation process 503. Problems arise in mapping an appropriate set of colours to the background, an appropriate set of colours to the foreground, and an intermediate set of 2s colours which define a softness region between the two.
In accordance with procedures performed by the present embodiment, the background colour is considered as occupying a volume in colour-space. RGB colour-space is a volume having axes defined for the amplitudes of red, green and blue colour components. Thus, for a plurality of pixels whose RGB values are sampled from an area in an image of similar colour, such as the blue background, the pixels are displayed as occupying a particular volume of colour-space, as indicated in Figure 6.
Image data, taking the form of a plurality of image pixels, is processed. The processing procedures are configured so as to provide signals to a visual display unit thereby displaying a three-dimensional representation of colour-space. Colour pixels forming an image are analysed and the analysed pixels are displayed at colour related positions within the displayed colour-space. Thus, a display is generated in which the geometric position of pixels relates to their colour only, with no bearing on their location within an original image frame.
A sample of blue pixels 601 is seen occupying a volume in colour-space, slightly away from the blue axis 602. A volume is defined by these pixels which includes all blue values that are valid for a corresponding ~5 matte area. Thus, by sampling background pixels, a region in colour-space is quickly defined which relates to the actual, rather than the intended, ideal blue value for the background which is to be replaced.
A minimal volume which includes all sampled pixels is defined by a three dimensional equivalent of applying a rubber band around all the 2o points. This may be more easily understood by viewing the problem in two dimensions of colour-space, as shown in Figure 7. Here, all the sampled pixel RGB values have been bounded by the shortest lines that connect all of the outermost pixels. The three dimensional equivalent of this is shown in Figure 8, and comprises a number of surface planes connected to form a 25 three dimensional convex hull 801. Convex hull calculation is performed by the known process of Delaunay Triangulation. This process is described in "The Computer Journal", Volume 24, Number 2, 1981 starting on page 167.
The purpose of performing this operation is to define a set of pixels which lie on the surface of the bounding volume of the convex hull. Pixels inside the convex hull are superfluous to the next stages of calculation, and would result in excessive complication of the procedures to follow.
Thus the convex hull 801 shown in Figure 8 is computed by Delaunay triangulation. Unfortunately, definition of the blue background colour in terms of this convex hull would result in excessive computation having to be performed by the processing system 101 when the matte definition is used. This is because, for each pixel in the foreground image, a decision must be made as to whether or not the RGB co-ordinates of that pixel cause it to be located within the convex hull or outside it. Because of ~o the geometric complexity of the shape) this calculation would require a large number of processing steps. So, although a high quality of results would be obtained to define the matte, in the majority of applications this amount of processing time would be prohibitive. Thus it is necessary to define a simplified volume which contains all of the pixel points in RGB
~ s space defined by the data sample of the blue background.
The first step in this process of volume simplification is shown in Figure 9. A rectangular volume 901 is shown, which fully encloses the convex hull 801 shown in Figure 8. It is possible to define the centre of the rectangular box 901 using the equations shown in Figure 10. The equations 2o shown in Figure 7 7 define scaling factors in each of the red, green and blue directions so as to normalise the rectangular box to a regular cube. A final calculation is performed in order to determine a rotation transformation matrix, which when applied after the scaling process, results in the rectangular box 901 shown in Figure 1 being rotated and normalised to the 2s cube 1201 shown in Figure 12, which then resides in a modified colour-space represented by CX, CY and CZ axes, 1202, 1203 and 1204 respectively.
The initial calculations required to determine the rotation are shown in Figure 73. Essentially, the set of points on the surface of the convex hull 801, determined by the Delaunay Triangulation, are each analysed in turn in order to determine a matrix MC, shown in Figure 14, from which eigenvectors u, v and w are calculated. The eigenvectors are then used to determine a rotation transformation matrix, which, when applied to a pixel's s co-ordinates in colour-space, results in the desired rotation being achieved.
This method is detailed in "Graphics Gems 3", pages 301 to 306, in the chapter "A Linear Time Simple Bounding Volume Algorithm", ISBN 0-12-409671-9. Derivation of the eigenvectors is performed in accordance with the Jacobi Method, which is fully described in "Numerical Recipes in C", P463, published by Cambridge Press, ISBN 6-521-431-08-5. Derivation of the rotation from the set of data points on the surface of the convex hull results in a more accurate determination of the rotation than if all the pixels in the volume of the convex hull were used. Furthermore, the time taken to perform the calculations is considerably less.
15 The RGB values for the centre of the rectangular box 901, calculated as shown in Figure 10, may be subtracted from colour-space pixel co-ordinates so that the rectangular box 901 is moved to a position where the centre of the box 901 coincides with the origin of the colour-space axes.
This may also be considered as a translation of colour-space, if every pixel 2o under consideration is modified in this way. Having moved the rectangular box 901 to the centre, it is then possible to perform the rotation using the eigenvectors obtained from the calculations shown in Figures 13 and 14.
Finally, the scaling factors obtained by the calculations shown in Figure 11 are applied to each pixel in colour-space, thereby resulting in the 25 normalised cube 1201 shown in Figure 12.
In summary, the three steps are: translation, rotation and scaling.
Once modified in this way, colour-space co-ordinates no longer represent red, green and blue values, but instead represent an arbitrary set of orthogonal values created as a result of the pixel modifications outlined above. For convenience it is considered that the new colour-space is represented by CX, CY and CZ co-ordinates, which should not be confused with the x and y co-ordinate systems used for representing the physical location of an image frame.
s The cube 1201 is unlikely to be a good approximation of the colour-space volume containing the sampled points. A typical cross section of the cube 1201 in two dimensions is shown in Figure 15. Here it may be seen that the majority of pixels are likely to reside in a sphere, represented by a circle 1501 of unit radius 1502 surrounding the origin 1503. However, a few points will lie outside this sphere, and in order to determine the correct scaling value to create the unit sphere containing all points it is necessary to find the point 1504 that lies furthest away from the origin 1504. The CX, CY, CZ colour co-ordinates of this point may then be used to generate an additional scaling factor, thus enabling a unit sphere containing all points to 15 be defined, as shown in Figure 76. The furthest point 1504 from the origin is then located directly at the surface of the enlarged unit sphere 1601. All other points are then guaranteed to be contained within this three dimensional unit sphere within colour-space.
The processing steps performed by the processing system 101 to obtain the modified scaling factors for the enlarged unit sphere are shown in Figure 7 7. A temporary register location is considered as containing the value for the maximum size of vector connecting the origin to a point CX, CY, CZ in colour-space. At the start of the process, no points have been considered, and it is necessary to reset this register, denoted MAX SIZE, 2s to zero, as shown in process 1701. In process 1702) a pixel is selected from those which are located on the surface of the convex hull 801. It is not necessary to consider any other points located inside the convex hull for this process, as these will all have smaller vector magnitudes than those at nodes upon the surface of the convex hull. In process 1703, the three steps of translation, rotation and scaling are applied to the RGB values for the pixel, in order to translate them into CX, CY, CZ values for the next stage of the calculation.
In process 1704 the size of the vector in CX, CY, CZ space is s calculated in accordance with the square root of the sum of the squares of each of the components. In process 1705, the size is compared with MAX SIZE. If the size is greater than MAX_SIZE, as it will always be on the first iteration of this process, control is directed to process 1706, where the register containing the value MAX SIZE is updated with the new value.
Alternatively control is directed to process 1707, where a question is asked as to whether another pixel has yet to be analysed. If another pixel remains, control is directed back to process 1702, and the processes just described are repeated for the next pixel on the surface of the convex hull 801.
15 Alternatively, if all pixels have been considered, control is directed to process 1708, where a new scaling factor is calculated by dividing the previous scaling factor by MAX_SIZE. With this information it is now possible to define forward and backward transformation matrices mF and mB, such that any pixels colour co-ordinates may be translated between 2o RGB colour-space and CX, CY, CZ colour-space. These transformation matrices are defined in process 1709.
The convex hull 801, shown in Figure 8, is therefore carefully approximated by an ellipse, as shown in Figure 78. For convenience, a three dimensional ellipse (an ellipsoid) will hereafter be referred to as an 2s ellipse. By applying the forward transformation matrix mF, defined in process 1709, to the ellipse 1801 shown in Figure 18, this shape is transformed into the unit sphere 1601 represented by the circle in Figure 76, and the sphere shown in Figure 79. The centre of the unit sphere 1601 coincides with the origin of the XYZ colour-space axes. This mF
transformation matrix simplifies the process of finding out whether or not any arbitrarily chosen RGB pixel co-ordinates reside inside or outside the ellipse 1801.
The processes performed by the processing system 101 to determine whether a pixel is located inside or outside the ellipse 1801 are shown in Figure 20. At process 2001 a point is selected, having red, green and blue co-ordinates, denoted Ri, Gi and Bi respectively. In process 2002, the co-ordinates are transformed by applying the forward transformation matrix mF, in order to obtain modified CX, CY, CZ colour-space co-to ordinates, denoted Xi, Yi and Zi respectively.
In process 2003 the sum of the squares of Xi, Yi and Zi are calculated. The square root is not required, as the critical value is unity.
Thus, if the sum of the squares is less than one) so will the square root of the sum of the squares be less than one. If the sum of the squares is 15 greater than one, then so is the square root of the sum of the squares.
Thus it is not necessary to perform a time-consuming square root calculation. This is the reason for scaling the sphere 1601 to a unit radius.
The result of process 2003 is one of three conditions. If the sum of the squares is greater than one, the point is outside the ellipse 1801, as 2o shown at condition 2005. If the sum of the squares is less than one, the point is inside the ellipse, as represented by condition 2004. If the sum of the squares is exactly equal to 1, which is unlikely to happen, the point is on the ellipse surface, as represented by condition 2006.
With the sequence of processes shown in Figure 20, it becomes 2s easier to understand why an ellipse is a useful approximation to the convex hull 801. The ellipse may be translated, rotated and scaled to a unit sphere, which then has the key property of having a unit radius. The large number of pixels in an image frame may each be efficiently tested for inclusion or exclusion within the volume of colour-space bounded by the ellipse, by testing the colour vector of the pixel after the forward transformation matrix has been applied to its RGB values. The ellipse represents the closest possible ellipseal approximation to the convex hull 801, thereby representing a highly efficient compromise between speed and accuracy for applications such as compositing, where it is necessary to efficiently determine whether a pixel resides in the background colour volume.
In compositing, a strict binary decision as to whether a pixel is a foreground pixel or a background pixel would generate a considerable level of distortion in border regions) where a level of blending is required. The ~o convex hull and the ellipse which are used to define the background colour volume are referred to herein as the tolerance hull and tolerance ellipse respectively. In order to define a blending process, a softness hull and a resulting softness ellipse are defined. Thus, in the same way that pixels representing absolute background colour values may be sampled and used ~ 5 to define the tolerance ellipse, pixels at border regions in the image, such as at the edges of foreground objects, such as the guitarist's hair 205, the translucent regions of the wine bottle 202 and the wine glass 203 may be sampled to define a larger volume of colour-space such that a softness ellipse can be determined. This ellipse is called a softness ellipse, because 2o it enables the transition edges of the foreground and background images to be softened, thereby resulting in a more convincing composited image.
A tolerance ellipse is shown in two dimensional cross section in Figure 27. The tolerance ellipse 1801 occupies a smaller volume of colour-space than the softness ellipse. The softness ellipse is determined from 25 pixel samples in exactly the same way as for the tolerance ellipse. This results in a pair of forward transformation matrices: mFT and mFS, for the tolerance and softness ellipses respectively. It is then possible to determine whether any particular RGB value resides in any one of three spaces:
inside the tolerance ellipse 1801, representing a background colour and a matte pixel value of 0.0, outside the softness ellipse 2101, representing a foreground colour, and a matte pixel value of 1.0, or in the volume between the tolerance and softness ellipses, corresponding to a matte pixel value or softness value of between 0.0 and 1Ø
s The intermediate values are calculated by considering a vector 2102, which originates at the origin of the tolerance ellipse 1801 and which intersects the point 2104 under consideration. The distance of the point 2104 along this vector 2102 from the surface of the tolerance ellipse 1801 to the softness ellipse 2101, as a proportion of the total distance between the two ellipses at the point where they intersect this vector, determines the fractional softness value in the range 0.0 to 1Ø Thus a point 2103 close to the tolerance ellipse may have a softness value of 0.25. A point 2104 half way along the vector 2102 may have a softness value of 0.50, and a point 2105 close to the softness ellipse may have a softness value of 0.80.
15 A diagrammatic representation of the calculations required to determine the softness value of the point 2104 is shown in Figure 22. The vector 2102, may have positions along its length considered as existing in tolerance colour-space, as defined by applying the tolerance transformation matrix mFT to these points. Alternatively, these same positions may be 2o considered as existing in softness colour-space, as defined by applying the softness transformation matrix mFS to the positions.
Thus, given the RGB co-ordinates of the origin of the vector 2102, which is the centre 2201 of the tolerance ellipse 1801, these may be transformed by applying the softness transformation matrix mFS to give the 2s co-ordinates of the origin in softness colour-space.
The point 2104 under consideration along the vector is also transformed in this way. The value w, of the distance of the point along this vector may be calculated according to the method described in "Graphics Gems 3", P275, "Intersecting a Ray with a Quadric Surface", ISBN 0-12-409671-9. The position 2202 along the vector 2102 that intersects the tolerance ellipse 1801 is unknown at this stage, but is given the value w/b, where w has just been found, but b is unknown. To determine the value of b, the RGB co-ordinates for the point are transformed from RGB space to tolerance space using the tolerance forward transformation matrix MFT.
Then, the tolerance origin is simply (0,0,0), and the distance to the point 2104 along the vector 2102 may be calculated by the square root of the sum of the squares of CX CY and CZ, to give the value of b. The remaining equation in Figure 22 enables the required softness value to be calculated.
The first graph shown in Figure 22 represents the softness ellipse scale and the second graph represents the tolerance ellipse scale. The variable w may be considered as the white position in softness space and the variable b may be considered as the black position in tolerance space.
The processes performed by the processing system 101 to generate ~s a matte pixel value between 0.0 and 1.0, from an individual RGB pixel value, are shown in Figure 23. Other applications, other than compositing, may also use these processes, so the matte value is generalised to being a control value, which may be used in a variety of related operations. In process 2301, a question is asked as to whether the pixel RGB value is 2o inside or on the tolerance ellipse. This is computed in accordance with the processes shown in Figure 20. If the pixel is anywhere inside the tolerance ellipse, the control value is set to 0.0, as indicated at process 2302.
Alternatively, if the pixel RGB value is outside the tolerance ellipse, control is directed to process 2303, where a question is asked as to whether the 2s pixel resides outside or on the softness ellipse. Again, this condition is identified by performing the processes shown in Figure 20.
If the pixel RGB value is anywhere outside the softness ellipse, the control value is set to 1.0, as indicated at process 2304. Alternatively, if the pixel RGB value is determined as lying inside the softness ellipse, it is understood that it must reside in the intermediate region between the tolerance and softness ellipses, and a softness value must be calculated.
At process 2305 the softness value is calculated in accordance with the method outlined in Figure 22, and this is used as the control value. Clearly s more processing resources are required for pixels that lie between the softness and tolerance ellipses. Fortunately, however, this usually represents a small minority of the pixels in a typical frame, as most pixels will be either in the foreground or the background. For this reason the additional complexity required to calculate the softness does not usually result in significantly more processing resources being required.
The matte resulting from processing a portion 205 of the image shown in Figure 2, containing a strand of the guitarist's hair, is detailed in Figure 24. Here pixels are seen where the guitarist's hair crosses sub-pixel boundaries. The processes described above for identifying tolerance and softness ellipses in colour-space enables matte pixel values to be generated which are appropriate to the blending of foreground and background images in a way that provides a high degree of realism.
The present embodiment provides users with a way of manipulating colour-space ellipses directly by actually displaying a colour-space 2o environment. Familiarity with the colour-space ellipses and their effect results in high quality compositing, and other effects, to be attained far more quickly than would otherwise be the case, because the user is able to interact directly with colour representations in a meaningful way. Thus, in addition to providing the user with a display of a foreground image, the 2s resulting matte, and the composited image on the monitor 104, the processing system 101 also supplies signals to the monitor 104 such that various representations of colour-space objects can be shown, at the same time as the corresponding image. Thus effects resulting from a particular arrangement of objects in colour-space can be closely related to the composited image.
By providing a two dimensional projection of the three dimensional colour-space on the monitor 104, several colour-space objects may be viewed and subsequently manipulated. Fundamental to the process of s compositing is the convex hull 801, which represents RGB values of sampled pixels. A displayed convex hull 801 is shown in Figure 25A and Figure 258. In its first form, 801, a tessellated surface to the volume is shown, with each node 2501, 2502 corresponding to a pixel RGB value on the outside of the volume. In the second form the surface tessellations are not shown and are replaced by colour shaded surfaces having smooth transitions. The colour at any point on the surface is given by its actual points in RGB space. Thus a smooth colour variation across the surface of the volume gives a correct indication to the eye of the actual colours represented by the enclosed volume.
15 The colour at point 2504 on the surface of the convex hull 2503 has low values of red and green, but a medium value for blue. Thus this point is coloured in accordance with these respective proportions of colour, as a medium blue. Point 2505 contains higher values for red, green and blue, and is plotted as a higher brightness pixel, again with the proportions of 2o colour being in accordance with its position relative to the RGB colour-space axes. Viewing options are provided by the processing system 101 such that the colour-space axes may be rotated, thus making it possible to view the convex hull from all sides, the particular view preferred being dependant upon the precise nature of the artefacts which the user is 2s attempting to avoid in the final composited image.
Each component plane 2506 on the surface of the convex hull is considered as being related to three defining points at its three corners.
Each of these points is determined by a pixel having an RGB value, which determines its colour and position in colour-space. For points across this triangular plane, the colour may be determined by linear interpolation in two dimensions between the three points. This type of shading is known as Gouraud shading and has an advantage in that many processing systems of the type indicated in Figure 7 include specialised hardware for s implementing this type of shading, thereby facilitating a high degree of processing efficiency.
In addition to displaying the convex hull, the processing system 101 may supply signals to the monitor 104 such that the ellipse approximation, used for calculations in colour-space, may also be displayed as a two dimensional projection of three dimensional colour-space. The ellipse may be shown as a wire-frame, as indicated in Figure 78, or with Gouraud surface shading, to provide an intuitive link with the colours being represented.
When displayed as a wire-frame it becomes possible to superimpose 15 the wire-frame ellipse upon the convex hull, thus enabling visualisation of the accuracy which this approximation represents. Using wire-frame projections of the ellipse permits both the tolerance and softness ellipse to be displayed simultaneously. The system processor allows the user to select which of the ellipses and convex hulls is displayed) and whether 2o these should be in wire-frame or colour shaded solid form. Furthermore, the RGB axes of the colour-space projection on the monitor may be rotated so as to form a preferred view of the colour-space objects and thereby improve visualisation and identification of potential solutions to process artefact removal.
25 Once colour-space objects have been displayed in this way, it becomes possible, by appropriate user manipulation of the stylus 102, to modify these objects in order to improve the quality of the resulting composited image. Thus, instead of sampling pixels on the displayed image as described above, the user may modify the ellipses directly, using several types of three dimensional shape modifying tools.
Preparations for defining a three dimensional transformation are shown in Figure 26. An ellipse 2601 is shown as a wire-frame model in a set of RGB axes generated by the processing system 101 and displayed on the monitor 401. A short control arrow 2602 is displayed, originating from the centre of the ellipse 2601. The arrow may be considered as having a constant length and may be rotated in any direction about the centre of the object to which it is attached. Thus the length and angle of the arrow indicates the direction in which a transformation is to be applied. The length ~ o of the arrow does not relate to the magnitude of the effect; this is merely a consequence of projecting its image onto the two dimensions of the screen of the monitor 104.
The position of the arrow may be adjusted by user manipulation of the stylus 102. Thus, the short arrow 2602 represents a transformation ~ s effect in a direction nearly perpendicular to the screen of the monitor 104.
The long arrow 2603 represents a transformation effect in a direction largely parallel with the screen of the display monitor 104, and the short arrow 2604 represents a transformation effect away from the green axis, largely perpendicular to the screen.
2o Figure 27 details two resulting transformations of the ellipse 2601 shown in Figure 26. The enlarged ellipse 2701 results from a stretch operation carried out in accordance with the position of the control arrow 2604. The magnitude of the stretch may be determined by typing in a numerical value, such as 1.3, or by dragging the stylus 102, with the stylus 25 button held down. An alternative result is represented by the rotated ellipse 2702. The rotation has been carried out with respect to the origin.
The result of a stretch operation is shown in Figure 28. Thus the user has complete control over the shape of the three dimensional ellipse. The corresponding convex hull, to which the ellipse is an approximation, is automatically transformed in this way also, thus maintaining the mathematical relationship between the two.
In summary, there are six functional transformations of three dimensional colour-space objects that may be achieved by manipulation of 5 the control arrow. These functions are:
F1 - Translate in the direction of the arrow.
F2 - Rotate F3 - Scale globally from the object's centre.
F4 - Scale globally from the opposite edge.
F5 - Proportional scaling or stretch from the object's centre.
F6 - Proportional scaling from the opposite edge.
The function is selected by pressing and holding the appropriate function key on keyboard 105 while dragging the control arrow using the stylus 102.
~5 In many instances it is useful to visualise the colour content of an entire image, or a sampled portion of an image. Figure 29 shows a histogram display of colour-space in which the magnitude of pixels in a quantised region of colour-space is represented by a small histogram, also drawn in the average colour of that region of colour-space. The histogram is 2o plotted in the three dimensions of colour-space at a co-ordinate representing the centre of the region that is being quantified. Thus, red, green and blue co-ordinates of pixels in an image determine three displayed characteristics: firstly the location of a histogram, secondly the colour of the histogram, and thirdly the height of the histogram.
25 The histogram display shown in Figure 29 is quantised by dividing each of the red, green and blue axes into eight sections. The user may select different quantisations, such as sixteen, thirty-two or sixty-four, in order to represent the data most clearly. At a quantisation level of sixty-four, it is possible that the histogram display may become cluttered, or require a very high display definition to be understood clearly. Under some circumstances, however, even such a cluttered display will provide important information to the user about the colour content of an image frame.
s The histogram is particularly useful for enabling the user to determine how well a tolerance or softness ellipse is likely to perform, as regions on the histogram display may clearly identify distinct regions for blue key colour as distinct from talent foreground colours. Also, places where differences are marginal will be clearly seen. The tolerance and softness ellipses may be superimposed upon the histogram display, so that an appropriate stretch or other transformation can be identified and applied to an ellipse, thereby improving the overall efficiency of the compositing process considerably.
A known problem with compositing is the adverse affect on texture which may occur in certain parts of the image. The original pixels of the surface of the wine bottle 202 shown in Figure 2 have an overall smooth colour texture, but which is affected slightly by noise, due to the quality of the original image.
In the original image, as shown in Figure 2, this low level of noise is 2o acceptable. However, once the image is processed in a non-linear fashion to extract the matte, it is possible for the noise to become amplified in parts of the image where intermediate matte values are generated, thus resulting in clearly visible processing artefacts. Such effects are considered as adversely affecting the texture of an area of an image.
2s A close-up of a texture that has been distorted in this way is shown in Figure 30. Adjacent pixels 3001 and 3002 have different colour values (shown as shading), the differences having been amplified by the process of compositing an area of the image containing a small amount of noise in an intermediate colour volume between the blue background and the foreground colours.
A two dimensional representation of three dimensional RGB colour-space is shown in Figure 31. The pixels on the wine bottle 202 that result in the distorted texture shown in Figure 30, are shown as a collection of points 3101, some of which are between the softness ellipse 3102 and the tolerance ellipse 3103, and some of which are outside the softness ellipse.
Points inside the softness ellipse 3102 represent pixels that will be processed differently from points outside the softness ellipse 3102. This represents a non-linearity, and results in the amplification of noise, and the generation of visible texture distortion in the resulting composited image, as indicated in Figure 30.
Other unwanted artefacts in the original image may be amplified in this way, including distortion artefacts from previous processing steps, including a previous iteration of a compositing procedure. The more heavily processed an image becomes, the more likely it is that distortion or noise artefacts will be revealed by a subsequent image processing step. Thus, minimising distortion is important if a particular special effect requires a sequence of image processes to be performed, as well as being important for the generation of a high quality image from a single stage image 2o process.
In the present embodiment, the softness ellipse may be stretched to include the "cloud" of points 3101 that represent the pixels in the texture to be smoothed. The information shown in Figure 31 is available to the user in the form of the three dimensional colour-space display shown in Figures 25 to 29, and the softness ellipse may be manipulated by a stretching function, as described. The problem of texture smoothing in a composited image is fairly common, and so it is preferable to avoid the need for manual identification and implementation of a solution in the form of modification of the softness ellipse, as this may take several minutes of a user's time, and will become tedious if the process has to be repeated frequently.
Instead of manually manipulating the softness ellipse 3102 shown in Figure 31, it is possible to automatically perturb the softness ellipse with sets of scaling factors. For each set of scaling factors a smoothness s measurement of the sampled pixels in the problem area is made. Out of the final set of smoothness measurements, the set of scaling factors for which the smoothness is greatest is selected and applied to modify the softness ellipse.
A set of ninety-four perturbation factors is used which are selected for an equal search of the problem space in three dimensions. The selection of sets of scaling values, to achieve a three dimensional stretch of the softness ellipse, is shown in Figure 32. The first set of scaling factors 3201 comprises values of 1.0, 1.0 and 2.0, which are applied to the x, y and z axes of modified colour-space, in which the softness ellipse is a unit ~ s sphere around the origin. The second set of scaling factors is 1.2, 1.2 and 1.7. Thus the x, y and z scaling factors are not being incremented numerically, but geometrically. Thus the values may be considered as being selected to perform a search of a quadrant of a sphere 3203, the surface of which has equally spaced points, and the volume of which also 2o contains equally spaced points. The points are equally spaced in three dimensions, such that the ninety-four points represent an equal search for an ideal stretch factor throughout the selected problem space.
The processes performed by the processing system 101 to obtain the optimal set of stretch factors, out of the ninety-four that are tested, are 2s shown in Figure 33. The processes shown are performed with respect to a set of pixels which have been identified as resulting in a rough texture in the composited image. This set of pixels may be sampled by identifying a rectangular region, within which all pixels are considered as samples, such as those indicated in Figure 30.
In process 3301, a register containing a value for the minimum variance is set to an impossibly high value. At step 3302, a set of x, y and z perturbation factors is selected from a look-up table, as represented by the table shown in Figure 32. In process 3303, each sampled pixel is processed to generate a softness value, thereby resulting in an array of softness values S(n) which has a number of entries (n) equal to the number of pixels in the sample shown in Figure 30. In process 3304 this array of pixel softness values is processed by a single dimension fast Fourier transformation (FFT) to generate an array F(n) of frequency values, having ~o the same number of entries (n) as the softness array S(n).
In process 3305, the frequency array F(n) is processed to generate a measurement of the variance, or roughness of the softness array S(n). In process 3306 a question is asked as to whether the variance just calculated is less than the minimum variance calculated so far. If not, control is 15 directed to process 3308. Alternatively, control is directed to process 3307, where the minimum variance is updated with the variance calculated in process 3305, and the set of x, y and z perturbation factors, which resulted in that variance is recorded as the preferred set of perturbation factors.
Thereafter, control is directed to process 3308, where a question is 2o asked as to whether all ninety-four sets of perturbation factors have been considered. If not, control is directed back to process 3302, where the next set of factors is selected. Alternatively, the sequence of processes is complete, and the values recorded in process 3307 are known to give the optimal stretch of the softness ellipse in order to smooth the texture 2s represented by the sampled pixels shown in Figure 30.
A graphical representation of processes 3303 and 3304 is shown in Figure 34. Each pixel in the sampled area has its RGB components 3401 supplied to the softness calculation 3402 with the perturbed softness ellipse, to generate a value in the softness array S(n) 3403. The perturbed softness calculation is repeated for each pixel in the sample until the softness array S(n) 3403 is completely populated. The contents of this array may be visualised as a softness graph 3404, which shows the random noisy patternless character of the pixels. The softness array S(n) is 5 supplied to a fast Fourier transform calculation 3405, to generate an array F(n) 3406 of frequency values. This set of frequency values may be visualised as a frequency graph 3407, in which the important characteristics of the smoothness are much more easily identifiable. A graph containing a relatively high frequency content contains more visible noise than a graph containing a relatively low frequency content.
If the area under the curve of the frequency graph 3407 is measured, then an expression of the roughness of the texture will be given by the point at which, moving from left to right along the frequency axis, seventy-five percent of the area under the frequency curve has been ~ 5 accounted for. This frequency value may then be used as an arbitrary unit of variance, used in process 3306 in Figure 33, which can form the basis for comparing the success of each stretch of the softness ellipse.
Given that the area under the frequency curve 3407 is in the discrete time domain, the area is simply considered as being the sum of array 2o values. The processes performed by the processing system 101 in process 3305 to obtain the measure of variance, are shown in Figure 35. In process 3501 the total area under the frequency curve is calculated as being equal to the sum of the values stored in the frequency array F(n). In process 3502 an area limit is calculated as being equal to the total area multiplied by 25 0.75. In process 3503 an initialisation is performed by setting variables AREA and i to zero. In process 3504 the value for AREA is added to the contents of the location in the frequency array F(n) indexed by the variable i. In process 3505 a question is asked as to whether AREA is now greater than or equal to the area limit. If so, control is directed to process 3507.
Alternatively control is directed to process 3506, where the variable i is incremented, so that the next value in the frequency array F(n) may be addressed. Control is then directed back to process 3504. At process 3507, analysis of the frequency array F(n) is complete, and the value of i, which s was used to index the frequency array F(n) in process 3504, is used as an arbitrary measure of variance at process 3305 in Figure 33.
Four sample graphs of frequency, out of the ninety four that are generated, are shown in Figure 36. Here, the area under the frequency curve corresponding to the lowest seventy-five percent of the total area ~o under each curve is shown shaded. Each graph corresponds to the frequency domain of the softness generated as a result of perturbing the softness ellipse 3120 shown in Figure 31. In graph 3601, a relatively even frequency content is observed, with a high value of i. In graph 3602 a lower proportion of frequencies are observed, indicating a lower noise content. In 15 graph 3603 a low frequency peak ensures a very low value for i, while at graph 3604 a higher value for i is observed. Out of these four graphs, 3601 to 3604, graph 3603 has the most predominant low frequencies, and so the perturbation factors which resulted in the generation of this graph would be preferable over those which generated the other graphs 3601, 3602 and 2o 3604.
The result of identifying a preferred stretch of the softness ellipse is shown in Figure 37. When the finalised x, y and z perturbation factors are applied to the softness ellipse 3102, the ellipse is stretched in three dimensions to an enlarged ellipse 3701, which now includes all the points 25 3101 corresponding to the pixels in the sampled area of texture, such as the translucent surface of the wine bottle 202 shown in Figure 2.
Having enlarged ellipse 3102 to ellipse 3701, that now includes all the required points 3101, it is possible that an additional collection of points has been included. This situation is represented in two dimensions by the diagram shown in Figure 38. Here a collection of points 3801 represents colours of pixels at a different part of the image from the wine bottle surface pixels 3101. The inclusion of these pixel points results in a part of the image which had been composited correctly before the smoothing process was s applied, becoming incorrectly composited. It may be very difficult to stretch or contort the softness ellipse in such a way that these additional points 3801 are excluded, without creating additional problems with other groups of pixels elsewhere on the image.
The solution to this problem is to provide a patch in the softness zone between the tolerance and softness ellipses. Figure 39 shows a patch 3901 which has been placed around the newly included pixels 3901 in the softness zone between the softness ellipse 3701 and the tolerance ellipse 3103. The patch 3801 is shown as being rectangular in shape. In three dimensions this becomes a rectangular box, proportioned to fit exactly around the points 3801. The patch is defined exactly in accordance with the methods described for defining the tolerance ellipse and the softness ellipse.
A set of pixels is identified, a convex hull is identified as a subset of the outermost of this set of pixels. A bounding box is identified (see Figures 20 10 and 11 ), and a rotation defined (see Figures 13 and 14). Unlike the case when defining a bounding ellipse, a secondary scaling process, as indicated in Figure 15, is not required, as all pixels are guaranteed to fit inside the bounding box.
Thus, the bounding box 1201 shown in Figure 15 is already 25 equivalent to the patch 3801 shown in Figure 39. A matrix mFp is defined that results in the patch 3801 being represented as a normalised cube around a modified colour-space origin, as shown in Figure 12. The test to find out whether a pixel resides inside or outside a bounding box is performed by applying the patch matrix mFp to the RGB components of the pixels under consideration.
The resulting co-ordinates may then be examined directly. If any of the x, y or z co-ordinates in the modified colour-space has a magnitude greater than one, then the pixel is outside the patch. Defining the patch 3801 as a bounding box instead of an ellipse has the advantage of reducing the amount of processing that must be performed by the processing system 101. The patch may be defined as representing an area outside the softness ellipse, corresponding to a control value of 1.0, as would be appropriate to the example shown in Figure 39. Alternatively, it may be appropriate to specify the patch as defining an area equivalent to the inside of the tolerance ellipse, corresponding to a control value of 0Ø
In the present embodiment, the patch is assigned any control value between 0.0 and 1.0, thus enabling a user to overcome subtle problems in images that are being used to control a compositing process.
~ 5 It may be appropriate to define the patch as an ellipse, in accordance with the method described for defining the tolerance and softness ellipses. In Figure 40 an elliptical patch 4001 is shown, which more accurately surrounds the collection of points 4001 that are to be excluded from the softness zone between the softness ellipse 3701 and the tolerance 2o ellipse 3103. A user may find it necessary to define multiple patches, as shown in Figure 41. Two additional, small elliptical patches 4101 and 4102 are shown, which are being used to exclude a few isolated colours from the softness zone.
The purpose of setting up such a complex colour-space environment 25 is to reduce the amount of direct user intervention required to process an image clip. In an extreme case, it is possible to define several patches, each with individual softness ellipses. An example of this is shown in Figure 42) where the elliptical patches 4001, 4101 and 4102 are each surrounded by softness ellipses 4201, 4202 and 4203. When a softness ellipse is used with a patch, the effect is to define a region in which an interpolation is carried out between the value of the softness as defined between the tolerance ellipse 3103 and the softness ellipse 3701, and the patch control value in the central zone of the patch 3801. The interpolation is carried out in response to the distance along a vector projected from the centre of the patch 4001 out through the point under consideration in the zone between the patch 4001 and its softness ellipse 4201, and the interpolation control value is proportional to the distance along this vector between the inner ellipse 4001 and the outer ellipse 4201, using a mathematical process analogous with that described for defining the softness value in response to the main tolerance 3103 and softness 3701 ellipses, as described with respect to Figure 22.
Patches may be defined as being represented by ellipses or rectangular boxes, and with or without softness zones. The more patches, ~ 5 and the greater their complexity, the more processing power that is required to determine the resulting control or matte value for each pixel in an image.
In the present embodiment the number of patches is restricted to three.
However, the use of elliptical or rectangular patches with the main tolerance and softness ellipses represents a highly efficient and intuitive 2o mathematical tool, compared to a more complex and far more computationally intensive approach, such as that where the complex three dimensional tessellated convex hulls 801 of the pixel sample volumes is used directly to define the volumes of colour-space representing background, foreground and softness.
Introduction to the Invention Many compositing techniques are known in which a first image is combined with a second image selectively at positions throughout the image.
The technique is known in cinematographic post production in which silhouettes or mattes are used to blank out portions of the image. Similar techniques have been used in broadcast video applications in which a control signal or a key signal is used to selectively derive images from a first video source or from a second image source. Such key signals may also be represented as images or, during the transmission of video data, control signals may be distributed in parallel with image signals in which the control channel is often referred to as the alpha channel.
In cinematographic film it is possible to produce hard edged mattes 2o given the very high spatial definition of the media. However, when images are transmitted as video signals, at broadcast definition or at a higher definition, it is necessary to quantise the spatial images, thereby significantly reducing the availability of spatial definition.
It has been known for some time that the reduced spatial definition of 25 a video image may be compensated by increased depth such that sub-pixel boundaries may be perceived by the eye by averaging colours at the actual position of the pixels. Similarly, control signals or key signal may be produced which provide for soft blending between the value representing a hard-key-on and a value representing a hard-key-off. Typically, such signals are recorded to a depth of eight bits with a similar eight bits being allocated for the red green and blue colour components.
In a process of chroma-keying, soft values for keys may be produced at image edges where pixels will be quantised with colour components being partially derived from a foreground image and partially derived from the background key colour. Thus, it is possible to derive soft-edge keys automatically which may then be used to smoothly blend a foreground image against a new background image. Furthermore, characteristics of the blending edge may be referred to as the softness of the edge and the key ~o values may be modified in order to enhance the properties of softness.
Soft keys can also be used to key transparent and translucent objects against new backgrounds. Soft keys allow the new background colour to be partially mixed with the new foreground and the blue components present within the original foreground image are suppressed by a process of colour ~5 suppression; as is well known in the chroma-keying art. However, many translucent and transparent objects are not uniformly transparent and may achieve their transparency by being made up from very small regions which are either very opaque or very transparent. Thus, when used to produce a soft key signal in a chroma-keying process, it is likely that the transparent 2o region will be perceived as noise and will not achieve the required effect.
A system in which each pixel is represented by three colour components defining a position within colour-space is disclosed in International patent publication WO 98/11510. A base colour is identified and a distance in colour-space between an input colour and said base colour is 25 calculated. The control value, which may be used as a basis for chroma suppress or a chroma-key, is produced in response to the calculated distance.
The system disclosed in this publication provides improved procedures for producing a chroma-key, thereby achieving improved chroma-keying results. However, a problem with the system is that it is difficult for users to control operational parameters so as to make optimum use of the processing facilities available.
A system for processing image data taking the form of a plurality of s image pixels forms the subject matter for the applicant's co-pending British patent application 98 06 975Ø A three-dimensional representation of colour-space is displayed and the colour of pixels within an image is analysed.
Thereafter, the analysed pixels are displayed at colour related positions within the displayed colour-space.
An advantage of this improved approach is that a user is provided with a graphic visualisation of colour-space regions, thereby allowing colours defined in colour-space to be graphically identified as forming part of a tolerance region or a softness region within colour-space.
A problem associated with defining softness regions is that some ~ 5 textures within an image, such as translucent textures, may produce adverse affects. The development of a chroma-key involves non-linear processes in order to extract the key signal whereupon it is possible for the texture, perceived as noise, to become amplified in parts of the image where intermediate values are generated. This results in clearly visible processing 2o artefacts which could severely restrict the application of the process when textures of this type are present.
A system is described in the applicant's co-pending British patent application 98 06 976.8 in which image data representing a matte, key or control signal is processed. A transitional or softness portion of the matte is 2s identified in which undesirable transitions occur in a form displayed as noise artefacts. The position of the softness region in colour-space is adjusted so as to reduce the relative amplitudes of variations within the identified portion.
Preferably, the softness region is defined in colour-space as a three-dimensional ellipsoid and a process of enlarging the ellipsoid tends to result in additional colour points being included in the softness region which were previously excluded. Thus, a problem may exist in terms of defining softness regions in that the overall selectivity of the region for defining a key may be degraded if the shape of the region is modified in order to mitigate the effect s of noise artefacts.
Summary of The Invention According to a first aspect of the present invention, there is provided a method of processing image data to produce control data, including a region in which said control data has varying values to define softness, comprising steps of defining a sub-region within said softness region in which said control data is set to a values substantially equal to values outside said softness region.
Preferably, the control data is generated by a process of chroma-15 keying and the sub-region may be defined with respect to a bounded region of colour-space. Preferably, the bounded region in colour-space has an internal tolerance region and its own surrounding softness region. The sub-region may be defined after the shape of the softness region has been modified to reduce noise artefacts.
2o According to a second aspect of the present invention, there is provided image processing apparatus configured to produce control data, including a region in which said control data has varying values to define softness, comprising processing means configured to define a sub-region within said softness region in which said control data is set to values 25 substantially equal to values outside said softness region.
In a preferred embodiment, the apparatus includes display means for displaying an image frame and selecting means for manually selecting colours from said image frame, wherein said processing means is configured to define said sub-region in response to a manual selection of colours. The processing means may be configured to determine a bounding volume in response to selected colour co-ordinates and the bounding volume may take the form of a convex hull. An ellipsoid may be derived from the convex hull and the geometry of the ellipsoid may be modified in response to manual s operations.
Brief Description of the Drawings Figure 1 shows a compositing station arranged to combine images using a process of chroma-keying, including a processing system;
Figure 2 shows an example of a foreground image to be composited against a new background image, using the equipment identified in Figure 1, and including foreground talent;
Figure 3 illustrates a key, matte or alpha signal generated from the image shown in Figure 2;
Figure 4 illustrates a new background image, such that the foreground image shown in Figure 2 will be composited against a new background image shown in Figure 4 using the key signal illustrated in Figure 3;
Figure 5 illustrates a compositing process used for combining the 2o foreground image of Figure 1 against the background image of Figure 4 by generating and using the key signal illustrated in Figure 3, and which operates on the processing system shown in Figure 7;
Figure 6 illustrates pixels occupying in a volume of colour-space that represent a blue colour predominant in the foreground image shown in 2s Figure 2, and which is to be replaced by the background image shown in Figure 4;
Figure 7 illustrates a cross section of colour-space including the pixels identified in Figure 6, including a line connecting the outermost of the identified pixels;
Figure 8 illustrates the three dimensional equivalent of connecting the outermost pixels shown in Figure 7, thereby forming a tessellated surface of a convex hull in colour-space;
Figure 9 illustrates a bounding box in colour-space which most efficiently bounds the convex hull shown in Figure 8;
Figure 10 illustrates the equations used to determine the centre of the bounding box shown in Figure 9;
Figure 11 illustrates the equations used to determine scaling factors in colour-space to normalise the box shown in Figure 9 to a cube;
Figure 12 illustrates a normalised, rotated cube derived from the rectangular box shown in Figure 9;
Figure 13 details preliminary equations used to determine eigenvectors from the convex hull shown in Figure 8;
Figure 14 details additional equations including eigenvectors for determining a rotation matrix required to locate the cube as shown in Figure 12;
Figure 15 details a cross section of the cube shown in Figure 12, including a cross section of a unit sphere and a pixel furthest away from the centre of the unit sphere;
2o Figure 16 shows the expansion of the unit sphere to include all pixels shown in Figure 15;
Figure 17 details processes performed by the processing system shown in Figure 1 in order to determine a scaling factor required to effect the unit sphere expansion shown in Figure 16;
Figure 18 illustrates the resulting three-dimensional tolerance ellipse when the unit sphere shown in Figure 16 is viewed in RGB colour-space;
Figure 19 illustrates the unit sphere in modified colour-space;
Figure 20 details processes performed by the processing system to test whether a given pixel is located inside, outside or on the tolerance ellipse shown in Figure 18;
Figure 21 illustrates a softness ellipse for improving the quality of border and intermediate colour regions of a composited image, and the tolerance ellipse shown in Figure 18;
s Figure 22 details a mathematical procedure for determining a softness value for colour co-ordinates of a pixel between the tolerance ellipse and softness ellipse shown in Figure 21;
Figure 23 details processes performed by the processing system to determine a control, matte, key or alpha value in response to a pixel RGB
co-ordinate in colour-space containing the tolerance and softness ellipse shown in Figure 21;
Figure 24 illustrates pixel detail of foreground talent shown in Figure 2;
Figure 25 illustrates a user-interactive display of the convex hull ~ 5 shown in Figure 8;
Figure 26 illustrates user-interactive views of a control arrow on an ellipse of the type shown in Figure 18;
Figure 27 illustrates the result of user manipulation of the control arrow and ellipse shown in Figure 26;
2o Figure 28 illustrates the result of a user-defined stretch function applied to an ellipse of the type shown in Figure 18;
Figure 29 shows a histogram display quantised by dividing each of the Red, Green and Blue axes into eight sections;
Figure 30 shows a close-up of a texture that has been distorted due to 25 a process of key extraction;
Figure 31 shows a two-dimensional representation of colour-space;
Figure 32 illustrates the selection of sets of scaling values to achieve a three-dimensional stretch of a softness ellipse;
Figure 33 details processes performed in order to obtain optimal stretch factors;
Figure 34 shows a graphical representation of processes identified in Figure 33;
Figure 35 identifies procedures performed in order to measure variance;
Figure 36 shows four examples of frequency graphs;
Figure 37 shows the effect of stretching a softness ellipse;
Figure 38 represents a two-dimensional representation of an enlarged ellipse;
Figure 39 shows a patch placed around newly included pixels;
Figure 40 shows an elliptical patch surrounding a collection of points;
Figure 41 shows multiple patches; and Figure 42 shows patches with their own softness ellipses.
Detailed Description of the Preferred Embodiments The invention will now be described by way of example only, with reference to the drawings identified above.
An image processing station is shown in Figure 7, in which an image processing system 101 includes interface circuitry arranged to receive 2o indications of the position of a user operated stylus 102 with respect to a position in two dimensions upon a graphics tablet 103. Video signals are supplied from the processing system 101 to a visual display unit 104. A
keyboard 105 may be operated by the user in order to facilitate additional control operations. A high definition image recorder 106 supplies image 2s data to the processing system 101, and may also receive processed image data back from the processing system 101. Image data may also be supplied to and from a data network.
Operating instructions executable by the processing system 101 are received by means of a computer-readable medium such as a CD ROM
111 receivable within a CD ROM player 112.
By operating the stylus 102, or keyboard 105, the user may command the processing system 101 to perform a sequence of processing events for compositing frames of image data. An image clip consists of a sequence of frames, and each frame is considered as a two dimensional array of image pixels at a resolution appropriate to the destination medium.
Thus, for image data that will be transferred to cinematographic film, a resolution of two thousand by two thousand pixels would be used. Each pixel in the image contains red, green and blue (RGB) components, thereby defining the luminance of each of the three primary colours for each pixel.
In addition to displaying image frames, the monitor 104 also provides the user with a graphical user interface (GUI) such that various image processing commands may be activated by movement of a stylus-controlled cursor on the screen, in combination with pressing a button on the stylus, or appropriate commands, simultaneous or otherwise, from the keyboard 105. In this way a comprehensive image processing environment is provided, in which a user may perform image processing operations upon source image data, the results of which may be stored once the desired result has been achieved. In the environment shown in Figure 1, the 2o processing system is typically required to perform similar or identical image processing operations upon consecutive frames of image data. A group of consecutive frames is considered as a clip.
Compositing is a primary task of the image processing station shown in Figure 1. Compositing involves the combination of images, one of which 2s may represent a foreground, while another may represent a background. In order to combine the images automatically, it is necessary for the foreground image to include a background having clearly definable properties. Typically, this means shooting the foreground against a blue background. An example of a foreground image shot in this way is shown in Figure 2. The foreground talent 201, in this example a guitarist, is clearly visible against a blue background 202. The blue background is created in a studio by painted board covering the walls and floors and all other angles visible to the camera. Additional foreground items may be included such as s a wine bottle 202, a wine glass 203 upon a table 204.
A process may be used to detect the blue colour in the foreground image in order to create a matte, in which all the blue is replaced by a pure black colour value, and all the foreground is replaced by a pure white colour value. A matte is not a collection of RGB pixels like the main image data, as each individual matte pixel only needs to be represented by a value of zero, for black, through to 1.0 for white. A matte resulting from the foreground image shown in Figure 2 is shown in Figure 3. The talent 201 has been replaced by a plain white silhouette 301 against a plain black background, represented by shading 302.
Generation of the matte shown in Figure 3 is complicated by border regions. Clearly the border between the background and foreground images will not cross exact pixel boundaries and for this reason an intermediate region for the matte along a border is defined by intermediate matte pixel values between black and white, represented by values in the 2o range between 0.0 and 1Ø It is difficult to define a clear linear transition at a border region because the precise variation in RGB values is complex;
due in part to the natural variation in the precise colour of the blue sheet used as a background and also the possibility of a degree of blue component being included within valid parts of a foreground image. Even 2s more difficult are translucent objects, such as the wine bottle 202 and glass 203.
After a matte of the type shown in Figure 3 has been generated from an image of the type shown Figure 2, the matte may be used to combine the image shown in Figure 2 against the new background, such as background 401 shown in Figure 4.
A summary of the processes performed by the processing system 101 is shown in Figure 5. RGB pixel data for the foreground image 501 is supplied to a colour suppression process 502. When an image is shot against a blue background, bleeding occurs due to reflection of the blue light, and an unnatural predominance of blue can result. The colour suppression process 502 facilitates removal of such unwanted colour artefacts in the resulting image. The foreground image data 501 is also supplied to a matte generation process 503, which performs processing steps to generate matte pixel data, as indicated in Figure 3. External matte data 505 may be selected via switch 504, if such data has already been prepared, for example, during a previous image processing session.
A blending process 506 receives colour-suppressed RGB foreground image pixel data, RGB background pixel data 502 and matte data. For each pixel in the matte a blend is performed) such that the proportion of each of the red, green and blue components in the foreground is proportional to the matte value, and the proportion of the red, green and blue components of the background is inversely proportional to the matte value. The resulting blended pixels form a composite image 507, which includes the foreground 2o and the background in the required parts of the image.
The quality of the resulting composite image 507 is largely dependent upon the quality of the matte generation process 503. Problems arise in mapping an appropriate set of colours to the background, an appropriate set of colours to the foreground, and an intermediate set of 2s colours which define a softness region between the two.
In accordance with procedures performed by the present embodiment, the background colour is considered as occupying a volume in colour-space. RGB colour-space is a volume having axes defined for the amplitudes of red, green and blue colour components. Thus, for a plurality of pixels whose RGB values are sampled from an area in an image of similar colour, such as the blue background, the pixels are displayed as occupying a particular volume of colour-space, as indicated in Figure 6.
Image data, taking the form of a plurality of image pixels, is processed. The processing procedures are configured so as to provide signals to a visual display unit thereby displaying a three-dimensional representation of colour-space. Colour pixels forming an image are analysed and the analysed pixels are displayed at colour related positions within the displayed colour-space. Thus, a display is generated in which the geometric position of pixels relates to their colour only, with no bearing on their location within an original image frame.
A sample of blue pixels 601 is seen occupying a volume in colour-space, slightly away from the blue axis 602. A volume is defined by these pixels which includes all blue values that are valid for a corresponding ~5 matte area. Thus, by sampling background pixels, a region in colour-space is quickly defined which relates to the actual, rather than the intended, ideal blue value for the background which is to be replaced.
A minimal volume which includes all sampled pixels is defined by a three dimensional equivalent of applying a rubber band around all the 2o points. This may be more easily understood by viewing the problem in two dimensions of colour-space, as shown in Figure 7. Here, all the sampled pixel RGB values have been bounded by the shortest lines that connect all of the outermost pixels. The three dimensional equivalent of this is shown in Figure 8, and comprises a number of surface planes connected to form a 25 three dimensional convex hull 801. Convex hull calculation is performed by the known process of Delaunay Triangulation. This process is described in "The Computer Journal", Volume 24, Number 2, 1981 starting on page 167.
The purpose of performing this operation is to define a set of pixels which lie on the surface of the bounding volume of the convex hull. Pixels inside the convex hull are superfluous to the next stages of calculation, and would result in excessive complication of the procedures to follow.
Thus the convex hull 801 shown in Figure 8 is computed by Delaunay triangulation. Unfortunately, definition of the blue background colour in terms of this convex hull would result in excessive computation having to be performed by the processing system 101 when the matte definition is used. This is because, for each pixel in the foreground image, a decision must be made as to whether or not the RGB co-ordinates of that pixel cause it to be located within the convex hull or outside it. Because of ~o the geometric complexity of the shape) this calculation would require a large number of processing steps. So, although a high quality of results would be obtained to define the matte, in the majority of applications this amount of processing time would be prohibitive. Thus it is necessary to define a simplified volume which contains all of the pixel points in RGB
~ s space defined by the data sample of the blue background.
The first step in this process of volume simplification is shown in Figure 9. A rectangular volume 901 is shown, which fully encloses the convex hull 801 shown in Figure 8. It is possible to define the centre of the rectangular box 901 using the equations shown in Figure 10. The equations 2o shown in Figure 7 7 define scaling factors in each of the red, green and blue directions so as to normalise the rectangular box to a regular cube. A final calculation is performed in order to determine a rotation transformation matrix, which when applied after the scaling process, results in the rectangular box 901 shown in Figure 1 being rotated and normalised to the 2s cube 1201 shown in Figure 12, which then resides in a modified colour-space represented by CX, CY and CZ axes, 1202, 1203 and 1204 respectively.
The initial calculations required to determine the rotation are shown in Figure 73. Essentially, the set of points on the surface of the convex hull 801, determined by the Delaunay Triangulation, are each analysed in turn in order to determine a matrix MC, shown in Figure 14, from which eigenvectors u, v and w are calculated. The eigenvectors are then used to determine a rotation transformation matrix, which, when applied to a pixel's s co-ordinates in colour-space, results in the desired rotation being achieved.
This method is detailed in "Graphics Gems 3", pages 301 to 306, in the chapter "A Linear Time Simple Bounding Volume Algorithm", ISBN 0-12-409671-9. Derivation of the eigenvectors is performed in accordance with the Jacobi Method, which is fully described in "Numerical Recipes in C", P463, published by Cambridge Press, ISBN 6-521-431-08-5. Derivation of the rotation from the set of data points on the surface of the convex hull results in a more accurate determination of the rotation than if all the pixels in the volume of the convex hull were used. Furthermore, the time taken to perform the calculations is considerably less.
15 The RGB values for the centre of the rectangular box 901, calculated as shown in Figure 10, may be subtracted from colour-space pixel co-ordinates so that the rectangular box 901 is moved to a position where the centre of the box 901 coincides with the origin of the colour-space axes.
This may also be considered as a translation of colour-space, if every pixel 2o under consideration is modified in this way. Having moved the rectangular box 901 to the centre, it is then possible to perform the rotation using the eigenvectors obtained from the calculations shown in Figures 13 and 14.
Finally, the scaling factors obtained by the calculations shown in Figure 11 are applied to each pixel in colour-space, thereby resulting in the 25 normalised cube 1201 shown in Figure 12.
In summary, the three steps are: translation, rotation and scaling.
Once modified in this way, colour-space co-ordinates no longer represent red, green and blue values, but instead represent an arbitrary set of orthogonal values created as a result of the pixel modifications outlined above. For convenience it is considered that the new colour-space is represented by CX, CY and CZ co-ordinates, which should not be confused with the x and y co-ordinate systems used for representing the physical location of an image frame.
s The cube 1201 is unlikely to be a good approximation of the colour-space volume containing the sampled points. A typical cross section of the cube 1201 in two dimensions is shown in Figure 15. Here it may be seen that the majority of pixels are likely to reside in a sphere, represented by a circle 1501 of unit radius 1502 surrounding the origin 1503. However, a few points will lie outside this sphere, and in order to determine the correct scaling value to create the unit sphere containing all points it is necessary to find the point 1504 that lies furthest away from the origin 1504. The CX, CY, CZ colour co-ordinates of this point may then be used to generate an additional scaling factor, thus enabling a unit sphere containing all points to 15 be defined, as shown in Figure 76. The furthest point 1504 from the origin is then located directly at the surface of the enlarged unit sphere 1601. All other points are then guaranteed to be contained within this three dimensional unit sphere within colour-space.
The processing steps performed by the processing system 101 to obtain the modified scaling factors for the enlarged unit sphere are shown in Figure 7 7. A temporary register location is considered as containing the value for the maximum size of vector connecting the origin to a point CX, CY, CZ in colour-space. At the start of the process, no points have been considered, and it is necessary to reset this register, denoted MAX SIZE, 2s to zero, as shown in process 1701. In process 1702) a pixel is selected from those which are located on the surface of the convex hull 801. It is not necessary to consider any other points located inside the convex hull for this process, as these will all have smaller vector magnitudes than those at nodes upon the surface of the convex hull. In process 1703, the three steps of translation, rotation and scaling are applied to the RGB values for the pixel, in order to translate them into CX, CY, CZ values for the next stage of the calculation.
In process 1704 the size of the vector in CX, CY, CZ space is s calculated in accordance with the square root of the sum of the squares of each of the components. In process 1705, the size is compared with MAX SIZE. If the size is greater than MAX_SIZE, as it will always be on the first iteration of this process, control is directed to process 1706, where the register containing the value MAX SIZE is updated with the new value.
Alternatively control is directed to process 1707, where a question is asked as to whether another pixel has yet to be analysed. If another pixel remains, control is directed back to process 1702, and the processes just described are repeated for the next pixel on the surface of the convex hull 801.
15 Alternatively, if all pixels have been considered, control is directed to process 1708, where a new scaling factor is calculated by dividing the previous scaling factor by MAX_SIZE. With this information it is now possible to define forward and backward transformation matrices mF and mB, such that any pixels colour co-ordinates may be translated between 2o RGB colour-space and CX, CY, CZ colour-space. These transformation matrices are defined in process 1709.
The convex hull 801, shown in Figure 8, is therefore carefully approximated by an ellipse, as shown in Figure 78. For convenience, a three dimensional ellipse (an ellipsoid) will hereafter be referred to as an 2s ellipse. By applying the forward transformation matrix mF, defined in process 1709, to the ellipse 1801 shown in Figure 18, this shape is transformed into the unit sphere 1601 represented by the circle in Figure 76, and the sphere shown in Figure 79. The centre of the unit sphere 1601 coincides with the origin of the XYZ colour-space axes. This mF
transformation matrix simplifies the process of finding out whether or not any arbitrarily chosen RGB pixel co-ordinates reside inside or outside the ellipse 1801.
The processes performed by the processing system 101 to determine whether a pixel is located inside or outside the ellipse 1801 are shown in Figure 20. At process 2001 a point is selected, having red, green and blue co-ordinates, denoted Ri, Gi and Bi respectively. In process 2002, the co-ordinates are transformed by applying the forward transformation matrix mF, in order to obtain modified CX, CY, CZ colour-space co-to ordinates, denoted Xi, Yi and Zi respectively.
In process 2003 the sum of the squares of Xi, Yi and Zi are calculated. The square root is not required, as the critical value is unity.
Thus, if the sum of the squares is less than one) so will the square root of the sum of the squares be less than one. If the sum of the squares is 15 greater than one, then so is the square root of the sum of the squares.
Thus it is not necessary to perform a time-consuming square root calculation. This is the reason for scaling the sphere 1601 to a unit radius.
The result of process 2003 is one of three conditions. If the sum of the squares is greater than one, the point is outside the ellipse 1801, as 2o shown at condition 2005. If the sum of the squares is less than one, the point is inside the ellipse, as represented by condition 2004. If the sum of the squares is exactly equal to 1, which is unlikely to happen, the point is on the ellipse surface, as represented by condition 2006.
With the sequence of processes shown in Figure 20, it becomes 2s easier to understand why an ellipse is a useful approximation to the convex hull 801. The ellipse may be translated, rotated and scaled to a unit sphere, which then has the key property of having a unit radius. The large number of pixels in an image frame may each be efficiently tested for inclusion or exclusion within the volume of colour-space bounded by the ellipse, by testing the colour vector of the pixel after the forward transformation matrix has been applied to its RGB values. The ellipse represents the closest possible ellipseal approximation to the convex hull 801, thereby representing a highly efficient compromise between speed and accuracy for applications such as compositing, where it is necessary to efficiently determine whether a pixel resides in the background colour volume.
In compositing, a strict binary decision as to whether a pixel is a foreground pixel or a background pixel would generate a considerable level of distortion in border regions) where a level of blending is required. The ~o convex hull and the ellipse which are used to define the background colour volume are referred to herein as the tolerance hull and tolerance ellipse respectively. In order to define a blending process, a softness hull and a resulting softness ellipse are defined. Thus, in the same way that pixels representing absolute background colour values may be sampled and used ~ 5 to define the tolerance ellipse, pixels at border regions in the image, such as at the edges of foreground objects, such as the guitarist's hair 205, the translucent regions of the wine bottle 202 and the wine glass 203 may be sampled to define a larger volume of colour-space such that a softness ellipse can be determined. This ellipse is called a softness ellipse, because 2o it enables the transition edges of the foreground and background images to be softened, thereby resulting in a more convincing composited image.
A tolerance ellipse is shown in two dimensional cross section in Figure 27. The tolerance ellipse 1801 occupies a smaller volume of colour-space than the softness ellipse. The softness ellipse is determined from 25 pixel samples in exactly the same way as for the tolerance ellipse. This results in a pair of forward transformation matrices: mFT and mFS, for the tolerance and softness ellipses respectively. It is then possible to determine whether any particular RGB value resides in any one of three spaces:
inside the tolerance ellipse 1801, representing a background colour and a matte pixel value of 0.0, outside the softness ellipse 2101, representing a foreground colour, and a matte pixel value of 1.0, or in the volume between the tolerance and softness ellipses, corresponding to a matte pixel value or softness value of between 0.0 and 1Ø
s The intermediate values are calculated by considering a vector 2102, which originates at the origin of the tolerance ellipse 1801 and which intersects the point 2104 under consideration. The distance of the point 2104 along this vector 2102 from the surface of the tolerance ellipse 1801 to the softness ellipse 2101, as a proportion of the total distance between the two ellipses at the point where they intersect this vector, determines the fractional softness value in the range 0.0 to 1Ø Thus a point 2103 close to the tolerance ellipse may have a softness value of 0.25. A point 2104 half way along the vector 2102 may have a softness value of 0.50, and a point 2105 close to the softness ellipse may have a softness value of 0.80.
15 A diagrammatic representation of the calculations required to determine the softness value of the point 2104 is shown in Figure 22. The vector 2102, may have positions along its length considered as existing in tolerance colour-space, as defined by applying the tolerance transformation matrix mFT to these points. Alternatively, these same positions may be 2o considered as existing in softness colour-space, as defined by applying the softness transformation matrix mFS to the positions.
Thus, given the RGB co-ordinates of the origin of the vector 2102, which is the centre 2201 of the tolerance ellipse 1801, these may be transformed by applying the softness transformation matrix mFS to give the 2s co-ordinates of the origin in softness colour-space.
The point 2104 under consideration along the vector is also transformed in this way. The value w, of the distance of the point along this vector may be calculated according to the method described in "Graphics Gems 3", P275, "Intersecting a Ray with a Quadric Surface", ISBN 0-12-409671-9. The position 2202 along the vector 2102 that intersects the tolerance ellipse 1801 is unknown at this stage, but is given the value w/b, where w has just been found, but b is unknown. To determine the value of b, the RGB co-ordinates for the point are transformed from RGB space to tolerance space using the tolerance forward transformation matrix MFT.
Then, the tolerance origin is simply (0,0,0), and the distance to the point 2104 along the vector 2102 may be calculated by the square root of the sum of the squares of CX CY and CZ, to give the value of b. The remaining equation in Figure 22 enables the required softness value to be calculated.
The first graph shown in Figure 22 represents the softness ellipse scale and the second graph represents the tolerance ellipse scale. The variable w may be considered as the white position in softness space and the variable b may be considered as the black position in tolerance space.
The processes performed by the processing system 101 to generate ~s a matte pixel value between 0.0 and 1.0, from an individual RGB pixel value, are shown in Figure 23. Other applications, other than compositing, may also use these processes, so the matte value is generalised to being a control value, which may be used in a variety of related operations. In process 2301, a question is asked as to whether the pixel RGB value is 2o inside or on the tolerance ellipse. This is computed in accordance with the processes shown in Figure 20. If the pixel is anywhere inside the tolerance ellipse, the control value is set to 0.0, as indicated at process 2302.
Alternatively, if the pixel RGB value is outside the tolerance ellipse, control is directed to process 2303, where a question is asked as to whether the 2s pixel resides outside or on the softness ellipse. Again, this condition is identified by performing the processes shown in Figure 20.
If the pixel RGB value is anywhere outside the softness ellipse, the control value is set to 1.0, as indicated at process 2304. Alternatively, if the pixel RGB value is determined as lying inside the softness ellipse, it is understood that it must reside in the intermediate region between the tolerance and softness ellipses, and a softness value must be calculated.
At process 2305 the softness value is calculated in accordance with the method outlined in Figure 22, and this is used as the control value. Clearly s more processing resources are required for pixels that lie between the softness and tolerance ellipses. Fortunately, however, this usually represents a small minority of the pixels in a typical frame, as most pixels will be either in the foreground or the background. For this reason the additional complexity required to calculate the softness does not usually result in significantly more processing resources being required.
The matte resulting from processing a portion 205 of the image shown in Figure 2, containing a strand of the guitarist's hair, is detailed in Figure 24. Here pixels are seen where the guitarist's hair crosses sub-pixel boundaries. The processes described above for identifying tolerance and softness ellipses in colour-space enables matte pixel values to be generated which are appropriate to the blending of foreground and background images in a way that provides a high degree of realism.
The present embodiment provides users with a way of manipulating colour-space ellipses directly by actually displaying a colour-space 2o environment. Familiarity with the colour-space ellipses and their effect results in high quality compositing, and other effects, to be attained far more quickly than would otherwise be the case, because the user is able to interact directly with colour representations in a meaningful way. Thus, in addition to providing the user with a display of a foreground image, the 2s resulting matte, and the composited image on the monitor 104, the processing system 101 also supplies signals to the monitor 104 such that various representations of colour-space objects can be shown, at the same time as the corresponding image. Thus effects resulting from a particular arrangement of objects in colour-space can be closely related to the composited image.
By providing a two dimensional projection of the three dimensional colour-space on the monitor 104, several colour-space objects may be viewed and subsequently manipulated. Fundamental to the process of s compositing is the convex hull 801, which represents RGB values of sampled pixels. A displayed convex hull 801 is shown in Figure 25A and Figure 258. In its first form, 801, a tessellated surface to the volume is shown, with each node 2501, 2502 corresponding to a pixel RGB value on the outside of the volume. In the second form the surface tessellations are not shown and are replaced by colour shaded surfaces having smooth transitions. The colour at any point on the surface is given by its actual points in RGB space. Thus a smooth colour variation across the surface of the volume gives a correct indication to the eye of the actual colours represented by the enclosed volume.
15 The colour at point 2504 on the surface of the convex hull 2503 has low values of red and green, but a medium value for blue. Thus this point is coloured in accordance with these respective proportions of colour, as a medium blue. Point 2505 contains higher values for red, green and blue, and is plotted as a higher brightness pixel, again with the proportions of 2o colour being in accordance with its position relative to the RGB colour-space axes. Viewing options are provided by the processing system 101 such that the colour-space axes may be rotated, thus making it possible to view the convex hull from all sides, the particular view preferred being dependant upon the precise nature of the artefacts which the user is 2s attempting to avoid in the final composited image.
Each component plane 2506 on the surface of the convex hull is considered as being related to three defining points at its three corners.
Each of these points is determined by a pixel having an RGB value, which determines its colour and position in colour-space. For points across this triangular plane, the colour may be determined by linear interpolation in two dimensions between the three points. This type of shading is known as Gouraud shading and has an advantage in that many processing systems of the type indicated in Figure 7 include specialised hardware for s implementing this type of shading, thereby facilitating a high degree of processing efficiency.
In addition to displaying the convex hull, the processing system 101 may supply signals to the monitor 104 such that the ellipse approximation, used for calculations in colour-space, may also be displayed as a two dimensional projection of three dimensional colour-space. The ellipse may be shown as a wire-frame, as indicated in Figure 78, or with Gouraud surface shading, to provide an intuitive link with the colours being represented.
When displayed as a wire-frame it becomes possible to superimpose 15 the wire-frame ellipse upon the convex hull, thus enabling visualisation of the accuracy which this approximation represents. Using wire-frame projections of the ellipse permits both the tolerance and softness ellipse to be displayed simultaneously. The system processor allows the user to select which of the ellipses and convex hulls is displayed) and whether 2o these should be in wire-frame or colour shaded solid form. Furthermore, the RGB axes of the colour-space projection on the monitor may be rotated so as to form a preferred view of the colour-space objects and thereby improve visualisation and identification of potential solutions to process artefact removal.
25 Once colour-space objects have been displayed in this way, it becomes possible, by appropriate user manipulation of the stylus 102, to modify these objects in order to improve the quality of the resulting composited image. Thus, instead of sampling pixels on the displayed image as described above, the user may modify the ellipses directly, using several types of three dimensional shape modifying tools.
Preparations for defining a three dimensional transformation are shown in Figure 26. An ellipse 2601 is shown as a wire-frame model in a set of RGB axes generated by the processing system 101 and displayed on the monitor 401. A short control arrow 2602 is displayed, originating from the centre of the ellipse 2601. The arrow may be considered as having a constant length and may be rotated in any direction about the centre of the object to which it is attached. Thus the length and angle of the arrow indicates the direction in which a transformation is to be applied. The length ~ o of the arrow does not relate to the magnitude of the effect; this is merely a consequence of projecting its image onto the two dimensions of the screen of the monitor 104.
The position of the arrow may be adjusted by user manipulation of the stylus 102. Thus, the short arrow 2602 represents a transformation ~ s effect in a direction nearly perpendicular to the screen of the monitor 104.
The long arrow 2603 represents a transformation effect in a direction largely parallel with the screen of the display monitor 104, and the short arrow 2604 represents a transformation effect away from the green axis, largely perpendicular to the screen.
2o Figure 27 details two resulting transformations of the ellipse 2601 shown in Figure 26. The enlarged ellipse 2701 results from a stretch operation carried out in accordance with the position of the control arrow 2604. The magnitude of the stretch may be determined by typing in a numerical value, such as 1.3, or by dragging the stylus 102, with the stylus 25 button held down. An alternative result is represented by the rotated ellipse 2702. The rotation has been carried out with respect to the origin.
The result of a stretch operation is shown in Figure 28. Thus the user has complete control over the shape of the three dimensional ellipse. The corresponding convex hull, to which the ellipse is an approximation, is automatically transformed in this way also, thus maintaining the mathematical relationship between the two.
In summary, there are six functional transformations of three dimensional colour-space objects that may be achieved by manipulation of 5 the control arrow. These functions are:
F1 - Translate in the direction of the arrow.
F2 - Rotate F3 - Scale globally from the object's centre.
F4 - Scale globally from the opposite edge.
F5 - Proportional scaling or stretch from the object's centre.
F6 - Proportional scaling from the opposite edge.
The function is selected by pressing and holding the appropriate function key on keyboard 105 while dragging the control arrow using the stylus 102.
~5 In many instances it is useful to visualise the colour content of an entire image, or a sampled portion of an image. Figure 29 shows a histogram display of colour-space in which the magnitude of pixels in a quantised region of colour-space is represented by a small histogram, also drawn in the average colour of that region of colour-space. The histogram is 2o plotted in the three dimensions of colour-space at a co-ordinate representing the centre of the region that is being quantified. Thus, red, green and blue co-ordinates of pixels in an image determine three displayed characteristics: firstly the location of a histogram, secondly the colour of the histogram, and thirdly the height of the histogram.
25 The histogram display shown in Figure 29 is quantised by dividing each of the red, green and blue axes into eight sections. The user may select different quantisations, such as sixteen, thirty-two or sixty-four, in order to represent the data most clearly. At a quantisation level of sixty-four, it is possible that the histogram display may become cluttered, or require a very high display definition to be understood clearly. Under some circumstances, however, even such a cluttered display will provide important information to the user about the colour content of an image frame.
s The histogram is particularly useful for enabling the user to determine how well a tolerance or softness ellipse is likely to perform, as regions on the histogram display may clearly identify distinct regions for blue key colour as distinct from talent foreground colours. Also, places where differences are marginal will be clearly seen. The tolerance and softness ellipses may be superimposed upon the histogram display, so that an appropriate stretch or other transformation can be identified and applied to an ellipse, thereby improving the overall efficiency of the compositing process considerably.
A known problem with compositing is the adverse affect on texture which may occur in certain parts of the image. The original pixels of the surface of the wine bottle 202 shown in Figure 2 have an overall smooth colour texture, but which is affected slightly by noise, due to the quality of the original image.
In the original image, as shown in Figure 2, this low level of noise is 2o acceptable. However, once the image is processed in a non-linear fashion to extract the matte, it is possible for the noise to become amplified in parts of the image where intermediate matte values are generated, thus resulting in clearly visible processing artefacts. Such effects are considered as adversely affecting the texture of an area of an image.
2s A close-up of a texture that has been distorted in this way is shown in Figure 30. Adjacent pixels 3001 and 3002 have different colour values (shown as shading), the differences having been amplified by the process of compositing an area of the image containing a small amount of noise in an intermediate colour volume between the blue background and the foreground colours.
A two dimensional representation of three dimensional RGB colour-space is shown in Figure 31. The pixels on the wine bottle 202 that result in the distorted texture shown in Figure 30, are shown as a collection of points 3101, some of which are between the softness ellipse 3102 and the tolerance ellipse 3103, and some of which are outside the softness ellipse.
Points inside the softness ellipse 3102 represent pixels that will be processed differently from points outside the softness ellipse 3102. This represents a non-linearity, and results in the amplification of noise, and the generation of visible texture distortion in the resulting composited image, as indicated in Figure 30.
Other unwanted artefacts in the original image may be amplified in this way, including distortion artefacts from previous processing steps, including a previous iteration of a compositing procedure. The more heavily processed an image becomes, the more likely it is that distortion or noise artefacts will be revealed by a subsequent image processing step. Thus, minimising distortion is important if a particular special effect requires a sequence of image processes to be performed, as well as being important for the generation of a high quality image from a single stage image 2o process.
In the present embodiment, the softness ellipse may be stretched to include the "cloud" of points 3101 that represent the pixels in the texture to be smoothed. The information shown in Figure 31 is available to the user in the form of the three dimensional colour-space display shown in Figures 25 to 29, and the softness ellipse may be manipulated by a stretching function, as described. The problem of texture smoothing in a composited image is fairly common, and so it is preferable to avoid the need for manual identification and implementation of a solution in the form of modification of the softness ellipse, as this may take several minutes of a user's time, and will become tedious if the process has to be repeated frequently.
Instead of manually manipulating the softness ellipse 3102 shown in Figure 31, it is possible to automatically perturb the softness ellipse with sets of scaling factors. For each set of scaling factors a smoothness s measurement of the sampled pixels in the problem area is made. Out of the final set of smoothness measurements, the set of scaling factors for which the smoothness is greatest is selected and applied to modify the softness ellipse.
A set of ninety-four perturbation factors is used which are selected for an equal search of the problem space in three dimensions. The selection of sets of scaling values, to achieve a three dimensional stretch of the softness ellipse, is shown in Figure 32. The first set of scaling factors 3201 comprises values of 1.0, 1.0 and 2.0, which are applied to the x, y and z axes of modified colour-space, in which the softness ellipse is a unit ~ s sphere around the origin. The second set of scaling factors is 1.2, 1.2 and 1.7. Thus the x, y and z scaling factors are not being incremented numerically, but geometrically. Thus the values may be considered as being selected to perform a search of a quadrant of a sphere 3203, the surface of which has equally spaced points, and the volume of which also 2o contains equally spaced points. The points are equally spaced in three dimensions, such that the ninety-four points represent an equal search for an ideal stretch factor throughout the selected problem space.
The processes performed by the processing system 101 to obtain the optimal set of stretch factors, out of the ninety-four that are tested, are 2s shown in Figure 33. The processes shown are performed with respect to a set of pixels which have been identified as resulting in a rough texture in the composited image. This set of pixels may be sampled by identifying a rectangular region, within which all pixels are considered as samples, such as those indicated in Figure 30.
In process 3301, a register containing a value for the minimum variance is set to an impossibly high value. At step 3302, a set of x, y and z perturbation factors is selected from a look-up table, as represented by the table shown in Figure 32. In process 3303, each sampled pixel is processed to generate a softness value, thereby resulting in an array of softness values S(n) which has a number of entries (n) equal to the number of pixels in the sample shown in Figure 30. In process 3304 this array of pixel softness values is processed by a single dimension fast Fourier transformation (FFT) to generate an array F(n) of frequency values, having ~o the same number of entries (n) as the softness array S(n).
In process 3305, the frequency array F(n) is processed to generate a measurement of the variance, or roughness of the softness array S(n). In process 3306 a question is asked as to whether the variance just calculated is less than the minimum variance calculated so far. If not, control is 15 directed to process 3308. Alternatively, control is directed to process 3307, where the minimum variance is updated with the variance calculated in process 3305, and the set of x, y and z perturbation factors, which resulted in that variance is recorded as the preferred set of perturbation factors.
Thereafter, control is directed to process 3308, where a question is 2o asked as to whether all ninety-four sets of perturbation factors have been considered. If not, control is directed back to process 3302, where the next set of factors is selected. Alternatively, the sequence of processes is complete, and the values recorded in process 3307 are known to give the optimal stretch of the softness ellipse in order to smooth the texture 2s represented by the sampled pixels shown in Figure 30.
A graphical representation of processes 3303 and 3304 is shown in Figure 34. Each pixel in the sampled area has its RGB components 3401 supplied to the softness calculation 3402 with the perturbed softness ellipse, to generate a value in the softness array S(n) 3403. The perturbed softness calculation is repeated for each pixel in the sample until the softness array S(n) 3403 is completely populated. The contents of this array may be visualised as a softness graph 3404, which shows the random noisy patternless character of the pixels. The softness array S(n) is 5 supplied to a fast Fourier transform calculation 3405, to generate an array F(n) 3406 of frequency values. This set of frequency values may be visualised as a frequency graph 3407, in which the important characteristics of the smoothness are much more easily identifiable. A graph containing a relatively high frequency content contains more visible noise than a graph containing a relatively low frequency content.
If the area under the curve of the frequency graph 3407 is measured, then an expression of the roughness of the texture will be given by the point at which, moving from left to right along the frequency axis, seventy-five percent of the area under the frequency curve has been ~ 5 accounted for. This frequency value may then be used as an arbitrary unit of variance, used in process 3306 in Figure 33, which can form the basis for comparing the success of each stretch of the softness ellipse.
Given that the area under the frequency curve 3407 is in the discrete time domain, the area is simply considered as being the sum of array 2o values. The processes performed by the processing system 101 in process 3305 to obtain the measure of variance, are shown in Figure 35. In process 3501 the total area under the frequency curve is calculated as being equal to the sum of the values stored in the frequency array F(n). In process 3502 an area limit is calculated as being equal to the total area multiplied by 25 0.75. In process 3503 an initialisation is performed by setting variables AREA and i to zero. In process 3504 the value for AREA is added to the contents of the location in the frequency array F(n) indexed by the variable i. In process 3505 a question is asked as to whether AREA is now greater than or equal to the area limit. If so, control is directed to process 3507.
Alternatively control is directed to process 3506, where the variable i is incremented, so that the next value in the frequency array F(n) may be addressed. Control is then directed back to process 3504. At process 3507, analysis of the frequency array F(n) is complete, and the value of i, which s was used to index the frequency array F(n) in process 3504, is used as an arbitrary measure of variance at process 3305 in Figure 33.
Four sample graphs of frequency, out of the ninety four that are generated, are shown in Figure 36. Here, the area under the frequency curve corresponding to the lowest seventy-five percent of the total area ~o under each curve is shown shaded. Each graph corresponds to the frequency domain of the softness generated as a result of perturbing the softness ellipse 3120 shown in Figure 31. In graph 3601, a relatively even frequency content is observed, with a high value of i. In graph 3602 a lower proportion of frequencies are observed, indicating a lower noise content. In 15 graph 3603 a low frequency peak ensures a very low value for i, while at graph 3604 a higher value for i is observed. Out of these four graphs, 3601 to 3604, graph 3603 has the most predominant low frequencies, and so the perturbation factors which resulted in the generation of this graph would be preferable over those which generated the other graphs 3601, 3602 and 2o 3604.
The result of identifying a preferred stretch of the softness ellipse is shown in Figure 37. When the finalised x, y and z perturbation factors are applied to the softness ellipse 3102, the ellipse is stretched in three dimensions to an enlarged ellipse 3701, which now includes all the points 25 3101 corresponding to the pixels in the sampled area of texture, such as the translucent surface of the wine bottle 202 shown in Figure 2.
Having enlarged ellipse 3102 to ellipse 3701, that now includes all the required points 3101, it is possible that an additional collection of points has been included. This situation is represented in two dimensions by the diagram shown in Figure 38. Here a collection of points 3801 represents colours of pixels at a different part of the image from the wine bottle surface pixels 3101. The inclusion of these pixel points results in a part of the image which had been composited correctly before the smoothing process was s applied, becoming incorrectly composited. It may be very difficult to stretch or contort the softness ellipse in such a way that these additional points 3801 are excluded, without creating additional problems with other groups of pixels elsewhere on the image.
The solution to this problem is to provide a patch in the softness zone between the tolerance and softness ellipses. Figure 39 shows a patch 3901 which has been placed around the newly included pixels 3901 in the softness zone between the softness ellipse 3701 and the tolerance ellipse 3103. The patch 3801 is shown as being rectangular in shape. In three dimensions this becomes a rectangular box, proportioned to fit exactly around the points 3801. The patch is defined exactly in accordance with the methods described for defining the tolerance ellipse and the softness ellipse.
A set of pixels is identified, a convex hull is identified as a subset of the outermost of this set of pixels. A bounding box is identified (see Figures 20 10 and 11 ), and a rotation defined (see Figures 13 and 14). Unlike the case when defining a bounding ellipse, a secondary scaling process, as indicated in Figure 15, is not required, as all pixels are guaranteed to fit inside the bounding box.
Thus, the bounding box 1201 shown in Figure 15 is already 25 equivalent to the patch 3801 shown in Figure 39. A matrix mFp is defined that results in the patch 3801 being represented as a normalised cube around a modified colour-space origin, as shown in Figure 12. The test to find out whether a pixel resides inside or outside a bounding box is performed by applying the patch matrix mFp to the RGB components of the pixels under consideration.
The resulting co-ordinates may then be examined directly. If any of the x, y or z co-ordinates in the modified colour-space has a magnitude greater than one, then the pixel is outside the patch. Defining the patch 3801 as a bounding box instead of an ellipse has the advantage of reducing the amount of processing that must be performed by the processing system 101. The patch may be defined as representing an area outside the softness ellipse, corresponding to a control value of 1.0, as would be appropriate to the example shown in Figure 39. Alternatively, it may be appropriate to specify the patch as defining an area equivalent to the inside of the tolerance ellipse, corresponding to a control value of 0Ø
In the present embodiment, the patch is assigned any control value between 0.0 and 1.0, thus enabling a user to overcome subtle problems in images that are being used to control a compositing process.
~ 5 It may be appropriate to define the patch as an ellipse, in accordance with the method described for defining the tolerance and softness ellipses. In Figure 40 an elliptical patch 4001 is shown, which more accurately surrounds the collection of points 4001 that are to be excluded from the softness zone between the softness ellipse 3701 and the tolerance 2o ellipse 3103. A user may find it necessary to define multiple patches, as shown in Figure 41. Two additional, small elliptical patches 4101 and 4102 are shown, which are being used to exclude a few isolated colours from the softness zone.
The purpose of setting up such a complex colour-space environment 25 is to reduce the amount of direct user intervention required to process an image clip. In an extreme case, it is possible to define several patches, each with individual softness ellipses. An example of this is shown in Figure 42) where the elliptical patches 4001, 4101 and 4102 are each surrounded by softness ellipses 4201, 4202 and 4203. When a softness ellipse is used with a patch, the effect is to define a region in which an interpolation is carried out between the value of the softness as defined between the tolerance ellipse 3103 and the softness ellipse 3701, and the patch control value in the central zone of the patch 3801. The interpolation is carried out in response to the distance along a vector projected from the centre of the patch 4001 out through the point under consideration in the zone between the patch 4001 and its softness ellipse 4201, and the interpolation control value is proportional to the distance along this vector between the inner ellipse 4001 and the outer ellipse 4201, using a mathematical process analogous with that described for defining the softness value in response to the main tolerance 3103 and softness 3701 ellipses, as described with respect to Figure 22.
Patches may be defined as being represented by ellipses or rectangular boxes, and with or without softness zones. The more patches, ~ 5 and the greater their complexity, the more processing power that is required to determine the resulting control or matte value for each pixel in an image.
In the present embodiment the number of patches is restricted to three.
However, the use of elliptical or rectangular patches with the main tolerance and softness ellipses represents a highly efficient and intuitive 2o mathematical tool, compared to a more complex and far more computationally intensive approach, such as that where the complex three dimensional tessellated convex hulls 801 of the pixel sample volumes is used directly to define the volumes of colour-space representing background, foreground and softness.
Claims (40)
1. A method of processing image data to produce control data, including a region in which said control data has varying values to define softness, comprising steps of defining a sub-region within said softness region in which said control data is set to values substantially equal to values outside said softness region.
2. A method according to claim 1, wherein said control data is generated by a process of chroma-keying.
3. A method according to claim 1, wherein said sub-region is defined with respect to a bounded region of colour-space.
4. A method according to claim 3, wherein said bounded region in colour-space has an internal tolerance region and its own surrounding softness region.
5. A method according to claim 4, wherein said sub-region is defined after the shape of said softness region has been modified to reduce noise artefacts.
6. A method according to claim 1, wherein said sub-region is defined by selecting colours from a displayed image and manipulating said colours in colour space.
7. A method according to claim 6, wherein a bounding volume in colour-space is determined for the colour-space co-ordinates of said selected colours.
8. A method according to claim 7, wherein a minimised convex hull in colour-space is determined as a bounding volume.
9. A method according to claim 8, wherein an ellipsoid is derived from the position of said convex hull.
10. A method according to claim 9, wherein the geometry of said ellipsoid is modified in response to manual operations.
11. Image processing apparatus configured to produce control data, including a region in which said control data has varying values to define softness, comprising processing means configured to define a sub-region within said softness region in which said control data is set to values substantially equal to values outside said softness region.
12. Apparatus according to claim 11, including chroma-keying apparatus configured to produce said control data.
13. Apparatus according to claim 1, wherein said processing means is configured to define said sub-region with respect to a bounded region of colour-space.
14. Apparatus according to claim 13, wherein said processing means defines said bounded region with an internal tolerance region and its own surrounding softness region.
15. Apparatus according to claim 14, including means for modifying the shape of a softness region to reduce noise artefacts, wherein said processing means is configured to define said sub-region after said modification process.
16. Apparatus according to claim 11, including display means for displaying an image frame and selecting means for manually selecting colours from said image frame, wherein said processing means is configured to define said sub-region in response to a manual selection of colours.
17. Apparatus according to claim 16, wherein said processing means is configured to determine a bounding volume in response to selected colour co-ordinates.
18. Apparatus according to claim 17, wherein said processing means is configured to determine a minimised convex hull as a bounding volume.
19. Apparatus according to claim 18, wherein said processing means is configured to derive an ellipsoid from the position of said convex hull.
20. Apparatus according to claim 19, wherein said processing means is configured to modify the geometry of said ellipsoid in response to manual operations.
21. A computer system programmed to process image data, to produce control data, including a region in which said control data has varying values to define softness, wherein a sub-region within said softness region is defined and said control data is set to values substantially equal to values outside said softness region.
22. A computer system programmed according to claim 21, further programmed to generate said control data by a process of chroma-keying.
23. A computer system programmed according to claim 21, further programmed to define said sub-region with respect to a bounded region of colour-space.
24. A computer system programmed according to claim 23, further programmed to define said sub-region having an internal tolerance region and its own surrounding softness region.
25. A computer system programmed according to claim 24, further programmed to define said sub-region after the shape of said softness region has been modified to reduce noise artefacts.
26. A computer system programmed according to claim 21, further programmed to define said sub-region by selecting colours from a displayed image and manipulating said colours in colour-space.
27. A computer system programmed according to claim 26, further programmed to determine a bounding volume in colour-space for colour-space co-ordinates of said selected colours.
28. A computer system programmed according to claim 27, further programmed to determine a minimised convex hull in colour-space as a bounding volume.
29. A computer system programmed according to claim 28, further programmed to derive an ellipsoid from the position of said convex hull.
30. A computer system programmed according to claim 29, further programmed to modify the geometry of said ellipsoid in response to data received from manual interface devices.
31. A computer-readable medium having computer-readable instructions executable by a computer, such that said computer performs the steps of producing control data, including a region in which said control data has varying values to define softness, and processing said control data to define a sub-region within said softness region in which said control data is set to values substantially equal to values outside said softness region.
32. A computer-readable medium according to claim 31, having computer-readable instructions executable by a computer, such that said computer performs the further step of producing said control data by means of a chroma-keying process.
33. A computer-readable medium according to claim 31, having computer-readable instructions executable by a computer, such that said computer performs the further step of defining said sub-region with respect to a bounded region in colour-space.
34. A computer-readable medium according to claim 33, having computer-readable instructions executable by a computer, such that said computer performs a further step of defining said bounded region with an internal tolerance region and its own surrounding softness region.
35. A computer-readable medium according to claim 34, having computer-readable instructions executable by a computer, such that said computer performs a further step of modifying the shape of a softness region to reduce noise artefacts, wherein a sub-region is defined after performing said modification step.
36. A computer-readable medium according to claim 31, having computer-readable instructions executable by a computer, such that said computer performs the further step of supplying display data to a display device configured to display an image frame and providing an interface presenting a selection means facilitating the manual selection of colours from said image frame, wherein a sub-region is defined in response to said manual selection.
37. A computer-readable medium according to claim 36, having computer-readable instructions executable by computer, such that said computer performs a further step of determining a bounding volume in response to selected colour co-ordinates.
38. A computer-readable medium according to claim 37, having computer-readable instructions executable by a computer, such that said computer performs a further step of determining a minimised convex hull as a bounding volume.
39. A computer-readable medium according to claim 38, having computer-readable instructions executable by a computer, such that said computer performs a further step of deriving an ellipsoid from the position of said convex hull.
40. A computer-readable medium according to claim 39, having computer-readable instructions executable by a computer, such that said computer performs a further step of modifying the geometry of said ellipsoid in response to manual operations.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
GB9806978.4 | 1998-04-01 | ||
GB9806978A GB2336056B (en) | 1998-04-01 | 1998-04-01 | Image processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CA2267545A1 true CA2267545A1 (en) | 1999-10-01 |
Family
ID=10829666
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CA 2267545 Abandoned CA2267545A1 (en) | 1998-04-01 | 1999-03-30 | Image processing |
Country Status (2)
Country | Link |
---|---|
CA (1) | CA2267545A1 (en) |
GB (1) | GB2336056B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2363019B (en) | 2000-04-07 | 2004-02-25 | Discreet Logic Inc | Processing image data |
US20080117333A1 (en) * | 2006-11-17 | 2008-05-22 | Disney Enterprises, Inc. | Method, System And Computer Program Product For Video Insertion |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE4142650B4 (en) * | 1991-12-21 | 2006-03-16 | Bts Holding International Bv | Method and arrangement for deriving a control signal for the insertion of a background signal into parts of a foreground signal |
DE4229377B4 (en) * | 1992-09-03 | 2006-03-23 | Bts Holding International Bv | Chroma punching method for image signals |
FR2741770B1 (en) * | 1995-11-23 | 1998-01-02 | Thomson Broadcast Systems | METHOD FOR CALCULATING A CUTTING KEY OF A SUBJECT EVOLVING IN FRONT OF A COLORED BACKGROUND AND DEVICE IMPLEMENTING THIS METHOD |
GB9619119D0 (en) * | 1996-09-12 | 1996-10-23 | Discreet Logic Inc | Processing image |
-
1998
- 1998-04-01 GB GB9806978A patent/GB2336056B/en not_active Expired - Fee Related
-
1999
- 1999-03-30 CA CA 2267545 patent/CA2267545A1/en not_active Abandoned
Also Published As
Publication number | Publication date |
---|---|
GB9806978D0 (en) | 1998-06-03 |
GB2336056B (en) | 2002-10-16 |
GB2336056A (en) | 1999-10-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6571012B1 (en) | Adjusting a softness region | |
US6496599B1 (en) | Facilitating the compositing of video images | |
US5355174A (en) | Soft edge chroma-key generation based upon hexoctahedral color space | |
US6445816B1 (en) | Compositing video image data | |
EP0590981B1 (en) | Method for Processing Data Representing Three-Dimensional Graphic Objects | |
US5105469A (en) | Control data array generation apparatus and method | |
US6751347B2 (en) | Color diamond chroma keying | |
US7084879B2 (en) | Image processing | |
US5777620A (en) | 3D graphics system grouping surface primitives with and without specularity | |
EP0990223B1 (en) | Method and apparatus for changing a color of an image | |
US6456300B1 (en) | Method and apparatus for processing image data to produce control data | |
US20040264767A1 (en) | Image processing | |
GB2271259A (en) | Processing image data | |
CN110248242A (en) | A kind of image procossing and live broadcasting method, device, equipment and storage medium | |
EP0566915B1 (en) | Sharpness processing apparatus | |
CA2267545A1 (en) | Image processing | |
Kurth et al. | Real-time adaptive color correction in dynamic projection mapping | |
JP2882754B2 (en) | Soft chroma key processing method | |
US6429866B1 (en) | Three-dimensional graphics drawing apparatus calculating tone of pixel based on tones of pixels at prescribed intervals, method thereof and medium recorded with program therefor | |
EP0532505A1 (en) | Video image creation | |
GB2271258A (en) | Processing image data | |
JP2000207561A (en) | Method and device for extracting area | |
JPS63244094A (en) | Fast color alteration display method and apparatus for color image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
FZDE | Dead |