CN102915439B - The center of gravity defining method of handwriting and electronic installation - Google Patents

The center of gravity defining method of handwriting and electronic installation Download PDF

Info

Publication number
CN102915439B
CN102915439B CN201210301693.9A CN201210301693A CN102915439B CN 102915439 B CN102915439 B CN 102915439B CN 201210301693 A CN201210301693 A CN 201210301693A CN 102915439 B CN102915439 B CN 102915439B
Authority
CN
China
Prior art keywords
dot matrix
close
word cell
matrix number
packed lattice
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
CN201210301693.9A
Other languages
Chinese (zh)
Other versions
CN102915439A (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.)
Beijing Eren Eben Information Technology Co Ltd
Original Assignee
Beijing Eren Eben 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 Beijing Eren Eben Information Technology Co Ltd filed Critical Beijing Eren Eben Information Technology Co Ltd
Priority to CN201210301693.9A priority Critical patent/CN102915439B/en
Publication of CN102915439A publication Critical patent/CN102915439A/en
Application granted granted Critical
Publication of CN102915439B publication Critical patent/CN102915439B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Electrically Operated Instructional Devices (AREA)
  • Character Input (AREA)

Abstract

This application discloses a kind of center of gravity defining method of handwriting and a kind of electronic installation realizing the center of gravity defining method of this handwriting, the center of gravity defining method of handwriting comprises the following steps: close-packed lattice area determination step: by the dot matrix of scan word unit, determines the close-packed lattice region of described word cell; Center of gravity determining step: get described close-packed lattice region center or and described center between there is the center of gravity of position as described word cell of preset distance.After being determined by the center of gravity of the application to word cell, be convenient to handwriting in layout and procedure for displaying, make the center of gravity of each word cell drop on same baseline, make the display more neat appearance of word content.

Description

