AU2005229629B2 - Implementing compositing operations on images - Google Patents
Implementing compositing operations on images Download PDFInfo
- Publication number
- AU2005229629B2 AU2005229629B2 AU2005229629A AU2005229629A AU2005229629B2 AU 2005229629 B2 AU2005229629 B2 AU 2005229629B2 AU 2005229629 A AU2005229629 A AU 2005229629A AU 2005229629 A AU2005229629 A AU 2005229629A AU 2005229629 B2 AU2005229629 B2 AU 2005229629B2
- Authority
- AU
- Australia
- Prior art keywords
- graphic element
- blend operation
- blend
- intermediate result
- operator
- 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.)
- Ceased
Links
- 239000000203 mixture Substances 0.000 claims description 127
- 238000000034 method Methods 0.000 claims description 68
- 235000020004 porter Nutrition 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 6
- 238000002156 mixing Methods 0.000 description 58
- 238000012937 correction Methods 0.000 description 21
- 230000000694 effects Effects 0.000 description 20
- 238000009877 rendering Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 15
- 239000002131 composite material Substances 0.000 description 5
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 239000004065 semiconductor Substances 0.000 description 3
- 102100035273 E3 ubiquitin-protein ligase CBL-B Human genes 0.000 description 1
- 101000737265 Homo sapiens E3 ubiquitin-protein ligase CBL-B Proteins 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Landscapes
- Image Generation (AREA)
Description
S&F Ref: 731876
AUSTRALIA
PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT Name and Address of Applicant: Actual Inventor(s): Address for Service: Invention Title: Canon Kabushiki Kaisha, of 30-2, Shimomaruko 3-chome, Ohta-ku, Tokyo, 146, Japan Craig William Northway Spruson Ferguson St Martins Tower Level 31 Market Street Sydney NSW 2000 (CCN 3710000177) Implementing compositing operations on images The following statement is a full description of this invention, including the best method of performing it known to me/us:- 5845c -1- SIMPLEMENTING COMPOSITING OPERATIONS ON IMAGES
O
FIELD OF INVENTION This invention relates to image processing, printing and graphics display, and in Sparticular to the blending of images.
SDESCRIPTION OF BACKGROUND ART In The display and printing of images by computer systems often involves some manipulation of the images, for example through combining the images using compositing operations or by modification using blend, or blending, operations. Other manipulations such as colour mapping may also be performed.
In compositing, graphic objects with transparency data may be combined using operators such as the well-known Porter and Duff operators (described in "Compositing Digital Images", Porter, T, Duff, T; Computer Graphics, Vol 18 No 3 (1984) pp 253-259), in which the opacity is modelled as the proportion of a pixel that is covered by opaque data. When combining colour and opacity from two Objects A and B (Source and Destination respectively), the pixel is divided into four regions, as illustrated in Fig. 1: a region 10 where both objects are opaque, of area aCAaB [Source and Destination]; a region 20 where only Object A is opaque, of area aA(1 Ca) [Source Only]; a region 30 where only Object B is opaque, of area aB(l aA) [Destination Only]; and a region 40 where both objects are transparent, of area (1 a as) [No Source or Destination], 727395.doc -2- I where: O opacity (or "alpha") of Object A opacity of Object B The mathematical descriptions of these regions are used to define the twelve N, 5 compositing operators. All operators provide distinct combinations of these regions.
Examples of the Porter and Duff operators applied to opaque objects are illustrated in Fig.
S2A, and examples of the Porter and Duff operators applied to partially transparent objects are illustrated in Fig. 2B.
Porter and Duff operators can be summarised by three terms within a function that represent the three regions 10, 20, 30 that may be painted by any of the operators. The fourth region 40 where no source (Object A) or destination (Object B) colour is present cannot contribute to the resultant colour or opacity. The resultant colour multiplied by the resultant opacity at any pixel is given by: CresultOlesut F(CA, CB)a)Ao! Y.CAaA(1 CB) Z.CBCBa(1 oA) where: F(CA, CB)oAaB a function selecting either the source or destination colour or no colour, multiplied by the product of the source and destination alpha. Hence this term can only be one of the following; CAUaB, CBaAaB or 0. This term represents the [Source and Destination] region 10 in Fig. 1.
Y.CAQA(1 aB) the product of the source colour, source opacity or alpha, inverse of the destination opacity, and a binary factor either 1 or This term represents the [Source Only] region 20 in Fig. 1.
727395.doc Z.CBaQ(l oA) the product of the destination colour, destination alpha, inverse Sof the source opacity, and a binary factor either 1 or This term represents the [Destination Only] region 30 in Fig. 1.
The resultant opacity at any point is given by: N 5 oresull X.AOtB Y.,QA(1 oQB) Z.aB( A) 0\ where: 0 X.cAaB the product of the source opacity, destination opacity, and a binary factor either 1 or This term represents the [Source and Destination] region 10 in Fig. 1.
Y.oA(l a the product of the source opacity, inverse of the destination opacity, and a binary factor either 1 or This term represents the [Source Only] region 20 in Fig. 1.
Z.oa(1 qA) the product of the destination opacity, inverse of the source opacity, and a binary factor either 1 or This term represents the [Destination Only] region in Fig. 1.
Table 1 lists the 12 Porter and Duff operators. A textual description is provided explaining how the operators relate to the equations and terms defined above.
Table 1: The twelve Porter and Duff operators Operator Cresutresuit Oresuit F(CA, CB) X Y Z Description clear 0 0 0 0 0 0 None of the terms are used.
src CAOA QA CA 1 1 0 Only the terms that contribute source colour are used.
dst CaBCB aB CB 1 0 1 Only the terms that 727395.doc contribute destination colour are used.
src-over CACA UA CA 1 1 1 The source colour is
CB
8 a 8 (1 oA) a(1l aQA) placed over the destination colour.
dst-over CauB a C 8 1 1 1 The destination CA QA(l CB) 0A(1 oB) colour is placed over the source colour.
src-in C4aAaR a 4 n CA 1 0 0 The source that overlaps the destination, replaces the destination.
dst-in C BIA 1 B QOAC4B CB 1 0 0 The destination that overlaps the source, replaces the source.
src-out CAA(1 aB) A(l OB) 0 0 1 0 The source that does not overlap the destination replaces the destination.
dst-out CBoaB(1 QA) B(1 oA) 0 0 0 1 The destination that does not overlap the source replaces the source.
src-atop CAaAaB U 8 CA 1 0 1 The source that overlaps the CBaB(1 aQ) destination is composited with the destination.
dst-atop CBoaa 8 B QA CB 1 1 0 The destination that overlaps the source 727395.doc in o
O
\O
(N
0 0) m€ a\'
(N
Os CAaA(I aC) is composited with the source and replaces the destination.
xor CAcXA(1 aC) QA aB 0 0 1 1 The non-overlapping 2 aCaCIB regions of source and CBCQ(1 aA) destination are combined.
It is common, however, only to use the src-over operator, where all three contributing regions 10, 20, 30 are used, and the colour of the region 10 where both objects are opaque is taken from the colour of the topmost object.
The src-over operator has also been used as the basis for blend, or blending, operations in systems where transparency data is used. In a blend operation, the source object (Object A) or effect is used as a parameter of a blend function B that modifies Object B. In the presence of transparency, the blend function operates on the region where both objects are opaque, so that the src-over operator gives rise to an over-based blend operation: Cover-blendOlover-blend CAA(I 0 CBLB(l IYA) B(CA, C)a ACB Clover-blend CA(1 OB) QB(l QA) QACB where: CA colour of Object A; CB colour of Object B; Cover-blend resultant colour of over-based blend operation; B(CA, CB) blend function of Objects A and B; aoA opacity of Object A; 727395.doc SxaB opacity of Object B; and 0 LCover-blend resultant opacity of over-based blend operation.
The src-over operator has the useful property that it does not modify pixels of the bottom object (Object B) outside the intersection of the two objects. However, a blend N 5 operation based on the src-over operator contains terms that include colour from both Noperands of the blending function. In some cases the resultant produced by an over-based O blend operation may be undesirable. An example of such a case is described in the following three paragraphs.
When Object B is partially transparent i.e. cB 1, the colour of Object A contributes to the colour of the resultant other than through the blending function. Fig. 3B shows the result 303 of blending a partially transparent object 301 (Object B) with a blending object 302 (Object A) using the over-based blending operation. In the example, object B 301 is a partially-transparent grey triangle. Object A 302 is a black square containing a circular region in which the colour varies radially from a black circumference to a white centre. In this particular case the blending operation uses a 'dodge' function.
The 'dodge' function is described by the B(CA, Cg) term in the over-based blend operation: if(CA CB) 1 B(CA, CB)= 1 else B(CA, CB) C.1l/(l CA) Note: CA and CB are normalised colour values in range If CA has a value of 1, no matter what value CB has, the term of B(CA, CB) will be equal to 1.
727395.doc SThe objects, 301 and 302, are shown separately in Fig. 3A and the result 303 of o using objects 301, 302 in an over-based blend operation is shown in Fig. 3B. Notice the black colour of Object A 302 darkening the destination colour in the overlapping area 310 of the two objects.
This effect is particularly noticeable in the 'dodge' and 'burn' blending operations.
IND
The 'dodge' operator is intended to brighten the destination (Object B) colour to reflect Sthe source (Object A) colour. Performing a 'dodge' operation with black is intended to produce no change. The 'burn' operator is intended to be complementary, and darken the destination colour to reflect the source colour. Performing a 'burn' operation with white is intended to produce no change.
There exists a need to be able to modify the result of a blend operation in order to produce an alternative effect.
SUMMARY OF THE INVENTION According to a first aspect of the invention there is provided a method of implementing a first blend operation between a first graphic element and a second graphic element, said method comprising the steps of: compositing the first graphic element with the second graphic element using a first operator to produce a first intermediate result; compositing the first graphic element with the second graphic element using a second blend operation that is different to the first blend operation to produce a second intermediate result; and combining the first intermediate result with the second intermediate result to produce a final result that is substantially identical to a result obtained if the first 727395.doc graphic element is composited with the second graphic element using the first blend operation.
According to a further aspect of the invention there is provided an apparatus for implementing a first blend operation between a first graphic element and a second graphic element, said apparatus comprising: means for compositing the first graphic element with the second graphic element using a first operator to produce a first intermediate result; means for compositing the first graphic element with the second graphic element using a second blend operation that is different to the first blend operation to produce a second intermediate result; and means for combining the first intermediate result with the second intermediate result to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend operation.
According to a further aspect of the invention there is provided a computer program product comprising machine-readable program code recorded on a machinereadable recording medium, for controlling the operation of a data processing apparatus on which the program code executes to perform a method of implementing a first blend operation between a first graphic element and a second graphic element, said method comprising the steps of: compositing the first graphic element with the second graphic element using a first operator to produce a first intermediate result; 727395.doc
O
compositing the first graphic element with the second graphic element O using a second blend operation that is different to the first blend operation to produce a second intermediate result; and combining the first intermediate result with the second intermediate result O 5 to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend O operation.
According to a further aspect of the invention there is provided a computer program comprising machine-readable program code for controlling the operation of a data processing apparatus on which the program code executes to perform a method of implementing a first blend operation between a first graphic element and a second graphic element, said method comprising the steps of: compositing the first graphic element with the second graphic element using a first operator to produce a first intermediate result; compositing the first graphic element with the second graphic element using a second blend operation that is different to the first blend operation to produce a second intermediate result; and combining the first intermediate result with the second intermediate result to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend operation.
BRIEF DESCRIPTION OF THE DRAWINGS One or more embodiments of the present invention will now be described with reference to the following drawings, in which: 727395.doc
O
Fig. 1 shows sub-pixel regions used to describe the Porter and Duff operators;
C.)
O Fig. 2A shows Porter and Duff operators used to composite opaque objects; SFig. 2B shows Porter and Duff operators used to composite partially transparent objects; O 5 Fig. 3A shows two objects used to illustrate different blending operations;
IND
Fig. 3B shows the result of blending the objects of Fig. 3A using the over-based 8 'dodge' blending operation; Fig. 3C shows the result of blending the objects of Fig. 3A using a Foreground Correction Method to produce the result of an atop-based 'dodge' blending operation; Fig. 4 is a flowchart showing the general steps of the Foreground Correction Method; Fig. 5 illustrates the use of the Foreground Correction Method of Fig. 4 in producing an atop-based 'dodge' blending operation result; Fig. 6 is a flow chart representing a method 600 in which the Foreground Correction Method of Fig. 4 is particularised to produce an in-based blending operation result; Fig. 7 shows the steps of the Foreground Correction Method of Fig. 4 used within a background group operation; and Fig. 8 is a schematic block diagram of a computer system incorporating a rendering system, in which the described arrangements may be implemented.
DETAILED DESCRIPTION INCLUDING BEST MODE The Foreground Correction Method described herein is a method for modifying the result of blending operations to produce a desired effect or alternative. result.
727395.doc SThis method may be implemented in software for a computer. Fig. 8 shows an O operating environment in which the described arrangements may be implemented The system 800 includes a host processor 802 associated with system random access memory (RAM) 803, which may include a non-volatile hard disk drive or similar device 805 and N 5 volatile, semiconductor RAM 804. The system 800 also includes a system read-only
IND
Smemory (ROM) 806 typically founded upon semiconductor ROM 807 and which may be O supplemented by compact disk devices (CD ROM) 808.
The system 800 may also incorporate a target device 811 for displaying-images, such as a printer or video display unit which operates in raster fashion.
The above-described components of the system 800 are interconnected via a bus system 809 and are operable in a normal operating mode of computer systems well known in the art.
Also seen in Fig. 8, a graphic rendering system 810 (or renderer) connects to the bus 809, and is configured for the rendering of pixel-based images derived from graphic object-based descriptions supplied with instructions and data from the processor 802 via the bus 809. The renderer 810 may utilise the system RAM 803 for the rendering of object descriptions although the renderer 810 may have associated therewith a dedicated rendering store arrangement 830, typically formed of semiconductor RAM.
The rendering system 810 may be implemented as software on the host processor 802. Alternatively, the rendering system 810 may be implemented on a separate unit, which may be a custom-built hardware unit or which may be software running on a general-purpose computer. In a further alternative, the rendering system may be an embedded system on the target device 811.
727395.doc SThe method may be particularly advantageous when an underlying software 3o graphics library in a graphics or rendering system rendering system 810) only implements blend operations that are based on one Porter and Duff operator. A particular case is where the available blending operation is based on the Porter and Duff src-over operator. The methods described herein enable the output of the blending operation to be modified to produce the same effect obtained by blend operations based on other Porter Sand Duff operators.
'Blending' is combining the colour and opacities of two objects in a predefined method where, in the overlapping region 10, the colours are operated on by a blending function. Objects that are being blended may represent any basic graphical elements; text, graphic, or raster bitmap; or a group of basic graphical elements.
Blending operations other than the over-based blending operations can be derived from the Porter and Duff operators. An atop-based blending operation is based on the Porter and Duff src-atop operator. The Porter and Duff src-atop operator (see Table 1) takes on the following compositing profile: CatopOCanop CAQBl(l A) CAAOB a,op =c aB where: CA colour of Object A; CB colour of Object B; cQA opacity of Object A; aB opacity of Object B; Canop resultant colour of src-atop operator; taop resultant opacity of src-atop operator; 727395.doc An atop-based blend operation is a Porter and Duff src-atop operator that is o modified such that the region 10 where both objects are opaque CArAcaB, obtains its colour from the blending function, B(CA, CB) instead: Caiop-blendiatop-blend CB B(1 A) B(CA, CB)UAUB Oatop-blend OB The src-atop operator has the useful property, shared with the src-over operator, 0 that it does not modify pixels of Object B outside the intersection of the two objects.
Furthermore, the blend operation based on src-atop does not include a term in which Object A directly contributes colour. The only effect of the colour of Object A on the result is through the blending function.
The effect of the opacity of Object B in the atop-based blending operation is to contain the operation to the region of a pixel over which Object B is opaque regions and 30 in Fig. 1).
Another blending effect derived from the Porter and Duff operators is an in-based blending operation. The in-based blending operation is based on the Porter and Duffsrcin operator. The Porter and Duff src-in operator takes on the following compositing profile: Cinin CA ACB where: Cin resultant colour of src-in operator; C4.n resultant opacity of src-in operator; 727395.doc -14- An in-based blend operation is a Porter and Duffsrc-in operator that is modified such that the region 10 where both objects are opaque CAAasB, obtains its colour from the blending function, B(CA, instead: Cin-blendOin-blend B(CA, CB)aAaB 4 in-blend QAQoB The src-in operator potentially modifies a destination object over the entire extent of the destination object, which makes the src-in operator an expensive operation. This expense is due to the modification of previously rendered objects. However, blend operations based on the src-in operator are potentially useful operations and are included for completeness.
The remaining Porter and Duff operators do not include the region 10 where both objects overlap and are therefore not suitable candidates for use with blending operations.
The Foreground Correction Method can be used to convert one blending operation result into the result of another blending operation. This provides a system that only implements a limited set of blending operations only over-based) with a means to produce the effects of additional blending operations based on other Porter and Duff operators.
Fig. 4 illustrates the steps of the generalised Foreground Correction Method 400, which may, for example, be implemented as part of the rendering system 810. The Foreground Correction Method 400 is a method for compositing two Objects A and B.
Object A represents the desired graphic object (or 'effect') to composite with previously composited objects. Object A has colour and opacity values. Object B represents the Current Background. The Current Background may be empty blank), a subset of the 727395.doc previously composited objects, or all of the previously composited objects. In each case o the Current Background will have colour and opacity values.
O
SThe first step 401 of the method 400 is to obtain the Current Background (Object B) Obtaining the Current Background may involve retrieving or calculating the in- 5 memory representation of either a subset or all of the previously rendered objects. The
(NO
Current Background (Object B) will be known as a First Graphic Element containing colour and opacity values. Similarly Object A will be known as a Second Graphic Element containing colour and opacity values. The Current Background may be retrieved from the rendering stores 830.
In step 402 a copy of the First Graphic Element (Object B) is made prior to any blending operations. The copy of the First Graphic Element (Object B) will be known as the Object A Contribution Buffer.
In step 403, the Second Graphic Element (Object A) is composited into the Object A Contribution Buffer using a Porter and Duff operator. The resultant of this compositing operation can be considered to be a First Intermediate Result.
In step 404, the Second Graphic Element (Object A) is composited with the First Graphic Element (Object B) using a blend operation This resultant can be considered to be a Second Intermediate Result. Note that the blend operation used to produce this result could be a blend operation based on any Porter and Duff operator, even though in many systems the only available blend operation is based on the Porter and Duff src-over operator.
Finally, in step 405, the colour and opacity values of the First Intermediate Result (result in Object A Contribution Buffer) are combined with the colour and opacity values of the Second Intermediate Result (Current Background result) to produce a final result.
727395.doc SThe combining step may be an addition or a subtraction, depending on the blending o operation being performed. O SIn a first arrangement, the Foreground Correction Method corrects the resultant of compositing the Objects A and B using an over-based blend operation. In the example of N 5 Figs. 3A-3C, the black of Object A 302 that darkens the resultant colour in the Noverlapping region 310 as shown in Fig. 3B can be removed from the result using the first O arrangement of the Foreground Correction Method. Fig. 5 illustrates how the steps of the generalised Foreground Correction Method 400 can be particularised to produce the atopbased 'dodge' blending result 305 shown in Fig. 3C. In the first arrangement, the compositing operator used in step 403 is a src-out operator and the blend operation of step 404 is an over-based blend operation. The combining operation of step 405 is a subtraction. Fig. 5 illustrates the method steps of the first arrangement using the objects 301,302.
Object A 506 represents the desired graphic object to composite with previously composited objects. In the example, Object A 506 (identifiable with object 302) is a black square having a circular region in which the colour varies radially from a black circumference to a white centre. Object A contains colour and opacity values. Object B represents the Current Background. The Current Background may be empty blank), a subset of the previously composited objects, or all of the previously composited objects.
In each case the Current Background will have colour and opacity values. In the example, Object B 507 (identifiable with object 301) is a partially-transparent grey triangle.
The first step 501 of the first arrangement is to obtain the Current Background (Object B) 507 (as in step 401). Obtaining the Current Background 507 may involve retrieving or calculating the in-memory representation of either a subset or all of the 727395.doc Spreviously rendered objects. The Current Background 507 will be known as a First o Graphic Element containing colour and opacity values. Similarly Object A will be known as a Second Graphic Element containing colour and opacity values.
In step 502 (as in step 402), a copy of the Current Background 507 is made prior to any blending operations. The copy 508 of the Current Background is stored in the SObject A Contribution Buffer At this point the contents of both the Current Background 0 507 and the Object A Contribution Buffer 508 should be identical.
In step 503 (a special case of step 403) the Second Graphic Element (Object A) 506 is composited into the Object A Contribution Buffer using the src-out Porter and Duff operator: Csrc-outOsrc-out CAQA(1 aB) csrc-ou t a!A(1 OEB) where: Cs.c-oul resultant colour of src-out Porter and Duff operator; and 4rc-out resultant opacity of src-out Porter and Duff operator.
This resultant 509 can be considered to be a First Intermediate Result.
In step 504 (a special case of step 404) the Second Graphic Element (Object A) 506 is composited with the First Graphic Element 507 using an over-based 'dodge' blend operation Cover-blendaover-blend CAeA( QB) CsaQB( CA) B(CA, CBs)aAcB Ceover-blend QA(1 tB) aB(l UA) eA QB where (for a 'dodge' operation) B(CA, CB) is defined as: if(CA Cs) 1 B(CA, CB) 1 727395.doc else o B(CA, CB) CB.1/(1 CA) This resultant 510 (identifiable with the result 303 of Fig. 3B) of the over-based blend 'dodge' operation can be considered to be a Second Intermediate Result, stored in N 5 the Current Background.
N, At this point it can be seen that the contents 510 of the Current Background differ 0 from the contents 509 of the Object A Contribution Buffer The contents 509 of the Object A Contribution Buffer only include those portions of the grey triangle 507 that overlap Object A 506.
Finally, in step 505 (a special case of step 405), the opacity and colour of the First Intermediate Result 509 (result in Object A Contribution Buffer) is subtracted from the opacity and colour values of the Second Intermediate Result 510 (stored in the Current Background) to produce the result 511 (stored in the Current Background). In the example the result 511 (identifiable with the result 305 of Fig. 3C) is a grey triangle having a radial blend in a region near the right-hand vertex of the triangle. The result of step 505 is: Cresultresult Cover-blendOiover-blend Csrc-outOsrc-out Substitute in Cover-blendtoXver-blend (over-based blending operation) and Cs,c.ouisr,-o,, (src-out Porter and Duff operator): CAQA(1 o) CBa 8 (1 aA) B(CA, CB)oA4oB [CAA(l as)] CACA CAAB CBOB CBOBC4A B(CA, CB)CAB CAQA
CAOAQB
C
8 aC CBOBCtA B(CA, CB)aAOB Caq(1 uA) B(CA, CB)acQ 727395.doc j= Catop-blendOiatop-blend
C,)
O
aresult 4over-blend src-out Substitute in over-blend and src-out equations \0 5 A(1 B) aB( -aA) AB [A(1 C OA CAB (B AQB AaB QA A B In Catop-blend Thus the final result produced by the first arrangement is identical to the result of the atop-based 'dodge' blend operation.
In a second arrangement, the Foreground Correction Method corrects the resultant of compositing an over-based blending operation to produce the effects of an in-based blending operation. Fig. 6 is a flow chart representing a method 600 in which the generalised Foreground Correction Method 400 is particularised to produce an in-based 'dodge' blending result.
As in the method 400 of Fig. 4, Object A represents the desired graphic object to composite with previously composited objects. Object A will contain colour and opacity values. Object B represents the Current Background. The Current Background may be empty blank), a subset of the previously composited objects, or all of the previously composited objects. In each case the Current Background will have colour and opacity values.
In step 601, the Current Background (Object B) is obtained. Obtaining the Current Background may involve retrieving or calculating the in-memory representation of either a subset or all of the previously rendered objects. The Current Background 727395.doc (Object B) will be known as a First Graphic Element containing colour and opacity.
O Similarly Object A will be known as a Second Graphic Element containing colour and opacity values.
In step 602 a copy of the Current Background is made prior to any blending NO 5 operations. The copy of the Current Background is stored in the the Object A C Contribution Buffer.
In step 603 the Second Graphic Element (Object A) is composited into the Object A Contribution Buffer using the xor Porter and Duff operator CxoAxor CACA(1 CB) CBCB(1 OA) txor A B- 2 CAae where: Cxor resultant colour of xor Porter and Duff operator; and txor resultant opacity of xor Porter and Duff operator.
This resultant can be considered to be a First Intermediate Result. The Second Graphic Element (Object A) is then further composited, in step 604, with the First Graphic Element using an over-based blending operation 604. The result is stored in the Current Background. In this arrangement a 'dodge' function will be used in the blend operation: Cover-blendOlover-blend CAqA(1 Oa) CBa(l tA) B(CA, CB)qA ael 0 over-blend A(l OB) QB(l aA) Q'ACB where (for a 'dodge' operation) B(CA, Ca) is defined as: if(CA Ca) 1 B(CA, Ca) 1 else 727395.doc B(CA, CB) CB I/0 CA)
C.)
Second Intermediate Result.
Finally, in step 605, the opacity and colour of the First Intermediate Result (result N 5 in Object A Contribution Buffer) is subtracted from the opacity and colour values of the
IND
Second Intermediate Result (Current Background result): Crestdt~cesi, Cover-blend~lver-blend Cxo4Yxor Substitute in Coer-blend~over-blend (over-based blending operation) and Cxoraxor (xor Porter and Duff operator) =CAAGl B) CBaB(l aA) B(CA, CB~AAaB =CAQA(l QB) CBC4B0 atA) B(CA, CB)CALQB CAC4A(1 -CBB(l A) =B(CA, CB)cQAQB 1 5 =Cin-blendCin..blend a-resuhf ~Yver-blend xor Substitute in %ovrblend and Cixor equations =aA(l aXB) aB(l aA) cia- [aA aB 2 aAaB] aA -AQB +B -aAaB+ aAaB -aA-aB+ 2aAaB A CIB 0'n-blend 727395.doc -22- SThus the result of the step 605 is identical to the result that would have been o obtained using the in-based 'dodge' blend operation. Thus, the second arrangement may O Sbe used to obtain the effect of an in -based blend, even though the only available blend operatiori is over-based.
The Foreground Correction Method 400 is used to derive a final blending result
IND
from an initial blending result. Effectively the Foreground Correction Method 400 can Sreplace Porter and Duff based blending operations that are part of a rendering procedure.
An example of such a case is illustrated in Fig. 7. In this particular example a group of objects is copied from a pre-processed set of objects 701. Another object, (Object A) is then blended with the group. In some cases Object A would be blended with a Porter and Duff-based blending operation.
If the desired Porter and Duff based blending operation is unavailable to the graphics or rendering system, the Foreground Correction Method 400 can be used. The Foreground Correction Method 400 is used to blend the group of objects 701 (Current Background) and Object A to produce the desired effect. From this point the graphics or rendering system could continue with the remaining rendering process 703.
As demonstrated in Figs. 5 and 6 the Foreground Correction Method 400 can be used to derive a desired effect from an initial Porter and Duff based blending result. This method allows a graphics or rendering system that contains only one Porter and Duff based blending operation to extend the number of effects that can be produced. Examples of different arrangements of the Foreground Correction Method 400 are shown in the following table: Table 2: Different arrangements of the Foreground Correction Method.
727395.doc Step 404 Step 403 Step 405 Resulting blend Base Blending Porter and Duff Combination operation Effect Operation Operator src-over src-out subtract src-atop src-over xor subtract src-in src-atop src-out add src-over src-atop dst-out subtract src-in src-in xor add src-over src-in dst-out add src-atop The first row of Table 2 corresponds to the first arrangement, in which the effect of an atop-based blend is obtained using an over-based blend. The second row of Table 2 corresponds to the second arrangement, in which the effect of an in-based blend is obtained using an over-based blend.
The following four rows of Table 2 summarise further arrangements of method 400. The first column of Table 2 shows the blending operation used in step 404, i.e. a blending operation that is actually available in the rendering system. The second column of Table 2 shows the Porter and Duff operator that is used in step 403 in each of the arrangements. The third column of Table 2 shows the combining operation used in each of the arrangements. The final column shows the blend operation of which the effect is reproduced in the corresponding arrangement.
The present specification discloses apparatus for performing the operations of the methods. Such apparatus may be specially constructed for the required purposes, or may comprise a general purpose computer or other device selectively activated or reconfigured by a computer program stored in the computer. The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various 727395.doc Sgeneral purpose machines may be used with programs in accordance with the teachings Sherein. Alternatively, the construction of more specialized apparatus to perform the
O
required method steps may be appropriate.
In addition, the present invention also implicitly discloses a computer program, in N 5 that it would be apparent to the person skilled in the art that the individual steps of the
IND
preferred method described herein are to be put into effect by computer code. The O computer program is not intended to be limited to any particular programming language and implementation thereof. It will be appreciated that a variety of programming languages and coding thereof may be used to implement the teachings of the disclosure contained herein. Moreover, the computer program is not intended to be limited to any particular control flow. Furthermore one or more of the steps of the computer program may be performed in parallel rather than sequentially.
Such a computer program may be stored on any computer readable medium. The computer readable medium may include storage devices such as magnetic or optical disks, memory chips, or other storage devices suitable for interfacing with a general purpose computer. The computer readable medium may also include a hard-wired medium such as exemplified in the Internet system, or wireless medium such as exemplified in the GSM mobile telephone system. The computer program when loaded and executed on such a general-purpose computer effectively results in-an apparatus that implements the steps of the preferred method.
Where reference is made in any one or more of the accompanying drawings to steps and/or features, which have the same reference numerals, those steps and/or features have for the purposes of this description the same function(s) or operation(s), unless the contrary intention appears.
727395.doc SIndustrial Applicability 0 It is apparent from the above that the disclosed methods are applicable to the image processing industries.
The foregoing describes only some embodiments of the present invention, and N 5 modifications and/or changes can be made thereto without departing from the scope and spirit of the invention, the embodiment(s) being illustrative and not restrictive.
t 0 In the context of this specification, the word "comprising" means "including principally but not necessarily solely" or "having" or "including" and not "consisting only of". Variations of the word comprising, such as "comprise" and "comprises" have corresponding meanings.
727395.doc
Claims (9)
1. A method of implementing a first blend operation between a first graphic element 5 and a second graphic element, said method comprising the steps of: compositing the first graphic element with the second graphic element o using a first operator to produce a first intermediate result; compositing the first graphic element with the second graphic element using a second blend operation that is different to the first blend operation to produce a second intermediate result; and combining the first intermediate result with the second intermediate result to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend operation.
2. A method according to claim 1 wherein the first blend operation and the second blend operation both include the same blend function.
3. A method according to claim 1 or claim 2 wherein the first blend operation is an atop-based blend operation and the second blend operation is an over-based blend operation.
727395.doc -27- O
4. A method according to claim 3 wherein the first operator is a Porter and Duff src- O out operator and said combining step subtracts the first intermediate result from the second intermediate result. C',
5. A method according to claim 1 or claim 2 wherein the first blend operation is an in-based blend operation and the second blend operation is an over-based blend operation. In
6. A method according to claim 5 wherein the first operator is a Porter and Duffxor operator and said combining step subtracts the first intermediate result from the second intermediate result.
7. A method according to claim 1 or claim 2 wherein the first blend operation is an over-based blend operation and the second blend operation is an atop-based blend operation.
8. A method according to claim 7 wherein the first operator is a Porter and Duffsrc- out operator and said combining step adds the first intermediate result to the second intermediate result.
9. A method according to claim 1 or claim 2 wherein the first blend operation is an in-based blend operation and the second blend operation is an atop-based blend operation. 727395.doc A method according to claim 9 wherein the first operator is a Porter and Duff dst- C.) L) out operator and said combining step subtracts the first intermediate result from the second intermediate result. (Ni N 5 11. A method according to claim 1 or claim 2 wherein the first blend operation is an over-based blend operation and the second blend operation is an in-based blend operation. 12. A method according to claim 11 wherein the first operator is a Porter and Duffxor operator and said combining step adds the first intermediate result to the second intermediate result. 13. A method according to claim 1 or claim 2 wherein the first blend operation is an atop-based blend operation and the second blend operation is an in-based blend operation. 14. A method according to claim 13 wherein the first operator is a Porter and Duff dst- out operator and said combining step adds the first intermediate result to the second intermediate result. An apparatus for implementing a first blend operation between a first graphic element and a second graphic element, said apparatus comprising: means for compositing the first graphic element with the second graphic element using a first operator to produce a first intermediate result; 727395.doc Smeans for compositing the first graphic element with the second graphic element O using a second blend operation that is different to the first blend operation to produce a second intermediate result; and means for combining the first intermediate result with the second intermediate O 5 result to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend O operation. 16. A computer program product comprising machine-readable program code recorded on a machine-readable recording medium, for controlling the operation of a data processing apparatus on which the program code executes to perform a method of implementing a first blend operation between a first graphic element and a second graphic element, said method comprising the steps of: compositing the first graphic element with the second graphic element using a first operator to produce a first intermediate result; compositing the first graphic element with the second graphic element using a second blend operation that is different to the first blend operation to produce a second intermediate result; and combining the first intermediate result with the second intermediate result to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend operation. 727395.doc 17. A computer program comprising machine-readable program code for controlling o the operation of a data processing apparatus on which the program code executes to O perform a method of implementing a first blend operation between a first graphic element C€3 and a second graphic element, said method comprising the steps of: compositing the first graphic element with the second graphic element Susing a first operator to produce a first intermediate result; O compositing the first graphic element with the second graphic element using a second blend operation that is different to the first blend operation to produce a second intermediate result; and combining the first intermediate result with the second intermediate result to produce a final result that is substantially identical to a result obtained if the first graphic element is composited with the second graphic element using the first blend operation. 18. A method of implementing a first blend operation between a first graphic element and a second graphic element substantially as described herein with reference to any one of the embodiments as illustrated in the accompanying drawings. 19. An apparatus for implementing a first blend operation between a first graphic element and a second graphic element substantially as described herein with reference to any one of the embodiments as illustrated in the accompanying drawings. A computer program product substantially as described herein with reference to any one of the embodiments as illustrated in the accompanying drawings. 727395.doc 21. A computer program substantially as described herein with reference to any one of the embodiments as illustrated in the accompanying drawings. DATED this Thirty-First Day of October 2005 CANON KABUSHIKI KAISHA Patent Attorneys for the Applicant SPRUSON&FERGUSON 727395.doc
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| AU2005229629A AU2005229629B2 (en) | 2005-10-31 | 2005-10-31 | Implementing compositing operations on images |
| US11/551,389 US7965299B2 (en) | 2005-10-31 | 2006-10-20 | Implementing compositing operations on images |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| AU2005229629A AU2005229629B2 (en) | 2005-10-31 | 2005-10-31 | Implementing compositing operations on images |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| AU2005229629A1 AU2005229629A1 (en) | 2007-05-17 |
| AU2005229629B2 true AU2005229629B2 (en) | 2008-12-18 |
Family
ID=38054973
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| AU2005229629A Ceased AU2005229629B2 (en) | 2005-10-31 | 2005-10-31 | Implementing compositing operations on images |
Country Status (1)
| Country | Link |
|---|---|
| AU (1) | AU2005229629B2 (en) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6130967A (en) * | 1997-07-03 | 2000-10-10 | Tri Path Imaging, Inc. | Method and apparatus for a reduced instruction set architecture for multidimensional image processing |
| US20050195220A1 (en) * | 2004-02-13 | 2005-09-08 | Canon Kabushiki Kaisha | Compositing with clip-to-self functionality without using a shape channel |
-
2005
- 2005-10-31 AU AU2005229629A patent/AU2005229629B2/en not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6130967A (en) * | 1997-07-03 | 2000-10-10 | Tri Path Imaging, Inc. | Method and apparatus for a reduced instruction set architecture for multidimensional image processing |
| US20050195220A1 (en) * | 2004-02-13 | 2005-09-08 | Canon Kabushiki Kaisha | Compositing with clip-to-self functionality without using a shape channel |
Also Published As
| Publication number | Publication date |
|---|---|
| AU2005229629A1 (en) | 2007-05-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5328857B2 (en) | Computer graphics processing | |
| JP4067605B2 (en) | Adjustment layer for composite image processing | |
| US6469707B1 (en) | Method for efficiently rendering color information for a pixel in a computer system | |
| EP1025558B1 (en) | A method and apparatus for performing chroma key, transparency and fog operations | |
| US7573487B1 (en) | Dynamically transformable user interface icons | |
| US8699815B2 (en) | Methods and apparatus for improved display of foreground elements | |
| US20020149600A1 (en) | Method of blending digital pictures | |
| NO328434B1 (en) | Formatting language and object model for vector graphics | |
| US20080238947A1 (en) | System and method for non-linear magnification of images | |
| JP2004318832A (en) | A Method for Reducing the Number of Compositing Operations Performed in a Pixel Sequential Drawing System | |
| EP1306810A1 (en) | Triangle identification buffer | |
| US20030117409A1 (en) | Barycentric centroid sampling method and apparatus | |
| US7532222B2 (en) | Anti-aliasing content using opacity blending | |
| US7864197B2 (en) | Method of background colour removal for porter and duff compositing | |
| AU2003204703B2 (en) | System and method for employing non-alpha channel image data in an alpha-channel-aware environment | |
| CN116578798B (en) | Page contrast automatic calibration optimization method | |
| US7215342B2 (en) | System and method for detecting and converting a transparency simulation effect | |
| AU2005229629B2 (en) | Implementing compositing operations on images | |
| US7450121B2 (en) | Dynamic bit depth rendering | |
| US6580836B2 (en) | Scan line rendering of convolutions | |
| US7965299B2 (en) | Implementing compositing operations on images | |
| US6323870B1 (en) | Texture alpha discrimination a method and apparatus for selective texture modulation in a real time graphics pipeline | |
| AU2005201930B2 (en) | Simplification of alpha compositing in the presence of transfer functions | |
| US7535480B2 (en) | Compositing rendering layers | |
| AU2019101827A4 (en) | A method for automatic vector watermarking |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| FGA | Letters patent sealed or granted (standard patent) | ||
| MK14 | Patent ceased section 143(a) (annual fees not paid) or expired |