Block selection review and editing system

Abstract: A system for editing the hierarchical tree structure which is created by a block selection system to correspond to a block template of a document image, wherein the hierarchical tree structure includes a plurality of nodes, each of which represents a block of image data in the block template of a document image and contains feature data defining features of the block of image data. The system operates to download from memory the hierarchical tree structure, generate and display a block template of a document image corresponding to the hierarchical tree structure in memory, select a block of image data to be edited in the block template of a document image, edit the selected block of image data and update the feature data in a node corresponding to the selected block of image data. The system determines whether the remaining feature data in the node has been affected by updated feature data, and, if so, the remaining feature data is altered to appropriately reflect the new feature of the selected block of image data. The system also determines whether any of the features of the remaining nodes have been affected by the new feature of the selected block of image data, and, if so, feature data in the affected nodes are appropriately altered to reflect the new features of its corresponding block of image data.

Description: The present invention relates to a system for reviewing and editing results of a block selection operation performed on a document image. More particularly, the present invention relates to a system for editing a hierarchical tree structure which has been created as a result of performing a block selection operation on a document image. Recently developed block selection techniques, such as the techniques described in U.S. Patent Application Serial Nos. 07/873,012 and 08/171,720, automatically analyze document images in order to distinguish between different types of image data within the document image. The result of such a block selection technique is used to determine the type of subsequent processing to be performed on the image, such as optical character recognition (OCR), data compression, data routing, etc. For example, image data which is designated as text data will be subjected to OCR processing while data which is designated as picture data would not be subjected to OCR processing. As a result, the different types of image data can be input and automatically processed without an operator's intervention. An example of how a block selection technique operates will be discussed below with respect to Figures 24-26. Figure 24 shows a page of a representative document. The document page 2401 is arranged in a two-column format. The page includes a title 2402, a horizontal line 2414, text areas 2404, 2405, and 2409 which include lines of text data, halftone picture area 2407 which includes a graphic image which is non-text, table block 2410 which includes text information, framed area 2406, halftone picture area 2411 accompanied by caption data 2416, and picture area 2412 and 2415 accompanied by caption data 2417. According to the block selection techniques described in U.S. Patent Application Serial Nos. 07/873,012 and 08/171,720, each area of document page 2401 is designated in accordance with the type of image data obtained therein and image data is then segmented based on the designation. As the block selection program processes the document image, a hierarchical tree structure is created as shown in Figure 25. As shown in Figure 25, hierarchical tree structure 2501 contains a plurality of nodes which represent segmented blocks of image data. Each node of the tree contains feature data which defines the features of each block of image data in the processed document image. For example, the feature data may include block location data, size data, attribute data (image type, such as text, picture, table, etc.), sub-attribute data, and child node and parent node pointers. In the present invention, child (or "descendant") nodes represent blocks which exist entirely within a larger block. Child nodes are depicted in the hierarchical tree structure as a node branching from a parent node, such as node 2521 which branches from parent node 2510. In addition to the feature data described above, a node which represents a text block may also contain feature data defining the block's reading orientation and reading order. Once hierarchical tree structure 2501 has been created, it is stored in memory. Upon receiving a request to process the image data in the document image, hierarchical tree structure 2501 is retrieved from memory and image data which has been blocked together is processed according to the feature data stored in its corresponding node. In addition to using the hierarchical tree structure to process image data of a document image, the hierarchical tree structure is used to generate and display a comprehensible format of document image 2401 on display 2600 as shown in Figure 26. As a result, block template 2601 of the document image is generated and displayed to the user on display 2600 based on the feature data stored in the hierarchical tree structure shown in Figure 25. The block template of the document image directly reflects the structure of the hierarchical tree as well as the feature data stored in each node of the hierarchical tree structure. The feature data in the node is utilized to generate the block outline, location, and size. In addition, feature data in each node is used to identify the type of image data contained within the block and, if appropriate, reading order and reading orientation. For example, as shown in Figure 26, block template 2601 includes text blocks 2602, 2604, 2605 and 2609 each of which correspond to nodes 2502, 2504, 2505, and 2509, respectively. As shown, each text block includes feature data which designate the block as text and also define the block's reading order and reading orientation. Similarly, horizontal line block 2614, table block 2610, frame block 2606, halftone picture blocks 2607 and 2611, and picture block 2612 (each of which correspond to nodes 2514, 2510, 2506, 2507, 2511 and 2512, respectively), include feature data which designate the type of image data in the block. Accordingly, when a block template of a document image is displayed to the user, the user sees a comprehensible format of how the document image has been processed by the block selection program. As a result, the user can readily determine whether the block selection program has operated correctly and whether the image data will be properly processed. In the foregoing block selection techniques, difficulties have been encountered. That is, erroneous designation of image data results, thereby creating problems when subjecting designated image data to the wrong type of image processing. For example, text data which should be grouped into separate blocks may be grouped as a single block, or table data which contains text data may be designated as a picture block instead of a text block. In the foregoing examples, the errors in grouping and classifying the image data will erroneously determine the processing technique to which image data is subjected, thereby resulting in improper processing. Another difficulty encountered with the block selection techniques described above occurs when a user desires to alter the type of processing to which designated image data within a document image is subjected. Conventionally, once the block selection operation has been performed on a document image, any editing of the resulting hierarchical tree structure is quite complex and time-consuming. .There is therefore a need to edit blocks of image data created by an automatic block selection operation so as to modify the blocks themselves or the feature data which defines the characteristics of the blocks. EP-A-0712088 was published after the priority date of the present application and thus only forms prior art by virtue of Article 54(3) EPC. This document discloses a page analysis system for analysing image data on the page of a document in which a hierarchical tree structure is created using a block selection system, the block template being displayed. EP-A-0528631 discloses a graphics editor in which a graphical flow diagram or appearance construction graph (ACG) representing complex image is generated and displayed. An operator creates the ACG by inputting commands for selected node types, for example image fragments and transforms, and creating links between the nodes. Shuichi Tsujimoto and Haruo Asada, "Understanding Multi-articled Documents", 10th International Conference on Pattern Recognition, IEEE, Vol. 1, June 16-21, 1990, pages 551-556, discloses a document analysis system for analysing a scanned document. A geometric tree structure is produced, an algorithm being used to transform the geometric tree structure to a logical tree structure. It is an object of the present invention to provide a system which can edit blocks of image data and the feature data associated therewith. Preferably, editing takes place in the displayed block template of the document image and the editing program automatically updates feature data in the hierarchical tree structure in accordance with the editing operation. In one aspect of the invention, there is provided a method of editing a hierarchical tree structure produced in a block selection system which analyzes a bitmap image representing a page of a document, the hierarchical tree structure corresponding to a block template comprising a plurality of blocks which represent areas of the document page wherein the hierarchical tree structure includes a plurality of nodes, each of which corresponds to a block in the block template and contains document feature data defining features of document data represented by the block, characterised by the steps of: downloading a hierarchical tree structure from memory; generating and displaying a block template from the hierarchical tree structure, the block template comprising a plurality of blocks which are displayed at substantially the same positions in the block template as corresponding document data in the document page; selecting a block to be edited from the displayed block template; editing a feature of the selected block; updating document feature data in the node corresponding to the selected block in accordance with an editing operation of a feature of the selected block; and automatically determining whether non-updated document feature data in the corresponding node should be updated based on the feature edited in the editing step, wherein, in the case that a non-updated document feature data should be updated, the non-updated document feature data is automatically updated so as to conform with the edited feature of the selected block of image data. According to a second aspect of the present invention, there is provided an apparatus for editing a hierarchical tree structure created in a block selection system which analyzes a bitmap image representing a page of a document, the hierarchical tree structure representative of a block template comprising plural blocks which represent areas of the document page, wherein the hierarchical tree structure includes a plurality of nodes, each of which corresponds to a block in the block template and contains document feature data defining features of document data represented by the block, characterised by: means responsive to input user commands; memory means for storing a hierarchical tree structure and process steps; and processor means for editing the hierarchical tree structure in accordance with the user commands and the stored process steps; wherein the processor means is arranged to execute the stored process steps in response to the user commands so as: to download the hierarchical tree structure from the memory means; to generate and display a block template corresponding to the stored hierarchical tree structure, the block template comprising plural blocks which are displayed at substantially the same positions in the block template as corresponding document data in the document page; to select a block to be edited in the displayed block template of a document image; to edit a feature in the block in accordance with an input editing selection; to update document feature data contained in a node corresponding to the selected block of image data; and to determine whether non-updated document feature data in the node should be updated in accordance with the updated document feature data; wherein, in a case where it is determined that a non-updated document feature data should be updated, the non-updated feature data is automatically updated so as to correspond to the edited feature of the selected block. According to a third aspect of the present invention, there is provided a method of directly editing a hierarchical tree structure created in a block selection system, the hierarchical tree structure corresponding to a block template comprising plural blocks which represent areas of the document page, wherein the hierarchical tree structure includes a plurality of nodes, each of which corresponds to a block in the block template and contains document feature data defining features of document data represented by the block, characterised by the steps of: retrieving a hierarchical tree structure from memory; selecting a node in the hierarchical tree structure to edit; editing document feature data in the selected node; automatically updating unedited document feature data in the node to conform with the edited document feature data; and automatically updating document feature data in at least one other node in the hierarchical tree structure in a case where the edited document feature data in the selected node affects the document feature data in the at least one other node. This brief summary of the invention has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention and its advantages may be obtained by reference to the following detailed description in connection with the appended drawings. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 is a perspective view showing the outward appearance of an apparatus according to the present invention; Figure 2 is a block diagram of the Figure 1 apparatus; Figure 3, comprising Figures 3A and 3B, is a flow diagram describing an overview of the block editing system according to the present invention; Figure 4 is a flow diagram describing the method of editing the attribute of a block of image data; Figures 5A and 5B are representational views of a hierarchial tree structure before and after editing the attribute of a block of image data; Figure 6 is a flow diagram describing the method of editing the reading order of a block of image data; Figures 7A and 7B are representational views of a hierarchial tree structure before and after editing the reading order of a block of image data; Figure 8 is a flow diagram describing the method of editing the reading orientation of a block of image data; Figures 9A and 9B are representational views of a hierarchial tree structure before and after editing the reading orientation of a block of image data; Figure 10 is a flow diagram describing the method of creating a new block of image data from within an existing block of image data in a block template of a document image; Figures 11A and 11B are representational views of a block template of a document image and its corresponding hierarchical tree structure before a new block of image data is created within an existing block of image data; Figures 12A and 12B are representational views of a block template of a document image and its corresponding hierarchical tree structure after creating a new block of image data within an existing block of image data; Figure 13 is a flow diagram describing the method of merging two blocks of image data to form a new block of image data in a block template of a document image; Figures 14A and 14B are representational views of a block template of a document image and its corresponding hierarchical tree structure before two blocks of image data are merged to form a new block of image data; Figures 15A and 15B are representational views of a block template of a document image and its corresponding hierarchical tree structure after two blocks of image data have been merged to form a new block of image data; Figure 16 is a flow diagram describing the method of releasing a block within a block template of a document image and creating one or more blocks from the image data; Figures 17A and 17B are representational views of a block template of a document image and its corresponding hierarchical tree structure before releasing and creating one or more blocks from the image within the document image; Figures 18A and 18B are representational views of a block template of a document image and its corresponding hierarchical tree structure after a block is released from the document image; Figures 19A and 19B are representational views of a block template of a document image and its corresponding hierarchical tree structure after a block is created in the document image; Figure 20 is a flow diagram describing the method of low-level editing of the hierarchial tree structure; Figure 21 is a flow diagram describing the method of editing the hierarchial block template of the document image; Figures 22A and 22B are representational views of a hierarchial block template of a document image and its corresponding hierarchial tree structure prior to editing; Figures 23A and 23B are representational views of the hierarchial block template of the document image corresponding hierarchial tree structure after an editing operation; Figure 24 is a representational view of a document image; Figure 25 is a representational view of the hierarchical tree structure which corresponds to the Figure 24 block template of a document image; and Figure 26 is a representational view of a document image which has undergone a block selection operation. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT Figure 1 is a view showing the outward appearance of a representative embodiment of the invention. Shown in Figure 1 is computing equipment 10, such as a MacIntosh or an IBM PC or PC-compatible computer having a windowing environment such as Microsoft Windows®. Provided with computing equipment 10 is display screen 12, such as a color monitor, keyboard 13 for entering user commands, and pointing device 14, such as a mouse, for pointing to and for manipulating objects displayed on screen 12. Computing equipment 10 includes a mass storage device such as computer disk 11 for storing data files which include document image files, in either compressed or uncompressed format, and for storing application program files which can include at least one block selection program and a block selection editor program. Also stored on disk 11 are various hierarchial tree structure data for each document image which has been subjected to a block selection program. Computer disk drive 11 contains other information processing programs which contain stored program instructions by which computing equipment 10 manipulates the data files and presents data in those files to an operator via display screen 12. Document image data is input by scanner 16 which scans documents or other images and provides bit-mapped images of those documents to computing equipment 10. The document image data may also be input into computing equipment 10 from a variety of other sources such as network interface 24 or other external devices via facsimile/modem interface 26. Printer 18 is provided for outputting processed document images. It should be understood that, although a programmable general purpose computer arrangement is shown in Figure 1, a dedicated or stand-alone computer or other type of data processing equipment can be used to practice the invention. Figure 2 is a detailed block diagram showing the internal construction of computing equipment 10. As shown in Figure 2, computing equipment 10 includes a central processing unit (CPU) 20 interfaced with computer bus 21. Also interfaced with computer bus 21 is scanner interface 22, printer interface 23, network interface 24, fax/modem interface 26, display interface 27, keyboard interface 28, mouse interface 29, main memory 30, and disk 11. Main memory 30 interfaces with computer bus 21 so as to provide random access memory storage for use by CPU 20 while executing stored program instructions such as the block selection program or the block selection editing program. More specifically, CPU 20 loads those programs from disk 11 into main memory 30 and executes those stored programs out of main memory 30. In accordance with the operator instructions, stored application programs provide for image processing and manipulating of data. For example, a desktop publishing program such as Wordperfect for Windows@ may be activated by an operator to create, manipulate, and view documents. Likewise, a block selection operation may be activated to analyze the various types of image data in an input document image. Figure 3, comprising Figures 3A and 3B, is a flow diagram describing an overview of the block editing system. A preferred method for selecting a hierarchical tree structure and editing a block template of a document image will be described with respect to a windowing environment in which the user utilizes a mouse to select operations from menus and pull-down menus displayed in a window. Thus, in step S301, the user selects a hierarchical tree structure to be edited from a displayed menu. In step S302, the selected file which contains the hierarchical tree structure is downloaded from disk 11 and stored in main memory 30. For the purpose of discussion, the hierarchical tree structure consist of text data, table data, halftone picture data, picture data, frame data, and line data. In step S304, a block template of a document image corresponding to the selected hierarchical tree structure is generated from the retrieved hierarchical tree structure and is displayed to the user. As discussed previously, each block is displayed to the user with at least the attribute feature which is defined by the feature data contained in its corresponding node. In step S305, the block selection editing program queries the user to determine whether editing is desired. If the user chooses not to edit the hierarchical tree structure, flow returns to step S301, at which point the user can select a.different hierarchical tree structure to edit. On the other hand, if the user elects to edit the hierarchical tree structure, then flow advances to step S307 in which editing operation options are displayed to the user. In step S309, the user selects the editing operation to be performed, for example, the user could select to edit an attribute of a block (step S310), a reading order of a block (step S311), or an orientation of a block (step S312). The user may also choose other editing operations which permit the user to redefine blocks by creating a block within a pre-existing block or splitting the pre-existing block into two blocks (step S314), merging two blocks (step S315), releasing and creating one or more blocks of image data from a preexisting block (step S316), directly editing the hierarchical tree structure (step S317), or editing the hierarchial block template of the document image (step S318). Preferably, each of the above editing operations, which will be discussed in greater detail below, are performed directly on the displayed block template of a document image (with the exception of step S317) and feature data in the corresponding node/nodes are automatically updated as a result of the edit operations. It is noted that the following editing operations are merely examples of the types of editing operations which can be performed with the present invention. Attribute Editing Figure 4 is a detailed flow diagram showing processing in the event that editing of a block's attribute is selected (step S310). In the present invention, a block attribute defines the type of image data within the block created by the block selection technique. For example, the block attribute may define text image, picture image, etc. In some situations, it may be desirable to change the attribute set by the block selection operation, for example, in the case the attribute has been incorrectly designated or in the case the user wants the block of image data subjected to a different type of image processing rather than the type designated by the attribute set by a block selection operation. Thus, in step S401, the user, utilizing mouse 14, selects a particular block within the displayed block template of a document image to be edited. Upon selecting the block, flow advances to step S402 in which a menu of selectable attributes is displayed. The menu of selectable attributes may consist of a list of attributes which are arranged in lowest to highest priority or least to most logical selection. In step S404, the user selects the attribute to be assigned to the block by placing the cursor on the desired attribute in the menu. In step S405, feature data contained in the node representing the block is updated in accordance with the selected attribute. The editing of the attribute is reflected in the hierarchical tree structure of the block template of the document image. For example, as shown in Figure 5A, there is illustrated a hierarchical tree structure of a block template of a document image. As shown in Figure 5B, the user has edited the attribute in node 502 from a text designation to a picture designation, and the feature data contained in node 502 is updated to reflect the change. After the attribute has been edited, flow advances to step S406, at which point the block selection editing program determines whether the editing of the attribute of node 502 requires the remaining feature data within node 502 to be updated. For example, since the unedited version of node 502 represented text data, and the edited version of node 502 represents picture data, feature data in node 502 must be updated in order to delete reading order and reading orientation and to create a sub-attribute which indicates whether the picture block is in joint-solid-line style. In this case, flow advances to step S407, so that various steps of block selection can be applied to the edited block. On the other hand, in step S406, if the edited block does not require further editing, flow proceeds to step S409. In step S409, the block selection editing program determines whether remaining nodes in the hierarchical tree structure require editing due to the edited attribute of node 502. For example, the reading order of the text block represented by node 504 must be edited from 3 to 2 due to the edited attribute. In addition, the remaining nodes must be rearranged within the tree structure so that the nodes representing the text blocks are rearranged sequentially according to reading order. Accordingly, step S410 performs various steps of block selection in order to edit remaining nodes of the hierarchical tree structure. As shown in Figure 5B, the reading order of node 504 has been edited from 3 to 2, and edited node 502 has been moved to the far right of the hierarchical tree structure. However, if the hierarchical tree structure does not need to be edited, flow advances to step S411. In step S411, the user is queried as to whether any additional editing operations should be performed. If additional editing is required, flow returns to step S307. If no further editing is desired, then flow proceeds to step S412 in which the edited hierarchical tree structure is saved to computer disk 11. Reading Order Editing Figure 6 is a detailed flow diagram showing processing in the event that editing of a block's reading order is selected (step S311). The reading order determines the sequence in which text blocks in a document image are read. The determination of reading order is important in facilitating OCR processing of the text block. That is, in order for OCR processing to perform properly, the text blocks must be processed in the correct order. Using this editing feature, the user can edit a reading order of a text block in the case that reading orders of text blocks in a block template of a document image are incorrectly assigned by a block selection technique. Thus, in step S601, the user selects and edits the reading order of at least one of the text blocks in the displayed document image. The feature data contained in the edited node representing the edited block is updated in accordance with the edited reading orders. For example, Figure 7A and 7B show a hierarchical tree structure before and after editing a reading order. In the present example, the reading order of text block 2 has been edited from 2 to 4. Consequently, as shown in Figure 7B, the feature data in node 702 defining the reading order of text block 2, is updated to reflect a new assigned reading order of 4. Flow advances to step S602, in which the block selection editing program determines whether the reading orders of any of the remaining text blocks require editing because of the editing of node 702. If the reading order of any of the remaining blocks require editing, flow proceeds to step S604, in which the reading orders of the affected blocks are edited. For example, as shown in Figure 7B, nodes 704 and 705 are edited to reflect a change in their reading order due to the editing of node 702. On the other hand, if no further editing is required, flow proceeds to step S605. In step S605, the block selection editing program determines whether the hierarchical tree structure needs to be edited in accordance with the edited reading orders. The positions of the nodes representing the text blocks of a document image in the hierarchical tree structure is determined by their respective reading orders. Therefore, if the reading orders have been edited, the structure of the hierarchical tree will require editing. In this case, flow proceeds to step S606, in which the nodes are rearranged according to the new reading orders. For example, as shown in Figure 7A and 7B, nodes 702, 704, and 705 have been rearranged in accordance with the edited reading orders. On the other hand, if the hierarchical tree structure does not need to be edited, flow proceeds to step S607. In step S607, the user is queried as to whether any additional editing operations are desired. If additional editing is required, flow returns to step S307. However, if no further editing is required, flow proceeds-to step S609 in which the edited hierarchical tree structure is saved to computer disk 11. Reading Orientation Editing Figure 8 is a detailed flowchart showing processing in the event that editing of a block's reading orientation is selected (step S312). In step S312, a reading orientation of a text block is edited. For example, if the reading orientation of a text block is incorrectly assigned during character recognition, such as in the case of Japanese text, which is normally read in vertical columns, being assigned a horizontal reading orientation, the user can edit the reading orientation to appropriately reflect the reading orientation of the text. As a result, segmentation of line and character data can be correctly performed. Thus, in step S801, the user selects the text block of the document image to be reoriented. In step S802, the reading orientation of the selected text block is changed and the feature data defining the reading orientation of the text block is updated. For example, Figures 9A and 9B show the hierarchical tree structure of a blocked document image before and after the reading orientation of a block has been edited. The reading orientation of text block 3, represented by node 904, has been selected for editing by the user. In step S802, the text lines and the skew of the text block are reconfigured in accordance with block selection process steps. In step S804, it is determined whether the reading order of the selected text block must be edited due to the edited reading orientation of the selected text block. If so, flow proceeds to step S805, in which the reading order of the selected text block is edited by applying various steps of block selection to the edited block. In accordance with this editing, the feature data representing the reading order of the selected block is updated. For example, as shown by Figures 9A and 9B, the feature data in node 904 which defines the reading order of text block 3 is updated from 3 to 4. In step S807, the block selection editing program determines whether the feature data contained in the remaining nodes in the hierarchical tree structure requires updating due to the change in node 904. If so, the hierarchical tree structure is edited in step S809. For example, as shown in Figures 9A and 9B, the feature data representing the reading order in node 905 is updated from 4 to 3 due to the editing of the reading orientation of text block 3. In addition, the nodes in the hierarchical tree structure are rearranged in accordance with the updated reading order. In step S810, the user is queried as to whether any additional editing operations are desired. If additional editing is requested, flow returns to step S304. On the other hand, if no further editing is required, flow advances to step S811 in which the edited tree structure is saved to computer disk 11. Creating A Block From Within A Preexisting Block Figure 10 is a detailed flow diagram showing processing in the event that creation of a block from within a preexisting block is selected (step S314). That is, the user may create a new block from within an existing block or split an existing block to create a new block if, for example; two different types of image data are contained within the block. By separating out a block within an existing block, the different types of image data can be subjected to the most appropriate type of processing. Thus, in step S1001, the user, utilizing mouse 14, selects a portion of a preexisting block to be separated out and blocked. As shown in Figures 11A and 12A, portion 1207 of block 1105 has been selected. In step S1002, and as shown in Figures 12A and 12B, new block 1207 and node 1214 are created. In the case that the portion of the existing block is formed by splitting the existing block, the new portion will be represented by a new node in the hierarchical tree in the same manner. In step S1004, the newly created block 1207 is subjected to various process steps of block selection operation so as to classify the new block. In this manner, feature data is created and stored in node 1214. For example, as shown in Figure 12B, the feature data in node 1214 has been updated to define a picture image. In step S1005, the block selection editing program determines whether the hierarchical tree structure needs to be edited. For example, in step S1006, parent node 1111 is edited to include a pointer to child node 1214, and the remaining nodes remain unaltered. In step S1007, the user is queried as to whether any additional editing operations should be performed. If additional editing is desired, flow returns to step S304. If not, flow proceeds to step S1009 in which the edited hierarchical tree structure is saved to disk 11. Merging Two Blocks Figure 13 is a detailed flow diagram showing processing in the event that an operation to merge two blocks is selected (step S315). Occasionally, after a block selection operation has been performed on a document image, two blocks which more appropriately should have been combined exist side by side in a block template of the document image. By merging the two blocks, the image data in the resulting new block will be processed as one image type. Thus, in step S1301, the user selects two blocks from the block template of a document image which are to be merged to form a new block. In step S1302, the two blocks are merged in the block template of a document image. For example, as shown in Figure 14A, blocks 1401 and 1402 have been selected to be merged, and, in Figure 15A, the two blocks are merged to create new block 1501. In step S1304, node 1514 is created in the hierarchical tree structure representing the block created by merging the two selected blocks. For example, node 1514 has been created to represent block 1501. In step S1305, the two nodes representing the merged blocks are deleted from the hierarchical tree structure. For example, nodes 1407 and 1409, representing blocks 1401 and 1402, have been deleted from the hierarchical tree structure as shown in Figure 15B. In step S1306, new block 1501 is subjected to various steps of a block selection operation and feature data defining characteristics of new block 1501 is created and stored in node 1514. For example, by applying block selection steps, feature data contained in node 1514 is created to define block 1501 as a text block with a reading order of 1 and having a horizontal reading orientation. In step S1307, it is determined whether the hierarchical tree structure requires further editing in view of the merging of blocks 1401 and 1402. If so, flow advances to step S1309, in which the affected blocks of image data are subjected to block selection process steps so as to edit their status in accordance with the new block. As shown in Figures 14B and 15B, the reading order of text block 1404 is edited from 3 to 2. Similarly, the reading order of text block 1405, represented by node 1411 is edited from 4 to 3. Finally, in step S1310, the user is queried as to whether any additional editing operations should be performed. If additional editing is desired, flow returns to step S304. On the other hand, if no further editing is required, flow proceeds to step S1311 in which the edited tree structure is saved to computer disk 11. Releasing And Creating One Or More Blocks From An Existing Block Figure 16 is a flow diagram showing processing in the event that releasing and creating one or more blocks from an existing block is selected (step S316). In this manner, erroneously combined image data-or image data which the user desires to be processed differently can be subjected to various processing techniques. Thus, in step S1601, the user selects the block to be released. In step S1602, the node representing the selected block, as well as any descendants of the node, is deleted from the hierarchical tree structure. For example, as shown in Figures 17A, block 1704 has been selected and, as shown in Figure 18A, the portion of the document image circumscribed by block lines is released. Additionally, node 1711 shown in Figure 17B is deleted from the hierarchical tree structure in Figure 18b. In step S1604, the user selects an unblocked portion of the block template of a document image to be blocked. As shown in Figure 19A, blocks 1916 and 1917 circumscribe the released image data. In step S1605, nodes 1919 and 1920 are created in the hierarchical tree structure which represent the newly blocked areas. In step S1606, blocks 1916 and 1917 are subjected to various steps of a block selection operation in order to create and to store feature data in corresponding nodes 1919 and 1920. For example, as shown in Figure 19B, node 1919 has been created to represent block 1916 and node 1920 has been created to represent block 1917. After block selection steps have been applied to blocks 1916 and 1917, feature data is stored in nodes 1919 and 1920 to define each block's characteristics. For example, block 1916 has been defined as text having a reading order of 3 and having a horizontal reading orientation. In step S1607, it is determined whether the hierarchical tree structure requires further editing in view of the releasing of block 1704 and the creation of blocks 1916 and 1917. If so, in step S1609, the affected blocks are subjected to various steps of a block selection operation so as to update the feature data of each affected block. For example, node 1712 is rearranged based on its edited reading order. And new blocks 1916 and 1917 are arranged in accordance with their new reading order. In step S1610, the user is queried as to whether any additional editing operations should be performed. If additional editing is required, flow returns to step S304. If not, flow proceeds to step S1611 in which the edited hierarchical tree structure is saved to computer disk 11. The foregoing method of releasing and creating one or more new blocks can be used to release more than one block so as to create one or more new blocks from the unblocked image areas. Direct Editing Of The Hierarchical Tree Structure Figure 20 is a detailed flow chart showing processing in the event that direct editing of the hierarchical tree structure is selected (step S317). This feature permits advanced users of image processing systems to directly edit the hierarchical tree structure which results from block selection of a document image. As a result, a user can review and edit the hierarchical tree structure directly, without a computer-generated interface. Thus, in step S2001, the hierarchical tree structure representing the selected block template of a document image is displayed. In step S2002, a node to be edited is selected and feature data in the node is edited by entering changes via the keyboard. In this manner, either the feature data contained in the nodes of the hierarchical tree structure or the position of the nodes in the hierarchical tree structure can be edited. For example, the feature data contained in a node can be changed from a non-text block to a text block with reading order 4 and horizontal orientation. In step S2004, it is determined whether the remaining nodes in the hierarchical tree structure require editing. If so, either the user can edit the affected nodes directly or the user can choose to allow the block editing program to do the editing automatically. In the case the user allows the block editing program to perform the editing operation, the affected blocks are subjected to various steps of a block selection operation in step S2005. For example, the nodes will be rearranged to sequentially order the nodes according to the reading orders of the blocks they represent. On the other hand, the user can directly edit each of the affected blocks, and step S2004 can be repeated to determine if any other nodes still require editing. In step S2006, the user is queried as to whether any additional editing operations should be performed. If additional editing is requested, flow returns to step S304. If not, flow proceeds to step S2007 in which the edited tree structure is saved to computer disk 11. Editing of the Hierarchial Block Template of the Document Image Figure 21 is a detailed flow chart showing processing in the event that editing of the hierarchial block template of the document image is selected (step S318). In this feature, the advanced user of image processing systems can directly edit not only features of blocked image data (as discussed above), but can also edit the hierarchical relationship between blocks of image data without having to modify the hierarchical tree. As a result, hierarchical relationships between blocked image data in the document image can be easily changed and the edited relationship displayed as the hierarchical tree structure is modified. Thus, in step S2101, the hierarchial block template of the document image is generated from the retrieved hierarchical tree structure and is displayed. The displayed hierarchical block template of the document image differs slightly from the block template image discussed previously. Specifically, the hierarchical block template includes hierarchical relationship information displayed at the top portion of each block in the hierarchical block template. The hierarchical relationship information allows the user to readily understand the hierarchical relationship of each block of image data within the document. For example, Figures 22A and 22B represent a hierarchial block template of a document image and its corresponding hierarchial tree structure. As shown in Figure 22A, the hierarchial relationship between text block 2201 and document 2200 is represented in the upper left hand corner of text block 2201 as "1-T-1". This information indicates that text block 2201 is first generation child node 2221, as shown in Figure 22B, of parent node 2220. The hierarchial relationship for each of the blocks of image data is generated based on the nodal relationship of the hierarchial tree structure shown in Figure 22B. Thus, for example, picture block 2206 has a hierarchial relationship to the document 2200 and is indicated as "1-NT-2". This information indicates that picture block 2202 is the second child picture node of parent node 2220. In step S2102, a block of image data in the hierarchial blocked document image is selected and edited. The selected editing operation can be any one of the editing operations discussed previously. For example, the "releasing and creating of a new node" edit operation can be selected. After the edit operation, the feature data contained in the corresponding node representing the edited block is updated in accordance with the edited reading orders. In the case that a hierarchical relationship among blocks of image data has been changed, the hierarchical information displayed on the affected block of image data will be updated as well. As shown in Figure 23B, the hierarchial relationship of picture block 2204 and text block 2205 has been edited. As shown in Figure 23A, a new block 2301 circumscribes both picture block 2204 and text block 2205 in a dashed block outline. As a result, the hierarchial tree structure, shown in Figure 22B, is edited and updated as illustrated in Figure 23B. As shown in Figure 23B, the hierarchial tree structure has been updated to reflect the edited relationship of picture block 2204 and text block 2205. In the present example, corresponding picture node 2225 and corresponding text node 2224 are deleted from the hierarchical tree structure and regenerated to depend from new picture node 2302. In this configuration, picture node 2302 is a child node of page node 2200 and text node 2224 and picture node 2225 are child nodes of picture node 2302. Once the hierarchial tree structure is edited in step 2102, the hierarchial block template is redisplayed as shown in Figure 23A. In step S2104, it is determined whether the remaining nodes in the hierarchial tree structure require editing in view of the editing of the hierarchial relationships of blocks 2204 and 2205. If so, in step S2105, the affected blocks of image data, are subjected to various steps of block selection processing so as to update the feature data of each affected block. In the present example shown in Figure 23B, the only change to the hierarchical block template and corresponding tree is the reading order of text block 2205. The reading order changes from "4" to "1". In step 2106, the user is queried as to whether any additional editing operations should be performed. If additional editing is requested, flow returns to step S304. If not, flow proceeds to step S2107, in which the edited image is saved to computer disk 11.