The center of gravity defining method of handwriting and electronic installation
Technical field
The present invention relates to electronic device field, particularly a kind of center of gravity defining method of handwriting and a kind of electronic installation.
Background technology
The electronic equipments such as most of panel computer, palm PC (PDA:Personal Digital Assistant), mobile terminal are except possessing conventional keyboard entry function, also have hand-write input function, the object (or claiming handwriting) of handwriting input comprises Chinese character, letter, numeral, punctuate, special symbol etc.Handwriting can be arranged on the screen of electronic installation by some electronic equipment line by line, and show according to former person's handwriting, but this arrangement and display mode need to consider text alignment problem, and displaying contents just can be made to look in picturesque disorder, attractive in appearance and neat.
The concept that word has usually " center of gravity ", as shown in Figure 1, in a row or column handwriting, if the center of gravity of each handwriting falls on the same line, then seem just can be relatively neat for word, and this straight line can be called as " baseline ".In order to a line or a row handwriting fitly be arranged according to " baseline " and show, the center of gravity of handwriting first should be determined.
Summary of the invention
The technical problem underlying that the application will solve is, provides a kind of center of gravity defining method of handwriting and a kind of electronic installation realizing the center of gravity defining method of this handwriting, is convenient to show handwriting neat, attractive in appearancely.
According to the first aspect of the application, provide a kind of center of gravity defining method of handwriting, comprise the following steps:
Close-packed lattice area determination step: by the dot matrix of scan word unit, determines the close-packed lattice region of described word cell;
Center of gravity determining step: get described close-packed lattice region center or and described center between there is the center of gravity of position as described word cell of preset distance.
In a kind of embodiment, described close-packed lattice area determination step specifically comprises:
Upper side frame determining step: in the process of the dot matrix of described word cell of vertically lining by line scan, if the dot matrix number of the top a line is A, when the dot matrix number of the row scanned by stipulated number is greater than A, using the upper side frame of the horizontal line corresponding to this journey as described close-packed lattice region;
Lower frame determining step: in the process of the dot matrix of described word cell of vertically lining by line scan, if the dot matrix number of bottom a line is B, when the dot matrix number of the row scanned by stipulated number is greater than B, using the lower frame of the horizontal line corresponding to this journey as described close-packed lattice region;
Left frame determining step: scan by column in the process of the dot matrix of described word cell in the horizontal direction, if the dot matrix number that Far Left one arranges is C, when the dot matrix number of the row scanned by stipulated number is greater than C, the vertical curve corresponding to this being arranged is as the left frame in described close-packed lattice region;
Left frame determining step: scan by column in the process of the dot matrix of described word cell in the horizontal direction, if the dot matrix number that rightmost one arranges is D, when the dot matrix number of the row scanned by stipulated number is greater than D, the vertical curve corresponding to this being arranged is as the left frame in described close-packed lattice region;
Close-packed lattice area determination step: get rectangle that described upper side frame, lower frame, left frame and left frame enclose as close-packed lattice region.
In a kind of embodiment, be vertically from top to bottom described in described upper side frame determining step, be vertically from bottom to up described in described lower frame determining step, be from left to right in the horizontal direction described in described left frame determining step, be from right to left in the horizontal direction described in described left frame determining step, then the number of times of described regulation is first time;
Be vertically from bottom to up described in described upper side frame determining step, be vertically from top to bottom described in described lower frame determining step, be from right to left in the horizontal direction described in described left frame determining step, be from left to right in the horizontal direction described in described left frame determining step, then the number of times of described regulation is last.
In a kind of embodiment, described close-packed lattice area determination step specifically comprises:
Vertical sweep step: the dot matrix of described word cell of vertically lining by line scan, obtains total line number of described word cell, and according to total dot matrix number of described word cell and total line number, and what obtain described word cell often goes average dot matrix number;
The capable determining step of close-packed lattice: the scanning again carrying out vertical direction, when the average dot matrix number of multirow continuous in described word cell be greater than described often go average dot matrix number time, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning step: the dot matrix scanning by column described word cell in the horizontal direction, obtains total columns of described word cell, and according to total dot matrix number of described word cell and total columns, obtains every column average dot matrix number of described word cell;
Point of density array determining step: the scanning again carrying out horizontal direction, when the average dot matrix number of multiple row continuous in described word cell is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and carries out record to described point of density array;
Close-packed lattice area determination step: to get on the capable and point of density array of described close-packed lattice overlapping region as close-packed lattice region.
In a kind of embodiment, described close-packed lattice area determination step specifically comprises:
Vertical sweep step: the dot matrix of described word cell of vertically lining by line scan, record total line number of described word cell, the position of often going, often capable dot matrix number, and according to total dot matrix number of described word cell and total line number, what obtain described word cell often goes average dot matrix number;
The capable determining step of close-packed lattice: according to the position of often going and the dot matrix number of often going; calculate the average dot matrix number of continuous multirow; when the average dot matrix number of continuous multirow be greater than described often go average dot matrix number time, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning step: the dot matrix scanning by column described word cell in the horizontal direction, record total columns of described word cell, the position often arranged, the dot matrix number that often arranges, and according to total dot matrix number of described word cell and total columns, obtain every column average dot matrix number of described word cell;
Point of density array determining step: according to the position often arranged and the dot matrix number often arranged, calculate the average dot matrix number of continuous multiple row, when the average dot matrix number of continuous multiple row is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to described point of density array;
Close-packed lattice area determination step: to get on the capable and point of density array of described close-packed lattice overlapping region as close-packed lattice region.
In a kind of embodiment, total dot matrix number of described word cell obtains in described vertical sweep or horizontal scanning step.
In a kind of embodiment, before described close-packed lattice area determination step, also comprise word cell splitting step: when the handwriting received be phrase or one group of word time, be split into multiple independent word cell.
According to a second aspect of the invention, the application protects a kind of electronic installation realizing the center of gravity defining method of handwriting, comprising:
Close-packed lattice area determination unit: for by lining by line scan to the word cell of input and scan by column, determine the close-packed lattice region of described word cell;
Center of gravity determining unit: for get described close-packed lattice region center or and described center between there is the center of gravity of position as described word cell of preset distance.
In a kind of embodiment, described close-packed lattice area determination unit comprises:
Upper side frame determination module: in the process of the dot matrix of described word cell of vertically lining by line scan, if the dot matrix number of the top a line is A, when the dot matrix number of the row scanned by stipulated number is greater than A, using the upper side frame the top a line as described close-packed lattice region of the horizontal line corresponding to this journey;
Lower frame determination module: in the process of the dot matrix of described word cell of vertically lining by line scan, if the dot matrix number of bottom a line is B, when the dot matrix number of the row scanned by stipulated number is greater than B, using the lower frame the top a line as described close-packed lattice region of the horizontal line corresponding to this journey;
Left frame determination module: in the process of dot matrix scanning by column described word cell in the horizontal direction, if the dot matrix number that Far Left one arranges is C, when the dot matrix number of the row scanned by stipulated number is greater than C, the vertical curve corresponding to this being arranged is as the left frame in described close-packed lattice region;
Left frame determination module: in the process of dot matrix scanning by column described word cell in the horizontal direction, if the dot matrix number that rightmost one arranges is D, when the dot matrix number of the row scanned by stipulated number is greater than D, the vertical curve corresponding to this being arranged is as the left frame in described close-packed lattice region;
Close-packed lattice area determination module: for getting rectangle that described upper side frame, lower frame, left frame and left frame enclose as close-packed lattice region.
In a kind of embodiment, described close-packed lattice area determination unit comprises:
Vertical sweep module: for the dot matrix of described word cell of vertically lining by line scan, obtains total line number of described word cell, and according to total dot matrix number of described word cell and total line number, and what obtain described word cell often goes average dot matrix number;
The capable determination module of close-packed lattice: for again carrying out the scanning of vertical direction, when the average dot matrix number of multirow continuous in described word cell is greater than described often capable average dot matrix number, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning module: for scanning by column the dot matrix of described word cell in the horizontal direction, obtains total columns of described word cell, and according to total dot matrix number of described word cell and total columns, obtains every column average dot matrix number of described word cell;
Point of density array determination module: for again carrying out the scanning of horizontal direction, when the average dot matrix number of multiple row continuous in described word cell is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to described point of density array;
Close-packed lattice area determination module: for getting region that the capable and point of density array of described close-packed lattice overlaps as close-packed lattice region.
In a kind of embodiment, described close-packed lattice area determination unit comprises:
Vertical sweep module: for the dot matrix of described word cell of vertically lining by line scan, record total line number of described word cell, the position of often going, often capable dot matrix number, and according to total dot matrix number of described word cell and total line number, what obtain described word cell often goes average dot matrix number;
The capable determination module of close-packed lattice: the position of often going for basis and the dot matrix number of often going; calculate the average dot matrix number of continuous multirow; when the average dot matrix number of continuous multirow is greater than described often capable average dot matrix number; using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning module: for scanning by column the dot matrix of described word cell in the horizontal direction, record total columns of described word cell, the position often arranged, the dot matrix number that often arranges, and according to total dot matrix number of described word cell and total columns, obtain every column average dot matrix number of described word cell;
Point of density array determination module: the position often arranged for basis and the dot matrix number often arranged, calculate the average dot matrix number of continuous multiple row, when the average dot matrix number of continuous multiple row is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to described point of density array;
Close-packed lattice area determination module: to get on the capable and point of density array of described close-packed lattice overlapping region as close-packed lattice region.
In a kind of embodiment, also comprise word cell split cells: if the handwriting received be phrase or one group of word time, for being split into multiple independent word cell, then determined the center of gravity of each word cell by described close-packed lattice area determination unit and center of gravity determining unit successively.
The beneficial effect of the application is: after the center of gravity defining method of the handwriting that the application provides and the center of gravity of electronic installation to word cell of center of gravity defining method realizing handwriting are determined, be convenient to handwriting makes the center of gravity of each word cell drop on same baseline in layout and procedure for displaying, makes the display more neat appearance of word content.
Accompanying drawing explanation
Fig. 1 is the layout schematic diagram of handwriting input text importing;
Fig. 2 is the center of gravity defining method process flow diagram of the word cell of a kind of embodiment of the application;
Fig. 3 is the close-packed lattice area schematic of the word cell that a kind of embodiment of the application is determined;
Fig. 4 is the center of gravity schematic diagram of the word cell that a kind of embodiment of the application is determined;
Fig. 5 is the determination method flow diagram of the level of confidentiality dot matrix rectangle of the word cell of a kind of embodiment of the application;
Fig. 6 is the determination method flow diagram of the level of confidentiality dot matrix rectangle of the word cell of the another kind of embodiment of the application;
Fig. 7 is the electronic device construction block diagram of a kind of embodiment of the application;
Fig. 8 is the electronic device construction block diagram of the another kind of embodiment of the application.
Embodiment
By reference to the accompanying drawings the application is described in further detail below by embodiment.
In the embodiment of the present application, the center of gravity defining method of handwriting is applied to the electronic installation with hand-write input function and former person's handwriting Presentation Function, and these electronic installations can be panel computer, PAD and mobile phone etc.In use procedure when electronic installation receives the handwriting of user's input, first according to the center of gravity of the mode determination handwriting of each embodiment of the application, then in layout and procedure for displaying, make the center of gravity of each word cell drop on same baseline, word is seemed neat appearance more.
Word cell described in the application arranges according to the writing style of user and the response of electronic installation to define.Under normal circumstances, according to the writing style of user, user generally can write once a punctuation mark, Chinese character, numeral, letter, special symbol, word, phrase, in short, one section of word etc.; Accordingly, electronic installation, generally can by a punctuation mark, Chinese character, numeral, letter, special symbol, word, phrase, in short, one section of word etc. integrally carry out standard word identification and the response such as conversion, convergent-divergent arrangement when responding.So, word cell described in the application, can be a punctuation mark, Chinese character, numeral, letter, special symbol, word, phrase, in short, one section of word etc., can be even the combination etc. of a stroke, radical, a word and some strokes.
Illustrate for the ease of setting forth, below respectively with word cell be a word, one group of word sets forth.Wherein, a word can be understood as: a punctuation mark, a Chinese character, a numeral, a letter, a special symbol, stroke or a radical etc.; Namely one group of word can be regarded as: word, phrase, in short, one section of word etc., can be even the combination of a stroke, radical, a Chinese character and some strokes.
Embodiment one:
Please refer to Fig. 2, the center of gravity defining method of the handwriting of the present embodiment comprises the following steps:
Step S100: close-packed lattice area determination step: by the dot matrix of scan word unit, determines the close-packed lattice region of word cell.The present embodiment proposes the concept in close-packed lattice region, please refer to Fig. 3, show word cell that user inputs in an electronic " in " corresponding to close-packed lattice region 20, be actually the rectangle frame invented in the relatively intensive region of dot matrix distribution in word cell, and record the coordinate position of this rectangle frame, be convenient to utilize in subsequent step the position of this rectangle frame to find the center of gravity of word cell.Than rectangular, close-packed lattice region also can be other personalized shape such as circle, triangle, and the determination strategy in close-packed lattice region also can be selected flexibly.
Step S101: center of gravity determining step: the center of gravity of center as word cell of getting close-packed lattice region 20, or near Hai Ke center, there is between Qu Yu center the center of gravity of position as word cell of preset distance, preset distance is arranged according to specific needs, can not and center between distance excessive.Please refer to Fig. 4, in the present embodiment, the geometric center point of getting close-packed lattice region 20 as word cell " in " center of gravity 10.
Embodiment two:
Please refer to Fig. 5, in the present embodiment, close-packed lattice area determination step specifically comprises following sub-step:
Step S200: vertical sweep step: the dot matrix of word cell of vertically lining by line scan, obtains total line number of word cell and total dot matrix number of word cell.
Step S201: according to total dot matrix number and total line number of word cell, by calculating, obtains the often capable average dot matrix number of word cell.Such as through the scanning of step S200, the total line number obtaining word cell is 10 row, and when total dot matrix number is 100, the average dot matrix number of often going of word cell is 10.
Step S202: the capable determining step of close-packed lattice: the scanning again carrying out vertical direction, when the average dot matrix number of multirow continuous in word cell be greater than often go average dot matrix number time, using capable as close-packed lattice for these continuous multirows, and close-packed lattice is advanced line item.Such as word cell often go average dot matrix number be 10, if the dot matrix number of certain a line is 11, the dot matrix number of next line is 2, and the average dot matrix number of these continuous two row is 6.5, is less than 10, then this two capable be not that close-packed lattice is capable; If the dot matrix number of certain a line is 11, the dot matrix number of next line is 2, then the dot matrix number of next line is 20, and the average dot matrix number of these continuous three row is 11, is greater than 10, then this three row is that close-packed lattice is capable; Such as, in a kind of embodiment, word cell third and fourth, five, the dot matrix number of six four lines be added after divided by the 4 average dot matrix numbers obtained more than 10, third and fourth, five, six four lines are that close-packed lattice is capable, if word cell third and fourth, five, six, the dot matrix number of the Seventh Five-Year Plan row is less than 10 divided by 5 averages obtained after being added, so the 7th row can not be capable as level of confidentiality dot matrix.
Step S203: horizontal scanning step: the dot matrix scanning by column word cell in the horizontal direction, obtains total columns of word cell.
Step S204: according to total dot matrix number and total columns of word cell, obtain every column average dot matrix number of word cell, total dot matrix number obtains in step s 200, also can run-down again in certain step S203, total dot matrix number of such as word cell is 100, through the scanning of step S203, the total columns obtaining word cell is 5 row, and every column average dot matrix number of word cell is 20.
Step S205: point of density array determining step: the scanning again carrying out horizontal direction, when the average dot matrix number of multiple row continuous in word cell is greater than every column average dot matrix number, using these continuous multiple rows as point of density array, and carries out record to point of density array.Every column average dot matrix number of such as word cell is 20, if the dot matrix number of a certain row is 31, the dot matrix number of next column is 3, and the average dot matrix number of these continuous two row is 17, is less than 20, then these two row are not point of density arrays; If the dot matrix number of a certain row is 31, the dot matrix number of next column is 4, then the dot matrix number of next column is 40, and the average dot matrix number of these continuous three row is 25, is greater than 20, then these three row are point of density arrays.
Step S206: close-packed lattice area determination step: to get on the capable and point of density array of close-packed lattice overlapping region as close-packed lattice region.
Embodiment three:
With embodiment two unlike, first the present embodiment performs step S203-S205 and determines point of density array after scan word unit in the horizontal direction, and in the scanning process of step S203, obtain total dot matrix number of word cell simultaneously, perform step S200-S202 again and vertically determine that close-packed lattice is capable after scan word unit, finally perform step S206 and determine close-packed lattice region.
Embodiment four:
The present embodiment close-packed lattice region determines that mode is similar to the mode of embodiment two and three, is only the reduction of scanning times, namely by the more information of single pass record, then directly by calculating, obtains the capable or point of density array of close-packed lattice.Close-packed lattice area determination step specifically comprises the following steps:
First vertical sweep step is carried out: the dot matrix of word cell of vertically lining by line scan, total dot matrix number of record word cell, total line number, the position of often going, often capable dot matrix number, and according to total dot matrix number of word cell and total line number, what obtain word cell often goes average dot matrix number;
Then determine that close-packed lattice is capable: according to the position of often going and the dot matrix number of often going; calculate the average dot matrix number of continuous multirow; when the average dot matrix number of continuous multirow be greater than often go average dot matrix number time, using capable as close-packed lattice for continuous multirow, and close-packed lattice is advanced line item;
Carry out horizontal scanning step again: the dot matrix scanning by column word cell in the horizontal direction, record total columns of word cell, the position often arranged, the dot matrix number that often arranges, and according to total dot matrix number of word cell and total columns, obtain every column average dot matrix number of word cell;
Then point of density array is determined: according to the position often arranged and the dot matrix number often arranged, calculate the average dot matrix number of continuous multiple row, when the average dot matrix number of continuous multiple row is greater than every column average dot matrix number, using continuous multiple row as point of density array, and record is carried out to point of density array;
Finally determine close-packed lattice region: to get on the capable and point of density array of close-packed lattice overlapping region as close-packed lattice region.
In the present embodiment, after also first can performing scanning in the horizontal direction, determine point of density array, and in scanning process, obtain total dot matrix number of word cell simultaneously, then determine that close-packed lattice is capable after the scanning performing vertical direction, finally determine close-packed lattice region.
Embodiment five:
Please refer to Fig. 6, in the present embodiment, close-packed lattice area determination step specifically comprises following sub-step:
Step S300: upper side frame determining step: the dot matrix of word cell of vertically lining by line scan.The concrete direction of scanning of the present embodiment can be selected according to specific needs, such as, can scan from top to bottom, or scan from bottom to up.
Step S301: in above scanning process, if the dot matrix number of the top a line is A, when the dot matrix number of the row scanned by stipulated number is greater than A, using the upper side frame of the horizontal line corresponding to this journey as close-packed lattice region, records the coordinate position of this upper side frame.In the present embodiment, stipulated number also can be arranged as the case may be in conjunction with concrete direction of scanning, and the Default Value that can be electronic installation also can carry out self-defined setting by user by user interface.When direction of scanning be from top to bottom time, the dot matrix number A of the top a line of such as word cell is 3, when stipulated number is first time, if first time scans certain a line mid point battle array number and is greater than 3, horizontal line then corresponding to this row is as the upper side frame in close-packed lattice region, such as, when stipulated number is second time, if then scanning certain a line mid point battle array number is greater than 3 for the second time, horizontal line then corresponding to this row is as the upper side frame in close-packed lattice region, certainly, stipulated number also can be the number of times that even third time is above for the third time; When direction of scanning be from bottom to up time, when being last to fixed number of times, if scan certain a line mid point battle array number to be for the last time greater than 3, horizontal line then corresponding to this row is as the upper side frame in close-packed lattice region, such as, when stipulated number is second from the bottom time, if second from the bottom certain a line mid point battle array number of scanning is greater than 3, then the horizontal line corresponding to this row is as the upper side frame in close-packed lattice region, certainly, stipulated number also can be the number of times of third from the bottom time more than even third from the bottom time.
Step S302: lower frame determining step: the dot matrix of word cell of vertically lining by line scan, certainly in some embodiment, this step can be omitted, and next step S303 is directly realized by the scanning result of step S300.
Step S303: set the dot matrix number of bottom a line as B, when the dot matrix number of the row scanned by stipulated number is greater than B, using the lower frame of the horizontal line corresponding to this journey as close-packed lattice region, records the coordinate position of this lower frame.In this step, the setting of stipulated number and usage are similar to step S 301, and difference is only the difference of direction of scanning.When direction of scanning be from bottom to up time, the dot matrix number B of bottom a line of such as word cell is 4, when stipulated number is first time, if first time scans certain a line mid point battle array number and is greater than 4, horizontal line then corresponding to this row is as the lower frame in close-packed lattice region, such as, when stipulated number is second time, if then scanning certain a line mid point battle array number is greater than 4 for the second time, horizontal line then corresponding to this row is as the lower frame in close-packed lattice region, certainly, stipulated number also can be the number of times that even third time is above for the third time; When direction of scanning be from top to bottom time, when being last to fixed number of times, if scan certain a line mid point battle array number to be for the last time greater than 4, horizontal line then corresponding to this row is as the lower frame in close-packed lattice region, such as, when stipulated number is second from the bottom time, if second from the bottom certain a line mid point battle array number of scanning is greater than 4, then the horizontal line corresponding to this row is as the lower frame in close-packed lattice region, certainly, stipulated number also can be the number of times of third from the bottom time more than even third from the bottom time.
Step S304: left frame determining step: the dot matrix of word cell of lining by line scan in the horizontal direction.The concrete direction of scanning of the present embodiment can be selected according to specific needs, such as, can scan from left to right, or scan from right to left.
Step S 305: the dot matrix number setting Far Left one to arrange is as C, and when the dot matrix number of the row scanned by stipulated number is greater than C, the vertical curve corresponding to this being arranged, as the left frame in close-packed lattice region, records the coordinate position of this left frame.When direction of scanning be from left to right time, the dot matrix number C that the Far Left one of such as word cell arranges is 5, when stipulated number is first time, if first time scans dot matrix number in a certain row and is greater than 5, vertical curve then corresponding to these row is as the left frame in close-packed lattice region, such as, when stipulated number is second time, if then scanning dot matrix number in a certain row is greater than 5 for the second time, vertical curve then corresponding to these row is as the left frame in close-packed lattice region, certainly, stipulated number also can be the number of times that even third time is above for the third time; When direction of scanning be from right to left time, when being last to fixed number of times, if scan dot matrix number in a certain row to be for the last time greater than 5, vertical curve then corresponding to these row is as the left frame in close-packed lattice region, such as, when stipulated number is second from the bottom time, if dot matrix number is greater than 5 in second from the bottom a certain row of scanning, then the vertical curve corresponding to these row is as the left frame in close-packed lattice region, certainly, stipulated number also can be the number of times of third from the bottom time more than even third from the bottom time.
Step S306: left frame determining step: the dot matrix of word cell of lining by line scan in the horizontal direction.Certainly, in some embodiment, this step can be omitted, and next step S307 is realized by the scanning result of step S304.
Step S 307: set the dot matrix number of first row as D, when the dot matrix number of the row scanned by stipulated number is greater than D, the vertical curve of being answered by these row, as the left frame in close-packed lattice region, records the coordinate position of this left frame.In this step, the setting of stipulated number and usage are similar to step S305, and difference is only the difference of direction of scanning.Namely when direction of scanning be from right to left time, the dot matrix number D that the rightmost one of such as word cell arranges is 6, when stipulated number is first time, if first time scans dot matrix number in a certain row and is greater than 6, vertical curve then corresponding to these row is as the left frame in close-packed lattice region, such as, when stipulated number is second time, if then scanning dot matrix number in a certain row is greater than 6 for the second time, vertical curve then corresponding to these row is as the left frame in close-packed lattice region, certainly, stipulated number also can be the number of times that even third time is above for the third time; When direction of scanning be from left to right time, when being last to fixed number of times, if scan dot matrix number in a certain row to be for the last time greater than 6, vertical curve then corresponding to these row is as the left frame in close-packed lattice region, such as, when stipulated number is second from the bottom time, if dot matrix number is greater than 6 in second from the bottom a certain row of scanning, then the vertical curve corresponding to these row is as the left frame in close-packed lattice region, certainly, stipulated number also can be the number of times of third from the bottom time more than even third from the bottom time.
Step S308: close-packed lattice area determination step: get rectangle that above upper side frame, lower frame, left frame and the left frame determined enclose as close-packed lattice region.
Embodiment six:
With embodiment five unlike, the order of four frames in the present embodiment determination close-packed lattice region can be arranged flexibly, such as first can perform step S302 and step S303 determines lower frame, perform step S300 again and step S301 determines upper side frame, then perform step S306 and step S307 and determine left frame, perform step S304 again and step S305 determines left frame, finally determine close-packed lattice region; Certainly, in other embodiments, also by adjusting the order of above each step, first determine left frame and left frame, then determine upper side frame and lower frame, finally determine close-packed lattice region.
Embodiment seven:
In above embodiment one to embodiment six, before close-packed lattice area determination step, also can comprise word cell splitting step: if the handwriting received be phrase or one group of word time, be split into multiple independent word cell, then determine the center of gravity of each word cell respectively.
Certainly, also can according to specific needs, directly using the phrase of input or one group of word as a word cell, directly determine the center of gravity of this word cell.
Embodiment eight:
As shown in Figure 7, the all or part of step of the method for above-described embodiment can be carried out instruction related hardware by program and complete, by with the mating of hardware, this example forms a kind of electronic installation, this electronic installation has hand-write input function and former person's handwriting Presentation Function, the various methods of application above-described embodiment, realize the word cell display on a display screen to handwriting input.This device can be panel computer, PAD and mobile phone etc.This electronic installation mainly comprises:
Close-packed lattice area determination unit 40: for by lining by line scan to the word cell of input and scan by column, determine the close-packed lattice region of word cell.
Center of gravity determining unit 50: for get close-packed lattice region center or and center between there is the center of gravity of position as word cell of certain distance.
Wherein, realize in the electronic installation of method in above-described embodiment two, three, close-packed lattice area determination unit 40 also comprises further:
Vertical sweep module 401: for the dot matrix of word cell of vertically lining by line scan, obtains total line number of word cell, and according to total dot matrix number of word cell and total line number, and what obtain word cell often goes average dot matrix number.In some embodiment, while vertical sweep module 401 scanning obtains total columns of word cell, also obtain total dot matrix number of word cell, and it is directly or indirectly supplied to point of density array determination module.
The capable determination module 402 of close-packed lattice: for again carrying out the scanning of vertical direction, when the average dot matrix number of multirow continuous in word cell be greater than often go average dot matrix number time, using capable as close-packed lattice for this continuous multirow, and close-packed lattice is advanced line item;
Horizontal scanning module 403: for scanning by column the dot matrix of word cell in the horizontal direction, obtains total columns of word cell, and according to total dot matrix number of word cell and total columns, obtains every column average dot matrix number of word cell.Have in some embodiments, while vertical sweep module 401 scanning obtains total columns of word cell, also obtain total dot matrix number of word cell, and it is directly or indirectly supplied to the capable determination module of close-packed lattice.
Point of density array determination module 404: for again carrying out the scanning of horizontal direction, when the average dot matrix number of multiple row continuous in word cell is greater than every column average dot matrix number, using this continuous multiple row as point of density array, and carries out record to point of density array.
Close-packed lattice area determination module 405: get the capable and close-packed lattice row overlapping region of close-packed lattice as close-packed lattice region.
In the present embodiment, also can comprise word cell split cells further: if the handwriting received be phrase or one group of word time, for being split into multiple independent word cell, then determined the center of gravity of each word cell by close-packed lattice area determination unit 40 and center of gravity determining unit 50 successively.
Embodiment nine:
Realize in the electronic installation of method in above-described embodiment four, close-packed lattice area determination unit 40 comprises:
Vertical sweep module: for the dot matrix of word cell of vertically lining by line scan, total line number of record word cell, the position of often going, the dot matrix number of often going, and according to total dot matrix number of word cell and total line number, what obtain word cell often goes average dot matrix number.
The capable determination module of close-packed lattice: the position of often going for basis and the dot matrix number of often going; calculate the average dot matrix number of continuous multirow; when the average dot matrix number of continuous multirow be greater than often go average dot matrix number time, using capable as close-packed lattice for described continuous multirow, and close-packed lattice is advanced line item;
Horizontal scanning module: for scanning by column the dot matrix of word cell in the horizontal direction, record total columns of word cell, the position often arranged, the dot matrix number that often arranges, and according to total dot matrix number of word cell and total columns, obtain every column average dot matrix number of word cell;
Point of density array determination module: the position often arranged for basis and the dot matrix number often arranged, calculate the average dot matrix number of continuous multiple row, when the average dot matrix number of continuous multiple row is greater than every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to point of density array;
Close-packed lattice area determination module: get the capable and close-packed lattice row overlapping region of close-packed lattice as close-packed lattice region.
Embodiment ten:
As shown in Figure 8, with embodiment eight unlike, realize in the electronic installation of method in above-described embodiment five, six, close-packed lattice area determination unit 40 also comprises further:
Upper side frame determination module 406: in the process of the dot matrix of word cell of vertically lining by line scan, if the dot matrix number of the top a line is A, when the dot matrix number of the row scanned by stipulated number is greater than A, using the upper side frame of the horizontal line corresponding to this journey as close-packed lattice region.
Lower frame determination module 407: in the process of the dot matrix of word cell of vertically lining by line scan, if the dot matrix number of bottom a line is B, when the dot matrix number of the row scanned by stipulated number is greater than B, using the lower frame of the horizontal line corresponding to this journey as close-packed lattice region.
Left frame determination module 408: in the process of dot matrix scanning by column word cell in the horizontal direction, if the dot matrix number that Far Left one arranges is C, when the dot matrix number of the row scanned by stipulated number is greater than C, the vertical curve corresponding to this being arranged is as the left frame in close-packed lattice region.
Left frame determination module 409: in the process of dot matrix scanning by column word cell in the horizontal direction, if the dot matrix number that rightmost one arranges is D, when the dot matrix number of the row scanned by stipulated number is greater than D, the vertical curve corresponding to this being arranged is as the left frame in close-packed lattice region.
Close-packed lattice area determination module 410: for getting rectangle that upper side frame, lower frame, left frame and left frame enclose as close-packed lattice region.
In the present embodiment, the setting of stipulated number and usage and embodiment five, six identical.
Embodiment 11:
This example is a computer-readable recording medium, and this storage medium can comprise: ROM (read-only memory), random access memory, disk or CD etc.In this computer-readable recording medium, have program stored therein, this program, by by related hardware load operating, can realize all or part of step of various method in above-described embodiment.
Above content is the further description done the application in conjunction with concrete embodiment, can not assert that the concrete enforcement of the application is confined to these explanations.For the application person of an ordinary skill in the technical field, under the prerequisite not departing from the application's design, some simple deduction or replace can also be made, all should be considered as the protection domain belonging to the application.

