AU2007254666A1 - Recognition of overlapping shapes from document images - Google Patents
Recognition of overlapping shapes from document images Download PDFInfo
- Publication number
- AU2007254666A1 AU2007254666A1 AU2007254666A AU2007254666A AU2007254666A1 AU 2007254666 A1 AU2007254666 A1 AU 2007254666A1 AU 2007254666 A AU2007254666 A AU 2007254666A AU 2007254666 A AU2007254666 A AU 2007254666A AU 2007254666 A1 AU2007254666 A1 AU 2007254666A1
- Authority
- AU
- Australia
- Prior art keywords
- template shape
- template
- shape
- identifying
- boundaries
- 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/46—Descriptors for shape, contour or point-related descriptors, e.g. scale invariant feature transform [SIFT] or bags of words [BoW]; Salient regional features
- G06V10/478—Contour-based spectral representations or scale-space representations, e.g. by Fourier analysis, wavelet analysis or curvature scale-space [CSS]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/18—Extraction of features or characteristics of the image
- G06V30/186—Extraction of features or characteristics of the image by deriving mathematical or geometrical properties from the whole image
- G06V30/188—Computation of moments
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Algebra (AREA)
- Computing Systems (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Processing Or Creating Images (AREA)
Description
S&F Ref: 835241 AUSTRALIA PATENTS ACT 1990 COMPLETE SPECIFICATION FOR A STANDARD PATENT Name and Address Canon Kabushiki Kaisha, of 30-2, Shimomaruko 3 of Applicant: chome, Ohta-ku, Tokyo, 146, Japan Actual Inventor(s): Steven Richard Irrgang Address for Service: Spruson & Ferguson St Martins Tower Level 35 31 Market Street Sydney NSW 2000 (CCN 3710000177) Invention Title: Recognition of overlapping shapes from document images The following statement is a full description of this invention, including the best method of performing it known to me/us: 5845c(1073963_1) - 1 RECOGNITION OF OVERLAPPING SHAPES FROM DOCUMENT IMAGES Field of the Invention The present invention relates generally to document analysis and, in particular, to a method and apparatus for creating a document, and to a computer program product 5 including a computer readable medium having recorded thereon a computer program for creating a document. Background The proliferation of scanning technology combined with ever increasing computational processing power has lead to many advances in the area of document 10 analysis systems. These systems may be used to extract semantic information from a scanned document, for example by means of Optical Character Recognition (OCR) technology. This technology is used in a growing number of applications such as automated form reading. Document analysis systems can also be used to improve compression of an electronic representation of the document by selectively using an 15 appropriate compression method depending on the content of each part of a page of the document. Improved document compression lends itself to applications such as archiving and electronic distribution. A significant proportion of office documents are generated using structured text/graphics editing applications such as MicrosoftTM WordTM, MicrosoftTM 20 Powerpoint
TM
, and the like. In addition to formatted text editing, these text/graphics editing applications include basic figure drawing tools and options. An important class of document analysis applications process a bitmap representation of a document to generate an electronic version of the document that can be -2 viewed and edited using such editing applications. Such document analysis applications will be referred to as "scan-to-editable" document analysis applications. The figure drawing options in a typical structured text/graphics editing application include freeform line drawing, template shapes and connectors (i.e., dynamic line objects 5 that connect to and/or between template shapes within a document). The text/graphics editing applications may also include colouring, filling and, layering and grouping options for sets of objects. Freeform line drawing can be used to draw open and closed objects with straight or curved sections by defining a set of points along the path of the object. A closed N-point 10 polygon may be drawn by defining an ordered set of vertices. For example, Fig. 1 shows a generalised line polygon 100 including vertices (e.g., 101) which are represented by black squares on the line polygon 100. Freeform drawn objects may be filled or empty, with a range of possible fill options including solid colours, transparency, blends and patterns. Many commonly used geometric shapes can be created using template shapes. A 15 user may prefer to use a template shape rather than drawing the shape using freeform lines as this option can be faster, more accurate in terms of representation of the desired shape, and easier to edit at a later time. The well known MicrosoftTM AutoShapes set includes a number of examples of template shapes which can be manipulated within editing environments such as MicrosoftTM WordTM and PowerPointTM. Other template shapes may 20 be found in OpenOffice TM editing applications such as the WriterTM and ImpressTM applications. Template shapes are commonly found in office documents, in particular in figures and flow charts. Some example template shapes 405 to 460 are shown in Fig. 4. A range of fill options are generally available including unfilled line objects 405 to 420, solid filled -3 objects of the same colour 425 to 440 or different colour 445 to 460 to the line, transparency, blends or patterned fills. Existing scan-to-editable applications tend to be biased towards processing text and tables and typically do not deal effectively with the processing of figures. Such scan-to 5 editable applications may use optical character recognition (OCR) processing to recognise characters and simple symbols from an image of a document. Many basic scan-to-editable applications simply embed the parts of the image that are not recognised as text or tables as a bitmapped image typically in a compressed format and sometimes at a low resolution. Such basic scan-to-editable applications are clearly disadvantageous to a user as the 10 embedded bitmapped images can not be readily edited using geometric drawing tools, and also as the overall file size can be large. Other applications employ vectorisation methods to identify line objects and solid filled objects. The line objects and solid filled objects may be represented as freeform line drawings in the output rather than instances of specific template shapes. This is 15 disadvantageous to the user as specific editing options defined for a template shape will not be available, limiting the usefulness of a corresponding editable electronic version. Such applications also provide less accurate semantic information regarding the content of a document and may therefore be less useful in database applications that rely on this data. There are a number of known methods for recognising graphical elements. Some of 20 these known methods use global shape features including Fourier descriptors, Curvature Scale Space descriptors, Zernike Moments, Grid Descriptors, Concavity Trees and other features -4 One disadvantage of the above methods is that they generally require the entire graphical element to be visible. In many images, the graphical elements may overlap each other making only part of the graphical element visible. There are a number of other shape recognition methods which use local features to 5 recognise the shapes, and so are considered to be robust to occlusion of the object. The robustness of these other methods to occlusion comes from the fact that the objects can be recognised from just a subset of their local features, without the entire object needing to be visible. However, some graphical elements, such as simple geometric shapes, contain very few identifiable local features are therefore difficult to recognise using these other 10 methods. A need therefore exists for a method of recognising simple geometric shapes which have been occluded by other objects in a scanned image. Summary It is an object of the present invention to substantially overcome, or at least ameliorate, 15 one or more disadvantages of existing arrangements. According to one aspect of the present invention there is provided a method of identifying an occluded known template shape in an image, said method comprising the steps of: identifying at least one object in the image at least partially occluding one or more 20 boundaries of objects underneath the at least one occluding object; extending the boundaries of the objects underneath the at least one occluding object to generate one or more new boundaries; and identifying at least one of the new boundaries as an occluded known template shape.
-5 According to another aspect of the present invention there is provided an apparatus for identifying an occluded known template shape in an image, said apparatus comprising: identifying module for identifying at least one object in the image at least partially occluding one or more boundaries of objects underneath the at least one occluding object; 5 boundary extending module extending the boundaries of the objects underneath the at least one occluding object to generate one or more new boundaries; and template shape identifying module for identifying at least one of the new boundaries as an occluded known template shape. According to still another aspect of the present invention there is provided a computer 10 readable medium, having a program recorded on the mediun, where the program is configured to make a computer execute a process to identify an occluded known template shape in an image, said program comprising: code for identifying at least one object in the image at least partially occluding one or more boundaries of objects underneath the at least one occluding object; 15 code for extending the boundaries of the objects underneath the at least one occluding object to generate one or more new boundaries; and code for identifying at least one of the new boundaries as an occluded known template shape. According to still another aspect of the present invention there is provided a method of 20 creating an editable document from a bitmap image, said method comprising the steps of: identifying at least one visible template shape within the bitmap image; identifying at least one partially occluded template shape within the bitmap image; and -6 creating the editable document containing an editable representation of both the visible template shape and an editable representation of the partially occluded template shape. According to still another aspect of the present invention there is provided an 5 apparatus for creating an editable document from a bitmap image, said apparatus comprising: visible shape identifying module for identifying at least one visible template shape within the bitmap image; occluded shape identifying module for identifying at least one partially occluded 10 template shape within the bitmap iamge; and document creation module for creating the editable document containing an editable representation of both the visible template shape and an editable representation of the parttially occluded template shape. According to still another aspect of the present invention there is provided a 15 computer readable medium, having a program recorded on the mediun, where the program is configured to make a computer execute a process to create an editable document from a bitmap image, said program comprising: code for identifying at least one visible template shape within the bitmap image; code for identifying at least one partially occluded template shape within the bitmap 20 iamge; and code for creating the editable document containing an editable representation of both the visible template shape and an editable representation of the partially occluded template shape. Other aspects of the invention are also disclosed.
-7 Brief Description of the Drawings Some aspects of the prior art and one or more embodiments of the present invention will now be described with reference to the drawings and appendices, in which: Fig. I shows a generalised line polygon; 5 Fig. 2 is intentionally blank; Fig. 3 shows a set of unfilled template shapes; Fig. 4 shows some example template shapes commonly found in documents: Fig. 5(a) shows a pentagon template shape changing as scaling, sx and sy, rotation, 6, and offset, Ax and Ay, affine parameters of the template shape are modified; 10 Fig. 5(b) shows a number of different triangles that may be obtained as the skew parameter of a triangle is modified; Fig. 6 shows a set of example template shapes with one control parameter; Fig. 7 shows an example of a template shape with two control parameters as the parameters are modified; 15 Fig. 8 shows another example of a template shape with two control parameters as the parameters are modified; Fig. 9 shows a rounded rectangle template shape as the scaling of the rounded rectangle template shape is modified; Fig. 10 shows an unfilled hexagon template shape with a set of increasing line 20 thickness parameters from left to right; Fig. 11 is a flowchart showing a method of creating a document comprising a modifiable template shape (i.e., a modifiable closed-form non-textual template shape); Fig. 12 is a flowchart showing a method of analysing graphics regions to identify (or detect) graphical objects within the graphics regions; -8 Fig. 13 is a flowchart showing a method of matching a detected graphical object with a predetermined template shape; Fig. 14 is intentionally blank; Fig. 15 is intentionally blank; 5 Fig. 16 is intentionally blank; Fig. 17 is a flowchart showing a method of determining a set of candidate template shapes for a graphical object; Fig. 18 is a flowchart showing a method of determining a set of parameters for modifying a candidate template shape to match a graphical object; 10 Fig. 19 is a flowchart showing a method of determining optimal control parameter values that transform a template shape to match a graphical object; Fig. 20 is a flowchart showing a method of creating an editable document; Fig. 21 is a flowchart showing a method of extracting non-line objects; Fig. 22 is intentionally blank;Fig. 23 is intentionally blank; 15 Fig. 24 is a flowchart showing a method of determining rotation and scaling parameters for use in modifying a template shape to match a graphical object; Fig. 25 is a schematic block diagram of a general purpose computer upon which arrangements described can be practiced; Fig. 26 is intentionally blank;Figs. 27(a) and (b) show a selection of the MicrosoftTM 20 AutoShapes; Fig. 28 is a flowchart showing a method of identifying overlapping shapes; Fig. 29A shows an opaque rectangle overlapping another rectangle; Fig. 29B shows the rectangles of Fig. 29B with extended boundaries shown; Fig. 30 shows an example of an overlapped shape that is broken into two pieces; -9 Fig. 31A shows a plurality of overlapping objects; Fig. 31 B shows the objects of Fig. 31 A with the extended boundaries shown; Fig. 32 shows the example from Fig. 31 with an example of an invalid pair of extended lines; 5 Fig. 33 shows a rectangular occluding area with six extended boundary lines; Fig. 34 is a flowchart showing a method of generating new boundaries; and Appendix A is a table listing the names of each of the MicrosoftTM AutoShapes of Figs. 27(a) and (b) together with their drawing reference. Detailed Description including Best Mode 10 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. It is to be noted that the discussions contained in the "Background" section and that 15 above relating to prior art arrangements relate to discussions of documents or devices which form public knowledge through their respective publication and/or use. Such should not be interpreted as a representation by the present inventor(s) or patent applicant that such documents or devices in any way form part of the common general knowledge in the art. 20 Methods of creating documents are described below. The described methods may be implemented using a computer system 2500, such as that shown in Fig. 25 wherein the processes of Figs. 1 to 34 may be implemented as software, such as one or more application programs executable within the computer system 2500. In particular, the steps of the described methods are affected by instructions in the software that are carried out - 10 within the computer system 2500. The instructions may be formed as one or more code modules, each for performing one or more particular tasks. The software may also be divided into two separate parts, in which a first part and the corresponding code modules perform the described methods and a second part and the corresponding code modules 5 manage a user interface between the first part and the user. The software may be stored in a computer readable medium, including the storage devices described below, for example. The software is loaded into the computer system 2500 from the computer readable medium, and then executed by the computer system 2500. A computer readable medium having such software or computer program recorded on it is a computer program product. 10 The use of the computer program product in the computer system 2500 preferably affects an advantageous apparatus for implementing the described methods. As seen in Fig. 25, the computer system 2500 is formed by a computer module 2501, input devices such as a keyboard 2502 and a mouse pointer device 2503, and output devices including a printer 2515, a display device 2514 and loudspeakers 2517. An 15 external Modulator-Demodulator (Modem) transceiver device 2516 may be used by the computer module 2501 for communicating to and from a communications network 2520 via a connection 2521. The network 2520 may be a wide-area network (WAN), such as the Internet or a private WAN. Where the connection 2521 is a telephone line, the modem 2516 may be a traditional "dial-up" modem. Alternatively, where the connection 2521 is a 20 high capacity (eg: cable) connection, the modem 2516 may be a broadband modem. A wireless modem may also be used for wireless connection to the network 2520. The computer module 2501 typically includes at least one processor unit 2505, and a memory unit 2506 for example formed from semiconductor random access memory (RAM) and read only memory (ROM). The module 2501 also includes a number of - 12 compatibles, Sun Sparcstations, Apple MacTM or alike computer systems evolved therefrom. Typically, the application programs discussed above are resident on the hard disk drive 2510 and read and controlled in execution by the processor 2505. Intermediate 5 storage of such programs and any data fetched from the networks 2520 and 2522 may be accomplished using the semiconductor memory 2506, possibly in concert with the hard disk drive 2510. In some instances, the application programs may be supplied to the user encoded on one or more CD-ROM and read via the corresponding drive 2512, or alternatively may be read by the user from the networks 2520 or 2522. Still further, the 10 software can also be loaded into the computer system 2500 from other computer readable media. Computer readable media refers to any storage medium that participates in providing instructions and/or data to the computer system 2500 for execution and/or processing. Examples of such media include floppy disks, magnetic tape, CD-ROM, a hard disk drive, a ROM or integrated circuit, a magneto-optical disk, or a computer readable 15 card such as a PCMCIA card and the like, whether or not such devices are internal or external of the computer module 2501. Examples of computer readable transmission media that may also participate in the provision of instructions and/or data include radio or infra-red transmission channels as well as a network connection to another computer or networked device, and the Internet or Intranets including e-mail transmissions and 20 information recorded on Websites and the like. The second part of the application programs and the corresponding code modules mentioned above may be executed to implement one or more graphical user interfaces (GUIs) to be rendered or otherwise represented upon the display 2514. Through manipulation of the keyboard 2502 and the mouse 2503, a user of the computer system - 11 input/output (I/O) interfaces including an audio-video interface 2507 that couples to the video display 2514 and loudspeakers 2517, an I/O interface 2513 for the keyboard 2502 and mouse 2503 and optionally a joystick (not illustrated), and an interface 2508 for the external modem 2516 and printer 2515. In some implementations, the modem 2516 may 5 be incorporated within the computer module 2501, for example within the interface 2508. The computer module 2501 also has a local network interface 2511 which, via a connection 2523, permits coupling of the computer system 2500 to a local computer network 2522, known as a Local Area Network (LAN). As also illustrated, the local network 2522 may also couple to the wide network 2520 via a connection 2524, which 10 would typically include a so-called "firewall" device or similar functionality. The interface 2511 may be formed by an EthernetTM circuit card, a wireless BluetoothTM or an IEEE 802.11 wireless arrangement. The interfaces 2508 and 2513 may afford both serial and parallel connectivity, the former typically being implemented according to the Universal Serial Bus (USB) standards 15 and having corresponding USB connectors (not illustrated). Storage devices 2509 are provided and typically include a hard disk drive (HDD) 2510. Other devices such as a floppy disk drive and a magnetic tape drive (not illustrated) may also be used. An optical disk drive 2512 is typically provided to act as a non-volatile source of data. Portable memory devices, such as optical disks (eg: CD-ROM, DVD), USB-RAM, and floppy disks 20 for example may then be used as appropriate sources of data to the system 2500. The components 2505 to 2513 of the computer module 2501 typically communicate via an interconnected bus 2504 and in a manner which results in a conventional mode of operation of the computer system 2500 known to those in the relevant art. Examples of computers on which the described arrangements can be practised include IBM-PC's and - 13 2500 and the application may manipulate the interface to provide controlling commands and/or input to the applications associated with the GUI(s). The described methods may alternatively be implemented in dedicated hardware such as one or more integrated circuits performing the functions or sub functions of the 5 methods. Such dedicated hardware may include graphic processors, digital signal processors, or one or more microprocessors and associated memories. The term "template shape" as used below refers to a predetermined model that defines the form of a modifiable non-textual shape object with a closed outer boundary within a specified editing or viewing environment. Accordingly, the template shapes 10 described herein are "modifiable closed-form non-textual template shapes." Many template shapes consist of a single closed outer boundary, although some, such as the "can" template shape 420 shown in Fig. 4, include other internal lines. A template shape is specified by a plurality of parameters the interpretation of which is defined within the model. The plurality of parameters can include affine parameters, control parameters and 15 line thickness parameters. The parameters defining a template shape are described in further detail below. Figs. 27(a) and (b) show a selection of MicrosoftTM Autoshapes. Further, Appendix A is a Table listing the names of each of the Microsoft T M AutoShapes of Figs. 27(a) and (b) together with their drawing reference in Figs. 27(a) and (b). 20 The affine parameters of the template shape define modifications to the closed-form non-textual template shape. Such modifications may be described by a linear matrix transform. The modifications include scaling, rotation and offset, and for certain shape classes may also include skew. For scaling of s, and sy along the x- and y-axes respectively, -14 a rotation of 0, and offsets of Ax and Ay along the x- and y-axes respectively, the linear matrix transform may be represented in accordance with Equation (1) below: (-sin9 coso.('s, 0 )(Ax (1) cos0 sin0 0 s, 0 Ay If the transform also includes a skew, c, the matrix transform may be represented in 5 accordance with Equation (2) below: (-sin9 cos0'Ws, 0 I c +(Ax )(2 A= I1. 1+1 (2) cos0 sin0 ' 0 s, 0 1 0 Ay Objects of the template class that differ only in terms of affine parameters may be modified to match using the appropriate matrix transform. Fig. 5(a) illustrates a pentagon template shape 500 changing firstly to the template shape 501, secondly to the template 10 shape 502 and thirdly to the template shape 503, as scaling, sx and sy, rotation, 0, and offset, Ax and Ay, affine parameters of the template shape 500 are modified. Fig. 5(b) shows a number of different triangles 505 to 507 that may be obtained as the skew parameter of the triangle 504 is modified. It is noted that the skew parameter for specific shapes may appear as a control parameter within some user interfaces. However, 15 as described herein, the skew parameter is considered as an affine parameter. Control parameters define further geometric modifications to the template shape that in general cannot be defined in terms of a linear matrix transform of the template shape. Each template shape has a defined set of N control parameters, where N is specified by the model and may be zero In particular, template shapes typically comprise at most four (4) 20 (i.e., four or less) control parameters. However, some template shapes may comprise more than four control parameters. Template shapes may be defined entirely by straight edges (ie. polygons) or curves, or may comprise a mixture of straight edges and curve sections - 15 between a set of vertices. Each control parameter typically modifies a plurality of vertices, a plurality of curve sections, or both a plurality of vertices and curve sections. A closed-form template shape can alternatively be defined by parameters that denote the coordinates of individual vertices of the particular template shape. Still further, a 5 closed-form template shape can be defined by parameters that independently modify each curve section of the template shape. Commonly used curve parameterisation methods are cubic splines and Bezier curves. The advantage of defining template shapes using control parameters that modify more than one vertex and/or curve section is that substantially fewer parameters are required, and the parameters describe modifications better suited to 10 that particular shape. The effect of modifying the control parameters of a template shape is defined by the template model for the template shape. The control parameters may be used for modifying the closed-form non-textual template shapes in a non-affine manner. A set 600 of example template shapes 601 to 624 with one control parameter are illustrated in Fig. 6. Adjacent to 15 each template shape (e.g., 606) is a black square (e.g., 625), the x-coordinate of which represents the value of the control parameter. Fig. 6 includes a set of round rectangles (i.e., 601 to 604), for which the control parameter modifies the radius of curvature of the corners. Fig. 6 also includes trapezoids (i.e., 605 to 608), hexagons (i.e., 609 to 612) and octagons (i.e., 613 to 616) for which the control parameter (e.g., 625) defines the point of 20 intersection of a line on the left side of the template shape with the upper horizontal section. Fig. 6 also includes 16-point seal (i.e., 617 to 620) for which the control parameter (e.g., 626) defines the relative radii of the convex and concave vertices. Finally, Fig. 6 includes partially occluded moon shapes (i.e., 621 to 624) for which the control parameter (e.g., 627) defines the phase of the moon shape.
-16 Fig. 7 shows a set 700 of example template shapes 701 to 716 with two control parameters, namely the arrow. The black squares represent the values of control parameters, in this case the two parameters are represented by the x- and y- coordinates respectively. 5 Similarly, Fig. 8 shows a set 800 of example template shapes 801 to 816 with two control parameters, namely the round callout. Again, the black squares represent the values of control parameters, in this case the two parameters are represented by the x- and y coordinates respectively. Template shapes generally have less control parameters than the number of sections 10 that define the outer boundary of the template shape. For example, the set 600 of example shapes in Fig. 6 are defined in terms of a single control parameter. However the trapezoids (605 to 608) consist of four (4) sections, the hexagons (609 to 612) consists of six (6) sections, the octagons (613 to 616) consist of eight (8) sections, the 16-point seals (617 to 620) consist of thirty two (32) sections and the moons (621 to 624) consist of tow (2) 15 sections. Similarly, the template shapes shown in Figs. 7 and 8 are defined in terms of two (2) control parameters however each template shape consists of more than two (2) sections. Most template shapes in the MicrosoftTM AutoShapes set have four (4) or less control parameters. It is noted that in some cases the scaling parameters may not behave as affine 20 parameters for specific template shapes. For example, as seen in Fig. 9, the corners of a rounded rectangle template shape 910 may retain their form as arcs of a circle while the scaling for the rounded rectangle template shape 910 is modified to form the rounded rectangle shape 920, rather than taking an elliptical form as would be expected with an affine scaling. Such behaviour can be modelled by adding an extra control parameter to the - 17 template shape corresponding to the aspect ratio (i.e., the ratio between the vertical and horizontal scaling parameters) of the template shape. Line thickness parameters simply define the thickness of the lines that define a given template shape. In general there is only one line thickness parameter which defines the 5 uniform thickness of the line for the entire template shape. Fig. 10 shows an unfilled hexagon template shape 1001 with a set of increasing line thickness parameters from left to right on the page. The methods described herein may be implemented using a number of moments, such as the geometric moments, the central geometric moments and the Zernike moments. 10 The (p, q)th order geometric moments are defined in terms of an integral over the area, A, covered by the interior of a given shape object (e.g., a graphical object) in accordance with Equation 3 as follows: M = fxPyq dx dy (3) A where p and q are integers > 0. The geometric moments may be determined in terms of a 15 boundary line integral for speed. The moment Moo represents the area of the shape object and the point (xo, yo) = (MIo / Moo, Mo 1 / Moo) represents its centroid. Central geometric moments are geometric moments of shape objects, for example, that have been translated such that their centroids are located at the origin in accordance with Equation 4 below: 20 mq = f(x -x 0 )p(y -yO ) qdx dy. (4) A Zernike moments are often used in image processing shape recognition processing. Zernike moments have excellent properties in terms of distinguishing shapes using a small number of terms. Zernike moments are defined in terms of a set of basis functions that are - 18 orthogonal over the unit circle. These basic functions are given in accordance with Equation (5) as follows: V,, (r,0) R,(r)e, (5) where: 2 R,(r) E S(k, p,q)rp-2k k=0 Sk q) P+I~}(~P -k! i 0 IqI p, (p - qJ) even S(k, p,q)= -k! p+|q|-k! k -q k 2 2 0 otherwise The Zernike moments are determined in accordance with Equation (6) as follows: Zp = JfrdrdOV,, (r,0)f(r,0) (6). unit circle The methods described below make use of an alternative representation of a shape 10 object which will be referred to as a "normalised shape object". The normalised shape object is based on the original shape object shifted such that the centroid of the shape object coincides with the origin and modified to reduce the effects of rotation and stretching. The normalisation is preferably represented by an affine transformation. Preferably, the general affine normalisation, which is a series of linear transformations to 15 map an arbitrary two dimensional (2D) shape object to its canonical form, is used to perform the normalisation. Specifically, the original shape object is shifted so that the centroid of the shape object is at the origin, stretched along the x and y axes so that the second order moments become I (m2o = m02 = 1), rotated by 45 degrees and then stretched again so that the second order moments are again I (m2o = mo 2 = 1). Alternative -19 normalisation methods may be used, for example based on the principal axis and bounding box of the original shape object. The affine normalisation described above may be represented in terms of the following matrix Equation 7, as follows: 5 = N. , (7) y' y - Ay where (x, y)T and (x', y')T define a particular point in the shape object before and after the transform respectively, (Ax, Ay)T is the location of the centroid of the original shape object, and the normalisation matrix N is defined in terms of the second order central geometric moments using Equation 8, as follows: r 1 (n, + n_) 1 (n. - n_) 10 N 2 m 02 2 (8) 1 (n, -n_) 1 (n, + n_) 2 m 2 where n+ 1+ mi, n m 2 omo 2 iN 2 0 M02 The methods described below may be used to analyse a bitmap image of a document 15 with graphical regions to generate a document with modifiable template shapes and connectors. Many of the described methods may also be applicable to the analysis of hand drawn digital ink inputs, for example, in tablet PCs and whiteboard applications. As digital ink inputs are usually stored in vector form, the vectorisation methods described may not be required.
- 20 Fig. 11 is a flowchart showing a method 1100 of creating a document comprising a modifiable shape (i.e., a closed-form non-textual template shape), according to one embodiment. The method 1100 creates the document by converting an input image with graphical regions into a document with modifiable template shapes and connectors (i.e., 5 dynamic line objects that connect template shapes within a document). The method 1100 may be implemented as software resident on the hard disk drive 2510 and being controlled in its execution by the processor 2505. As shown in Fig. 11, the method 1100 begins in step 1110, where a bitmap image undergoes a low-level image segmentation. In this manner, the bitmap image is segmented 10 by the processor 2505 into one or more regions according to colour. At the next step 1120, the processor 2505 performs a high-level document layout analysis on the segmented regions of the bitmap image to identify regions of various document content types. In the exemplary embodiment, the regions are rectangular and the content types include the following classifications: text, photographs (halftone) and graphical objects. Each of these 15 content types is made up of pixel data. In alternate embodiments other document content types such as table and line-drawing may be included. The classified regions may also be referred to as zones, blocks or regions of interest. The bounding boxes of the regions may overlap. At the next step 1130, the detected graphics regions are further analysed to detect 20 graphical objects within the graphics regions, in accordance with a method 1200 which will be described in more detail below with reference to Fig. 12. Accordingly, at step 1130, the processor 2505 performs the step of analysing graphics regions of the bitmap image to detect bitmap representations of graphical objects and a bitmap representation of a line object.
-21 The method 1100 continues at the next step 1140, where the processor 2505 performs the step of matching each of the detected graphical objects with one of a plurality of predetermined modifiable closed-form non-textual template shapes, as described above, to determine the identities of the individual detected graphical objects. Each template 5 shape may have a finite set of one or more predetermined non-contiguous connection points. As described above, each of the template shapes typically comprises at most four control parameters for modifying the closed-form non-textual template shape in a non affine manner. The number of control parameters of the predetermined modifiable closed form non-textual template shape is typically less than the number of sections making up 10 the modifiable closed-form non-textual template shape. A method 1300 of matching a detected graphical object with a predetermined template shape, as executed at step 1140, will be described in detail below with reference to Fig. 13. The output of the method 1300 is one or more candidate template shapes and associated shape parameters. The method 1100 continues at the next step 1150, where the processor 2505 15 performs the step of identifying any overlapped (or occluded) shapes among the graphical objects. A method 2800 of identifying overlapped shapes, as executed at step 1150, will be described in more detail below with reference to Fig. 28. At the next step 1160, the processor 2505 performs the step of creating an editable version of the document comprising the matched modifiable closed-form non-textual 20 template shapes with any line objects (or connectors) connected thereto. The editable version of the document also comprises any recognised text, document elements, and the in-painted background. A method 2000 of creating an editable document comprising the matched closed-form non-textual template shapes, and other document elements, as executed at step 1160, will be described below with reference to Fig. 20.
- 22 The method 1200 of analysing the graphics regions (i.e., as identified in step 1120) to identify (or detect) graphical objects within the graphics regions, as executed at step 1130, will now be described with reference to Fig. 12. The method 1200 may be implemented as software resident on the hard disk drive 2510 and being controlled in its execution by the 5 processor 2505. The method 1200 employs a loop structure to generate line and solid filled graphical objects from the graphics regions identified in Step 1120. The method 1200 begins at step 1210, where the processor 2505 selects a segmentation colour mask/layer with graphics regions for processing. Then at the next step 10 1220, the processor 2505 extracts both open and closed line objects as vectors from the colour layer. An open line object consists of one or more connected line segments with two unconnected ends. A closed line object consists of a number of connected line segments that form a closed polygon. Preferably a line segment is a straight line. In alternate embodiments a line segment may be a curve. Any suitable method of extracting open and 15 closed line segments, such as vectorisation techniques, may be used at step 1220. The colour layer is further processed at step 1230 to extract non-line objects such as filled shapes. The extracted filled shapes are preferably represented as polygon objects. A method 2100 of extracting non-line objects, as executed at step 1230, will be described in more detail below with reference to Fig. 21. At the next step 1240, if there are any more 20 colour layers the method 1200 returns to Step 1210, where the next colour layer is selected and processed. Otherwise, the method 1200 concludes. The method 1300 of matching a detected graphical object with a predetermined template shape, as executed at step 1140, will now be described with reference to Fig. 13. The method 1300 may be implemented as software resident on the hard disk drive 2510 - 23 and being controlled in its execution by the processor 2505. The method 1300 employs a loop structure to select a best matched template shape for each detected graphical object. The method 1300 begins at step 1310, where the processor 2505 selects a next detected graphical object for processing. Then at the next step 1320, a set of candidate 5 template shapes for the graphical object is determined using a machine learning classifier. A method 1700 of determining a set of candidate template shapes for a graphical object, as executed at step 1320, will be described in more detail below with reference to Fig. 17. A second loop structure is employed in the method 1300 to process all selected candidate template shapes in turn to identify the best matching template shape for the 10 current graphical object. At step 1330 a next candidate template shape is selected, and then in step 1340, the set of shape parameters of the candidate template shape that modifies the candidate template shape to best match the current graphical object and a match score that quantifies how well the graphical object and the modified template shape match each other are determined. A method 1800 of determining a set of parameters for modifying a 15 candidate template shape (i.e., a modifiable closed-form non-textual template shape) to match a graphical object as executed at step 1340 will be described in more detail below with reference to Fig. 18. From Step 1350, the method 1300 returns to step 1330 if there are more candidate template shapes to be analysed. Otherwise, the method 1300 continues at step 1360, where 20 the candidate template shape with the highest matching score to the current graphical object is selected. Then at step 1370, if that score is greater than a predetermined threshold for shape recognition, then the method 1300 proceeds to step 1380. If the score is greater than the predetermined threshold, the candidate template shape selected at step 1360 with associated shape parameters is stored in memory 2506 for output at step 1380, then the - 24 method 1300 continues to step 1390. Otherwise, processing continues directly to step 1390 from step 1370. At step 1390, if there are any more graphical objects to be processed, then the method 1300 returns to step 1310. Otherwise, the method 1300 is complete. 5 The method 1700 begins at step 1710, where the processor 2505 determines a normalised shape object of a current graphical object. At step 1720 the processor 2505 extracts a set of normalised shape feature values from the normalised shape object. These feature values may be based on simple moments, Fourier descriptors, or simple radial distance functions. 10 Then at step 1730, a current normalised shape feature vector is analysed using a previously trained machine learning classifier to generate candidate template shapes. The classifier is preferably trained using the Support Vector Machine (SVM) algorithm. In alternate embodiments other machine learning algorithms may be implemented for training and classification. Examples of suitable machine learning algorithms may include artificial 15 neural networks, k-nearest neighbour and decision tree. Optionally, step 1730 of the method 1700 may be followed by step 1740 to improve the classification rates. Step 1740 uses a confusion matrix generated by the classifier to rationalise the set of candidate template shapes. The confusion matrix specifies the likelihood that a given template shape may be confused with (or misclassified as) another 20 template shape. If a candidate template shape shares a high confusion likelihood with another template shape, then the latter template shape is also selected as a candidate template shape for further processing. The method 1800 of determining a set of parameters for modifying a candidate template shape to match a graphical object, as executed at step 1340, will be described in -25 more detail below with reference to Fig. 18. The method 1800 determines a set of transform parameters that optimally modifies the candidate template shape to match the graphical object. The transform parameters preferably consist of two scaling parameters s, and sy, two offset parameters, Ax and Ay, a rotation angle, and, depending on the graphical 5 object, some additional control parameters. The method 1800 may be carried out using sets of features or descriptors of the graphical object and its normalised form such as moments. In the exemplary embodiment geometric, central geometric and Zernike moments of the normalised graphical object are used to estimate the template shape parameters. At step 1810, if the processor 2505 determines that the template shape being matched 10 is modifiable by at least one control parameter, then the method 1800 proceeds to step 1840. Otherwise, the method 1800 proceeds to step 1820. At step 1820, if the processor 2505 determines that the template shape has a shearing parameter, then the method 1800 proceeds to step 1830. Otherwise, the method 1800 proceeds to step 1850. At step 1830, the processor 2505 determines the affine transform parameters for a 15 template shape with a skew parameter by specifying a set of possible scaling, rotation and skew parameters for the graphical object. Preferably, at step 1830, a set of potential rotation parameters for the normalised template shape is determined, and then a matrix equation is solved in terms of the four unknown parameters that define the scaling in x and y- axes (s, and sy), the rotation (6) and the skew control parameter, c of the template 20 shape respectively. If the normalised template shapes are rotationally symmetric and the order of symmetry of this normalised template shape is k, the set of possible normalised space rotation angles on may be determined by comparing the Fourier phases of the normalised shape and a normalised template shape. The Fourier phase of a given shape is given by Equation 9: - 26 Arg( fek(cosa+isina)r da drj k where A is the area covered by the shape. The angles On are then given by Equation 10: 5 # = (A') - D(AT')+2;n /k (10) where A' is the area of the normalised shape, AT is the area of the normalised template shape, and n is an arbitrary integer in the range {0,..., k-I). If the normalised template 10 shape is not symmetric then alternative rotation methods may be used such as those described below. For each value of the angle n, the following matrix equation can be solved in terms of the four unknown parameters that define the scaling in x- and y- axes (sx and sy), the rotation (0) and the skew control parameter, c in accordance with matrix Equation 11: 15 C sinG -cos0 )(s, 0 1 c N -sin#, -cos#( cos0 sin0 0 s, 0 1) (cos#, sin# where N is the affine normalisation matrix of the template shape. A set of k potential affine transform parameter sets corresponding to the k possible values of the angle on are found. 20 In the exemplary embodiment, solutions which are outside the valid range for the parameters are removed, while the rest are passed on to step 1860.
- 27 Parameter estimation for shapes with control parameters is performed in step 1840. A method 1900 of determining optimal control parameter values that transform a template shape to match a graphical object, as executed at step 1840, will be described in further detail with reference to Fig. 19. 5 At the next step 1850, a set of potential rotation and scaling parameters are determined for the template shape. A method 2400 of determining rotation and scaling parameters for use in modifying a template shape to match a graphical object, as executed at step 1850, will be described in detail below with reference to Fig. 24. The method 1800 continues at the next step 1860 where the x- and y-offsets of the 10 graphical object, (Ax,Ay), are determined for each set of estimated parameters from previous processing steps. In particular, at step 1860, the processor 2505 determines the centre of mass of the graphical object and shifts the template shape so that the centre of mass of the template shape is in the same location as the graphical object. The method 1800 then continues to step 1870, at which a score for each possible set 15 of parameters is determined. The score is a measure of how well the graphical object matches the template shape for the given set of parameters. In the exemplary embodiment, the score,f, is determined in accordance with Equation 1 IA, as follows: f 2A, (11A) , + A' where A 2 ,, is the area of intersection of the template shape and the graphical object, and A, 20 and As are the areas of the template shape and the graphical object, respectively. In alternative embodiments other distance metrics may be used such as the Hausdorff distance, and the average square distance between the boundaries. The method 1800 concludes at the next step 1880, where the processor 2505 determines the set of parameters having the highest score.
- 28 Returning to step 1840, the best parameter set is determined to be the parameter set with the highest match score. This match score is then passed back for use in step 1360 for comparing the candidate template shape to the other candidate template shapes. The method 1900 of determining optimal control parameter values that transform a 5 template shape to match a graphical object, as executed at step 1840, will now be described in detail with reference to Fig. 19. The method 1900 may be implemented as resident on the hard disk drive 2510 and being controlled in its execution by the processor 2505. The method 1900 begins at step 1910, where a set of descriptors is determined for the graphical object. This can be any set of shape features that can be represented as a 10 function of the graphical object control parameters. In the exemplary embodiment, the Zernike moments of the graphical object are used, but other descriptors such as Fourier descriptors, central geometric moments, or more specific features such as the boundary length, or the location of identifiable features such as corners may be used, as well as any combination of different types of features. 15 In step 1920 the descriptors of the graphical object are compared with those of the template shape. A distance between the template shape descriptors for a given set of control parameters and the graphical object descriptors is defined. In the exemplary embodiment this distance is the sum of the squares of the differences between the graphical object descriptors and the corresponding template shape descriptors. The value of this 20 distance measure is a function of the control parameters for the graphical object. If there are N control parameters then the distance measure defines an N-dimensional function. Estimates of the control parameters can be determined by finding the minima of this function, typically using function minimisation methods.
- 29 The method 2000 of creating an editable document comprising the matched closed form non-textual template shapes and connectors (i.e., line objects that connect to and/or between template shapes within a document), and other document elements, as executed at step 1160, will now be described with reference to Fig. 20. The method 2000 may be 5 implemented as software resident on the hard disk drive 2510 and being controlled in its execution by the processor 2505. The method 2000 begins at the first step 2010, where the processor 2505 opens a document file in memory 2506 for writing and prepares the document file for entering the matched closed-form non-textual template shapes. At the next step 2020, the background 10 image is inpainted. Inpainting removes the recognised text and shapes from the original image. Pixels which are part of a shape or recognised as text are replaced with the surrounding background colour. At the next step 2030, this inpainted background image is optionally written to the document file, to serve as the background of the document. This ensures any objects not recognised, which may include things such as photographic 15 images, are still visible in the document. In step 2040, the matched template shapes and classified straight and elbow connectors are written to the document file with the corresponding parameters. The connectors are output as connecting to the template shapes they have been recognised as connecting to. At step 2050, any remaining line objects are output as lines to the document file. Then at the next step 2060, the text and tables 20 recognised earlier are added to the document file. The method 2000 concludes at the next step 2070 where the document is complete and the document file is closed. The method 2100 of extracting non-line objects from a colour layer, as executed at step 1230, will now be described with reference to Fig. 21. The method 2100 may be - 30 implemented as software resident on the hard disk drive 2510 and being controlled in its execution by the processor 2505. The method 2100 begins at the first step 2110, where the outside boundary of the non-line object to be extracted is determined. Step 2110 may be performed by starting at a 5 point of the object known to be on the boundary of the object, such as the first object pixel in raster order. Then the boundary of the non-line object is followed by moving from each boundary pixel to the next eight (8)-connected pixel in a clockwise fashion. Once the starting point is reached again the outside boundary of the non-line object is complete. At the next step 2120, a tree of critical points is generated for the non-line object to 10 be extracted. First a pair of starting points is found. The first starting point is the furthest point from the centre of the non-line object to be extracted, and the second is the furthest point on the boundary of the non-line object from the first point. This defines a simple polygon of two lines, one starting at the first point and ending at the second, and the other starting at the second point and ending at the first. Each line represents a summary of a 15 section of the boundary of the non-line object to be extracted, where the section of boundary is made up of the boundary points found by moving between the start and the end of the line in a clockwise direction. Each line is then recursively split into two more lines, until a minimum line length is reached. In one embodiment the minimum line length is four (4) pixels. The splitting point used in the recursive splitting operation is the furthest 20 point from the line on the section of boundary that line represents. Both end points of each line are therefore on the boundary of the non-line object, and each line represents a section of the boundary of the non-line object to be extracted. All of the lines formed during step 2120 are stored in memory 2506 and are represented in a tree structure, where each line is a parent of the two lines that the line is split into.
-31 At the next step 2130 a measure of significance is given to each line in the tree. In one embodiment the significance is defined as the length of the line divided by the distance of the furthest point on the section of the boundary of the object that line represents from the line. In one embodiment, the distance of the furthest point is increased to a minimum 5 value if the distance is too low. In one embodiment this minimum value is a distance of one (1) pixel. The method 2100 concludes at the next step 2140, where the dominant lines are written to a list configured within memory 2506. The dominant lines are those which have a higher significance than all the lines underneath them in the tree. An ordered set of 10 dominant lines is formed which represents the entire boundary of the object in the form of a polygon, and so the polygon creation step 1230 is complete. The method 2400 of determining rotation and scaling parameters for use in modifying a template shape to match a graphical object, as executed at step 1850, will now be described with reference to Fig. 24. The method 2400 estimates the scaling parameters 15 (s, and sy) and rotation, 6, in more detail. These parameters may be estimated using sets of features of a current graphical object. In the exemplary embodiment, the scaling parameters are estimated using combinations of central geometric moments that are invariant to rotation. Let (mOPm20,mo 2 ) and (HiOi20o2) denote the sets of central geometric moments of the untransformed shape template and graphical object, 20 respectively. The scaling parameters, denoted by s,, and sy, are determined in accordance with Equations 12 and 13: ino =\ s is Mno (12)
N
20 +io 2 = (s.m 2 o +s mo 2 ) (13) -32 At step 2410, two pairs of solutions for the absolute values of the scaling parameters that satisfy the Equations (12) and (13), are determined in accordance with Equations 15, 16, 17 and 18: 2o +1 2 + J(m~ +im 2
)
2 -4K 4 m 2 0 m 0 2 (15) 5 s - K (16) 2502 -(7 2 0 +rmo 2 )2 -4K 4 m 2 0 mo 2 S 1 =K, (17) 2Km2, s =|s2 K (18) where K = mo moo Once the two pairs of solutions are found for the scaling parameters, at the next step 1o 2420 the processor 2505 determines values for the rotation angle. In the exemplary embodiment, fourth order Zernike moments are used to determine the base rotation angles. Zernike moments are complex (comprising a real part and an imaginary part) shape descriptors which may be used for shape detection. Fourth order Zernike moments may be expressed in terms of zeroth, second and fourth order central 15 geometric moments in accordance with Equations 19 and 20: z 4 4 =5[(m40-6m2 + m 04 )+4i(mB - M 3 1 ) (19) z 4 2 = 5[(4m40 -4mO 4 -3m 2 O +3mo 2 )+2i(3m 1 - 4m, 3 -4m 3 )] (20) where i = f .
-33 Let mpq denote the central geometric moments of the untransformed template shape, let m' denote those of the template shape after scaling along the x- and y-axis by sx and sy respectively, and let Ii, denote those of the graphical object. Similarly let z', and Y4n, n = 2, 4, denote the fourth order Zernike moments of the scaled template shape and the 5 graphical object respectively. In the exemplary embodiment, the rotation angles used are the roots of Equation 21: ao +a, cos 20 +a 2 cos 2 20 + a 3 cos 3 20 +a 4 cos 4 20 (21) where ao =A 2
-C
2 10 a, =2(AB-CD) a 2
=B
2
+C
2 -D2 + 2AE a 3 = 2(CD + BE) a 4 =D2 + E 2 A = -8(-z'4,zY 4 4 , + Z4r 2 4 4 ) 15 B = 4(Z' 2 r 42
-Z'
2 i, 42 r) E = -2A C = 4(z' 2 iz 42 i + Z, 2 r) 42 r) D = 16(z 4 44 + Z' 4 ,z 44 ,) and 20 Z,,r = Re[z',] z',W = Im1z'] Z4nr = Re[z4,,] - 34 Y4,= Im[4,] Equation 21 may be derived by finding the local minima of Equation 22: err =|lZ4 - z 4 4 1l2 +|z' - z 42 , (22) 5 using the relationship between the moments of a shape and the rotation of the shape in accordance with Equations 23, 24, 25 and 26: m', = sXS sfsm,, (23) 00 = M, (24) mLo c " C2 -2cs s2 'in' 2 i =CS C 2
-S
2 -Cs m (25) S 2 2 i i 0 2 s 2cs C 'M 0 2, i 4 'c 4 - 4c's 6c 2 s 2 -4cs 3 s 4 m4' "i7 31 Cs C 2
(C
2 -3s 2 ) -3cs(C 2 -s 2 ) s 2 (3c 2 -s 2 ) -CS 3
M
3 10 in 22 = C 2 s 2 2cs(C 2 - S2) -6C 2 s 2 -2CS(c 2 -S2) C 2 s 2 m' 2 (26) 5i, 3
CS
3 s 2 (3C2 _ S 2 ) 3cs(c 2 -s 2 ) C 2 (C2 -3S 2 ) - c i 3 i s 4 4Cs 3 6C 2
S
2 4cs c 4 , m 4 i' 04 464 0 where c=cos9 and s=sinO. The solutions of Equation 21 give base rotation angles for 0 for each of the solutions for the absolute values of the scaling parameters. For each value of 0 there are then up to four solutions added corresponding to the four solutions for the signed scaling parameters: IS {sx, Sy}, {SX, -sy}, {-sx, Sy}, {-sx,-sy}. Noting that taking the negative of both sx and sy is the same as a one-hundred and eighty (180) degree rotation, the options may be written as {sx, Isyl, 0), -35 {Sx, |sy|, 0 + 7E}, {sx, -Isyl, 0}, {sx, -jSy|, 0 + X}. 5 For template shapes with x or y symmetry, the negatives of sx and sy have no effect on the template shape so those possibilities may be ignored. Also, template shapes with one-hundred and eighty (180) degree rotational symmetry do not need to consider the rotated possibilities. Template shapes with both sorts of symmetry only need one solution possibility for each base angle. 10 The method 2400 concludes at the next step 2430, where all of the solutions for each value of 0, as described above, are added to a list. The best solution will be decided in step 1870 based on the fit scores. The method 2800 of identifying overlapping shapes, as executed at step 1150, will now be described below with reference to Fig. 28. The method 2800 may be implemented 15 as software resident on the hard disk drive 2510 and being controlled in its execution by the processor 2505. The method 2800 begins at step 2810, where the processor 2505 selects a group of similarly coloured graphical objects from the graphical objects detected at step 1130. Objects of a particular colour are preferably processed at the same time, as different 20 objects of the same colour are more likely to be part of a single underlying shape that has been separated into multiple parts by occluding objects. For example. Fig. 30 shows an underlying triangle that has been split into two pieces 3003 and 3004 by an opaque occluding rectangle 3002. Preferably, objects which were not matched with one of the template shapes at step 1140 are selected for overlap processing at step 2810. Objects - 36 which were already matched with a template shape at step 1140 are more likely to be the shape that they were matched with rather than be part of an overlapped shape. However, in the exemplary embodiment. shapes which were not confidently matched with an object at step 1140, and very simple shapes like triangles, are preferably processed at step 2810, 5 since visible sections of overlapped objects are very often triangular. For example, as seen in Fig. 30, the piece 3003 of the overlapped triangle 3001 is also itself a triangle. In the next step 2820, the processor 2505 performs the step of identifying boundaries between the group of similarly coloured objects selected at step 2810 and at least one occluding object in the image. Such boundaries represent areas where the boundaries of an 10 overlapped object at least partially follow the boundaries of an occluding object. The occluding object is at least partially occluding one or more boundaries of overlapped objects underneath the occluding object. For example, Fig. 29A shows an opaque rectangle 2910 overlapping a rectangle 2920. The rectangle 2910 is considered to be an occluding object and the visible area 2921 of the rectangle 2920 is considered to be a 15 potentially overlapped object. The rectangles 2910 and 2920 share a section of boundary 2930 shown by dotted line in Fig. 29B. The section of boundary 2930 is created by the presence of the overlapping rectangle 2910, rather than by being part of the boundary line of the rectangle 2920. The section of boundary 2930 is important to identify, as the section of boundary 2930 is a section that is to be replaced on the object 2920. 20 In the next step 2830, the processor 2505 performs the step of generating one or more new boundaries. The new boundaries are generated by extending the boundaries of the overlapped objects underneath at least one occluding object. A method 3400 of generating new boundaries will now be described with reference to Fig. 34. The method - 37 3400 may be implemented as software resident on the hard disk drive 2510 and being controlled in its execution by the processor 2505. The method 3400 begins at step 3401, where the processor 2505 performs the step of extending sections of boundary lines that meet the boundary of the at least one occluding 5 object. The extended boundaries are the boundaries of the objects that are at least partially underneath the at least one occluding object. Referring again to Fig. 29B, a section of boundary line 2940 and a section of boundary line 2950, show the direction of the boundary of the rectangle 2920 at the location that the boundary of the rectangle 2920 meets the rectangle 2910. In the example of Fig. 29B, the polygon generated to represent 10 the rectangle 2920 provides an accurate and robust estimate of the direction of the boundary of the rectangle 2920 where the boundary of the rectangle 2920 meets the rectangle 2910. Once the direction of a boundary at the location where the boundary meets another boundary is found, lines are created which extend underneath the occluding object. These lines follow the direction of the boundaries where the boundaries met the occluding 15 objects, and are extended until they are no longer covered by the occluding objects. Lines are created for every place that one of the group of objects of the same colour meets one of the occluding objects. A more complicated example of a set of extended lines that might be generated at step 2830 is shown in Figs. 31A and 31B. Fig. 31A shows original objects 3100, 3101, 20 3102 and 3103, where the objects 3100 and 3103 are opaque so as to occlude objects 3101 and 3102, respectively. In the example of Fig. 31A, the objects 3100 and 3103 are currently being processed as potentially overlapping objects. Fig. 31B shows the objects 3100, 3101, 3102 and 3103 with extended lines shown as dotted lines.
-38 The method 3400 continues at the next step 3403, where the processor 2505 identifies intersections between the extended boundary lines. For example, Fig. 33 shows a rectangular occluding area 3300. The rectangular occluding area 3300 has six extended boundary lines 3310, 3320, 3330, 3340, 3350 and 3360 over the area 3300. Each of the 5 extended boundary lines 3310, 3320, 3340, 3350 and 3360 is shown by a dotted line, with a thick black line over part of each line. Each of the lines 3310, 3320, 3340, 3350 and 3360 also has a small arrow at the start of each overlapped line representing which side of the corresponding line the boundary of a potential overlapped object is on. In the exemplary embodiment, any two particular extended boundary lines are 10 considered for intersection of each other if the side of each of the lines that an overlapped object is on, matches. For example, line 3310 and 3330 do not match, as the overlapped object is on different sides of those lines 3310 and 3330 as indicated by the small arrow on each of the lines 3310 and 3330. As such, connecting the lines 3310 and 3330 does not lead to a consistent interpretation of where an overlapped shape would be underneath the 15 occluding area 3300. In the exemplary embodiment, when a line has multiple acceptable intersections, the intersection closest to an origin of the line is selected. For example, as seen in Fig. 33, the boundary line 3350 is intersected by the line 3340 and the line 3330 at intersection points 3351 and 3352, respectively. The intersection point 3351 is closest to the origin of the line 20 3350 and is therefore selected. Once the processor 2505 identifies the intersections between the extended lines, at the next step 3405, the boundaries of the objects are reconnected in intersecting pairs. Also at step 2505, the boundaries of the objects are extended underneath the occluding shapes following the extended lines to where the extended lines intersect, in order to -39 generate one or more new boundaries. If a particular extended boundary line representing part of a potentially overlapped object, does not intersect with any other suitable extended boundary lines, then an original boundary for that part of the potentially overlapped object is kept. 5 The method 2800 continues at the next step 2840, where the processor 2505 performs the step of identifying at least one of the new boundaries as an occluded known template shape. In order to identify which of the newly generated boundaries represents an occluded known template shape, shape recognition as in method 1300 described above is applied to each of the reconnected objects. If one of the newly generated boundaries is 10 identified as a known template shape, then the newly generated boundary is accepted and the newly generated boundary is stored in memory 2506 or on the hard disk drive 2510. Otherwise. the newly generated boundary is discarded and corresponding original objects are restored. The identified known template shapes stored in memory along with corresponding occluding obects may be contained in the document created in accordance 15 with the method 1100. As seen in Fig. 28, if the processor 2505 determines that there are groups of similarly coloured objects which have not been processed, then the method 2800 returns to step 2810, where another group of similarly coloured graphical objects is selected from the graphical objects detected at step 1130. Otherwise, the method 2800 continues to step 20 2860. At step 2860, if no new overlapped objects have been recognised, then method 2800 concludes. Otherwise, the method continues to step 2870, where the newly recognised objects are added to the list of potential occluding objects. This is to deal with cases such as that shown in Fig. 32.
- 40 Fig. 32 shows a grey trapezoid 3200, occluded by an opaque black hexagon 3201, which is itself occluded by an opaque grey crescent 3202. The parts of the black hexagon 3201 occluding the trapezoid 3200 will not be listed as potential occluding objects, as they do not form a recognisable shape. However, after the black hexagon 3201 is reconstructed 5 and recognised, the black hexagon 3201 then becomes possible to recognise the grey trapezoid 3200. After the newly recognised objects are added to the occluding objects list in step 2870, the processor 2505 then returns to step 2810. The template shapes used in the described methods may be one of the template 10 shapes defined by the MicrosoftTM AutoShape application. The template shapes may also be one of the template shapes defined by the OpenOffice.org editing applications such as WriterTM and ImpreSSTM . Further, the template shapes may also be one of the template shapes defined by the VISIOTM editing application. Still further, the template shapes may also be one of the template shapes defined by the Smart Draw editing application 15 developed by SmartDraw.com. Industrial Applicability It is apparent from the above that the arrangements described are applicable to the computer and data processing industries). The foregoing describes only some embodiments of the present invention, and 20 modifications and/or changes can be made thereto without departing from the scope and spirit of the invention, the embodiments being illustrative and not restrictive. In the context of this specification, the word "comprising" means "including principally but not necessarily solely" or "having" or "including", and not "consisting only -41 of'. Variations of the word "comprising", such as "comprise" and "comprises" have correspondingly varied meanings.
-42 Appendix A TABLE 1 SHAPE NAME REFERENCE Rectangle 27001 Round Rectangle 27002 Ellipse 27003 Diamond 27004 Isosceles Triangle 27005 Right Triangle 27006 Parallelogram 27007 Trapezoid 27008 Hexagon 27009 Octagon 27010 Plus Sign 27011 Star 27012 Arrow 27013 Thick Arrow 27014 Home Plate 27015 Balloon 27016 Seal 27017 Plaque 27018 Chevron 27019 Pentagon 27020 Seal8 27021 Seal16 27022 Seal32 27023 Wedge Rectangle Callout 27024 Wedge Rrect Callout 27025 Wedge Ellipse Callout 27026 Wave 27027 Left Arrow 27028 Down Arrow 27029 Up Arrow 27030 Left Right Arrow 27031 Up Down Arrow 27032 Irregularseal1 27033 Irregularseal2 27034 Lightning Bolt 27035 Heart 27036 Quad Arrow 27037 Left Arrow Callout 27038 Right Arrow Callout 27039 Up Arrow Callout 27040 Down Arrow Callout 27041 Left Right Arrow Callout 27042 Up Down Arrow Callout 27043 Quad Arrow Callout 27044 Left Up Arrow 27045 - 43 Bent Up Arrow 27046 Bent Arrow 27047 Seal24 27048 Notched Right Arrow 27049 Block Arc 27050 Circular Arrow 27051 U Turn Arrow 27052 Flow Chart Process 27053 Flow Chart Decision 27054 Flow Chart Input Output 27055 Flow Chart Document 27056 Flow Chart Terminator 27057 Flow Chart Preparation 27058 Flow Chart Manual Input 27059 Flow Chart Manual Operation 27060 Flow Chart Connector 27061 Flow Chart Punched Card 27062 Flow Chart Punched Tape 27063 Flow Chart Extract 27064 Flow Chart Merge 27065 Flow Chart Online Storage 27066 Flow Chart Magnetic Tape 27067 Flow Chart Display 27068 Flow Chart Delay 27069 Flow Chart Alternate Process 27070 Flow Chart Off Page Connector 27071 Left Right Up Arrow 27072 Moon 27073 Seal4 27074 Double Wave 27075 Cube 27076 Can 27077 Donut 27078 Ribbon 27079 Ribbon2 27080 No Smoking 27081 Folded Corner 27082 Bevel 27083 Striped Right Arrow 27084 Vertical Scroll 27085 Horizontal Scroll 27086 Curved Right Arrow 27087 Curved Left Arrow 27088 Curved Up Arrow 27089 Curved Down Arrow 27090 Cloud Callout 27091 Ellipse Ribbon 27092 Ellipse Ribbon 2 27093 Flow Chart Predefined Process 27094 Flow Chart Internal Storage 27095 Flow Chart Multidocument 27096 Flow Chart Summing Junction 27097 -44 Flow Chart Or 27098 Flow Chart Collate 27099 Flow Chart Sort 27100 Flow Chart Offline Storage 27101 Flow Chart Magnetic Disk 27102 Flow Chart Magnetic Drum 27103 Sun 27104
Claims (24)
1. A method of identifying an occluded known template shape in an image, said method comprising the steps of: 5 identifying at least one object in the image at least partially occluding one or more boundaries of objects underneath the at least one occluding object; extending the boundaries of the objects underneath the at least one occluding object to generate one or more new boundaries; and identifying at least one of the new boundaries as an occluded known template 10 shape.
2. The method according to claim 1, further comprising the step of creating a document containing the known template shape along with the occluding object. 15
3. The method according to claim 1, wherein the image is a bitmap image.
4. The method according to claim 1, wherein the known template shape comprises at most four control parameters. 20
5. The method according to claim 1, wherein the known template shapes comprises line thickness parameters.
6. The method according to claim 1, wherein the identified template shape is one of the Microsoft AutoShapes. - 46
7. The method according to claim 2, wherein the identified template shape is one of the template shapes defined by the OpenOffice Tm application. 5
8. The method according to claim 2, wherein the identified template shape is one of the template shapes defined by the VISIOTM application.
9. The method according to claim 12 wherein the template shape is one of the template shapes defined by the SMART DRAW Tm application. 10
10. The method according to claim 2, wherein the known template shape further comprises affine parameters.
11. An apparatus for identifying an occluded known template shape in an image, 15 said apparatus comprising: identifying module for identifying at least one object in the image at least partially occluding one or more boundaries of objects underneath the at least one occluding object; boundary extending module extending the boundaries of the objects underneath 20 the at least one occluding object to generate one or more new boundaries; and template shape identifying module for identifying at least one of the new boundaries as an occluded known template shape. -47
12. A computer readable medium, having a program recorded on the mediun, where the program is configured to make a computer execute a process to identify an occluded known template shape in an image, said program comprising: code for identifying at least one object in the image at least partially occluding 5 one or more boundaries of objects underneath the at least one occluding object; code for extending the boundaries of the objects underneath the at least one occluding object to generate one or more new boundaries; and code for identifying at least one of the new boundaries as an occluded known template shape. 10
13. A method of creating an editable document from a bitmap image, said method comprising the steps of: identifying at least one visible template shape within the bitmap image; identifying at least one partially occluded template shape within the bitmap image; 15 and creating the editable document containing an editable representation of both the visible template shape and an editable representation of the partially occluded template shape. 20
14. The method according to claim 13, wherein a visible part of the editable representation of the partially occluded template shape matches a visible part of the partially occluded template shape, to within a predetermined threshold.
15. The method according to claim 13, further comprising the steps of: -48 identifying object boundaries; identifying at least one object as a potentially occluding object; extending the boundaries of objects underneath the at least one potentially occluding object; and 5 identifying at least one of the extended boundaries as a template shape to within a predetermined threshold.
16. The method according to claim 13, wherein the visible template shape is one of a 10 plurality of predetermined modifiable closed-form non-textual template shapes.
17. The method according to claim 13, wherein the partially occluded template shape is one of a plurality of predetermined modifiable closed-form non-textual template shapes. 15
18. The method according to any one of claims 16 or 17, wherein the templates shapescomprise control parameters for modifying the closed-form non-textual template shape in a non-affine manner.
19. The method according to any one of claims 18, wherein the number of control 20 parameters of the predetermined modifiable closed-form non-textual template shape is less than a number of sections making up the modifiable closed-form non-textual template shape. - 49
20. An apparatus for creating an editable document from a bitmap image, said apparatus comprising: visible shape identifying module for identifying at least one visible template shape within the bitmap image; 5 occluded shape identifying module for identifying at least one partially occluded template shape within the bitmap iamge; and document creation module for creating the editable document containing an editable representation of both the visible template shape and an editable representation of the parttially occluded template shape. 10
21. A computer readable medium, having a program recorded on the mediun, where the program is configured to make a computer execute a process to create an editable document from a bitmap image, said program comprising: code for identifying at least one visible template shape within the bitmap image; 15 code for identifying at least one partially occluded template shape within the bitmap iamge; and code for creating the editable document containing an editable representation of both the visible template shape and an editable representation of the partially occluded template shape. 20
22. A method of identifying an occluded known template shape in an image, said method being substantially as herein before described with reference to any one of the embodiments as that embodiment is shown in the accompanying drawings. -50
23. An apparatus for identifying an occluded known template shape in an image, said apparatus being substantially as herein before described with reference to any one of the embodiments as that embodiment is shown in the accompanying drawings. 5
24. A computer readable medium, having a program recorded on the mediun, where the program is configured to make a computer execute a process to create an editable document from a bitmap image, said program being substantially as herein before described with reference to any one of the embodiments as that embodiment is shown in the accompanying drawings. 10 DATED this the Twentieth Day of December 2007 CANON KABUSHIKI KAISHA Patent Attorneys for the Applicant SPRUSON&FERGUSON
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| AU2007254666A AU2007254666A1 (en) | 2007-12-24 | 2007-12-24 | Recognition of overlapping shapes from document images |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| AU2007254666A AU2007254666A1 (en) | 2007-12-24 | 2007-12-24 | Recognition of overlapping shapes from document images |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| AU2007254666A1 true AU2007254666A1 (en) | 2009-07-09 |
Family
ID=40873543
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| AU2007254666A Abandoned AU2007254666A1 (en) | 2007-12-24 | 2007-12-24 | Recognition of overlapping shapes from document images |
Country Status (1)
| Country | Link |
|---|---|
| AU (1) | AU2007254666A1 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104933448A (en) * | 2015-07-14 | 2015-09-23 | 四川大学 | Curve matching algorithm independent from position and scale in image identification |
-
2007
- 2007-12-24 AU AU2007254666A patent/AU2007254666A1/en not_active Abandoned
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104933448A (en) * | 2015-07-14 | 2015-09-23 | 四川大学 | Curve matching algorithm independent from position and scale in image identification |
| CN104933448B (en) * | 2015-07-14 | 2018-09-18 | 四川大学 | The curve matching algorithm unrelated with Location Scale in a kind of image recognition |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| AU2006252025B2 (en) | Recognition of parameterised shapes from document images | |
| US7991233B2 (en) | Method and apparatus for dynamic connector analysis | |
| Kasturi et al. | Document image analysis: A primer | |
| EP1999688B1 (en) | Converting digital images containing text to token-based files for rendering | |
| US8849032B2 (en) | Shape parameterisation for editable document generation | |
| US20090016605A1 (en) | System and method for creating an editable template from a document image | |
| Hase et al. | Character string extraction from color documents | |
| CN113158977B (en) | Image character editing method for improving FANnet generation network | |
| CN110717492B (en) | A method for correcting the orientation of strings in drawings based on joint features | |
| CN111460782B (en) | Information processing method, device and equipment | |
| CN110298353A (en) | A kind of character identifying method and system | |
| Yao et al. | Manga vectorization and manipulation with procedural simple screentone | |
| CN118135584A (en) | Automatic handwriting form recognition method and system based on deep learning | |
| CN118397634B (en) | Digital twin modeling marking method, system, equipment and medium for ground power station | |
| CN109409211B (en) | Processing method, processing device and storage medium for Chinese character skeleton stroke segments | |
| JP5824309B2 (en) | Image processing apparatus, image processing method, and program | |
| CN109325483B (en) | Method and device for processing internal short pen section | |
| JP5020698B2 (en) | Image processing apparatus, image processing method, and image processing program | |
| US12430724B2 (en) | Autonomously removing scan marks from digital documents utilizing content-aware filters | |
| AU2007254666A1 (en) | Recognition of overlapping shapes from document images | |
| CN115331236A (en) | Method and device for generating handwriting whole-line sample | |
| CN109410291B (en) | Processing method and device for burr type pen segments | |
| CN115147858A (en) | Method, device, device and medium for generating handwritten form image data | |
| Bartneck | A general data structure for image analysis based on a description of connected components | |
| AU2008202867A1 (en) | Recognition of disjoint shapes from document images |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| MK1 | Application lapsed section 142(2)(a) - no request for examination in relevant period |