|Publication number||US5386508 A|
|Application number||US 07/745,897|
|Publication date||Jan 31, 1995|
|Filing date||Aug 16, 1991|
|Priority date||Aug 24, 1990|
|Publication number||07745897, 745897, US 5386508 A, US 5386508A, US-A-5386508, US5386508 A, US5386508A|
|Inventors||Katsuhiko Itonori, Noboru Shimizu|
|Original Assignee||Fuji Xerox Co., Ltd.|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (7), Non-Patent Citations (5), Referenced by (65), Classifications (15), Legal Events (5)|
|External Links: USPTO, USPTO Assignment, Espacenet|
1. Field of the Invention
The present invention relates to a program generator which reads an image composed of characters and line graphics and transforms the contents of said image into coded information.
2. Description of Background
Apparatus by which a program written in a specified language can be generated from a flowchart is already sold on the market but all commercial products of such apparatus are intended to handle flowcharts that have been drawn on systems such as those having CAD capabilities. A technique associated with such apparatus was reported in "A Technique for Developing Built-in System Oriented Software by 1444 Graphic Representation" at the Commemorative National Conference celebrating the 70th anniversary of the founding of The Institute of Electronics, Information and Communication Engineers. With a view to realizing efficient software development, this technique utilizes the CAD capabilities of a computer in all stages ranging from software design to source code generation and combines the necessary parts to generate a flowchart which is then converted to a program.
However, in writing a new program, we rarely draw a flowchart on a trial-and-error basis using the program generator described above and, in almost all cases, we first draw a flowchart on paper that is half complete and then enter it into the program generator. In other words, the prior art method of program generation has the disadvantage that it involves two overlapping operations, one for drawing a flowchart on paper and the other for drawing the same flowchart on the apparatus. A further problem is that the operator has to learn interfaces (e.g. operating procedures) that are peculiar to the apparatus and this often increases the complexity of overall operations.
An object, therefore, of the present invention is to provide a program generator for generating a coded computer program from program representations that are easy to understand for humans as exemplified by flowcharts which are composed of the combination of line graphics and characters. The generator is capable of generating the intended computer program without letting the programmer be conscious of the machine interface and in a rapid and accurate manner.
In order to attain the above-stated object, the present invention provides a program generator which comprises the following components:
a character/figure separating device that separates characters and line graphic from an image in an input flowchart (as indicated by 3 in FIG. 1);
a character recognizing device that performs character recognition on said separated character portion (as indicated by 5 in FIG. 1);
a figure recognizing device that extracts a symbols from said line graphics (as indicated by 6 in FIG. 1); and
a program code generating device that generates instructions corresponding to said symbols and which generates a program code by combining the generated instructions with the results of said character recognition that correspond to the positions in which said symbols have been extracted (as indicated by 7 in FIG. 1).
A graphic image such as a flowchart that is handwritten on paper or that is manually entered by graphic software is supplied into the character/figure separating device 3, where it is separated into a character region and a line graphics region. The image in the character region is subjected to character recognition by the character recognizing device 5, whereas the image in the line graphic region is sent to the figure recognizing device 6, where symbols are extracted.
In the program code generating device 7, instructions that correspond to the symbols extracted in the figure recognizing device 6 are generated and combined with the results of recognition by the character recognizing device 5 that correspond to the positions in which said symbols have been extracted, whereby a program code is generated.
According to the present invention, an image signifying the procedure of program processing that is composed of characters and line graphics and that is represented in a format easy to understand for humans is separated into an image in the character region and an image in the line graphics region and those images are subjected to individual recognition, with the results of recognition being combined to generate a coded program that is compatible with automatic machine processing. Hence, a desired computer program can be prepared by simple steps in a rapid and accurate way.
FIG. 1 is a block diagram showing the basic composition of a program generator according to an embodiment of the present invention;
FIG. 2a shows an example of the flowchart that contains characters and line graphics in admixture;
FIG. 2b is a sample program coded in C language as prepared by conversion from the flowchart of FIG. 2a;
FIG. 2c is a sample program coded in BASIC as prepared by conversion from the flowchart of FIG. 2a;
FIG. 3a shows an image in the character region that is obtained by the process of character/figure separation;
FIG. 3b shows an image in the line graphics region that is also obtained by the process of character/figure separation;
FIG. 4 is a block diagram showing the basic composition of character/figure separating unit;
FIG. 5 is a diagram illustrating the method of creating a shrunk image;
FIG. 6a shows an example of the original image;
FIG. 6b shows an example of the shrunk image obtained by the method shown in FIG. 5;
FIG. 6c shows an example of the contoured image;
FIG. 7 is a diagram showing the directions of chain codes in which chain coding is performed, as well as the numbers assigned to those directions;
FIG. 8 shows graphic symbols and the meanings of instructions that correspond to them; and
FIGS. 9a-9c illustrate how a program is generated from a particular graphic symbol.
FIG. 1 shows a program generator according to an embodiment of the present invention. The program generator comprises: an image input device 1; an image memory 2 for storing the original image; a character/figure separating unit for separating characters in the original image from line graphics; an image memory 41 for storing the image in the character region separated by the separating unit 3; an image memory 42 for storing the image in the graphic region separated by the separating unit 3; a character recognizing unit 5; a figure recognizing unit 6; and a program code generating unit 7 that combines the results of character recognition and figure recognition to generate a program code.
The image input device 1 is supplied with digital data of a flowchart that contains characters and line graphics, the entered flowchart is then stored in the image memory 2. FIG. 2a shows an example of flowcharts that can be entered into the image input device 1.
The image stored in the memory 2 is supplied into the character/figure separating unit 3, where it is separated into an image in the character region that is solely composed of characters (as shown in FIG. 3a) and an image in the graphics region that is solely composed of line graphics (as shown in FIG. 3b). The respective images are stored in the memories 41 and 42.
Art example of the character/figure separating unit 3 is described below. FIG. 4 shows an example of the basic composition for the character/figure separating unit. As shown, it comprises an image memory 2, a contour extracting portion 43, a chain coding portion 44, a directional change counting portion 45, a region identifying portion 46, a memory 41 of the image in the character region, and a memory 42 of the image in the graphics region.
The image memory 42 stores the digital data of flowchart that has been entered into the image input device 1 and it is the same as shown in FIG. 1.
The contour extracting portion 43 performs the following contouring operation as shown in FIG. 5, the original image is ANDed with an image obtained by shifting it to the right by one pixel; the resulting image is ANDed (logical product) with an image obtained by shifting the original image to the left by one pixel; similar AND operations are performed with respect to images that are obtained by shifting the original image both upward and downward by one pixel; as a result, an image is created that has shrunk in four directions by one pixel; this image is XORed (exclusive logical sum) with the original image to extract its contour. FIG. 6 depicts the original image, the shrunk image and the contoured image.
The chain coding portion 44 raster scans the contoured image to find any black pixel in it. If a black pixel is located, it is replaced by a white pixel and the eight areas adjacent said pixel are scanned. If any black pixel is found, chain coding is performed as shown in FIG. 7 and that pixel is replaced by a white one. This process is repeated until there is not black pixel in the surrounding eight area. If more than one black pixel is present in those areas, position information on black pixels other than the pixel of interest is stacked. Upon completion of the tracing of the main black pixel, the stacked pixel portion information is retrieved and subjected to chain code in the same manner. The chain code extracted by tracing on the basis of the stacked pixel information is continuous to the main chain code and may be designated as "a child chain code". When all of the pixel information in stack has been retrieved, the initial raster scan is resumed. This process completes the chain coding of all areas of the image of interest.
The directional change counting portion 45 counts the number of changes in the direction of strings of chain coded black pixels (each string being a set of one main chain code and a plurality of continuous child chain codes).
A generally established criterion for distinguishing a character from a (geometric) figure states that "a character is comparatively small in size, is complex in shape and has many directional changes in the contour whereas a figure is comparatively large in size, is simple in shape and has a smaller number of directional changes in the contour" in the light of this criterion, the region identifying portion 46 identifies an image region of interest as a character region if the number of changes in the direction of each chain code is larger than a given threshold value, and identifies it as a graphics region if said number is smaller than the threshold.
The region identified as a character region is transferred into the image memory 41 for storing characters and region identified as a graphics region transferred to the image memory 42 for storing figures. The image stored in the character image memory 41 is forwarded to the character recognizing unit 5 and the image stored in the figure image memory 42 to the figure recognizing unit 6.
In the character recognizing unit 5, the character in the image memory 41 is recognized and an associated character code is produced as an output; at the same time, the position in which the character is located is produced as an output in terms of coordinates in the image in the character region. Such character recognizing unit has been available in many types and the intended character recognition can be realized by using a suitable type (see, for example, "A Classification of Kanji Characters for Use in Multi-font Printing" by Umeda, PRU78-13, 1987).
In the figure recognizing unit 6, graphic symbols in the image memory 42 are recognized and instructions corresponding to the results of that recognition are produced as an output. The graphic symbols that are recognized and the meanings of instructions that correspond to those symbols are shown in FIG. 8. The figure recognizing unit 6 may be composed of any device that is capable of recognizing line graphics. For example, the graphic symbols to be recognized are preliminarily registered in a dictionary and figures in an image of interest are pattern-matched with the dictionary to perform graphics recognition (see, for example, "A System for Recognizing Hand-written Logic Circuit Diagrams" by Yamazaki and Ejima, PRU89-47, p. 55-60).
Another means of recognizing figures involves extracting line segments from an image of interest and recognizing the figure on the basis of the combination of the extracted in segments. For example, a figure composed of line segments that intersect one another at right angles is a rectangle and recognized as a figure that signifies a sequence of processing operations in a flowchart.
In the program code generating unit 7, a program is generated on the basis of a combination of the results of recognition by the character recognizing unit 5 and recognition by the figure recognizing unit 6. Stated more specifically, the program code generating unit 7 references the image in the memory 42 and identifies the order in which individual graphic symbols are linked. First, the unit 7 searches for a graphic symbol signifying the start of a program on the basis of the results of character and figure recognition and the order of linkage is designated "1". In the case shown in FIG. 2, the graphic symbol "START" signifies the start of a program. Then, the unit 7 follows the line segment extending from that symbol, finds a symbol signifying the next step of program generation, and designates the order of linkage as "2". The unit 7 continues this process until a graphic symbol signifying the end of the program appears, whereby the order of linkage between successive graphic symbols is determined. If, in this process, a line segment extending from a branch statement returns to the line segment that was once passed, a graphic symbol signifying this branch statement will be dealt with as one that signifies repetition.
In the next step, the program code generating unit 7 generates a program from the individual graphic symbols in accordance with the order in which they are linked. On the pages that follow, the process of generating a program from the graphic symbol signifying the branch statement in FIG. 2 is described.
On the basis of the recognition of graphic symbols and the process described above, the graphic symbol shown in FIG. 9a is found to signify a repeat statement. Accordingly, "while" is first generated. Then, the unit 7 examines the results of character recognition that are located around said graphic symbol (see FIG. 9b) and searches for the condition of the repeat statement. In the case of the example, the result of character recognition "Y" (see FIG. 9b) is in the neighborhood of the line segment extending from the graphic symbol (see FIG. 9a) to signify repetition, so the condition of the repeat statement may well be taken as "i<=10" which is another result of character recognition, whereby a program can be generated as shown in FIG. 9c. If the line segment in the neighborhood of "n" which is still another result of character recognition signifies repetition, the result of character recognition "i<=10" is modified and the condition of the repeat statement is changed to "i>10".
By following these procedures a program can be generated from a flowchart that is written on paper and that is composed of characters and line graphics.
In the embodiment described above, a computer program is assumed to be generated from a flowchart but it can be generated from PAD and other formats of representation by changing the referents of graphic symbols.
As described on the foregoing, according to the present invention, an image signifying the procedure of program processing that is composed of characters and line graphics and that is represented in a format easy to understand for humans is separated into an image in the character region and an image in the line graphics region and those images are subjected to individual recognition, with the results of recognition being combined to generate a code program that is compatible with automatic machine processing. Hence, a desired computer program can be prepared by simple steps in a rapid and accurate way.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US3805237 *||Apr 30, 1971||Apr 16, 1974||Ibm||Technique for the conversion to digital form of interspersed symbolic and graphic data|
|US4315315 *||Mar 9, 1971||Feb 9, 1982||The Johns Hopkins University||Graphical automatic programming|
|US4589144 *||Dec 9, 1982||May 13, 1986||Tokyo Shibaura Denki Kabushiki Kaisha||Character and image processing apparatus|
|US4831580 *||Jul 10, 1986||May 16, 1989||Nippon Electric Industry Co., Ltd.||Program generator|
|US4833721 *||Feb 11, 1988||May 23, 1989||Canon Kabushiki Kaisha||Image processing apparatus|
|US5048096 *||Dec 1, 1989||Sep 10, 1991||Eastman Kodak Company||Bi-tonal image non-text matter removal with run length and connected component analysis|
|US5148522 *||Feb 19, 1991||Sep 15, 1992||Kabushiki Kaisha Toshiba||Information retrieval apparatus and interface for retrieval of mapping information utilizing hand-drawn retrieval requests|
|1||"A Classification of Kanji Characters for Use in Multi-font Printing" by Umeda, PRU78-13, 1987, pp. 1-8.|
|2||"A System for Recognizing Hand-written Logic Circuit Diagrams" Yamazaki and Ejima, PRU89-47, pp. 55-60, 1989.|
|3||*||A Classification of Kanji Characters for Use in Multi font Printing by Umeda, PRU78 13, 1987, pp. 1 8.|
|4||*||A Software Development Method For Embedded System Based on Graphic Representation Technique, Institute of Electronics, Information and Communication Engineers, 1987 (Japanese Language Literature).|
|5||*||A System for Recognizing Hand written Logic Circuit Diagrams Yamazaki and Ejima, PRU89 47, pp. 55 60, 1989.|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US5761328 *||May 22, 1995||Jun 2, 1998||Solberg Creations, Inc.||Computer automated system and method for converting source-documents bearing alphanumeric text relating to survey measurements|
|US5767853 *||Sep 21, 1995||Jun 16, 1998||Hitachi, Ltd.||Computer operating method and computer operated thereby|
|US5802514 *||Apr 9, 1996||Sep 1, 1998||Vision Software Tools, Inc.||Automated client/server development tool using drag-and-drop metaphor|
|US5867593 *||Oct 8, 1996||Feb 2, 1999||Olympus Optical Co., Ltd.||Image region dividing apparatus|
|US5867596 *||Jan 30, 1995||Feb 2, 1999||Hitachi Software Engineering Co., Ltd.||Method for diagram recognition by using recognizing rules and system for implementing the method|
|US5898799 *||Aug 27, 1997||Apr 27, 1999||Sony Corporation||Image signal coding and decoding method and apparatus|
|US5982931 *||Nov 28, 1997||Nov 9, 1999||Ishimaru; Mikio||Apparatus and method for the manipulation of image containing documents|
|US6134338 *||Jun 1, 1998||Oct 17, 2000||Solberg Creations, Inc.||Computer automated system and method for converting source documents bearing symbols and alphanumeric text relating to three dimensional objects|
|US6157736 *||Jun 15, 1999||Dec 5, 2000||Xerox Corporation||Method and apparatus for automatic image segmentation using template matching filters|
|US6243857 *||Feb 17, 1998||Jun 5, 2001||Nemasoft, Inc.||Windows-based flowcharting and code generation system|
|US6249905 *||Jan 16, 1998||Jun 19, 2001||Kabushiki Kaisha Toshiba||Computerized accounting system implemented in an object-oriented programming environment|
|US6269186 *||Dec 18, 1997||Jul 31, 2001||Canon Kabushiki Kaisha||Image processing apparatus and method|
|US6369836 *||Dec 23, 1999||Apr 9, 2002||Triconex||Cause effect diagram program|
|US6370683||May 7, 1999||Apr 9, 2002||Arnold Sobers||Computer software for generating flowchart images of a source program|
|US6389163 *||Nov 18, 1994||May 14, 2002||Xerox Corporation||Method and apparatus for automatic image segmentation using template matching filters|
|US6434270 *||Feb 10, 1998||Aug 13, 2002||Fujitsu Limited||Pattern extraction apparatus|
|US6690396 *||Dec 27, 1999||Feb 10, 2004||Gateway, Inc.||Scannable design of an executable|
|US6766331||Oct 4, 2001||Jul 20, 2004||The Boeing Company||Method, computer program product, and system for creating and viewing an intelligent graphics file including parts information|
|US6864794 *||Mar 12, 2002||Mar 8, 2005||Siemens Aktiengesellschaft||Method and apparatus for evaluating medical examination images|
|US6904172||Jul 30, 2004||Jun 7, 2005||Sony Corporation||Coding device and method, and decoding device and method|
|US6975771 *||May 18, 2000||Dec 13, 2005||Sony Corporation||Coding device and method using a strong correlation noted pixel selection|
|US7120616 *||Mar 4, 2002||Oct 10, 2006||Siemens Ag||Method for specifying, executing and analyzing method sequences for recognition|
|US7200271||Oct 4, 2001||Apr 3, 2007||The Boeing Company||Method, computer program product, and system for performing automated text recognition and text search within a graphic file|
|US7246328||Oct 4, 2001||Jul 17, 2007||The Boeing Company||Method, computer program product, and system for performing automated linking between sheets of a drawing set|
|US7310784||Jan 2, 2002||Dec 18, 2007||The Jellyvision Lab, Inc.||Methods for identifying cells in a path in a flowchart and for synchronizing graphical and textual views of a flowchart|
|US7529648||Nov 24, 2003||May 5, 2009||The Boeing Company||Method, system and computer program product for automatically generating a subset of task-based components from engineering and maintenance data|
|US7647577 *||May 27, 2005||Jan 12, 2010||International Business Machines Corporation||Editing, creating, and verifying reorganization of flowchart, and transforming between flowchart and tree diagram|
|US7712036||Nov 17, 2003||May 4, 2010||Gateway, Inc.||Scannable design of an executable|
|US7881561 *||Jun 26, 2003||Feb 1, 2011||Abbyy Software Ltd.||Method of pre-analysis of a machine-readable form image|
|US7937665||Jun 13, 2000||May 3, 2011||National Instruments Corporation||System and method for automatically generating a graphical program to implement a prototype|
|US8000535||Aug 16, 2011||Sharp Laboratories Of America, Inc.||Methods and systems for refining text segmentation results|
|US8127238||Dec 14, 2007||Feb 28, 2012||The Jellyvision Lab, Inc.||System and method for controlling actions within a programming environment|
|US8276058||Feb 8, 2008||Sep 25, 2012||The Jellyvision Lab, Inc.||Method of automatically populating and generating flowerchart cells|
|US8434013 *||May 26, 2006||Apr 30, 2013||Oracle America, Inc.||Navigating source code using annotated topographic image(s)|
|US8464169||Oct 19, 2007||Jun 11, 2013||The Jellyvision Lab, Inc.||Methods for identifying cells in a path in a flowchart and for synchronizing graphical and textual views of a flowchart|
|US8521709||Oct 26, 2007||Aug 27, 2013||The Jellyvision Lab, Inc.||Methods for preloading media assets|
|US8640027 *||Jul 19, 2002||Jan 28, 2014||National Instruments Corporation||System and method for configuring a hardware device to execute a prototype|
|US8805093 *||Dec 22, 2010||Aug 12, 2014||Abbyy Development Llc||Method of pre-analysis of a machine-readable form image|
|US9098940 *||Apr 19, 2010||Aug 4, 2015||International Business Machines Corporation||Method, apparatus and system for processing graphic objects|
|US9182952 *||Sep 23, 2013||Nov 10, 2015||Qualcomm Incorporated||Automated graph-based programming|
|US20010044932 *||Jan 24, 2001||Nov 22, 2001||Keiji Hashimoto||Automatic program generation technology using data structure resolution unit|
|US20020165876 *||Mar 4, 2002||Nov 7, 2002||Peter Enghauser||Method for specifying, executing and analyzing method sequences for recognition|
|US20020186245 *||Jul 19, 2002||Dec 12, 2002||Sundeep Chandhoke||System and method for configuring a hardware device to execute a prototype|
|US20030025734 *||Oct 4, 2001||Feb 6, 2003||The Boeing Company||Method, computer program product, and system for performing automated linking between sheets of a drawing set|
|US20040037475 *||Aug 26, 2002||Feb 26, 2004||Avinash Gopal B.||Method and apparatus for processing annotated screen capture images by automated selection of image regions|
|US20040095368 *||Nov 17, 2003||May 20, 2004||Gateway, Inc.||Scannable design of an executable|
|US20040205702 *||Mar 20, 2001||Oct 14, 2004||Nematron, Inc.||Windows-based flowcharting and code generation system|
|US20050002583 *||Jul 30, 2004||Jan 6, 2005||Tetsujiro Kondo||Coding device and method, and decoding device and method|
|US20050114096 *||Nov 24, 2003||May 26, 2005||The Boeing Company||Method, system and computer program product for automatically generating a subset of task-based components from engineering and maintenance data|
|US20050289526 *||May 27, 2005||Dec 29, 2005||International Business Machines Corporation||Editing, creating, and verifying reorganization of flowchart, and transforming between flowchart and tree diagram|
|US20060274941 *||Jun 26, 2003||Dec 7, 2006||Konstantin Zuev||Method of pre-analysis of a machine-readable form image|
|US20070277149 *||May 26, 2006||Nov 29, 2007||Stevens Matthew J||Navigating source code using annotated topographic image(s)|
|US20080065977 *||Oct 19, 2007||Mar 13, 2008||Gottlieb Harry N||Methods for identifying cells in a path in a flowchart and for synchronizing graphical and textual views of a flowchart|
|US20080104121 *||Oct 26, 2007||May 1, 2008||Gottlieb Harry N||Methods For Preloading Media Assets|
|US20080184143 *||Dec 14, 2007||Jul 31, 2008||Gottlieb Harry N||Methods for Identifying Actions in a Flowchart|
|US20080310685 *||Jun 18, 2007||Dec 18, 2008||Speigle Jon M||Methods and Systems for Refining Text Segmentation Results|
|US20100281359 *||Apr 19, 2010||Nov 4, 2010||International Business Machines Corporation||Method, apparatus and system for processing graphic objects|
|US20110091109 *||Apr 21, 2011||Abbyy Software Ltd||Method of pre-analysis of a machine-readable form image|
|US20110188759 *||Apr 14, 2011||Aug 4, 2011||Irina Filimonova||Method and System of Pre-Analysis and Automated Classification of Documents|
|US20140359559 *||Sep 23, 2013||Dec 4, 2014||Qualcomm Incorporated||Automated graph-based programming|
|EP1033885A1 *||Sep 21, 1999||Sep 6, 2000||Sony Corporation||Encoding device and method, and decoding device and method|
|WO1996031835A1 *||Mar 15, 1996||Oct 10, 1996||Base Ten Systems Inc||Ultrasonic image archiving method and system|
|WO1996037861A1 *||May 22, 1996||Nov 28, 1996||Solberg Creations Inc||Computer automated system and method for converting source documents bearing alphanumeric text relating to survey measurements|
|WO2000038040A1 *||Dec 23, 1999||Jun 29, 2000||Triconex Corp||Cause effect diagram program maintenance development and test system|
|WO2005055103A1 *||Dec 3, 2004||Jun 16, 2005||Bourke Sarah||Control of processes|
|U.S. Classification||717/109, 382/197, 382/113, 382/176|
|International Classification||G06F9/06, G05B19/05, G06K9/00, G06F9/44|
|Cooperative Classification||G05B19/056, G06F8/34, G05B2219/13113, G06K9/00476|
|European Classification||G06F8/34, G06K9/00L5, G05B19/05P|
|Aug 16, 1991||AS||Assignment|
Owner name: FUJI XEROX CO., LTD., JAPAN
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST.;ASSIGNORS:ITONORI, KATSUHIKO;SHIMIZU, NOBORU;REEL/FRAME:006025/0258
Effective date: 19910806
|Jul 20, 1998||FPAY||Fee payment|
Year of fee payment: 4
|Aug 20, 2002||REMI||Maintenance fee reminder mailed|
|Jan 31, 2003||LAPS||Lapse for failure to pay maintenance fees|
|Apr 1, 2003||FP||Expired due to failure to pay maintenance fee|
Effective date: 20030131