CN107544743B - Method and device for adjusting characters and electronic equipment - Google Patents

Method and device for adjusting characters and electronic equipment Download PDF

Info

Publication number
CN107544743B
CN107544743B CN201710718416.0A CN201710718416A CN107544743B CN 107544743 B CN107544743 B CN 107544743B CN 201710718416 A CN201710718416 A CN 201710718416A CN 107544743 B CN107544743 B CN 107544743B
Authority
CN
China
Prior art keywords
character
adjusting
writing
writing direction
characters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710718416.0A
Other languages
Chinese (zh)
Other versions
CN107544743A (en
Inventor
李仁鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shizhen Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710718416.0A priority Critical patent/CN107544743B/en
Publication of CN107544743A publication Critical patent/CN107544743A/en
Application granted granted Critical
Publication of CN107544743B publication Critical patent/CN107544743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The invention provides a method and a device for adjusting characters and electronic equipment, wherein the method for adjusting the characters comprises the following steps: recognizing the written content into a single character; determining a reference area of each character according to the coordinate information of each character; and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value. The invention can lead the writing content to be tidy when the user writes on the electronic equipment.

Description

Method and device for adjusting characters and electronic equipment
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for adjusting characters and electronic equipment.
Background
When a finger or an electronic pen is used to write on a touch screen electronic device, the difficulty of writing on traditional paper is higher. The typesetting of the written interface is not very neat generally, and the condition of non-uniform word spacing often occurs, so that the final display effect is not beautiful. When users find such problems after writing, only part of the content is erased for rewriting, but after rewriting, the regularity of the written content is still difficult to ensure.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for adjusting a text, and an electronic device, so that when writing is performed on the electronic device, the writing content is uniform.
Specifically, in one embodiment, the invention is realized by the following technical scheme:
a method of adjusting text, the method comprising:
recognizing the written content into a single character;
determining a reference area of each character according to the coordinate information of each character;
and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
In some examples, the reference region includes any one of: the writing method comprises the following steps of (1) obtaining a central area, a maximum value area in the writing direction, a minimum value area in the writing direction, an occupied rectangular area and a reference point;
the reference points include: a center point, a maximum point in the writing direction, and a minimum point in the writing direction.
In some examples, the approximation includes: the distance between adjacent characters in the writing direction.
In some examples, the approximation is no less than half of the distance that any two adjacent characters occupy in the writing direction.
In some examples, the approximation is not less than either
Figure BDA0001384360000000021
Wherein the content of the first and second substances,
Figure BDA0001384360000000022
wherein, D [ i ] is the distance occupied by the ith character in the writing direction; i is an integer;
α is the included angle between the writing direction and the horizontal direction, 0 degree is more than or equal to α degrees and less than 360 degrees;
the coordinates of the maximum point of the ith character in the writing direction are as follows: (x)max[i],ymax[i]);
The coordinates of the minimum point of the ith character in the writing direction are as follows: (x)min[i],ymin[i])。
In some examples, recognizing the written content as a single word includes the steps of:
identifying a rectangular area occupied by each graph according to the coordinate information of each graph in the written content;
and identifying the graphs of the rectangular areas with the overlapped parts as the same character.
In some examples, recognizing the written content as a single word includes the steps of:
and acquiring the writing interval time of each graph in the writing content, and identifying the graphs with the time intervals smaller than a preset value as the same character.
In some examples, the method further comprises the steps of:
the reference areas of all the characters are arranged on the same straight line.
In some examples, the method further comprises: and simultaneously amplifying or reducing all the characters according to the preset touch gesture.
In some examples, the method further comprises: and changing the approximate value according to a preset touch gesture.
In some examples, the predetermined touch gesture includes sliding in a direction at an angle η from a reference direction,
according to the change of η, different control instructions are sent out, wherein the control instructions comprise that all characters are amplified, reduced, approximate values are increased and approximate values are reduced simultaneously;
the reference direction includes any one of: writing direction, horizontal direction and vertical direction.
In some examples, the method further comprises the steps of:
each word is set to a uniform size.
An apparatus for adjusting text, comprising:
an identification module: for recognizing the written content as a single word;
a processing module: a reference area used for determining each character according to the coordinate information of each character; and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
An electronic device, comprising:
a memory storing processor-executable instructions; wherein the processor is coupled to the memory for reading program instructions stored by the memory and, in response, performing the following:
recognizing the written content into a single character;
determining a reference area of each character according to the coordinate information of each character;
and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
A storage medium having stored thereon a computer program for execution by a processor to:
recognizing the written content into a single character;
determining a reference area of each character according to the coordinate information of each character;
setting the spacing of adjacent characters as an approximate value;
and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
The invention identifies the writing content into a single character; then, the reference area of each character is determined according to the coordinate information of each character, and finally, the distance between the reference areas of the adjacent characters is set as an approximate value. Therefore, the space between every two characters in the written content is close, and the regularity of the written content is ensured.
Drawings
FIG. 1 is a diagram illustrating effects of writing on an electronic device according to the prior art;
FIG. 2 is a partial flow diagram illustrating the adjustment of text in accordance with an exemplary embodiment of the present invention;
FIG. 3a is a schematic diagram illustrating an exemplary embodiment of the present invention before text is adjusted;
FIG. 3b is a diagram illustrating text after adjustment according to an exemplary embodiment of the present invention;
FIG. 4a is a partial flow diagram illustrating the identification of a single word in accordance with an exemplary embodiment of the present invention;
FIG. 4b is a diagram illustrating the identification of a single word in accordance with an exemplary embodiment of the present invention;
FIG. 5a is a partial flow diagram illustrating the identification of a single word in accordance with another exemplary embodiment of the present invention;
FIG. 5b is a schematic diagram illustrating the identification of a single word in accordance with another exemplary embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating the identification of a single word in accordance with another exemplary embodiment of the present invention;
FIG. 7 is a schematic diagram illustrating the identification of a single word in accordance with another exemplary embodiment of the present invention;
FIG. 8 is a diagram illustrating adjusting text in accordance with an exemplary embodiment of the present invention;
FIG. 9 is a diagram of the hardware architecture of an electronic device in an exemplary embodiment of the invention;
fig. 10 is a logic block diagram of an application program of a text adjusting apparatus according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
When a finger or an electronic pen is used to write on a touch screen electronic device, the difficulty of writing on traditional paper is higher. The layout of the written interface is not very well-arranged, and the case of non-uniform word spacing often occurs, for example, the effect shown in fig. 1 may occur, so that the final display effect may be not beautiful.
Based on the above problem, an embodiment of the present invention provides a method for adjusting a character, which aims to make a space between characters written on an electronic device consistent and a layout neat, and fig. 2 is a partial step of the method for adjusting a character provided by the embodiment of the present invention:
step S201: recognizing the written content into a single character;
step S202: determining a reference area of each character according to the coordinate information of each character;
step S203: and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
In some examples, the spacing of adjacent words in the writing direction includes: the distance of the adjacent text reference areas in the writing direction.
In some examples, the operations of the method for adjusting the text may be performed by an electronic device, and of course, in other examples, the operations of the method for adjusting the text may be performed by an operating system or other execution subjects, such as a program running on the electronic device, according to differences of the operating system. The electronic device proposed in the embodiment of the present invention may have a touch screen, for example: smart tablets, smart phones, tablet computers, electronic devices, etc., the present invention is not limited to the type of electronic device.
The following description will be given by taking a program running on an electronic device as an execution subject by way of example. For convenience of description, the above program is referred to as a character adjustment program in the embodiment of the present invention.
The reference region provided by the embodiment of the present invention may be a region occupying a certain area, or may be a closed wire frame, or a line, or a point, and in some examples, the reference region may be: a central area, a maximum value area in the writing direction, a minimum value area in the writing direction, an occupied rectangular area and the like; in some examples, the reference region may be a reference point, which in some examples may be: a center point, a maximum point in the writing direction, a minimum point in the writing direction, etc. The present invention does not limit the type of the reference area.
The coordinate information provided by the embodiment of the present invention may include coordinates of each pixel point of a single character, and in some examples, the coordinate information may be more than one or one of the following: the maximum value coordinate of each character in the writing direction, the minimum value coordinate in the writing direction, the maximum value coordinate in the second direction and the minimum value coordinate in the second direction, wherein the second direction is perpendicular to the writing direction.
The writing direction proposed by the embodiment of the present invention may be a horizontal direction or a vertical direction in some examples, the included angle α between the writing direction and the horizontal direction may be xy 44-xy 11 or xy 33-yx 22 in some examples, where the maximum value coordinates of all the written contents in the horizontal direction are (x1, y1), the minimum value coordinates of the horizontal direction are (x2, y2), the maximum value coordinates of the vertical direction are (x3, y3), and the minimum value coordinates of the vertical direction are (x4, y 4).
In some examples, the approximate value may be a uniform fixed value, such as obtaining a distance between respective reference areas of two adjacent characters in the writing direction, where the distance is an approximate value or a fixed value set by a user according to the reference area of each character. In some cases, if the value of the approximation is small, it may happen that two characters overlap, so in some cases, the approximation is not less than half of the distance that any two adjacent characters occupy in the writing direction.
In some examples, the approximation is no less than either
Figure BDA0001384360000000061
Wherein the content of the first and second substances,
Figure BDA0001384360000000062
wherein, D [ i ] is the distance occupied by the ith character in the writing direction; i is an integer;
α is the included angle between the writing direction and the horizontal direction, 0 degree is more than or equal to α degrees and less than 360 degrees;
the coordinates of the maximum point of the ith character in the writing direction are as follows: (x)max[i],ymax[i]);
The coordinates of the minimum point of the ith character in the writing direction are as follows: (x)min[i],ymin[i])。
In some examples, the approximation may be any value close to a fixed value, for example, 10.67mm and 10.5mm may be approximations proposed by the present invention. When the distance between the first letter and the second letter is 10.67mm, and the distance between the second letter and the three letters is 10.5mm, the three letters can be considered to be consistent because the three letters cannot be slightly distinguished by naked eyes of people.
In some application scenarios, a writable range may exist in the writing direction, and if the writable range is exceeded, the writable range may exceed a frame of the electronic device or cover other characters, and if the writable range is not adjusted, the written content does not exceed the writable range. To avoid this, in some instances, the approximation may be automatically adjusted based on the writeable range to ensure that the writeable range is not exceeded. For example, the writable range in the writing direction is 190mm, and the distance occupied by each character in the writing direction is 10mm if consistent; if the written content is 14 characters, before character adjustment is not carried out, the written content does not exceed the writable range; if the approximation value is set to be 14mm, the distance between the adjacent characters is the distance between the center points of each character, the distance occupied by the writing content after character adjustment in the writing direction is 19.2mm, and in order to prevent the writing content from exceeding the writable range, the last two distances between the last three characters can be set to be 13.9 mm.
Fig. 3a is a schematic diagram of a method for adjusting characters according to an exemplary embodiment of the present invention, where as shown in the drawing, a "writing content style" is a writing content, the writing content is recognized as 6 characters "book", "write", "content", "appearance", "form", and then a reference region is determined according to coordinate information of each character, this embodiment is described by taking the reference region as a center point of each character, a distance between adjacent characters is a distance between center points of two adjacent characters in a writing direction, in fig. 3a, before character adjustment is not performed, distances between adjacent characters are d1, d2, d3, d4, and d5, respectively, if an approximation value is set as d0, after character adjustment is performed, as shown in fig. 3b, distances between all characters are set as d 0. Compared with fig. 3a, in the writing content after the character adjustment in fig. 3b, the intervals of all characters are nearly consistent, and the regularity of the writing content is achieved.
The written content provided by the embodiment of the invention can be characters, symbols, letters, numbers and the like written on the touch screen of the electronic equipment by a user, and the invention does not limit the type of the written content. In some examples, the written content may be content selected according to user instructions; for example, a user writes the following on a touch screen of an electronic device:
character adjusting method
Adjustment of character spacing "
The user can only select the second line of characters, namely character spacing adjustment, or a plurality of characters are used as writing contents to adjust, so that the occupation of a processor in the electronic equipment is reduced.
In other examples, the written content may be content written by the user on the electronic device during execution of the text adjustment program; in other examples, the written content may be content written on the electronic device by the user during the execution of the text adjustment program, the user triggering an instruction, and then triggering the instruction again. For example: the user can click the trigger mark for character adjustment first, the user writes five characters in a 'writing content sample' on the electronic equipment, and when the user clicks the trigger mark for character adjustment again and then writes 'formula' characters, only the five characters in the 'writing content sample' are writing contents, and the 'formula' characters cannot be used as the writing contents.
The characters provided by the embodiment of the invention can comprise characters of various countries, such as Chinese characters, English and the like, and the characters can also comprise punctuation marks and numbers. In some examples, the text may consist of a graphic, which in some examples may be a stroke; in some examples, the graphic components are connected, such as the Chinese character "Chuan" is composed of three graphic components, and the Chinese character "mu" is connected, so that the graphic component is a graphic, and similarly, the English letter "A" is a graphic, the Japanese "ち" is a graphic, and the exclamation point! "consists of two patterns.
In some examples, the writing content is identified by judging whether the rectangular area occupied by each graph has an overlapping part or not by judging the coordinate information of each graph in the writing content;
in other examples, a single word may be identified by the time between writes at which the user writes each graphic.
The specific steps for recognizing the written content as a single character are described below in an exemplary manner.
As shown in fig. 4a, in one example, the step of recognizing the written content as a single word comprises:
step S401: identifying a rectangular area occupied by each graph according to the coordinate information of each graph in the written content;
step S402: and identifying the graphs of the rectangular areas with the overlapped parts as the same character.
As shown in fig. 4b, in an example, the written content is recognized as a single character, as shown in fig. 4b, taking the written content as a "style" two character as an example, a user writes the "style" two character on a touch screen of an electronic device, the system recognizes 6 graphs, which are 401 to 406 respectively, and then obtains coordinates of the 6 graphs respectively, and after recognizing a rectangular area of each graph, as shown in the figure, if there is an overlap between the rectangles occupied by the graphs 401 and 402, the graphs 401 and 402 belong to the same character, there is an overlap between the rectangles occupied by the graphs 402 and 403, and the graphs 402 and 403 belong to the same character, so that the graphs 401, 402 and 403 belong to the same character, and similarly, the graphs 404, 405 and 406 belong to the same character.
In other examples, the feature that the user stays between each character for a long time and stays between the graphics of the same character for a short time when writing is performed may be utilized. Individual words are identified by the time between writes for which each graphic was written. As shown in fig. 5a, some steps are as follows:
step S501: obtaining the writing interval time between each graph in the writing content, if the writing interval time of a plurality of adjacent graphs is less than a preset value,
step S502: the patterns are recognized as the same character.
In some examples, the preset value may be a fixed value, and in other examples, the preset value may be obtained through analysis of writing habits of the user. In some examples, the graph may also be a stroke, and with reference to fig. 5b, taking the written content as a "mountain and river" two-character as an example, the step of obtaining the preset value includes:
acquiring the interval time between each stroke, in the example shown in fig. 5b, the "mountain" two-character includes 6 strokes, the time interval for writing each stroke is △ t1, △ t2, △ t3, △ t4 and △ t5, for convenience of description, table 1 exemplarily lists the specific values of the time intervals;
arranging all the time interval values in the order of magnitude, in this embodiment, all the time interval values are arranged in the order of magnitude from small to large for 0.1s, 0.25s, 0.26s, 0.31s and 0.67 s;
acquiring the difference between the time interval values, which are 0.15s, 0.01s, 0.05s and 0.36s in sequence in the embodiment;
identifying the maximum value of the difference between the time interval values, and acquiring a first boundary interval time and a second boundary interval time corresponding to the maximum value, wherein in the embodiment, 0.36s is the maximum value of the difference, and then the first boundary time and the second boundary time are 0.31s and 0.67s respectively;
the preset value is set to any value between the first boundary interval time and the second boundary interval time, which is any value between 0.31s and 0.67s in this embodiment.
Table 1 time intervals and time interval values exemplarily shown by embodiments of the present invention
Time interval △t1 △t2 △t3 △t4 △t5
Time interval value(s) 0.25 0.26 0.67 0.1 0.31
In some cases, due to irregular writing of some users, incorrect recognition of individual characters may occur, and in some cases, the incorrectly recognized characters may be corrected by an "error correction mode" in response to the above problem. Part of the steps are as follows:
after the reference area of each character is determined based on the coordinate information of each character,
displaying the reference area;
and identifying the characters corresponding to the at least two reference areas selected by the user into the same character according to the instruction of the user.
As shown in fig. 6, if the user writes two graphics of the same text too far away, the two graphics may be recognized as two texts, such as "sample" 603 shown in fig. 6, as "wood" 602 and "sheep" 601, the user may recognize the two texts as the same text by a touch gesture, for example, the user may recognize the two graphics of "wood" and "sheep" as the same text "sample" by sliding on "wood" 602 and "sheep" 601.
In some examples, the partial step of correcting the recognized text by the "error correction mode" is:
after the reference area of each character is determined based on the coordinate information of each character,
displaying the reference area;
according to the instruction of the user, the characters corresponding to one reference area selected by the user are split into a plurality of characters.
For example: as shown in fig. 7, taking a rectangular frame occupied by a reference area as a text as an example, if two texts "appearance" 701 "702 are recognized as one text, a user can issue an instruction to split the text recognized as the unified text" appearance "703 through a touch gesture 704, and after obtaining the instruction, the text" appearance "can be recognized as two texts" appearance "and" appearance ". The touch gesture described above is only an optional embodiment of the present application, and the present application does not limit the type of the touch gesture.
In some cases, the written content may not be on the same straight line, and in order to make the written content look more neat, in some examples, the reference areas of all the characters may be set on the same straight line, taking the reference area as the center point of the character as an example, after the center coordinate of each character is determined by the boundary coordinate of each character, the writing direction is generated according to the written content, the second center coordinate of each character is determined according to the writing direction, and each character is moved to the corresponding second coordinate and displayed.
In some cases, the size of each character of the written content may not be uniform, and in order to make the written content look more tidy, the size of the area occupied by all the characters may be set to be similar in some examples.
In some examples, the control command may be issued by a slide gesture, and different control commands may be issued according to the size of an angle η between the slide direction and a reference direction, by which a user may issue different control commands by changing only the slide direction, not only for convenient user memory, but also for easier operation, the control command proposed by the above embodiments may include simultaneously enlarging, reducing, increasing the approximation, decreasing the approximation, etc. for example, as shown in FIG. 8, when the user slides at an angle β from the reference direction, the control command may be to simultaneously enlarge all the characters by a larger magnification factor as the slide distance increases, when the user slides at an angle θ from the reference direction, the control command may be to simultaneously reduce all the characters by a larger factor as the slide distance increases, when the user slides at an angle ψ from the reference direction, the control command may be to increase the approximation and increase as the slide distance increases, and when the user slides at an angle Φ from the reference direction, the control command may be to decrease the approximation as phi 0 and decrease the approximation as the slide distance increases, and the approximation may be < 360 < horizontal, etc.
Corresponding to the embodiment of the text adjusting method, the application also provides an embodiment of the electronic device.
The text adjusting device can be applied to electronic equipment. Hardware block diagram of electronic device referring to fig. 9, the terminal device may include hardware such as a processor, a memory, a network interface, and a non-volatile memory. The embodiment of the text adjusting device can be realized by an application program, or by hardware or a combination of hardware and software. Taking the application program implementation as an example, as a device in a logical sense, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the electronic device where the device is located. From a hardware aspect, as shown in fig. 9, the present application is a hardware structure diagram of a terminal device where the text adjusting apparatus is located, and besides the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 9, an electronic device where the apparatus is located in the embodiment may also include other hardware according to an actual function of the electronic device, which is not described again. In some examples, the processor is coupled to the memory and configured to read the applications and files stored in the memory and, in response, perform the following operations:
recognizing the written content into a single character;
determining a reference area of each character according to the coordinate information of each character;
and determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
Referring to fig. 10, an apparatus 1000 for adjusting text includes:
the identification module 1001: for recognizing the written content as a single word;
the processing module 1002: and the distance adjusting device is used for determining a reference area of each character according to the coordinate information of each character, determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value.
In some examples, the reference region includes any one of: the writing method comprises the following steps of (1) obtaining a central area, a maximum value area in the writing direction, a minimum value area in the writing direction, an occupied rectangular area and a reference point;
the reference points include: a center point, a maximum point in the writing direction, and a minimum point in the writing direction.
In some examples, the approximation includes: the distance between adjacent text reference areas in the writing direction.
In some examples, the approximation is no less than half of the distance that any two adjacent characters occupy in the writing direction.
In some examples, the approximation is not less than either
Figure BDA0001384360000000121
Wherein the content of the first and second substances,
Figure BDA0001384360000000131
wherein, D [ i ] is the distance occupied by the ith character in the writing direction; i is an integer;
α is the included angle between the writing direction and the horizontal direction, 0 degree is more than or equal to α degrees and less than 360 degrees;
the coordinates of the maximum point of the ith character in the writing direction are as follows: (x)max[i],ymax[i]);
The coordinates of the minimum point of the ith character in the writing direction are as follows: (x)min[i],ymin[i])。
In some examples, the coordinate information of each word includes:
the maximum value coordinate in the writing direction of each character, the minimum value coordinate in the writing direction of each character, the maximum value coordinate in the first direction of each character and the minimum value coordinate in the first direction of each character;
the first direction is perpendicular to the writing direction.
In some examples, the processing module 1002 may be configured to identify a rectangular area occupied by each graph according to coordinate information of each graph in the written content;
and identifying the graphs of the rectangular areas with the overlapped parts as the same character.
In some examples, the processing module 1002 may be configured to obtain a writing interval time of each graph in the writing content, and identify graphs with a time interval smaller than a preset value as the same character.
In some examples, the processing device 1002 may be further configured to place all of the text reference areas in a same line.
In some examples, the processing device 1002 may be further configured to zoom in or zoom out all the texts at the same time according to a preset touch gesture.
In some examples, the processing device 1002 may be further configured to change the approximate value according to a preset touch gesture.
In some examples, the preset touch gesture includes sliding along a direction forming an angle η with a reference direction, and sending different control instructions according to the change of the η value, where the control instructions include zooming in, zooming out, increasing the approximate value, and decreasing the approximate value of all the characters at the same time.
The present invention may take the form of a computer program product embodied on one or more storage media including, but not limited to, disk storage, CD-ROM, optical storage, and the like, having program code embodied therein. Computer-usable storage media include permanent and non-permanent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to: variable memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (14)

