This application claims priority to Taiwan Application Serial Number 97142694, filed Nov. 5, 2008, which is herein incorporated by reference.
The present invention relates to a word string arranging apparatus and method thereof, and especially to an automatic word string arranging apparatus and method.
Mouse and keyboard are standard input equipments for computers. However, there are many differences among mouse, keyboard and pen in writing and drawing. Therefore, it is necessary for a novice to spend much time to study how to control mouse and keyboard and to remember the positions of the basic characters in keyboard. Therefore, a digital board is developed for resolving the foregoing problems.
The digital board includes a pen and a sensor board. A user uses the pen to draw in the sensor board. The sensor board can sense the drawing content and transform the content to digital signals to send to a computer to display. However, such input method requires the user to keep a close watch on the display to insure that the display position in the display is correct. It is very inconvenient for a user. Moreover, if the sensitivity of the digital board is not good, the size and the position of the content shown in the display will be different from what the user wants. For example, the user needs a word string arranged in a line shown in the display. However, because of not good sensitivity of the digital board, the word string shown in the display can be arranged at an angle.
Therefore, an apparatus and a method that can resolve the foregoing problems are needed.
Therefore, the present invention provides an apparatus and a method to automatically arrange word string in the display based on a datum point.
In accordance with the foregoing purpose, the present invention discloses a method to automatically arrange word string in a display. The word string includes two words. The method includes the following steps. The first step is to define the positions of the start position and the stop position of strokes of the two words. The second step is to group the start position and the stop position based on a threshold value. The third step is to circle the words based on the grouping result. The final step is to rearrange the two words based on a datum point.
Moreover, the present invention discloses an apparatus to automatically arrange word string in a display. The word string includes two words. The apparatus includes a selecting module to define the positions of the start position and the stop position of strokes of the two words, a grouping module to group the start position and the stop position based on a threshold value and to circle the words based on the grouping result and an arranging module to rearrange the two words based on a datum point.
Accordingly, the words are divided into a plurality of strokes. Then, these strokes are arranged in the display to constitute the words again based on a datum point. Such apparatus and method can correct the word string from being arranged at an angle to be arranged in a line.
The foregoing aspects and many of the attendant advantages of this invention will become more readily appreciated as the same becomes better understood by reference to the following detailed description, when taken in conjunction with the accompanying drawings, wherein:
There is no orientation line in a conventional digital board. Therefore, using digital board to input information requires the user to keep a close watch on the display to insure that the display position in the display is correct. It is very inconvenient for a user. Moreover, if the sensitivity of the digital board is not good, the size and the position of the content shown in the display will be different from what the user wants. Therefore, the present invention provides an apparatus and method to automatically arrange the word string to resolve the foregoing problems.
When writing a word, each stroke of the word is sequentially written to form the word. Each stroke has a start position and a stop position. Moreover, a user intentionally leaves a space between two adjacent words for distinguishing each word in a word string. The present invention uses the foregoing features to distinguish range of each word in a word string. Then, the word string is arranged again based on the range.
In an embodiment, a user uses an input device to input a word string, and displays in a display. An orientation problem causes the word string, arranged at an angle as illustrated in
In step 102, adjacent defined positions are grouped. A user intentionally leaves a space between two adjacent words for distinguishing each word in a word string. Typically, the space is half of the range of a word. In an embodiment, the average length of all strokes is defined as the range of a word. The present invention uses this foregoing definition to group the defined positions. These positions in a group represent the start positions or the stop positions of a word. A start position and a stop position that are sequentially defined represents a stroke exists between this start position and this stop position. When the distance between two adjacent strokes is less than half of the average length of all strokes, the two adjacent strokes is determined to belong to same word. For example, the word, is illustrated in the
On the other hand, if the foregoing determination method can not determine whether or not a stroke should belong to the word, an auxiliary determination method is provided in the following. When a first stroke is surrounded by other strokes that belong to a same word, the first stroke is determined to belong to this word even though the distances among the first stroke and other strokes is larger than half of the range the word occupied therein. For example, in
In another embodiment, if a first stroke crosses a second stroke and the second stroke follows the first stroke, the first stroke and the second stroke are determined to belong to a same word. For example, the stroke 405 crosses the stroke 406 in the word and the stroke 406 follows the stroke 405, the stroke 405 and the stroke 406 are determined to belong to a same word. Moreover, the stroke 407, 408 and 409 cross the stroke 410 in the word Therefore, the stroke 407, 408, 409 and 4109 are determined to belong to a same word.
In another embodiment, a projecting method is used to divide a word string. When a word is projected, a gray level projection drawing is formed.
Then, step 103 is to circle the words based on the grouping result in step 102. Moreover, a word range is also defined in this step 103 by determining the pixel position of the strokes of the word. For example, in
Finally, step 104 is to arrange the words. In this step, the words are arranged again based on the range defined in step 103 and based on a datum point. In an embodiment, the datum point is the lowest position of the words defined in the step 103. For example, in
In another embodiment, the dividing module 702 further includes a projecting module 7023 to project a word string or a paragraph to form a gray level projection drawing. When any word is projected, a wave peak 602 is formed in the projection diagram; otherwise, a wave trough 601 is formed in the projection diagram as shown in the
Accordingly, the words are divided into a plurality of strokes. Then, these strokes are arranged in the display to constitute the words again based on a datum point. Such apparatus and method can correct the word string from being arranged at an angle to be arranged in a line.
While the preferred embodiment of the invention has been illustrated and described, it will be appreciated that various changes can be made therein without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
97142694 | Nov 2008 | TW | national |