This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2014-058606, filed on Mar. 20, 2014; the entire contents of which are incorporated herein by reference.
An embodiment described herein relates generally to a correction device, a correction method, and a computer program product.
JP-A 2011-018228 (KOKAI) discloses a technique by which, during input of strokes handwriting-input by a user, when an acceleration sensor detects occurrence of an acceleration equal to or more a threshold value on a handwriting-input screen, strokes input in the period of detection are corrected by strokes input before and after the period of detection.
However, according to such a conventional technique as described above, it is not possible to correct strokes when an acceleration equal to or more than a threshold value has occurred at the input of strokes or when an acceleration equal to or more than a threshold value occurs at any time.
According to an embodiment, a correction device includes a processor, a display controller, an acquisition processor, a detector, and a correction processor. The processor is configured to generate a guide for content stored in the correction device. The display controller is configured to display the content on a display. The acquisition processor is configured to acquire data regarding a stroke on the display. The detector is configured to detect acceleration data regarding the stoke. The correction processor is configured to determine a corrected stroke based on the guide and the stroke when the acceleration is equal to or more than a threshold value. The display controller is configured to display the corrected stroke on the display.
An embodiment will be described in detail with reference to the attached drawings.
The input unit 11 can be implemented by an input device capable of handwriting input, such as a touch panel, touch pad, mouse, or electronic pen, for example. The acquisition unit 13, the generator 17, the display controller 19, and the corrector 25 may be implemented by causing a processing device such as a CPU (Central Processing Unit) to execute programs, that is, via software, or may be implemented via hardware such as ICs (Integrated Circuits), or may be implemented by using a combination of software and hardware. The storage 15 can be implemented by a storage device allowing magnetic, optical, or electronic storage, such as a HDD (Hard Disk Drive), SSD (Solid State Drive), memory card, optical disc, ROM (Read Only Memory), or RAM (Random Access Memory), for example. The display 21 can be implemented by a display device such as a touch panel display or liquid crystal display, for example. The detector 23 can be implemented by an acceleration sensor or gyro sensor, for example.
The input unit 11 inputs into the correction device 10 a specification of a content or a handwriting stroke by a user.
The acquisition unit 13 acquires the specification of a content and the stroke input from the input unit 11.
The storage 15 stores one or more contents. In the embodiment, contents are assumed to be digital documents such as documents generated via word-processing software, spreadsheet software, presentation software, and viewing software, and web pages, and handwritten documents generated by a user inputting handwritten data, and the like. However, the contents are not limited to these documents but may be still images, moving images, and the like.
When the acquisition unit 13 acquires an input for specifying a content, the generator 17 acquires the content from the storage 15 and generates a guide. Specifically, the generator 17 generates a guide using structure information on constituent elements of the acquired content.
In the embodiment, the structure information is at least one of a base line for character string, outer shape of a text box, and a bounding box for graphics, but is not limited to them.
When the content is a digital document, the content may contain structure information in advance. When the content is a handwritten document, the content may be analyzed in advance to generate structure information and add the same to the content.
Alternatively, the structure information may contain a base line for a character string separated into words and phrases. When the content is a digital document, the digital document may be provided in advance with results of character conversion or separated into words and phrases by morphological analysis.
The display controller 19 displays the content acquired by the generator 17 on the display 21.
The detector 23 detects an acceleration. Specifically, the detector 23 detects an acceleration of the correction device 10.
When the acceleration detected by the detector 23 is equal to or more than a threshold value and the acquisition unit 13 has acquired a stroke, the corrector 25 uses the guide generated by the generator 17 to correct the stroke. Specifically, the corrector 25 projects the stroke onto the guide positioned in the direction of occurrence of the acceleration equal to or more than the threshold value.
The display controller 19 will be described again. The display controller 19 displays on the display 21 the stroke corrected by the corrector 25.
The guide onto which a stroke to be corrected is projected may be decided based on priority according to the type of the guide or may be decided based on the distance from the stroke to be corrected.
First, when the acquisition unit 13 acquires an input for specifying a content, the generator 17 acquires the content from the storage 15 (step S101) to generate a guide (step S103).
Subsequently, the display controller 19 displays on the display 21 the content acquired by the generator 17 together with the guide generated by the generator 17 (step S105).
Subsequently, the acquisition unit 13 acquires a stroke (step S107).
Subsequently, when an acceleration detected by the detector 23 is equal to or more than a threshold value (Yes at step S109), the corrector 25 uses the guide generated by the generator 17 to correct the stroke acquired by the acquisition unit 13 (step S111).
When the acceleration detected by the detector 23 is not equal to or more than the threshold value (No at step S109), step 5111 is not carried out.
Subsequently, the display controller 19 displays on the display 21 the stroke corrected by the corrector 25 or the stroke acquired by the acquisition unit 13 (step S113). The display controller 19 may display on the display 21 both of the stroke corrected by the corrector 25 and the stroke acquired by the acquisition unit 13.
According to the embodiment described above, when an acceleration equal to or more than a threshold value occurs, a stroke is corrected using a guide for a content. It is thus possible to correct the stroke regardless of occurrence form of an acceleration.
An example in the case where the content is a sentence will be described below.
When an acceleration occurs in the direction of characters, start and end points of a stroke to be corrected are projected according to start and end points of a word.
In the example of
In the example of
A program to be executed in the correction device 10 according to the embodiment is stored and provided in the form of installable or executable files, in a computer-readable storage medium, as a computer program product, such as a CD-ROM, CD-R, memory card, DVD (Digital Versatile Disk), flexible disc (FD), and the like.
Alternatively, the program to be executed in the correction device 10 according to the embodiment may be stored in a computer connected to a network such as the Internet and provided by downloading through the network. Alternatively, the program to be executed in the correction device 10 according to the embodiment may be provided or distributed through a network such as the Internet. Alternatively, the program to be executed in the correction device 10 according to the embodiment may be incorporated in advance in a ROM or the like.
The program to be executed in the correction device 10 according to the embodiment has a module configuration in which the units described above are implemented on a computer. In terms of actual hardware, the CPU reads the program from the HDD into the RAM and executes the same to implement the foregoing units on the computer.
For example, the steps in the flowchart of the foregoing embodiment may be changed in order of execution, may be performed in plural at the same time, or may be performed in different order at each time of carrying out the embodiment.
As in the foregoing, according to the embodiment, it is possible to correct a stroke regardless of occurrence form of an acceleration.
While a certain embodiment has been described, this embodiment has been presented by way of example only, and is not intended to limit the scope of the inventions. Indeed, the novel embodiment described herein may be embodied in a variety of other forms; furthermore, various omissions, substitutions and changes in the form of the embodiment described herein may be made without departing from the spirit of the inventions. The accompanying claims and their equivalents are intended to cover such forms or modifications as would fall within the scope and spirit of the inventions.
Number | Date | Country | Kind |
---|---|---|---|
2014-058606 | Mar 2014 | JP | national |