Claims (5)

1. a center of gravity defining method for handwriting, is characterized in that, comprise the following steps:
Close-packed lattice area determination step: by the dot matrix of scan word unit, determines the close-packed lattice region of described word cell;
Center of gravity determining step: get described close-packed lattice region center or and described center between there is the center of gravity of position as described word cell of preset distance;
Described close-packed lattice area determination step specifically comprises:
Vertical sweep step: the dot matrix of described word cell of vertically lining by line scan, obtains total line number of described word cell, and according to total dot matrix number of described word cell and total line number, and what obtain described word cell often goes average dot matrix number;
The capable determining step of close-packed lattice: the scanning again carrying out vertical direction, when the average dot matrix number of multirow continuous in described word cell be greater than described often go average dot matrix number time, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning step: the dot matrix scanning by column described word cell in the horizontal direction, obtains total columns of described word cell, and according to total dot matrix number of described word cell and total columns, obtains every column average dot matrix number of described word cell;
Point of density array determining step: the scanning again carrying out horizontal direction, when the average dot matrix number of multiple row continuous in described word cell is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and carries out record to described point of density array;
Close-packed lattice area determination step: to get on the capable and point of density array of described close-packed lattice overlapping region as close-packed lattice region;
Or described close-packed lattice area determination step specifically comprises:
Vertical sweep step: the dot matrix of described word cell of vertically lining by line scan, record total line number of described word cell, the position of often going, often capable dot matrix number, and according to total dot matrix number of described word cell and total line number, what obtain described word cell often goes average dot matrix number;
The capable determining step of close-packed lattice: according to the position of often going and the dot matrix number of often going, calculate the average dot matrix number of continuous multirow, when the average dot matrix number of continuous multirow be greater than described often go average dot matrix number time, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning step: the dot matrix scanning by column described word cell in the horizontal direction, record total columns of described word cell, the position often arranged, the dot matrix number that often arranges, and according to total dot matrix number of described word cell and total columns, obtain every column average dot matrix number of described word cell;
Point of density array determining step: according to the position often arranged and the dot matrix number often arranged, calculate the average dot matrix number of continuous multiple row, when the average dot matrix number of continuous multiple row is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to described point of density array;
Close-packed lattice area determination step: to get on the capable and point of density array of described close-packed lattice overlapping region as close-packed lattice region.
2. the method for claim 1, is characterized in that, total dot matrix number of described word cell obtains in described vertical sweep or horizontal scanning step.
3. the method for claim 1, is characterized in that, before described close-packed lattice area determination step, also comprises word cell splitting step: when the handwriting received be phrase or one group of word time, be split into multiple independent word cell.
4. realize an electronic installation for the center of gravity defining method of handwriting, it is characterized in that, comprising:
Close-packed lattice area determination unit: for by lining by line scan to the word cell of input and scan by column, determine the close-packed lattice region of described word cell;
Center of gravity determining unit: for get described close-packed lattice region center or and described center between there is the center of gravity of position as described word cell of preset distance;
Described close-packed lattice area determination unit comprises:
Vertical sweep module: for the dot matrix of described word cell of vertically lining by line scan, obtains total line number of described word cell, and according to total dot matrix number of described word cell and total line number, and what obtain described word cell often goes average dot matrix number;
The capable determination module of close-packed lattice: for again carrying out the scanning of vertical direction, when the average dot matrix number of multirow continuous in described word cell is greater than described often capable average dot matrix number, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning module: for scanning by column the dot matrix of described word cell in the horizontal direction, obtains total columns of described word cell, and according to total dot matrix number of described word cell and total columns, obtains every column average dot matrix number of described word cell; Point of density array determination module: for again carrying out the scanning of horizontal direction, when the average dot matrix number of multiple row continuous in described word cell is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to described point of density array;
Close-packed lattice area determination module: for getting region that the capable and point of density array of described close-packed lattice overlaps as close-packed lattice region;
Or described close-packed lattice area determination unit comprises:
Vertical sweep module: for the dot matrix of described word cell of vertically lining by line scan, record total line number of described word cell, the position of often going, often capable dot matrix number, and according to total dot matrix number of described word cell and total line number, what obtain described word cell often goes average dot matrix number;
The capable determination module of close-packed lattice: the position of often going for basis and the dot matrix number of often going, calculate the average dot matrix number of continuous multirow, when the average dot matrix number of continuous multirow is greater than described often capable average dot matrix number, using capable as close-packed lattice for described continuous multirow, and described close-packed lattice is advanced line item;
Horizontal scanning module: for scanning by column the dot matrix of described word cell in the horizontal direction, record total columns of described word cell, the position often arranged, the dot matrix number that often arranges, and according to total dot matrix number of described word cell and total columns, obtain every column average dot matrix number of described word cell;
Point of density array determination module: the position often arranged for basis and the dot matrix number often arranged, calculate the average dot matrix number of continuous multiple row, when the average dot matrix number of continuous multiple row is greater than described every column average dot matrix number, using described continuous multiple row as point of density array, and record is carried out to described point of density array;
Close-packed lattice area determination module: to get on the capable and point of density array of described close-packed lattice overlapping region as close-packed lattice region.
5. electronic installation as claimed in claim 4, it is characterized in that, also comprise word cell split cells: if the handwriting received be phrase or one group of word time, for being split into multiple independent word cell, then determined the center of gravity of each word cell by described close-packed lattice area determination unit and center of gravity determining unit successively.
CN201210301693.9A 2012-08-22 2012-08-22 The center of gravity defining method of handwriting and electronic installation Active CN102915439B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210301693.9A CN102915439B (en) 2012-08-22 2012-08-22 The center of gravity defining method of handwriting and electronic installation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210301693.9A CN102915439B (en) 2012-08-22 2012-08-22 The center of gravity defining method of handwriting and electronic installation

