CN114925252A - Stroke recommendation method of calligraphy mechanical arm based on neighborhood - Google Patents
Stroke recommendation method of calligraphy mechanical arm based on neighborhood Download PDFInfo
- Publication number
- CN114925252A CN114925252A CN202210605798.7A CN202210605798A CN114925252A CN 114925252 A CN114925252 A CN 114925252A CN 202210605798 A CN202210605798 A CN 202210605798A CN 114925252 A CN114925252 A CN 114925252A
- Authority
- CN
- China
- Prior art keywords
- strokes
- stroke
- chinese character
- chinese
- calligraphy
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 239000011159 matrix material Substances 0.000 claims abstract description 18
- 238000010606 normalization Methods 0.000 claims description 3
- 230000000694 effects Effects 0.000 abstract description 4
- 238000005457 optimization Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/903—Querying
- G06F16/9035—Filtering based on additional data, e.g. user or group profiles
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J11/00—Manipulators not otherwise provided for
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Character Discrimination (AREA)
- Document Processing Apparatus (AREA)
Abstract
The invention discloses a stroke recommendation method in a stroke recommendation method based on neighborhoods, which comprises the steps of splitting Chinese characters to be written into corresponding font structures according to the traditional calligraphy theory and identifying radicals in corresponding structural areas. And selecting strokes in sequence according to the sequence numbers of the corresponding areas, and calculating according to a stroke recommendation method based on the neighborhood. And sequentially judging the coincidence degree of the obtained N strokes and the corresponding strokes in the standard font of the Chinese character according to the sequence of the similarity scores from high to low, and judging whether the strokes are matched with the Chinese character to be written. If not, other strokes with high similarity are selected for recalculation; if the matching is carried out, the stroke is recommended to the calligraphy mechanical arm, and the newly obtained data is added into the existing Chinese character-stroke relation matrix. By adopting the technical scheme, the purpose of reasonably executing the character forming process in the writing of the intelligent mechanical arm can be achieved, and the writing effect of the intelligent calligraphy mechanical arm is continuously improved on the basis.
Description
Technical Field
The invention belongs to the field of intelligent calligraphy mechanical arms, and particularly relates to a stroke recommendation method of a calligraphy mechanical arm based on neighborhood.
Background
The traditional calligraphy mechanical arm has limited functions, and is difficult to accurately write according to a calligraphy theory, particularly difficult to realize the writing and character constructing process in writing according to the traditional calligraphy theory. Strokes in the traditional calligraphy theory are different in length and shape, and a specific stroke cannot be completely matched with various writing occasions using the stroke. The traditional calligraphy mechanical arm can only write according to a set program, is difficult to select various appropriate strokes for the character to be written by the calligraphy mechanical arm, and cannot perform personalized selection and optimization of the required appropriate strokes for the Chinese character to be written according to the existing stroke writing result.
Disclosure of Invention
In order to solve the technical problems, the invention provides a stroke recommendation method of a calligraphy mechanical arm based on neighborhood. Appropriate strokes are provided for corresponding areas of Chinese characters to be written through a neighborhood-based mechanical arm stroke recommendation method, so that the purpose of improving the writing capability of the intelligent calligraphy mechanical arm is achieved.
The technical scheme for realizing the purpose of the invention is as follows:
a stroke recommendation method of a calligraphy mechanical arm based on neighborhood comprises the following steps:
(1) constructing a relational stroke library of the Chinese characters and corresponding strokes thereof;
(2) inputting corresponding codes of Chinese characters to be written, and splitting the codes into an upper structure, a lower structure, a left structure, a right structure, a surrounding structure, an upper structure, a middle structure, a lower structure, a left structure, a middle structure, a right structure and a semi-surrounding structure according to the basic structure of the Chinese characters; dividing the image into corresponding areas according to the structure;
(3) identifying radicals in the structure, splitting each stroke in the radicals and coding corresponding serial numbers;
(4) selecting strokes in sequence according to the serial numbers, adding the strokes into the existing relation matrix, calculating according to a neighborhood-based stroke recommendation method, and selecting K strokes with the highest similarity score for next calculation;
(5) sequentially judging the coincidence degree of the obtained K strokes and corresponding strokes in a standard font of the Chinese character according to the sequence of similarity scores from high to low, judging whether the strokes are matched with the Chinese character to be written, selecting other strokes with similarity second to the strokes for recalculation if the K strokes do not meet the conditions, expanding the value range of K and returning to the third step for recalculating the relation matrix to obtain more strokes to participate in the calculation of the fourth step; if the matching is carried out, the stroke is recommended to the calligraphy mechanical arm, and the newly obtained data is added into the existing Chinese character-stroke relation matrix.
The method for constructing the relational stroke library of the Chinese characters and the corresponding strokes of the Chinese characters in the step (1) comprises the following steps of:
1) according to the traditional calligraphy theory, the Chinese characters to be written are split into corresponding font structures such as an upper-lower structure, a left-right structure, an enclosing structure, an upper-middle-lower structure, a left-middle-right structure, a semi-enclosing structure and the like, and the Chinese characters are divided into corresponding areas on the basis of the corresponding font structures and are numbered; sequentially identifying Chinese character components in the region according to the region number, and naming the corresponding region according to Chinese character coding, font structure, structure region number and component number;
2) according to the traditional calligraphy theory, the Chinese characters are divided into corresponding font structures such as an upper-lower structure, a left-right structure, an enclosing structure, an upper-middle-lower structure, a left-middle-right structure, a semi-enclosing structure and the like, and the corresponding font structures are divided into corresponding areas on the basis of the corresponding font structures and are numbered; sequentially identifying Chinese character components in the region according to the region numbers, splitting the Chinese character components into strokes according to the components, and naming corresponding strokes according to Chinese character coding-font structure-region numbers-component numbers-stroke numbers;
3) and establishing a relation matrix between the corresponding area of the Chinese character and the corresponding stroke so as to obtain a relational stroke library of the Chinese character and the corresponding stroke in the stroke recommendation method based on the neighborhood.
The Chinese character splitting method in the step (2) comprises the following steps:
1) inputting Chinese characters to be written by a calligraphy mechanical arm, and dividing the Chinese characters into an upper-lower structure, a left-right structure, an enclosing structure, an upper-middle-lower structure, a left-middle-right structure and a semi-enclosing structure according to the basic structure of the Chinese characters; dividing the image into corresponding areas according to the structure;
2) identifying the radicals in the structure, splitting each stroke in the radicals and coding corresponding serial numbers;
3) inquiring whether the same strokes exist in the stroke library or not, if not, inputting the same strokes into the stroke library, and compiling into similar stroke groups;
4) and updating the relation matrix, and adding strokes contained in the Chinese character and information of the Chinese character containing the corresponding strokes.
The calculation process of the stroke recommendation method based on the neighborhood in the step (4) comprises the following steps:
1) analyzing and evaluating the similarity between the two strokes according to the existing relationship between the Chinese characters and the strokes; by usingTo measure the degree of similarity between stroke i and stroke j,
2) Generating a stroke recommendation table for the Chinese character according to the similarity between the strokes and the historical relationship between the Chinese character and the strokes;represents the set of strokes used by the Chinese character h in the stroke library,represents the scoring of stroke b by Chinese character h in the relation matrix,the final recommendation score for stroke b to Chinese character h,represents the average recommendation score for stroke b over the other strokes,,respectively representing the sum of the times that the stroke i and the stroke j are used by all Chinese characters:
tau is the number of adjacent strokes, only tau strokes with the highest similarity to the strokes are selected for scoring prediction during calculation, all the strokes are not required to be listed for calculation, and the calculation speed can be improved while a certain accuracy degree is ensured; and obtaining a stroke recommendation table for the Chinese character h through the recommendation scores of the Chinese character h to different strokes, and performing subsequent corresponding calculation according to the stroke recommendation table.
By adopting the technical scheme, corresponding strokes can be flexibly selected for the intelligent mechanical arm according to the calligraphy theory, continuous optimization is realized through analysis and evaluation of historical stroke data, more appropriate strokes are recommended to the input end of the mechanical arm in a personalized mode, the purpose of reasonably executing the character forming process in the writing of the intelligent mechanical arm is achieved, and the writing effect of the intelligent calligraphy mechanical arm is continuously improved on the basis.
Drawings
FIG. 1 is a flow chart of Chinese character splitting in a stroke recommendation method of a neighborhood-based calligraphy manipulator of the present invention.
FIG. 2 is a flow chart of stroke recommendation in the stroke recommendation method of the neighborhood-based calligraphy manipulator of the present invention.
Detailed Description
The invention is further described below in conjunction with the corresponding drawing figures, and the scope of the claimed invention should not be limited to only the following description. In order to more specifically understand the technical solutions, final objectives, and experimental effects of the present invention, embodiments of the present invention will now be described with reference to the accompanying drawings.
The invention comprises a Chinese character splitting method and a stroke recommending method, and can split Chinese characters into strokes according to writing structures and radicals and store the strokes in a stroke library, select proper strokes from the stroke library and recommend the strokes to a calligraphy mechanical arm, help the mechanical arm select proper strokes, and continuously improve writing effects.
The flow chart of the Chinese character splitting method based on the stroke recommendation method of the neighborhood calligraphy mechanical arm is shown in figure 1:
the first step is as follows: inputting Chinese characters to be written by a calligraphy mechanical arm, and dividing the Chinese characters into an upper-lower structure, a left-right structure, a surrounding structure, an upper-middle-lower structure, a left-middle-right structure and a semi-surrounding structure according to the basic structure of the Chinese characters; and then divided into corresponding regions according to the structure.
The second step is that: identifying the radicals in the structure, and splitting each stroke in the radicals and coding the corresponding serial number.
The third step: and (4) inquiring whether the same strokes exist in the stroke library, if not, inputting the same strokes into the stroke library, and compiling into similar stroke groups (for example, short strokes with different lengths are one group, and long strokes with different shapes are one group).
The fourth step: and updating the relation matrix, and adding strokes contained in the Chinese character and information of the Chinese character containing the corresponding strokes.
A stroke recommendation method flow chart of the stroke recommendation method based on the neighborhood calligraphy mechanical arm is shown in FIG. 2.
The first step is as follows: inputting corresponding codes of Chinese characters to be written, and dividing the codes into an upper structure, a lower structure, a left structure, a right structure, a surrounding structure, an upper structure, a middle structure, a lower structure, a left structure, a middle structure, a right structure and a semi-surrounding structure according to the basic structure of the Chinese characters; and then divided into corresponding regions according to the structure.
The second step: the radicals in the structure are identified, and then each stroke in the radicals is separated and coded with a corresponding serial number.
The third step: selecting strokes in sequence according to the serial numbers, adding the strokes into the existing relation matrix, calculating according to a neighborhood-based stroke recommendation method, and selecting the strokes with the highest similarity score for next calculation; the calculation process comprises the following steps:
1) analyzing and evaluating the similarity between the two strokes according to the existing relationship between the Chinese characters and the strokes; by usingTo measure the degree of similarity between stroke i and stroke j,
2) Generating a stroke recommendation table for the Chinese characters according to the similarity among the strokes and the historical relationship among the Chinese characters and the strokes;represents the set of strokes used by the Chinese character h in the stroke library,represents the scoring of stroke b by Chinese character h in the relation matrix,the final recommendation score for stroke b to Chinese character h,represents the average recommendation score for stroke b over the other strokes,,represents the sum of the times that the stroke i and the stroke j are used by all Chinese characters:
tau is the number of adjacent strokes, only tau strokes with the highest similarity to the strokes are selected for scoring prediction during calculation, all the strokes are not required to be listed for calculation, and the calculation speed can be improved while a certain accuracy degree is ensured; and obtaining a stroke recommendation table for the Chinese character h through the recommendation scores of the Chinese character h to different strokes, and performing subsequent corresponding calculation according to the stroke recommendation table.
The fourth step: sequentially judging the coincidence degree of the obtained K strokes and corresponding strokes in a standard font of the Chinese character according to the sequence of similarity scores from high to low, judging whether the strokes are matched with the Chinese character to be written, selecting other strokes with similarity second to the strokes for recalculation if the K strokes do not meet the conditions, expanding the value range of K and returning to the third step for recalculating the relation matrix to obtain more strokes to participate in the calculation of the fourth step; if the matching is carried out, the stroke is recommended to the calligraphy mechanical arm, and the newly obtained data is added into the existing Chinese character-stroke relation matrix.
Finally, the present example was chosen and described in detail to better illustrate the patentable solution of the present invention, and not to limit the invention to the details shown. Those skilled in the art should also appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention and that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (4)
1. A stroke recommendation method of a calligraphy mechanical arm based on neighborhood is characterized by comprising the following steps: the method comprises the following steps:
(1) constructing a relational stroke library of the Chinese characters and the corresponding strokes thereof;
(2) inputting corresponding codes of Chinese characters to be written, and splitting the Chinese characters into an upper-lower structure, a left-right structure, a surrounding structure, an upper-middle-lower structure, a left-middle-right structure and a semi-surrounding structure according to the basic structure of the Chinese characters; dividing the image into corresponding areas according to the structure;
(3) identifying radicals in the structure, splitting each stroke in the radicals and coding corresponding serial numbers;
(4) selecting strokes in sequence according to the serial numbers, adding the strokes into the existing relation matrix, calculating according to a neighborhood-based stroke recommendation method, and selecting K strokes with the highest similarity score for next calculation;
(5) sequentially judging the coincidence degree of the obtained K strokes and corresponding strokes in a standard font of the Chinese character according to the sequence of similarity scores from high to low, judging whether the strokes are matched with the Chinese character to be written, selecting other strokes with similarity second to the strokes for recalculation if the K strokes do not meet the conditions, expanding the value range of K and returning to the third step for recalculating the relation matrix to obtain more strokes to participate in the calculation of the fourth step; if the matching is carried out, the stroke is recommended to the calligraphy mechanical arm, and the newly obtained data is added into the existing Chinese character-stroke relation matrix.
2. The stroke recommendation method of claim 1, further comprising: the method for constructing the relational stroke library of the Chinese characters and the corresponding strokes comprises the following steps of:
1) according to the traditional calligraphy theory, the Chinese characters to be written are split into corresponding font structures such as an upper-lower structure, a left-right structure, an enclosing structure, an upper-middle-lower structure, a left-middle-right structure, a semi-enclosing structure and the like, and the Chinese characters are divided into corresponding areas on the basis of the corresponding font structures and are numbered; sequentially identifying Chinese character components in the region according to the region number, and naming the corresponding region according to Chinese character coding-font structure-structure region number-component number;
2) according to the traditional calligraphy theory, the Chinese characters are divided into corresponding font structures such as an upper-lower structure, a left-right structure, an enclosing structure, an upper-middle-lower structure, a left-middle-right structure, a semi-enclosing structure and the like, and the corresponding font structures are divided into corresponding areas on the basis of the corresponding font structures and are numbered; sequentially identifying Chinese character components in the region according to the region numbers, splitting the Chinese character components into strokes according to the components, and naming corresponding strokes according to Chinese character coding-font structure-region numbers-component numbers-stroke numbers;
3) and establishing a relation matrix between the corresponding area of the Chinese character and the corresponding stroke so as to obtain a relational stroke library of the Chinese character and the corresponding stroke in the stroke recommendation method based on the neighborhood.
3. The stroke recommendation method of claim 1, further comprising: the Chinese character splitting method in the step (2) comprises the following steps:
1) inputting Chinese characters to be written by a calligraphy mechanical arm, and dividing the Chinese characters into an upper-lower structure, a left-right structure, an enclosing structure, an upper-middle-lower structure, a left-middle-right structure and a semi-enclosing structure according to the basic structure of the Chinese characters; dividing the image into corresponding areas according to the structure;
2) identifying the radicals in the structure, splitting each stroke in the radicals and coding corresponding serial numbers;
3) inquiring whether the same strokes exist in the stroke library or not, if not, inputting the same strokes into the stroke library, and compiling into a similar stroke group;
4) and updating the relation matrix, and adding strokes contained in the Chinese character and information of the Chinese character containing the corresponding strokes.
4. The stroke recommendation method of claim 1, further comprising: the calculation process of the stroke recommendation method based on the neighborhood in the step (4) comprises the following steps:
1) analyzing and evaluating the similarity between the two strokes according to the existing relationship between the Chinese characters and the strokes; by usingTo measure the degree of similarity between stroke i and stroke j,
2) According to the similarity between strokes and Chinese charactersGenerating a stroke recommendation table for the Chinese characters according to the historical relation between strokes;represents the set of strokes used by the Chinese character h in the stroke library,represents the scoring of stroke b by Chinese character h in the relation matrix,the final recommendation score for stroke b for chinese character h,represents the average recommendation score for stroke b over the other strokes,,respectively representing the sum of the times that the stroke i and the stroke j are used by all Chinese characters:
tau is the number of adjacent strokes, only tau strokes with the highest similarity to the strokes are selected for scoring prediction during calculation, all the strokes are not required to be listed for calculation, and the calculation speed can be improved while a certain accuracy degree is ensured; and obtaining a stroke recommendation table for the Chinese character h through the recommendation scores of the Chinese character h to different strokes, and performing subsequent corresponding calculation according to the stroke recommendation table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210605798.7A CN114925252B (en) | 2022-05-31 | 2022-05-31 | Stroke recommendation method of handwriting mechanical arm based on neighborhood |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210605798.7A CN114925252B (en) | 2022-05-31 | 2022-05-31 | Stroke recommendation method of handwriting mechanical arm based on neighborhood |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114925252A true CN114925252A (en) | 2022-08-19 |
CN114925252B CN114925252B (en) | 2024-03-19 |
Family
ID=82813319
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210605798.7A Active CN114925252B (en) | 2022-05-31 | 2022-05-31 | Stroke recommendation method of handwriting mechanical arm based on neighborhood |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114925252B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201535955U (en) * | 2009-11-03 | 2010-07-28 | 于良运 | Chinese character stroke sequence demonstrating device |
KR20120101606A (en) * | 2011-02-25 | 2012-09-14 | 정건호 | Method and system for inputting characters composed of multiple strokes |
JP2013167815A (en) * | 2012-02-16 | 2013-08-29 | Bunkeido Co Ltd | System and program for determining hand writing chinese character |
CN112192576A (en) * | 2020-10-29 | 2021-01-08 | 哈工大机器人湖州国际创新研究院 | Mechanical arm Chinese character writing control method |
-
2022
- 2022-05-31 CN CN202210605798.7A patent/CN114925252B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201535955U (en) * | 2009-11-03 | 2010-07-28 | 于良运 | Chinese character stroke sequence demonstrating device |
KR20120101606A (en) * | 2011-02-25 | 2012-09-14 | 정건호 | Method and system for inputting characters composed of multiple strokes |
JP2013167815A (en) * | 2012-02-16 | 2013-08-29 | Bunkeido Co Ltd | System and program for determining hand writing chinese character |
CN112192576A (en) * | 2020-10-29 | 2021-01-08 | 哈工大机器人湖州国际创新研究院 | Mechanical arm Chinese character writing control method |
Non-Patent Citations (2)
Title |
---|
宋春晓;黄峰;靳松清;白晓东;仇宏斌;姜杰;李艺;: "基于汉字笔画与结构的特征字库构造及优化", 计算机工程与科学, no. 05, 15 May 2019 (2019-05-15) * |
贾建忠;: "偏旁部首和笔画特征混合的离线中文笔迹鉴别", 信息技术, no. 08, 19 August 2020 (2020-08-19) * |
Also Published As
Publication number | Publication date |
---|---|
CN114925252B (en) | 2024-03-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110738207A (en) | character detection method for fusing character area edge information in character image | |
CN111323037B (en) | Voronoi path planning algorithm for novel framework extraction of mobile robot | |
CN106844664B (en) | Time series data index construction method based on abstract | |
CN106156082A (en) | A kind of body alignment schemes and device | |
Battle et al. | A structured review of data management technology for interactive visualization and analysis | |
CN112163401A (en) | Chinese character font generation method based on compressed and excited GAN network | |
CN100481115C (en) | Character searching device | |
CN112784531A (en) | Chinese font and word stock generation method based on deep learning and part splicing | |
US11037356B2 (en) | System and method for executing non-graphical algorithms on a GPU (graphics processing unit) | |
CN105740428A (en) | B+ tree-based high-dimensional disc indexing structure and image search method | |
CN100595751C (en) | Scalable stroke font system and method | |
CN111553442B (en) | Optimization method and system for classifier chain tag sequence | |
CN114925252A (en) | Stroke recommendation method of calligraphy mechanical arm based on neighborhood | |
CN111046092B (en) | Parallel similarity connection method based on CPU-GPU heterogeneous system structure | |
CN109857886B (en) | Three-dimensional model retrieval method based on minimum maximum value game theory view approximation | |
CN107464272A (en) | The interpolation method of central diffusion type meteorological causes isopleth based on key point | |
Böhm | Space-filling curves for high-performance data mining | |
CN115965789A (en) | Scene perception attention-based remote sensing image semantic segmentation method | |
CN109740013A (en) | Image processing method and image search method | |
CN114742014A (en) | Few-sample character style migration method based on associated attention | |
CN113344626A (en) | Data feature optimization method and device based on advertisement push | |
Wang et al. | DeepStroke: understanding glyph structure with semantic segmentation and tabu search | |
CN107564289B (en) | Road network preprocessing method for merging traffic nodes | |
CN107491443B (en) | Method and system for translating Chinese sentences containing unconventional words | |
Nasien et al. | New feature vector from freeman chain code for handwritten roman character recognition |
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 |