1. Field of the Invention
The present invention relates generally to computer drawing systems and methods, and particularly to a system and method for shape recognition and correction that provides for computer recognition of a hand drawn geometric shape and replacement thereof with a matching regular geometric shape image.
2. Description of the Related Art
With computers and portable computing devices being used more frequently for everyday tasks, pattern recognition, and particularly geometrical shape recognition, is becoming increasingly important. With portable computing devices, in particular, being used for note taking and sketching that permits users to hand draw shapes and symbols, it is necessary for high level pattern and shape recognition to be implemented on the computing device in order to be able to properly interpret the intended shape the user draws. Although software that permits the user to hand draw or sketch images and graphics is known, such software offers very little flexibility for the user, particularly in allowing the user to choose between automatic recognition and replacement of shapes or manual selection of various replacement options.
Thus, a system and method for shape recognition and correction solving the aforementioned problems is desired.
The system and method for shape recognition and correction allows a user to hand draw a shape on a computer, personal digital assistant (PDA), portable device or the like, and to replace the hand drawn shape with a corrected geometrical shape. A database of regular geometrical shapes is established and stored in a database of geometrical shapes in computer readable memory. The user manually draws a manual geometric shape with a computer interface, such as a touch screen display, a drawing tablet, a light pen, a mouse or the like. The manual geometric shape is then stored as a first geometric data set in the computer readable memory. The position of the manual geometric shape relative to a display screen of the computer or portable device is also stored in the computer readable memory. The manual geometric shape is displayed to the user on the display.
A best fit geometrical shape is selected from the database of geometrical shapes, so that the best fit geometrical shape has contours approximately matching the contours of the manually drawn geometric shape. The best fit geometrical shape is then scaled to have dimensions approximately matching dimensions of the manual geometric shape.
In a first mode, the best fit geometrical shape is selected automatically. Preferably, the system requests approval for the replacement of the manual geometric shape with the best fit geometric shape before proceeding. Once approved, the best fit geometrical shape is stored as a second geometric data set in the computer readable memory and the first geometric data set is replaced with the second geometric data set. The best fit geometric shape is then displayed to the user on the display with the best fit geometric shape replacing the manual geometric shape in the same position as the manual geometric shape.
In a second mode, the best fit geometrical shape is manually selected by the user. A plurality of estimated best fit geometrical shapes from the database of geometrical shapes is displayed to the user. The user then manually selects the best fit geometrical shape from the plurality of estimated best fit geometrical shapes. In a third mode, the system attempts to automatically select the best fit geometrical shape, but if this attempt fails, then the system reverts to the second mode, where the best fit geometrical shape is manually selected by the user. In the third mode, the failure to automatically select the best fit geometrical shape may occur if the user does not approve the replacement of the manual geometric shape with the selected best fit geometric shape.
Alternatively, the automatically selected best fit geometrical shape may be compared with the manual geometric shape and a difference therebetween is calculated. If the difference exceeds a predetermined threshold value, then the system goes to the second mode, in which the best fit geometrical shape is manually selected by the user.
These and other features of the present invention will become readily apparent upon further review of the following specification and drawings.
Similar reference characters denote corresponding features consistently throughout the attached drawings.
The system and method for shape recognition and correction allows a user to hand draw a shape on a computer, personal digital assistant (PDA), portable device or the like and replace the hand drawn shape with a corrected geometrical shape selected from a database stored on a computer readable medium. In
It should be understood that the calculations described below may be performed by any suitable computer system, such as that diagrammatically shown in
The processor 200 may be associated with, or incorporated into, any suitable type of computing device, for example, a personal computer or a programmable logic controller. The display 16, the processor 200, the memory 210 and any associated computer readable recording media are in communication with one another by any suitable type of data bus, as is well known in the art.
Examples of computer-readable recording media include a magnetic recording apparatus, an optical disk, a magneto-optical disk, and/or a semiconductor memory (for example, RAM, ROM, etc.). Examples of magnetic recording apparatus that may be used in addition to memory 210, or in place of memory 210, include a hard disk device (HDD), a flexible disk (FD), and a magnetic tape (MT). Examples of the optical disk include a DVD (Digital Versatile Disc), a DVD-RAM, a CD-ROM (Compact Disc-Read Only Memory), and a CD-R (Recordable)/RW.
In use, a database of regular geometrical shapes is established and stored in a database of geometrical shapes in computer readable memory 210. As shown in
A best fit geometrical shape 30 is selected from the database of geometrical shapes so that the best fit geometrical shape 30 has contours approximately matching the contours of the manual geometric shape. The best fit geometrical shape 30 is then scaled to have dimensions approximately matching dimensions of the manual geometric shape 14.
In a first mode, the best fit geometrical shape 30 is selected automatically. Preferably, the system 10 requests approval for the replacement of the manual geometric shape 14 with the best fit geometric shape 30 before proceeding. As shown in
Once approved, the best fit geometrical shape 30 is stored as a second geometric data set in the computer readable memory 210 and the first geometric data set is replaced with the second geometric data set. The best fit geometric shape 30 is then displayed to the user on the display, the best fit geometric shape 30 replacing the manual geometric shape in the same position as the manual geometric shape, as shown in
In a second mode, the best fit geometrical shape 30 is manually selected by the user, as shown in
In a third mode, illustrated in the flowchart of
Alternatively, at step 120, the automatically selected best fit geometrical shape may be compared with the manual geometric shape 14 and the difference therebetween is then calculated. If the difference exceeds a predetermined threshold value, which may be selected by the user from a preferences or options dialog box setting the default behavior of the system and method, then the system goes to the second mode, in which the best fit geometrical shape is manually selected by the user. At the beginning of the process, the user may select whether to use the first, second or third modes of operation.
It should be understood that system 10 may use any suitable type of pattern recognition or shape recognition to determine the best fit geometrical shape based on the manually drawn shape 14. Such pattern recognition systems and methods are well known in the art. Examples of such systems and methods are shown in U.S. Pat. Nos. 4,058,849; 5,544,265; 5,771,342; and 6,233,351, each of which is hereby incorporated by reference in its entirety.
It is to be understood that the present invention is not limited to the embodiments described above, but encompasses any and all embodiments within the scope of the following claims.