Claims: A method of editing a hierarchical tree structure produced in a block selection system which analyzes a bitmap image representing a page of a document, the hierarchical tree structure corresponding to a block template comprising a plurality of blocks which represent areas of the document page wherein the hierarchical tree structure includes a plurality of nodes, each of which corresponds to a block in the block template and contains document feature data defining features of document data represented by the block, characterised by the steps of: downloading a hierarchical tree structure-from memory (S302); generating and displaying (S304) a block template from the hierarchical tree structure, the block template comprising a plurality of blocks which are displayed at substantially the same positions in the block template as corresponding document data in the document page (S304); selecting a block to be edited (S401) from the displayed block template; editing (S310; S311; S312) a feature of the selected block; updating document feature data in the node corresponding to the selected block in accordance with an editing operation of a feature of the selected block; and automatically determining (S406) whether non-updated document feature data in the corresponding node should be updated based on the feature edited in the editing step (S310. S311, S312), wherein, in the case that a non-updated document feature data should be updated, the non-updated document feature data is automatically updated so as to conform with the edited feature of the selected block of image data. A method according to claim 1, further comprising: a second determining step (S409) for determining whether a feature of at least one other block of image data is affected by the editing of the selected block of image data and, in the case that the at least one feature of the at least one other block of image data in the block template of a document image is affected by the editing of the selected block, feature data in a node corresponding to the at least one block of image data is updated (S410). A method according to claim 1, further comprising: a block template selection step for selecting a block template which represents a document image, wherein a block template is generated and displayed (S304) based on the selected block template; and an editing operation selection step for selecting an editing operation to be performed on the selected block (S401), wherein the selected editing operation is used in the editing step to edit (S310; S311; S312) a feature of the selected block. A method according to claim 3, further comprising the step of automatically updating at least one other node in the hierarchical tree structure as a result of the edit operation to the at least one block of image data. An apparatus for editing a hierarchical tree structure created in a block selection system which analyzes a bitmap image representing a page of a document, the hierarchical tree structure representative of a block template comprising plural blocks which represent areas of the document page, wherein the hierarchical tree structure includes a plurality of nodes, each of which corresponds to a block in the block template and contains document feature data defining features of document data represented by the block, characterised by : means responsive to input user commands; memory means for storing a hierarchical tree structure and process steps; and processor means for editing the hierarchical tree structure in accordance with the user commands and the stored process steps; wherein the processor means is arranged to execute the stored process steps in response to the user commands so as: to download the hierarchical tree structure from the memory means; to generate and display a block template corresponding to the stored hierarchical tree structure, the block template comprising plural blocks which are displayed at substantially the same positions in the block template as corresponding document data in the document page; to select a block to be edited in the displayed block template of a document image; to edit a feature in the block in accordance with an input editing selection; to update document feature data contained in a node corresponding to the selected block of image data; and to determine whether non-updated document feature data in the node should be updated in accordance with the updated document feature data; wherein, in a case where it is determined that a non-updated document feature data should be updated, the non-updated feature data is automatically updated so as to correspond to the edited feature of the selected block. An apparatus according to claim 5, wherein the processor means is arranged to execute stored process steps in order to determine whether a feature of at least one other block of image data is affected by the editing means of the selected block of image data and, in the case it has been determined the feature of the at least one block of image data has been affected, feature data in a node corresponding to the at least one block of image data is updated. A method according to claim 1, wherein the step of editing (S310; S311; S312) a feature of the selected block includes selecting an attribute feature for the selected block (S404), and wherein the document feature updated in the updating step defines the attribute feature so as to conform to the selected attribute feature (S405). A method according to claim 1, wherein in the generating step the block template is a block template of a document image corresponding to the stored hierarchical tree structure, wherein in the block selection step the selected block is a block of text data, the method further comprising: a menu displaying step for displaying a menu containing a numerical reading order of each block of text data in the block template of a document image; and a numerical reading order selection step for selecting a new numerical reading order for the selected block of text data (S601); wherein in the editing step the feature data defining the reading order feature in a node (702) corresponding to the selected block is edited; and wherein the updating step further includes updating feature data in each node (704, 705) corresponding to each block of image data which is affected by the edit of the reading order feature of the selected block (S604). A method according to claim 1, wherein in the generating step the block template is a block template of a document image corresponding to the stored hierarchical tree structure (S304), wherein in the block selection step the selected block is a block of text data (S801), the method further comprising: a menu displaying step for displaying a menu containing at least two selectable reading orientation features; and a reading orientation feature selection step for selecting one of the at least two reading orientation features; wherein in the editing step the feature data defining the reading orientation feature in a node corresponding to the selected block is edited; and wherein the updating step further includes updating remaining feature data in the node and in each node (904) corresponding to each block of image data which is affected by the edit of the reading orientation feature of the selected block (3). A method according to claim 1, wherein the block selection step includes selecting at least two blocks to be merged together into a new block (S1301), wherein the editing step includes deleting each node corresponding to the selected blocks (1305), the method further comprising: a re-displaying step of re-displaying the block template having the selected blocks (1401, 1402) merged into the new block (1501) (S1302); and a block selection step of subjecting the new block to block selection so as to create a corresponding node in the hierarchical tree structure and so as to store document feature data in the created node (S1304); wherein the automatic determination step further includes automatically determining whether non-updated document feature data in at least one other node should be updated based on the stored document feature data, wherein, in the case that a non-updated document feature data of at least one other node should be updated, the non-updated document feature data is automatically updated so as to conform with the stored document feature data (S1307). A method according to claim 1, wherein the editing step includes releasing image data represented by the selected block, deleting a node of the hierarchical tree structure corresponding to the selected block (S1602), and creating one or more blocks representing the released image data, the method further comprising: a block selection step of performing a block selection operation on the one or more blocks so as to create a node and document feature data corresponding to each of the one or more blocks (S1606); wherein the automatic determination step further includes automatically determining whether non-updated document feature data in at least one other node should be updated based on the created document feature data, wherein, in the case that a non-updated document feature data of at least one other node should be updated, the non-updated document feature data is automatically updated so as to conform with the created document feature data (S1607, S1609). A method of directly editing a hierarchical tree structure created in a block selection system, the hierarchical tree structure corresponding to a block template comprising plural blocks which represent areas of the document page, wherein the hierarchical tree structure includes a plurality of nodes, each of which corresponds to a block in the block template and contains document feature data defining features of document data represented by the block, characterised by the steps of: retrieving a hierarchical tree structure from memory; selecting a node in the hierarchical tree structure to edit (S2002); editing document feature data in the selected node (S2002); automatically updating unedited document feature data in the node to conform with the edited document feature data (S2005); and automatically updating document feature data in at least one other node in the hierarchical tree structure in a case where the edited document feature data in the selected node affects the document feature data in the at least one other node (S2006). A method according to claim 1, wherein in the generating step the block template is a hierarchical block template and the plurality of blocks display information which indicates at least image data type and a hierarchical relationship of each block within the hierarchical block template (S2101), the method further comprising: an editing operation selection step for selecting an editing operation to be performed on the hierarchical block template (2200), wherein in the editing step the selected editing operation is performed on the block selected in the block selection step (S2102), and wherein the automatic determination step further includes automatically updating document feature data contained in at least one other node of the hierarchical tree structure in accordance with the updated document feature data (S2104; S2105). A method according to claim 1, wherein the block selected in the block selection step is to be split into at least two blocks, and the block selection step includes designating a portion to be split from the selected block, wherein the editing step includes splitting the selected block into at least two blocks in accordance with the designated portion and deleting a node in the hierarchical tree structure corresponding to the selected block, the method further comprising: a re-displaying step of re-displaying the block template having the selected block split into at least two blocks; and a block selection step of subjecting the at least two blocks to block selection so as to create corresponding nodes in the hierarchical tree structure and to store document feature data in the created nodes; wherein the automatic determination step further includes automatically determining whether non-updated document feature data in at least one other node should be updated based on the stored document feature data, wherein, in a case that a non-updated document feature data of at least one other node should be updated, the non-updated document feature data is automatically updated so as to conform with the stored document feature data. A computer-readable medium storing computer-executable process steps for performing all steps of a method according to any one of claims 1-4 and 7-14. A computer-executable program comprising process steps for performing all steps of a method according to any one of claims 1-4 and 7-14.

Inventors: WANG SHIN-YWAN, WANG, SHIN-YWAN, Wang, Shin-Ywan, c/o Canon Information Syst., Inc.
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1995
Main classification: G06K9
IPC codes: G06T11, H04N1, G06K9