1. A method for adjusting text, the method comprising:
recognizing the written content into a single character;
determining a reference area of each character according to the coordinate information of each character;
determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value;
and determining the center coordinate of each character, determining a second center coordinate of each character according to the writing direction, moving each character to the corresponding second center coordinate and displaying, so as to set the reference area of each character on the same straight line.
2. The method of adjusting words according to claim 1, wherein the reference area comprises any one of: the writing method comprises the following steps of (1) obtaining a central area, a maximum value area in the writing direction, a minimum value area in the writing direction, an occupied rectangular area and a reference point;
the reference points include: a center point, a maximum point in the writing direction, and a minimum point in the writing direction.
3. The method of adjusting words according to claim 1, wherein said approximating comprises: the distance between adjacent characters in the writing direction.
4. The method of adjusting words according to claim 1, wherein the approximate value is not less than half of the distance between any two adjacent words in the writing direction.
5. The method of adjusting words according to claim 1, wherein the approximate value is not less than any
Figure FDA0002271610220000011
Wherein the content of the first and second substances,
Figure FDA0002271610220000012
wherein, D [ i ] is the distance occupied by the ith character in the writing direction; i is an integer;
α is the included angle between the writing direction and the horizontal direction, 0 degree is more than or equal to α degrees and less than 360 degrees;
the coordinates of the maximum point of the ith character in the writing direction are as follows: (x)max[i],ymax[i]);
The coordinates of the minimum point of the ith character in the writing direction are as follows: (x)min[i],ymin[i])。
6. The method for adjusting letters according to claim 1, wherein recognizing written contents as a single letter comprises the steps of:
identifying a rectangular area occupied by each graph according to the coordinate information of each graph in the written content;
and identifying the graphs of the rectangular areas with the overlapped parts as the same character.
7. The method for adjusting letters according to claim 1, wherein recognizing written contents as a single letter comprises the steps of:
and acquiring the writing interval time of each graph in the writing content, and identifying the graphs with the time intervals smaller than a preset value as the same character.
8. The method of adjusting words according to claim 1, further comprising: and simultaneously amplifying or reducing all the characters according to the preset touch gesture.
9. The method of adjusting words according to claim 1, further comprising: and changing the approximate value according to a preset touch gesture.
10. The method according to claim 8 or 9, wherein the predetermined touch gesture comprises sliding in a direction forming an angle η with the reference direction,
according to the change of η, different control instructions are sent out, wherein the control instructions comprise that all characters are amplified, reduced, approximate values are increased and approximate values are reduced simultaneously;
the reference direction includes any one of: writing direction, horizontal direction and vertical direction.
11. The method of adjusting words according to claim 1, further comprising the steps of:
each word is set to a uniform size.
12. An apparatus for adjusting text, comprising:
an identification module: for recognizing the written content as a single word;
a processing module: a reference area used for determining each character according to the coordinate information of each character; determining an approximate value according to the reference area, and adjusting the distance of the adjacent characters in the writing direction to the approximate value; and the number of the first and second groups,
the central coordinates of each character are determined, the second central coordinates of each character are determined according to the writing direction, each character is moved to the corresponding second central coordinates and displayed, and the reference area of each character is arranged on the same straight line.
13. An electronic device, comprising:
a memory storing processor-executable instructions; wherein the processor is coupled to the memory and configured to read program instructions stored in the memory and, in response, perform operations of any one of the methods for adjusting text as recited in claims 1-11.
14. A storage medium having stored thereon a computer program for executing by a processor operations in a method of adjusting text as claimed in any one of claims 1 to 11.
CN201710718416.0A 2017-08-21 2017-08-21 Method and device for adjusting characters and electronic equipment Active CN107544743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710718416.0A CN107544743B (en) 2017-08-21 2017-08-21 Method and device for adjusting characters and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710718416.0A CN107544743B (en) 2017-08-21 2017-08-21 Method and device for adjusting characters and electronic equipment

