EP0809213A2

Optimising an expression tree for production of images

Abstract

The present invention relates to a method, apparatus and system for optimising an expression tree (101,902,1102) for compositing an image. Such an expression tree (101,902,1102) can comprise at least two nodes. Each node is either a graphical element (102,104) or image compositing operator ((103,104) and has a region of the image represented by the node (102,103,104). In the method, for at least one node in the tree, several steps are carried out. The region represented by the node (103,104) is compared to a region representation data structure, which is preferably a quadtree representation, corresponding to one or more regions represented by at least one other node. A determination is thea made if the region represented by the node (102,103,104) is totally or partially obscured by the one or more regions. If the region represented by the node is at least partially or totally obscured, the expression tree (101,902,1102) is modified. Modifying the expression tree (101,902,1102) involves applying a clipping operator (58,59) to the node if the region represented by the node is partially obscured. If the node is totally obscured, either removing the node if the node is a graphical element (102, 104) or applying a predetermined set of node replacement rules in accordance with the image compositing operator if the node (103) is a image compositing operator.

EP0809213A2, drawing sheet 1
Sheet 1 of 21

Term

Term ended

Projected expiry passed 21 May 2017, 9.3 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

34 claims: 11 independent, 23 dependent

  1. 1
    A method for optimising an expression tree, said expression tree for compositing an image and comprising at least two nodes, each said node of said tree being either a graphical element or a graphical operator and having a region of the image represented by said node, the method comprising, for at least one node in said tree, the steps of:comparing the region represented by said node to a region representation data structure corresponding to one or more regions represented by at least one other node;determining if the region represented by said node is totally or partially obscured by said one or more regions;and modifying the expression tree in the event that the region represented by said node is at least partially or totally obscured.
  2. 5
    The method as recited in any one of claims 1 to 4, wherein the graphical operators are image compositing operators.
  3. 8
    A method of optimising an expression tree for compositing an image, said expression tree comprising a plurality of nodes each said node being either a graphical element or a graphical operator and having a region of the image represented by said node, said method comprising the steps of:traversing the expression tree node by node;determining at a current node if a region of the image represented at said current node is obscured by regions represented by at least one other node, and modifying said expression tree in the event that the current node is partially or totally obscured.
  4. 11
    A method of optimising an expression tree for compositing an image, said expression tree comprising a plurality of nodes, each said node comprising either a graphical element or a graphical operator and having a region of the image represented by said node, said method comprising the of:traversing the expression tree node by node and at each current node comprising a graphical operator applying the sub-steps of: (i) receiving a first region representation from a parent node;(ii) passing to a first operand of said graphical operator a modified first region representation in accordance with a first predetermined modification rule for said operator;(iii) returning to the graphical operator a second region representation of regions obscured by a sub-tree associated with the first operand;(iv) passing to a second operand of said graphical operator a modified second region representation in accordance with a second predetermined modification rule for said operator;(v) returning to the graphical operator a third region representation of regions obscured by a sub-tree associated with the second operand;and (vi) determining, in accordance with a set rule for said graphical operator, a final region representation to be returned to the parent node.
  5. 15
    The method as recited in any one of claims 11 to 14 wherein the image representation is not created at a node, or returned to a parent node of said node, unless said image representation is subsequently utilised.
  6. 17
    An apparatus for optimising an expression tree, said expression tree for compositing an image and comprising at least two nodes, each said node of said tree being either a graphical element or a graphical operator and having a region of the image represented by said node, the apparatus comprising:means for comparing the region represented by said node to a region representation data structure corresponding to one or more regions represented by at least one other node;means for determining if the region represented by said node is totally or partially obscured by said one or more regions;and means for modifying the expression tree in the event that the region represented by said node is at least partially or totally obscured.
  7. 21
    The apparatus as recited in any one of claims 17 to 20, wherein the graphical operators are image compositing operators.
  8. 24
    An apparatus for optimising an expression tree for compositing an image, said expression tree comprising a plurality of nodes each said node being either a graphical element or a graphical operator and having a region of the image represented by said node, said apparatus comprising:means for traversing the expression tree node by node;means for determining at a current node if a region of the image represented at said current node is obscured by regions represented by at least one other node;means for modifying said expression tree in the event that the current node is partially or totally obscured.
  9. 27
    A apparatus for optimising an expression tree for compositing an image, said expression tree comprising a plurality of nodes, each said node comprising either a graphical element or a graphical operator and having a region of the image represented by said node, said apparatus comprising:means for traversing the expression tree node by node, said traversing means. for each current node comprising a graphical operator, further comprising: means for receiving a first region representation from a parent node;means for passing to a first operand of said graphical operator a modified first region representation in accordance with a first predetermined modification rule for said operator;means for returning to the graphical operator a second region representation of regions obscured by a sub-tree associated with the first operand;means for passing to a second operand of said graphical operator a modified second region representation in accordance with a second predetermined modification rule for said operator;means for returning to the graphical operator a third region representation of regions obscured by a sub-tree associated with the second operand;and means for determining, in accordance with a set rule for said graphical operator, a final region representation to be returned to the parent node.
  10. 31
    The apparatus as recited in any one of claims 27 to 30 wherein the image representation is not created at a node, or returned to a parent node of said node, unless said image representation is subsequently utilised.
  11. 33
    An image processing method comprising the steps of:generating an image expression tree for an image;optimising the expression tree using the method of any one of claims 1 to 16;compositing an image using the optimised expression tree;and outputting the composited image.