CN106599818A - Method and apparatus for generating handwriting-format document based on picture - Google Patents

Method and apparatus for generating handwriting-format document based on picture Download PDF

Info

Publication number
CN106599818A
CN106599818A CN201611114430.1A CN201611114430A CN106599818A CN 106599818 A CN106599818 A CN 106599818A CN 201611114430 A CN201611114430 A CN 201611114430A CN 106599818 A CN106599818 A CN 106599818A
Authority
CN
China
Prior art keywords
handwriting
person
color value
pixel
picture
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
Application number
CN201611114430.1A
Other languages
Chinese (zh)
Other versions
CN106599818B (en
Inventor
李纯冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Guangzhou Shirui Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Shiyuan Electronics Thecnology Co Ltd, Guangzhou Shirui Electronics Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201611114430.1A priority Critical patent/CN106599818B/en
Priority to PCT/CN2017/077154 priority patent/WO2018103226A1/en
Publication of CN106599818A publication Critical patent/CN106599818A/en
Application granted granted Critical
Publication of CN106599818B publication Critical patent/CN106599818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/32Digital ink
    • G06V30/333Preprocessing; Feature extraction
    • G06V30/347Sampling; Contour coding; Stroke extraction

Abstract

The present invention discloses a method and apparatus for generating a handwriting-format document based on a picture. The method includes the following steps that: a picture to be processed is recognized, recognized handwritings are obtained; at least one handwriting color value is obtained according to the color values of pixels constituting the recognized handwritings; pixels in the picture which have the same color value with the handwriting color value are obtained, so that a handwriting point set can be generated; a background image is generated based on the handwriting point set and the picture; and a handwriting-format document is generated according to the background image and the handwriting point set. The invention also discloses a device for generating a handwriting-format document based on a picture. With the method and apparatus of the invention adopted, the picture can be converted into the editable handwriting-format document, and therefore, a user can conveniently edit the handwritings.

Description

A kind of method and device of the file that person's handwriting form is generated based on picture
Technical field
The present invention relates to picture processing field, more particularly to a kind of file that person's handwriting form is generated based on picture method and Device.
Background technology
When being write using electronic whiteboard, typically the person's handwriting write can be plotted in background, after the completion of writing, can To select for person's handwriting and background to save as the file (such as the file of ENB forms) of specific person's handwriting form or directly save as general The document format such as picture, PDF.
For the file for saving as person's handwriting form, it is advantageous in that, when this document is again turned on, can to file or The person's handwriting write carries out secondary editor, has the disadvantage that the file compatibility of this person's handwriting form is poor, general only specifically to write Software can be opened, it has not been convenient to written contents are checked in the environment of writing software is fitted without.And if directly saved as The document formats such as general picture, PDF, although facilitate checking and transmitting under circumstances, but writing software cannot Secondary operation is carried out to original person's handwriting, is merely able to enter edlin to picture so that the context of file is inconsistent, and repeatedly Saving as picture can also cause the decline of file definition, and Consumer's Experience is not good.
The content of the invention
For the problems referred to above, it is an object of the invention to provide a kind of method of the file that person's handwriting form is generated based on picture And device, the file of person's handwriting form can be generated according to picture, facilitating user to identify the handwriting carries out secondary operation.
The invention provides a kind of method of the file that person's handwriting form is generated based on picture, including:
Pending picture is identified, the person's handwriting for recognizing is obtained;
The color value of the pixel of the person's handwriting recognized according to composition obtains at least one person's handwriting color value;
The pixel with the person's handwriting color value in the picture with same color value is obtained, person's handwriting point set is generated;
Background is generated based on the person's handwriting point set and the picture;
The file of person's handwriting form is generated according to the Background and the person's handwriting point set.
Preferably, the color value of the pixel of the person's handwriting recognized according to composition obtains at least one person's handwriting face Colour is specially:
The color value of all pixels point of the person's handwriting that composition is recognized is obtained, and is counted corresponding with each color value The number of pixel;
The corresponding color value of most with number pixels is set to into person's handwriting color value.
Preferably, the color value of the pixel of the person's handwriting recognized according to composition obtains at least one person's handwriting face Colour is specially:
The color value of all pixels point of the person's handwriting that composition is recognized is obtained, and is counted corresponding with each color value The number of pixel;
The number of corresponding pixel and the ratio of the pixel sum for recognizing are exceeded into the color value mark of predetermined threshold It is designated as person's handwriting color value.
Preferably, it is described that Background is generated according to the person's handwriting point set and the picture, specifically include:
Obtain the background color value of the picture;
The pixel being located in the person's handwriting point set is inquired about in the picture;
The color value of the pixel for inquiring is replaced with into the background color value, Background is generated.
Preferably, it is described that Background is generated according to the person's handwriting point set and the picture, specifically include:
The pixel being located in the person's handwriting point set is inquired about in the picture;
Generated according to the color value of the neighbor pixel adjacent with the pixel for inquiring and replace color value;
The color value of the pixel for inquiring is replaced with into the replacement color value, Background is generated.
Preferably, the color value of the basis neighbor pixel adjacent with the pixel for inquiring is generated and replaces face Colour, specially:
Obtain the color value of the neighbor pixel adjacent with the pixel for inquiring;
Remove the neighbor pixel in the person's handwriting point set;
The color value of remaining neighbor pixel is mixed, is generated and is replaced color value.
Preferably, the color value of the basis pixel adjacent with the pixel for inquiring is generated and replaces color Value, specially:
Obtain the color value of the neighbor pixel adjacent with the pixel for inquiring;
Remove the neighbor pixel in the person's handwriting point set;
Determined according to the occurrence number of the color value of remaining neighbor pixel and replace color value.
Present invention also offers a kind of device of the file that person's handwriting form is generated based on picture, including:
Person's handwriting recognition unit, for being identified to pending picture, obtains the person's handwriting for recognizing;
Person's handwriting color value signal generating unit, the color value of the pixel of the person's handwriting for being recognized according to composition obtain to A few person's handwriting color value;
Person's handwriting point set signal generating unit, for obtaining the picture in there is same color value with the person's handwriting color value Pixel, generates person's handwriting point set;
Background signal generating unit, for generating Background based on the person's handwriting point set and the picture;
Person's handwriting file generating unit, for generating the text of person's handwriting form according to the Background and the person's handwriting point set Part.
Preferably, the person's handwriting color value signal generating unit is specifically included:
First statistical module, for obtaining the color value of all pixels point of the person's handwriting that composition is recognized, and counts The number of pixel corresponding with each color value;
First mark module, for the corresponding color value of most with number pixels to be labeled as into person's handwriting color value.
Preferably, the Background signal generating unit is specifically included:
Background color value acquisition module, for obtaining the background color value of the picture;
First enquiry module, for inquiring about the picture in be located at the person's handwriting point set in pixel;
First color value replacement module, for the color value of the pixel for inquiring to be replaced with into the background color Value, generates Background.
The method and device of the file that person's handwriting form is generated based on picture that the present invention is provided, by the identification picture Person's handwriting, and person's handwriting color value is obtained according to the person's handwriting that recognizes, recycle person's handwriting color value to obtain all in the picture The pixel of person's handwriting, generates person's handwriting point set, and recovers Background according to person's handwriting point set, finally according to person's handwriting point set and Background generates the file of person's handwriting form, so as to picture to be converted to the file of person's handwriting form.On the one hand, for being fitted without The environment or terminal of the file of person's handwriting form can be opened, directly checking for content can be carried out by opening original picture, And for being provided with the environment or terminal (such as electronic whiteboard) of the file that can open person's handwriting form, can be with being converted into picture Person's handwriting form file in person's handwriting carry out secondary editor, improve the compatibility of file, facilitate operation and the body of user Test.
Description of the drawings
In order to be illustrated more clearly that technical scheme, the accompanying drawing to be used needed for embodiment will be made below Simply introduce, it should be apparent that, drawings in the following description are only some embodiments of the present invention, general for this area For logical technical staff, on the premise of not paying creative work, can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 is the schematic flow sheet of the method for the file that person's handwriting form is generated based on picture provided in an embodiment of the present invention.
Fig. 2 is the schematic diagram of pending picture provided in an embodiment of the present invention.
Fig. 3 is that the schematic diagram after person's handwriting identification is carried out to the picture shown in Fig. 2.
Fig. 4 is a kind of schematic diagram of the neighbor pixel for obtaining adjacent with the pixel for inquiring.
Fig. 5 is another kind of a kind of schematic diagram of the neighbor pixel for obtaining adjacent with the pixel for inquiring.
Fig. 6 is the structural representation of the device of the file that person's handwriting form is generated based on picture provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than the embodiment of whole.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Fig. 1 is referred to, the invention provides a kind of method of the file that person's handwriting form is generated based on picture, it at least includes Following steps:
S101, is identified to pending picture, obtains the person's handwriting for recognizing.
As shown in Fig. 2 in embodiments of the present invention, the pending picture can be incited somebody to action by the writing software on electronic whiteboard The Background that drafting has person's handwriting saves as the figure that picture format is obtained, or arbitrarily includes writing information or handwriting information Piece, the present invention is not specifically limited.
In embodiments of the present invention, it is contemplated that writing or person's handwriting generally comprise the element such as horizontal, vertical, round more than comparison, because This can use the most of person's handwriting identified based on the straight line of Hough transformation, loop truss algorithm in picture.Wherein, Hough transformation is One of classical means in image conversion, are mainly used to isolate the geometry with certain same characteristic features from image, e.g., Straight line, circle etc..However, it is to be understood that in embodiments of the present invention, Engineering drawing technology known to others may also be employed The identification from the picture obtains person's handwriting, and the present invention is not specifically limited.
It should be noted that because person's handwriting also usually includes some irregular geometries, such as non-round dot, crotch Deng, these geometries are typically more difficult directly to be kept completely separate out by Engineering drawing technology, it is therefore understood that yes, knowledge The person's handwriting not gone out only be the part person's handwriting in picture and not all person's handwriting (if the more black geometry of color in Fig. 3 is not to be known The person's handwriting not gone out).
In addition it is also necessary to explanation, in embodiments of the present invention, after the completion of identification, can also receive user to identification As a result modification, the such as supplementary person's handwriting omitted, or remove the part of wrong identification etc..If necessary to the area for supplementing or remove Domain is less, it is possible to use the mode of imitation is changed, if region is larger, it is possible to use the mode of circle choosing is changed, so as to recognize The person's handwriting for arriving is more accurate.
S102, the color value of the pixel of the person's handwriting recognized according to composition obtains at least one person's handwriting color value.
Specifically, in one implementation, step S102 includes:
S1021, obtains the color value of the pixel of the person's handwriting that composition is recognized, and counts corresponding with each color value Pixel number.
S1022, by the corresponding color value of most with number pixels person's handwriting color value is set to.
In embodiments of the present invention, due to during picture recognition or Engineering drawing, unavoidably introducing non-person's handwriting Pixel (pixel of such as adjacent with person's handwriting background or other interference pixels), the color value and pen of this partial pixel point The color value of mark is different, it is therefore desirable to the color value of real person's handwriting is obtained from the person's handwriting for recognizing, non-due to what is introduced The pixel of person's handwriting necessarily occupies the minority, therefore, the number of pixel corresponding with each color value can be counted, and will be with number most The corresponding color value of many pixels is set to the person's handwriting color value of the picture.
For example, it is assumed that the number for recognizing all pixels point of composition person's handwriting is 1000, wherein, color value is black The number of pixel is 900, and the number of the pixel of other colors is 100, then black is set to the pen of the picture Mark color value.
It should be noted that the more single situation of the color value of person's handwriting of the present invention suitable for picture, particularly picture In all person's handwritings draw or write using same color value.
In one implementation, step S102 includes:
S1023, obtains the color value of all pixels point of the person's handwriting that composition is recognized, and counts and each color value The number of corresponding pixel.
S1024, by the number of corresponding pixel and the ratio of the pixel sum for recognizing the face of predetermined threshold is exceeded Colour is labeled as person's handwriting color value.
In some cases, then now, may obtain and each face simultaneously including the person's handwriting of different colours in the picture The number of the corresponding pixel of colour, and number and the ratio of the pixel sum for recognizing are exceeded into the color value of predetermined threshold It is labeled as person's handwriting color value.
For example, it is assumed that the threshold value is 20%, and the number of all pixels point of the person's handwriting for recognizing is 1000, its In, color value is 600 for the number of the pixel of black, and it is 300 that color value is the number of red pixel, other face The number of the pixel of colour is 100, then black and redness are labeled as into person's handwriting color value.
It should be noted that due to inevitably including the pixel of non-person's handwriting (such as background in the person's handwriting that recognizes Pixel) color value, it is therefore desirable to rationally arrange threshold value to filter these interference, on the one hand, if threshold value arranges too small, Then it is likely to occur and the color value of the pixel of these non-person's handwritings is also labeled as into person's handwriting color value, and must compares if threshold value is arranged Greatly, the smaller person's handwriting of some accountings may be filtered out, the effect of the file that impact is ultimately generated.Specific threshold value can basis Using Algorithm for Text/Photo Separation recognition accuracy statistics obtain.
S103, obtains the pixel with the person's handwriting color value in the picture with same color value, generates person's handwriting point Set.
In embodiments of the present invention, after the person's handwriting color value for obtaining the picture, you can according to the person's handwriting color value Greater part or nearly all of person's handwriting are extracted from the picture.When extracting, can be with the upper left corner of picture as origin O (0,0), the width of picture be x-axis border, with the height of picture as y-axis border, each pixel of picture is read line by line Color value, if pixel P1 (x1, y1) color value and person's handwriting color value (can be one, or multiple person's handwriting face Any one in colour) equally, then add point P1 (x1, y1) in person's handwriting point set, until reading complete pictures.
It should be noted that in the person's handwriting point set, in addition to the position coordinateses for recording each pixel, also simultaneously Record its corresponding color value.
S104, based on the person's handwriting point set and the picture Background is generated.
In embodiments of the present invention, the file of person's handwriting form includes Background and person's handwriting point, therefore in order to obtain person's handwriting lattice The file of formula, in addition it is also necessary to reconstruct or recover Background.Specifically:
In one embodiment, step S104 is specifically included:
S1041, obtains the background color value of the picture.
S1042, inquires about in the picture pixel being located in the person's handwriting point set.
S1043, by the color value of the pixel for inquiring the background color value is replaced with, and generates Background.
For certain situation, the color of Background is single, such as white Background or jade-green Background.Then Now, it is only necessary to obtain the background color value of Background, picture, pixel of the inquiry in the person's handwriting point set are then traveled through Point, then the color value of the pixel for inquiring is replaced with into the background color value, just reconstruct obtains Background.
In one embodiment, step S104 is specifically included:
S1044, inquires about in the picture pixel being located in the person's handwriting point set.
S1045, generates according to the color value of at least 4 neighbor pixels adjacent with the pixel for inquiring and replaces Color value.
S1046, by the color value of the pixel for inquiring the replacement color value is replaced with, and generates Background.
In some cases, Background is potentially included to have powerful connections and pattern or is made up of multiple color, then now, recovered During Background, need to inquire about in the picture pixel being located in person's handwriting point set, then basis and the pixel for inquiring The color value of adjacent pixel is generated replaces color value, and the color value of the pixel for inquiring is set to into described replacing Color value is changed, Background is obtained.Because the replacement color value of the pixel for inquiring is by the color of the pixel being adjacent What value was determined, thus can as far as possible ensure the quality reconstruction of Background.
S105, according to the Background and the person's handwriting point set file of person's handwriting form is generated.
In embodiments of the present invention, after person's handwriting point set and the Background is obtained, as long as first drawing the Background, Again the pixel in person's handwriting point set is drawn out with the corresponding person's handwriting color value on Background, it is possible to preserve To the file (such as the file of ENB forms) of person's handwriting form.User can pass through specific writing software and open the person's handwriting form File, and directly identify the handwriting into edlin.
In sum, the method for the file that person's handwriting form is generated based on picture provided in an embodiment of the present invention, by identification Person's handwriting in the picture, and person's handwriting color value is obtained according to the person's handwriting for recognizing, recycle person's handwriting color value to obtain the figure The pixel of all person's handwritings in piece, generates person's handwriting point set, and recovers Background according to person's handwriting point set, finally according to pen Mark point set and Background generate the file of person's handwriting form, so as to picture to be converted to the file of person's handwriting form.On the one hand, for The environment or terminal of the file for being fitted without that person's handwriting form can be opened, can directly by opening in original picture carry out That what is held checks, and for being provided with the environment or terminal (such as electronic whiteboard) of the file that can open person's handwriting form, can be with right Person's handwriting in the file of the person's handwriting form that picture is converted into carries out secondary editor, improves the compatibility of file, facilitates user Operation and experience.
For the ease of the understanding to the embodiment of the present invention, some currently preferred embodiments of the present invention is done further below Description.
First preferred embodiment:
Preferably, step S1045 is specifically included:
S10451, obtains the color value of the neighbor pixel adjacent with the pixel for inquiring.
In the preferred embodiment, the color value of 4 adjacent with the pixel neighbor pixel can be obtained (such as Fig. 4 It is shown), it is also possible to obtain with the pixel centered on square area in 8 neighbor pixels color value (such as Fig. 5 It is shown).
S10452, removes the neighbor pixel in the person's handwriting point set.
In the preferred embodiment, because the pixel in the person's handwriting point set is necessarily not belonging to background, thus remove The pixel in the person's handwriting point set in neighbor pixel, in case these pixel interference recover the effect of Background Really.
S10453, mixes to the color value of remaining neighbor pixel, generates and replaces color value.
In the preferred embodiment, the color value of remaining neighbor pixel is mixed, generates and replace color value.By It is usually continuous transition in the color of pattern, thus mixing can be carried out by the color value to neighbor pixel and be looked into obtain The original color value of the position that the pixel is occupied is ask, wherein, mixing can directly be mixed with the rgb value of pixel Close, or rgb value be converted to remix after form and aspect, in general, RGB is converted to remixed after form and aspect it is relatively good Effect.
Second preferred embodiment:
Preferably, step S1045 is specifically included:
S10454, obtains the color value of the neighbor pixel adjacent with the pixel for inquiring.
In the preferred embodiment, the color value of 4 adjacent with the pixel neighbor pixel can be obtained, it is also possible to Obtain the color value with 8 neighbor pixels in the square area centered on the pixel.
S10455, removes the neighbor pixel in the person's handwriting point set.
In the preferred embodiment, because the pixel in person's handwriting point set is necessarily not belonging to background, thus remove adjacent The pixel in the person's handwriting point set in pixel, in case these neighbor pixel interference recover the effect of Background Really.
S10456, determines according to the occurrence number of the color value of remaining neighbor pixel and replaces color value.
For example, if pixel P1(x1, y1) be the pixel in person's handwriting point set, then read point P1Upper Pup (x1, y1- 1), lower Pdown(x1, y1+ 1), left Pleft(x1- 1, y1), right Pright(x1+ 1, y1) four direction neighbor pixel Cu, Cd, Cl, Cr, and assume that this four neighbor pixels are not located in person's handwriting point set, then judged:
If Cu, Cd, Cl, CrColor value all, then replace color value take the color value;
If Cu, Cd, Cl, CrColor value have 3 it is the same, then replace color value take with 3 values color value;
If Cu, Cd, Cl, CrColor value have 2 it is the same, in addition 2 it is different, then replace color value and take as 2 values Color value;
If Cu, Cd, Cl, CrColor value have 2 it is the same, in addition 2 it is same, then replace color value and take 2 color value Blend color value;
If Cu, Cd, Cl, CrColor value it is all different, then explanation be isolated person's handwriting point, can remove as noise, It is removed in person's handwriting point set, the blend color value that color value takes four values is replaced.
Fig. 6 is seen also, the embodiment of the present invention additionally provides a kind of dress of the file that person's handwriting form is generated based on picture 100 are put, including:
Person's handwriting recognition unit 10, for being identified to pending picture, obtains the person's handwriting for recognizing.
Person's handwriting color value signal generating unit 20, the color value for the pixel of the person's handwriting recognized according to composition is obtained At least one person's handwriting color value.
Person's handwriting point set signal generating unit 30, for obtaining the picture in there is same color value with the person's handwriting color value Pixel, generate person's handwriting point set.
Background signal generating unit 40, for generating Background based on the person's handwriting point set and the picture.
Person's handwriting file generating unit 50, for generating the text of person's handwriting form according to the Background and the person's handwriting point set Part.
Preferably, in one implementation, the person's handwriting color value signal generating unit 20 is specifically included:
First statistical module 21, for obtaining the color value of all pixels point of the person's handwriting that composition is recognized, and unites The number of meter pixel corresponding with each color value;
First mark module 22, for the corresponding color value of most with number pixels to be labeled as into person's handwriting color value.
Preferably, in one implementation, the person's handwriting color value signal generating unit 20 is specifically included:
Second statistical module 23, for obtaining the color value of the pixel of the person's handwriting that composition is recognized, and count with The number of the corresponding pixel of each color value.
Second mark module 24, for the number of corresponding pixel to be exceeded with the ratio of the pixel sum for recognizing The color value of predetermined threshold is labeled as person's handwriting color value.
Preferably, in one implementation, the Background signal generating unit 40 is specifically included:
Background color value acquisition module 41, for obtaining the background color value of the picture;
First enquiry module 42, for inquiring about the picture in be located at the person's handwriting point set in pixel;
First color value replacement module 43, for the color value of the pixel for inquiring to be replaced with into the background face Colour, generates Background.
Preferably, in one implementation, the Background signal generating unit 40 is specifically included:
Second enquiry module 44, for inquiring about the picture in be located at the person's handwriting point set in pixel.
Color value generation module 45 is replaced, for the basis at least 4 adjacent pictures adjacent with the pixel for inquiring The color value of vegetarian refreshments is generated replaces color value.
Second color value replacement module 46, for the color value of the pixel for inquiring to be replaced with into the replacement face Colour, generates Background.
Preferably, the replacement color value generation module 45 is specifically included:
First adjacent color value acquisition submodule 451, adjacent at least 4 of the pixel for obtaining with inquire The color value of neighbor pixel.
First removes submodule 452, for removing the neighbor pixel in the person's handwriting point set.
Color value mixes submodule 453, for mixing to the color value of remaining neighbor pixel, generates and replaces face Colour.
Preferably, the replacement color value generation module 45 is specifically included:
Second adjacent color value acquisition submodule 454, adjacent at least 4 of the pixel for obtaining with inquire The color value of neighbor pixel.
Second removes submodule 455, for removing the neighbor pixel in the person's handwriting point set;
Color value arranges submodule 456, replaces for being determined according to the occurrence number of the color value of remaining neighbor pixel Change color value.
The device 100 of the file that person's handwriting form is generated based on picture provided in an embodiment of the present invention, it is single by person's handwriting identification Person's handwriting in the identification of unit 10 picture, and person's handwriting color is obtained according to the person's handwriting for recognizing by person's handwriting color value signal generating unit 20 Value, then the pixel of all person's handwritings in the picture is obtained using person's handwriting color value by person's handwriting point set signal generating unit 30, it is raw Into person's handwriting point set, then Background, last person's handwriting file life are recovered according to person's handwriting point set by Background signal generating unit 40 The file of person's handwriting form is generated according to person's handwriting point set and Background into unit 50, so as to picture to be converted to the text of person's handwriting form Part.On the one hand, for the environment or terminal of the file for being fitted without that person's handwriting form can be opened, can be directly former by opening Some pictures carry out checking for content, and for being provided with the environment or terminal of the file that can open person's handwriting form (such as electronics Blank), secondary editor can be carried out with the person's handwriting in the file of the person's handwriting form being converted into picture, improve the compatibility of file Property, facilitate the operation and experience of user.
Above disclosed is only a kind of preferred embodiment of the invention, can not limit the power of the present invention with this certainly Sharp scope, one of ordinary skill in the art will appreciate that all or part of flow process of above-described embodiment is realized, and according to present invention power Profit requires made equivalent variations, still falls within the covered scope of invention.
One of ordinary skill in the art will appreciate that realizing all or part of flow process in above-described embodiment method, can be Related hardware is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..

Claims (10)

1. it is a kind of based on picture generate person's handwriting form file method, it is characterised in that include:
Pending picture is identified, the person's handwriting for recognizing is obtained;
The color value of the pixel of the person's handwriting recognized according to composition obtains at least one person's handwriting color value;
The pixel with the person's handwriting color value in the picture with same color value is obtained, person's handwriting point set is generated;
Background is generated based on the person's handwriting point set and the picture;
The file of person's handwriting form is generated according to the Background and the person's handwriting point set.
2. it is according to claim 1 based on picture generate person's handwriting form file method, it is characterised in that the basis The color value of the pixel of the person's handwriting that composition is recognized obtains at least one person's handwriting color value and is specially:
The color value of all pixels point of the person's handwriting that composition is recognized is obtained, and counts pixel corresponding with each color value The number of point;
The corresponding color value of most with number pixels is set to into person's handwriting color value.
3. it is according to claim 1 based on picture generate person's handwriting form file method, it is characterised in that the basis The color value of the pixel of the person's handwriting that composition is recognized obtains at least one person's handwriting color value and is specially:
The color value of all pixels point of the person's handwriting that composition is recognized is obtained, and counts pixel corresponding with each color value The number of point;
The color value that the number of corresponding pixel exceedes predetermined threshold with the ratio of the pixel sum for recognizing is labeled as Person's handwriting color value.
4. it is according to claim 1 based on picture generate person's handwriting form file method, it is characterised in that the basis The person's handwriting point set and the picture generate Background, specifically include:
Obtain the background color value of the picture;
The pixel being located in the person's handwriting point set is inquired about in the picture;
The color value of the pixel for inquiring is replaced with into the background color value, Background is generated.
5. it is according to claim 1 based on picture generate person's handwriting form file method, it is characterised in that the basis The person's handwriting point set and the picture generate Background, specifically include:
The pixel being located in the person's handwriting point set is inquired about in the picture;
Generated according to the color value of the neighbor pixel adjacent with the pixel for inquiring and replace color value;
The color value of the pixel for inquiring is replaced with into the replacement color value, Background is generated.
6. it is according to claim 5 based on picture generate person's handwriting form file method, it is characterised in that the basis The color value of the neighbor pixel adjacent with the pixel for inquiring is generated replaces color value, specially:
Obtain the color value of the neighbor pixel adjacent with the pixel for inquiring;
Remove the neighbor pixel in the person's handwriting point set;
The color value of remaining neighbor pixel is mixed, is generated and is replaced color value.
7. it is according to claim 5 based on picture generate person's handwriting form file method, it is characterised in that the basis The color value of the pixel adjacent with the pixel for inquiring is generated replaces color value, specially:
Obtain the color value of the neighbor pixel adjacent with the pixel for inquiring;
Remove the neighbor pixel in the person's handwriting point set;
Determined according to the occurrence number of the color value of remaining neighbor pixel and replace color value.
8. it is a kind of based on picture generate person's handwriting form file device, it is characterised in that include:
Person's handwriting recognition unit, for being identified to pending picture, obtains the person's handwriting for recognizing;
Person's handwriting color value signal generating unit, the color value for the pixel of the person's handwriting recognized according to composition obtains at least one Individual person's handwriting color value;
Person's handwriting point set signal generating unit, for obtaining the picture in there is the pixel of same color value with the person's handwriting color value Point, generates person's handwriting point set;
Background signal generating unit, for generating Background based on the person's handwriting point set and the picture;
Person's handwriting file generating unit, for generating the file of person's handwriting form according to the Background and the person's handwriting point set.
9. it is according to claim 8 based on picture generate person's handwriting form file device, it is characterised in that the person's handwriting Color value signal generating unit is specifically included:
First statistical module, for obtaining the color value of all pixels point of the person's handwriting that composition is recognized, and count with it is every The number of the corresponding pixel of individual color value;
First mark module, for the corresponding color value of most with number pixels to be labeled as into person's handwriting color value.
10. it is according to claim 8 based on picture generate person's handwriting form file device, it is characterised in that the back of the body Scape figure signal generating unit is specifically included:
Background color value acquisition module, for obtaining the background color value of the picture;
First enquiry module, for inquiring about the picture in be located at the person's handwriting point set in pixel;
First color value replacement module, for the color value of the pixel for inquiring to be replaced with into the background color value, Generate Background.
CN201611114430.1A 2016-12-07 2016-12-07 Method and device for generating handwriting format file based on picture Active CN106599818B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201611114430.1A CN106599818B (en) 2016-12-07 2016-12-07 Method and device for generating handwriting format file based on picture
PCT/CN2017/077154 WO2018103226A1 (en) 2016-12-07 2017-03-17 Method and device for generating handwriting format document on the basis of picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611114430.1A CN106599818B (en) 2016-12-07 2016-12-07 Method and device for generating handwriting format file based on picture

Publications (2)

Publication Number Publication Date
CN106599818A true CN106599818A (en) 2017-04-26
CN106599818B CN106599818B (en) 2020-10-27

Family

ID=58596299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611114430.1A Active CN106599818B (en) 2016-12-07 2016-12-07 Method and device for generating handwriting format file based on picture

Country Status (2)

Country Link
CN (1) CN106599818B (en)
WO (1) WO2018103226A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874254A (en) * 2018-06-12 2018-11-23 掌阅科技股份有限公司 The method for drafting and E-book reader of the hand-written pencil person's handwriting of E-book reader
CN109062491A (en) * 2018-07-23 2018-12-21 广州视源电子科技股份有限公司 The handwriting processing method and device of interactive intelligence equipment
CN109215098A (en) * 2018-08-20 2019-01-15 广州视源电子科技股份有限公司 Handwriting erasing method and apparatus
CN110174978A (en) * 2019-05-13 2019-08-27 广州视源电子科技股份有限公司 Data processing method, device, intelligent interaction plate and storage medium
CN111160265A (en) * 2019-12-30 2020-05-15 Oppo(重庆)智能科技有限公司 File conversion method and device, storage medium and electronic equipment
CN113688838A (en) * 2021-10-25 2021-11-23 江西软云科技股份有限公司 Red handwriting extraction method and system, readable storage medium and computer equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112256146A (en) * 2020-09-09 2021-01-22 广州视源电子科技股份有限公司 Method, device, equipment and storage medium for testing whiteboard handwriting

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6909803B2 (en) * 2000-12-22 2005-06-21 Canon Kabushiki Kaisha Text color detection for copier image processing
CN101295359A (en) * 2007-04-25 2008-10-29 日立欧姆龙金融系统有限公司 Image processing program and image processing apparatus
CN102136064A (en) * 2011-03-24 2011-07-27 成都四方信息技术有限公司 System for recognizing characters from image
CN102289322A (en) * 2011-08-25 2011-12-21 盛乐信息技术(上海)有限公司 Method and system for processing handwriting
CN103544722A (en) * 2013-10-25 2014-01-29 深圳市掌网立体时代视讯技术有限公司 Method and device for handwriting decoration of digital painting and chirography
CN102131038B (en) * 2010-01-18 2014-06-25 夏普株式会社 Image compressing apparatus, compressed image outputting apparatus and image compression method
CN105205488A (en) * 2015-07-13 2015-12-30 西北工业大学 Harris angular point and stroke width based text region detection method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003274424A1 (en) * 2002-10-24 2004-05-13 Immediad Aps System for presenting and controlling information on a display device
CN101593324B (en) * 2009-06-17 2012-05-23 浙江师范大学 Method and system for network multi-level approval based on dependable computing application technique
CN102541347A (en) * 2011-11-15 2012-07-04 上海大学 Automatic identification system and method of handwriting Chinese character
CN102968789B (en) * 2012-10-25 2015-06-24 清华大学 Method used for extracting unearthed bamboo slip and silk character pattern image and based on digital image processing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6909803B2 (en) * 2000-12-22 2005-06-21 Canon Kabushiki Kaisha Text color detection for copier image processing
CN101295359A (en) * 2007-04-25 2008-10-29 日立欧姆龙金融系统有限公司 Image processing program and image processing apparatus
CN102131038B (en) * 2010-01-18 2014-06-25 夏普株式会社 Image compressing apparatus, compressed image outputting apparatus and image compression method
CN102136064A (en) * 2011-03-24 2011-07-27 成都四方信息技术有限公司 System for recognizing characters from image
CN102289322A (en) * 2011-08-25 2011-12-21 盛乐信息技术(上海)有限公司 Method and system for processing handwriting
CN103544722A (en) * 2013-10-25 2014-01-29 深圳市掌网立体时代视讯技术有限公司 Method and device for handwriting decoration of digital painting and chirography
CN105205488A (en) * 2015-07-13 2015-12-30 西北工业大学 Harris angular point and stroke width based text region detection method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874254A (en) * 2018-06-12 2018-11-23 掌阅科技股份有限公司 The method for drafting and E-book reader of the hand-written pencil person's handwriting of E-book reader
CN109062491A (en) * 2018-07-23 2018-12-21 广州视源电子科技股份有限公司 The handwriting processing method and device of interactive intelligence equipment
CN109215098A (en) * 2018-08-20 2019-01-15 广州视源电子科技股份有限公司 Handwriting erasing method and apparatus
CN110174978A (en) * 2019-05-13 2019-08-27 广州视源电子科技股份有限公司 Data processing method, device, intelligent interaction plate and storage medium
CN111160265A (en) * 2019-12-30 2020-05-15 Oppo(重庆)智能科技有限公司 File conversion method and device, storage medium and electronic equipment
CN113688838A (en) * 2021-10-25 2021-11-23 江西软云科技股份有限公司 Red handwriting extraction method and system, readable storage medium and computer equipment
CN113688838B (en) * 2021-10-25 2022-03-22 江西软云科技股份有限公司 Red handwriting extraction method and system, readable storage medium and computer equipment

Also Published As

Publication number Publication date
WO2018103226A1 (en) 2018-06-14
CN106599818B (en) 2020-10-27

Similar Documents

Publication Publication Date Title
CN106599818A (en) Method and apparatus for generating handwriting-format document based on picture
CN1655583B (en) Systems and methods for generating high compression image data files having multiple foreground planes
CN101944179B (en) Image processing apparatus and image processing method
CN102750541B (en) Document image classifying distinguishing method and device
CN102194123B (en) Method and device for defining table template
CN105654072A (en) Automatic character extraction and recognition system and method for low-resolution medical bill image
CN101295359B (en) Image processing method and image processing apparatus
US20140219561A1 (en) Character segmentation device and character segmentation method
CN114299528B (en) Information extraction and structuring method for scanned document
CN102855232A (en) Table analysis and edit processing method
US8611658B2 (en) Image processing apparatus and image processing method
JP5830338B2 (en) Form recognition method and form recognition apparatus
CN101599125A (en) The binarization method that the complex background hypograph is handled
CN110866388A (en) Publishing PDF layout analysis and identification method based on mixing of multiple neural networks
US8249364B2 (en) Method for resolving contradicting output data from an optical character recognition (OCR) system, wherein the output data comprises more than one recognition alternative for an image of a character
JP6607496B2 (en) CONVERSION PROCESSING DEVICE, INFORMATION PROCESSING DEVICE EQUIPPED WITH THE SAME, PROGRAM, AND RECORDING MEDIUM
CN103927533A (en) Intelligent processing method for graphics and text information in early patent document scanning copy
US10523848B2 (en) Image processing apparatus for processing marked regions
JP7178445B2 (en) Information processing device, information processing method, and program
JP7317886B2 (en) Information processing device and information processing method
Kumar et al. Analysis of OMR sheet using machine learning model
US6987584B1 (en) Method and system for preventing artifacts that may be product when bottling PDL files converted from raster images
CN107018251A (en) Image processing apparatus and image processing method
US20110135162A1 (en) Image processing apparatus, image processing method and recording medium
CN116777723A (en) Image watermarking method and device, computer readable medium and electronic device

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