Publications (2)

Publication Number Publication Date
CN107544743A CN107544743A (en) 2018-01-05
CN107544743B true CN107544743B (en) 2020-04-14

Family

ID=60958550

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710718416.0A Active CN107544743B (en) 2017-08-21 2017-08-21 Method and device for adjusting characters and electronic equipment

Country Status (1)

Country Link
CN (1) CN107544743B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7298290B2 (en) * 2018-06-19 2023-06-27 株式会社リコー HANDWRITING INPUT DISPLAY DEVICE, HANDWRITING INPUT DISPLAY METHOD AND PROGRAM
CN112860157B (en) * 2019-11-12 2022-06-24 广州视源电子科技股份有限公司 Display element adjusting method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1799088A (en) * 2003-05-29 2006-07-05 夏普株式会社 Character graphic display device, character graphic display method, program and recording medium
CN101470549A (en) * 2007-12-27 2009-07-01 汉王科技股份有限公司 Handwriting processing method and system used for information processing terminal
CN101655835A (en) * 2009-08-26 2010-02-24 北大方正集团有限公司 Method for text message processing, text message output and character retrieval in electronic document and device thereof
CN102027526A (en) * 2008-03-18 2011-04-20 劲升逻辑私人有限公司 Method and system for embedding covert data in a text document using space encoding
CN105718673A (en) * 2016-01-22 2016-06-29 集美大学 Spacing adjustment method for words on straight line of CAD
CN106293462A (en) * 2016-08-04 2017-01-04 广州视睿电子科技有限公司 A kind of character displaying method and device
CN107003994A (en) * 2014-11-25 2017-08-01 三星电子株式会社 Method and apparatus for correcting hand-written character

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1799088A (en) * 2003-05-29 2006-07-05 夏普株式会社 Character graphic display device, character graphic display method, program and recording medium
CN101470549A (en) * 2007-12-27 2009-07-01 汉王科技股份有限公司 Handwriting processing method and system used for information processing terminal
CN102027526A (en) * 2008-03-18 2011-04-20 劲升逻辑私人有限公司 Method and system for embedding covert data in a text document using space encoding
CN101655835A (en) * 2009-08-26 2010-02-24 北大方正集团有限公司 Method for text message processing, text message output and character retrieval in electronic document and device thereof
CN107003994A (en) * 2014-11-25 2017-08-01 三星电子株式会社 Method and apparatus for correcting hand-written character
CN105718673A (en) * 2016-01-22 2016-06-29 集美大学 Spacing adjustment method for words on straight line of CAD
CN106293462A (en) * 2016-08-04 2017-01-04 广州视睿电子科技有限公司 A kind of character displaying method and device