Publications (2)

Publication Number Publication Date
CN102915439A CN102915439A (en) 2013-02-06
CN102915439B true CN102915439B (en) 2015-09-09

Family

ID=47613800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210301693.9A Active CN102915439B (en) 2012-08-22 2012-08-22 The center of gravity defining method of handwriting and electronic installation

Country Status (1)

Country Link
CN (1) CN102915439B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5582674B2 (en) * 2007-07-20 2014-09-03 アルパイン株式会社 Character data generation device and method, character data display control device and display method, and navigation device
CN101676838B (en) * 2008-09-16 2012-05-23 夏普株式会社 Input device
CN102542269B (en) * 2010-12-24 2014-12-10 北大方正集团有限公司 Western language word segmenting method and device
CN102842046B (en) * 2012-08-07 2015-09-23 天津大学 A kind of calligraphic style recognition methods of extracting based on global characteristics and training

Also Published As

Publication number Publication date
CN102915439A (en) 2013-02-06

Similar Documents

Publication Publication Date Title
CA2718636C (en) Method and tool for recognizing a hand-drawn table
US8381119B2 (en) Input device for pictographic languages
US20140170611A1 (en) System and method for teaching pictographic languages
WO2019154197A1 (en) Electronic book handwritten note display method, computing device and computer storage medium
US20150089429A1 (en) Very Thin Virtual Keyboards and Keyboard Locators
WO2014183677A1 (en) Method for acquiring and displaying original handwriting information of handwriting input device
CN101572746A (en) Method for inputting characters on touch screen of internet-enabled mobile phone through virtual keyboard
CN107357483A (en) Data sharing method and device, computer equipment and computer-readable recording medium
CN102830934A (en) Method and device for displaying of hand character input
CN110692060A (en) Electronic text pen system and method
CN105242895B (en) A kind of dot matrix character display methods and device
US20110286662A1 (en) System for building a personalized-character database and method thereof
CN102915439B (en) The center of gravity defining method of handwriting and electronic installation
CN104281560A (en) Memory text information display method and device and terminal
CN102902969B (en) The method of combination of handwriting input text importing and electronic installation
CN103577059A (en) User interface presenting method and electronic device
CN102855502B (en) The center of gravity of handwriting determines method and electronic installation
CN106095649A (en) A kind of icon display method, device and mobile terminal
CN102375723B (en) Soft keyboard skin volume optimizing method and system
CN103165105B (en) Mobile communication terminal and graphic display method
CN107016303A (en) A kind of method and device of presentation of information
CN102141981A (en) Text output method and apparatus
CN106781837B (en) Writing board and method for generating writing board
Rao et al. Multimodal representation of complex spatial data
KR101384455B1 (en) Computer, electronic dictionary, smartphone keyboard Japanese alphabet arrangement

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant