Claims
- 1. In a computing system for handling freehand drawn lines and shapes, a method for improving the appearance of the hand drawn lines and shapes comprising:
comparing a source line segment of a source line against a straight line and detecting a deviation value indicating deviation between the source line segment and the straight line; straightening the source line segment to a straight line if the deviation value is below a predetermined threshold value; evaluating the source line segment as an angle segment, when the deviation value is below a predetermined threshold value, by detecting whether the source line segment can be defined as an angle segment with two straight line segments and defining the line segment as an angle segment having two straight line segments intersecting at an angle if the source line segment can be defined with two straight line segments; dividing the source line segment into new segments if the deviation value is not below the predetermined threshold value and the line segment can not be defined as an angle segment; and repeating the acts of comparing, straightening, evaluating and dividing on the new segments until all segments of the source line have been straightened.
- 2. The method of claim 1 further comprising:
detecting if the source line closes on itself and thereby forms a shape; improving the shape to a polyline shape if the source line closes on itself; and improving the source line to a polyline if the source line does not close on itself.
- 3. The method of claim 2 further comprising:
comparing the polyline shape against reference shapes and improving the polyline shape to a reference shape most similar to the polyline shape.
- 4. The method of claim 1 wherein the act of detecting comprises:
finding a point of intersection between a first source line segment and a second source line segment making up the angle segment; comparing the first source line segment to a straight line to determine if its deviation is below the predetermined threshold; and comparing the second source line segment to a straight line to determine if its deviation is below the predetermined threshold.
- 5. The method of claim 4 wherein the act of defining comprises:
straightening the first line segment to a straight line and the second line segment to a straight line intersecting at the point of intersection if both the first and second source line segments have a deviation from a straight line below the predetermined threshold.
- 6. The method of claim 5 further comprising:
combining line segments and angle segments to form a polyline; and detecting if the polyline line closes on itself and thereby forms a polyline shape.
- 7. The method of claim 6 further comprising:
comparing the polyline shape against basic reference shapes and improving the polyline shape to a transformed shape transformed from a basic shape most similar to the polyline shape; and adjusting the transformed shape to a specific shape identified from the basic shape.
- 8. A system for reshaping freehand drawn lines and shapes in a computing system having a display and a pointing device for drawing lines and shapes on the display, the system comprising:
a polyline recognition module analyzing freehand drawn lines and shapes and generating a polyline made up of sequential straight line segments when the polyline does not form a closed line and generating a polyline shape when the polyline forms a closed line; a basic shape recognition module responsive to the polyline recognition module and selecting a basic shape from reference ideal shapes as the basic shape of the polyline shape; and a shape adjustment module responsive to the basic shape recognition module and adjusting the basic shape to provide a specific shape as an improved polyline shape.
- 9. The system of claim 8 wherein said polyline recognition module comprises:
a straight line compare module comparing segments of a source line to a straight line and defining a segment as a line segment if the difference between the source line and the straight line is below a predetermined value; an evaluate module analyzing segment pairs as an angle segment and defining a segment pair as an angle segment if both segments of the segment pair are within a predetermined deviation from a straight line; and a combine module combining line segments from the straight line compare module and angle segments from the evaluate module to generate a polyline or polyline shape.
- 10. The system of claim 9 wherein the polyline recognition module further comprises:
a closed line detect module determining whether the combined line segments from the combine module form a polyline or a polyline shape.
- 11. The system of claim 8 wherein the basic shape recognition module comprises:
a transform module transforming the reference ideal shapes into transformed shapes relative to the polyline shape; a comparison module matching each transformed shape to the polyline shape and storing a similarity value for each transformed shape indicating similarity between the polyline shape and the transformed shape; a selection module selecting the transformed shape with the highest similarity value as the basic shape of the polyline shape.
- 12. The system of claim 11 wherein said shape adjustment module comprises:
a test module identifying a specific shape from the basic shape.
- 13. The system of claim 11 wherein said shape adjustment module comprises:
angle adjustment module changing angles of segments in the basic shape to standard angles for a specific shape. line segment adjustment module adjusting the parallelism of line segments and line segments relative to a horizontal and vertical grid line.
- 14. Apparatus for improving the appearance of freehand drawn lines and shapes displayed in an electronic document, said apparatus comprising:
means for recognizing freehand drawn lines and shapes and generating a line made up of sequential straight line segments for the freehand drawn line when the line does not form a closed line and generating a multiple straight-line-segment shape when the line forms a closed line; means responsive to the multiple straight-line-segment shape for selecting a basic shape from reference ideal shapes as the basic shape of the freehand drawn shape; and means responsive to the basic shape for adjusting the basic shape to provide a specific shape as an improved shape for the freehand drawn shape.
- 15. The apparatus of claim 14 wherein said means for recognizing comprises:
means for comparing segments of a source freehand drawn line to a straight line and defining a segment as a straight line segment if the deviation between the segment of source line and the straight line is below a predetermined value; means for evaluating sequential source segments of a source freehand drawn line as an angle segment and defining a segment pair of sequential straight line segments as an angle segment if both source segments of the segment pair are within a predetermined deviation value from a straight line; and means for serially combining straight line segments and angle segments to form a multiple segment line or a multiple segment shape.
- 16. The system of claim 15 wherein said means for selecting comprises:
means for transforming the reference ideal shapes into transformed shapes similar to the multiple segment shape; means for matching each transformed shape to the multiple segment shape and storing a similarity value for each transformed shape indicating similarity between the multiple segment shape and the transformed shape; a selection module selecting the transformed shape with the highest similarity value as the basic shape of the freehand drawn shape.
- 17. The system of claim 16 wherein said means for adjusting comprises:
means for identifying a specific shape from the basic shape.
- 18. The system of claim 16 wherein said means for adjusting comprises:
means for changing angles of segments in the basic shape to standard angles for a specific shape. means for set line segments parallel to each other or to one of a horizontal and vertical grid line.
- 19. A computer program product readable by a computing system and encoding a computer program of instructions for executing a computer process for improving the appearance of freehand drawn lines and shapes, said computer process comprising:
recognizing freehand drawn lines and shapes and generating a line made up of sequential straight line segments for the freehand drawn line when the line does not form a closed line and generating a multiple straight-line-segment shape when the line forms a closed line; selecting a basic shape from reference ideal shapes as the basic shape of the multiple segment shape; and adjusting the basic shape to provide a specific shape as an improved shape for the freehand drawn shape.
- 20. The computer program product of claim 19 wherein said act of recognizing comprises:
comparing source segments of a source freehand drawn line to a straight line and substituting a straight line segment for a source segment if the deviation between the source segment and the straight line is below a predetermined value; evaluating sequential source segments of a source freehand drawn line as an angle segment and defining a segment pair of sequential source line segments as an angle segment having two straight line segments intersecting at a common end point if both source segments of the segment pair are within a predetermined deviation value from a straight line; and combining straight line segments and angle segments to form a multiple segment line or a multiple segment shape.
- 21. The computer program product of claim 20 wherein said act of selecting comprises:
transforming the reference ideal shapes into transformed shapes similar to the multiple segment shape; matching each transformed shape to the multiple segment shape and storing a similarity value for each transformed shape indicating similarity between the multiple segment shape and the transformed shape; and selecting the transformed shape with the highest similarity value as the basic shape of the freehand drawn shape.
- 22. The program product of claim 21 wherein said act of adjusting comprises:
identifying a specific shape from the basic shape.
- 23. The program product of claim 21 wherein said act of adjusting comprises:
changing angles between line segments in the basic shape to standard angles for a specific shape; setting line segments parallel to each other or to one of a horizontal and vertical grid line.
RELATED APPLICATIONS
[0001] This application claims the benefit of priority of U.S. provisional application Serial No. 60/284,075, filed Apr. 16, 2001.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60284075 |
Apr 2001 |
US |
Divisions (1)
|
Number |
Date |
Country |
Parent |
10123708 |
Apr 2002 |
US |
Child |
10637930 |
Aug 2003 |
US |