Also Published As

Publication number Publication date
CN107544743A (en) 2018-01-05

Similar Documents

Publication Publication Date Title
CN109284059B (en) Handwriting drawing method and device, interactive intelligent panel and storage medium
EP3618003B1 (en) Method and apparatus for generating synthetic picture
CN106250804B (en) Reduced document stroke storage
US10373359B2 (en) Method and device for erasing a writing path on an infrared electronic white board, and a system for writing on an infrared electronic white board
US10489051B2 (en) Handwriting input apparatus and control method thereof
US8345017B1 (en) Touch input gesture based command
JP2018533782A (en) Digital notebook taking system and method
US8515176B1 (en) Identification of text-block frames
US20040205624A1 (en) System and method for scaling and repositioning drawings
WO2019154197A1 (en) Electronic book handwritten note display method, computing device and computer storage medium
US9021403B2 (en) Touch input gesture based command
EP2257914A1 (en) Method and tool for recognizing a hand-drawn table
AU2019457052B2 (en) Table processing method and apparatus, and intelligent interactive tablet and storage medium
KR102075433B1 (en) Handwriting input apparatus and control method thereof
JP6877446B2 (en) Systems and methods for recognizing multiple object structures
CN107544743B (en) Method and device for adjusting characters and electronic equipment
GB2535301A (en) Capture of handwriting strokes
US9734132B1 (en) Alignment and reflow of displayed character images
CN113111624A (en) Text display method and device, electronic equipment and storage medium
US7945855B2 (en) Smart space insertion
US7454699B2 (en) Smart content insertion
US20230343125A1 (en) Handwriting Recognition Method and Apparatus, Handwriting Recognition System and Interactive Display
CN115859936A (en) Typesetting method and device for written content, storage medium and electronic equipment
CN108804003B (en) Handwriting recognition method and device for intelligent interaction equipment and intelligent interaction equipment
US20240176482A1 (en) Gesture Based Space Adjustment for Editing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant