A kind of method of handwritten entries in automatic segmentation electronization notebook
Technical field
The invention belongs to electronic computer technology field, relate to the method for handwritten entries in a kind of automatic segmentation electronization notebook.
Background technology
In daily life, people often need to take paper document, preserve into the photo of jpeg format, or generate the document of PDF, thus realize the electronization of paper document, convenient management.Smart mobile phone is exactly conventional by one of instrument of paper document electronization.Utilize the camera on mobile phone to take paper document because general on smart mobile phone all with camera, and will the photo converting jpeg format after the electronic document obtained carries out certain image procossing again to be taken, or generate the document of PDF.The application software possessing above-mentioned functions is also more universal, applies the application CamScanner in shop as apple application shop and google.These application software can measure the four edges of captured document by automatic monitoring from the image of shooting, background in benchmark excision image outside document areas, and document areas is corrected and the process such as image enhaucament, obtain the effect that is similar to the shipshape electronic document obtained by scanner scanning, the form of specifying with user carries out preserving and managing.
The paper document that common needs carry out electronization is the paper notebook page, people did various record originally through the notes of common paper part for a long time, as minutes, memorandum transaction record etc., dozens or even hundreds of page paper is had in a paper notebook, and the notebook of same type, the pattern of its all page being used for recording is generally unified.In actual use, user often needs to record entry one by one with handwriting mode on notebook, such as user is divided into 3 row on the notebook page writes possible movable option at weekend: 1, go window-shopping, and 2, see a film, 3, go to park; After the image that have taken this notebook page carries out electronization, user has made decision in these 3 options, select 2, see a film, he needs this to determine to be saved in backlog to go just to need to input a word in the electronic device again, and this is just very inconvenient.As long as click " 2, see a film " in the electronic document of this notebook page that desirable way is user to be shown on an electronic device, just the image-region of " 2, see a film " person's handwriting cuts out comprising automatically for the region at person's handwriting place, joins inside backlog and goes.A lot of notebooks all can stamp a point line; time user is hand-written, handwriting often can with the branch's line overlap printed in advance; some notebook even can stamp background patterns on the page; these all can be given and obtain the image-region that positions that user clicks later automatically to be syncopated as " 2, see a film " this handwriting place from image and bring interference, cause cutting to be forbidden.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide the method for handwritten entries in a kind of automatic segmentation electronization notebook, for solving the problem automatically cannot extracting the content of ad-hoc location in electronic document in prior art.
For achieving the above object and other relevant objects, the invention provides the method for handwritten entries in a kind of automatic segmentation electronization notebook.
A method for handwritten entries in automatic segmentation electronization notebook, in described automatic segmentation electronization notebook, the method for handwritten entries comprises:
Shooting needs the papery page-images of the notebook of electronization;
Determined the four edges edge line of described papery page-images by the line detection method in image, and the page area that four edges edge line limits is corrected to square region;
Determine the type of the described papery page according to described papery page-images, obtain the papery page empty cutting template of the described type notebook preserved in advance, described blank cutting template is made up of some character blocks;
Determine the character block at user's handwriting place in described square region, in units of character block, the user's handwriting be in any one character block is extracted in automatic segmentation.
Preferably, the type of the described papery page is by the size of this papery page and format determination; The form of the described papery page comprises the number of the character block that the papery page comprises, size, interval.
Preferably, described character block can merge with adjacent character block, and in units of the character block after merging, the user's handwriting be in any one character block is extracted in automatic segmentation.
Preferably, when the type of the described papery page is known in advance, determine that according to described papery page-images the specific implementation of the type of the described papery page is: artificial type of specifying the described papery page.
Preferably, when the type of the described papery page is known in advance, determine that according to described papery page-images the specific implementation of the type of the described papery page is: the fixed position place on the described papery page is printed with a type mark; Detect the type mark in described papery page-images, the type mark this detected compares one by one with type mark known in advance, finds out the type belonging to the described papery page.
Preferably, when the type of the described papery page be do not know in advance, determine that according to described papery page-images the specific implementation of the type of the described papery page is: the type creating the new papery page, input size and the form of the papery page of this unknown.
As mentioned above, the method for handwritten entries in automatic segmentation electronization notebook of the present invention, has following beneficial effect:
The present invention is by when carrying out electronization to the papery page of notebook, assist by the blank cutting template of preserving in advance and obtain and split the hand-written word of user on the papery page, because described blank cutting template is made up of several character blocks, so each character block all can as the unit of writing on the cutting page, thus obtain the handwritten entries containing content intact, achieve automatic segmentation and the extraction of electronic document content.
Accompanying drawing explanation
Fig. 1 is shown as the schematic flow sheet of the method for handwritten entries in automatic segmentation of the present invention electronization notebook.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
Refer to accompanying drawing.It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
Below in conjunction with embodiment and accompanying drawing, the present invention is described in detail.
Embodiment one
The present embodiment provides the method for handwritten entries in a kind of automatic segmentation electronization notebook, and as shown in Figure 1, in described automatic segmentation electronization notebook, the method for handwritten entries comprises:
Shooting needs the papery page-images of the notebook of electronization.In the present embodiment, the described papery page needing the notebook of electronization can be any type, as this papery page being printed with class indication region, page number region, Title area, point line or/and parse line etc., it also can be the combination of above-mentioned every any-mode.
Determined the four edges edge line of described papery page-images by the line detection method in image, and the page area that four edges edge line limits is corrected to square region.Particularly, four the outer peripheral straight lines of the page represented in papery page-images are obtained by the line detection method in image, to cut away in image the background area beyond scope that these four page outward flange straight lines limit, and correct for the papery page-images of benchmark to shooting with these four page outward flange straight lines, the page area that these four page outward flange straight lines limit is corrected into rectangular region.
Determine the type of the described papery page according to described papery page-images, obtain the papery page empty cutting template of the described type notebook preserved in advance, described blank cutting template is made up of some character blocks.In the present embodiment, the type of the described papery page is by the size of this papery page and format determination; The form of the described papery page comprises the interval between the number of the character block that the papery page comprises, the size of character block and adjacent character block.That is, the described papery page can be made up of the block region of arbitrary shape, and each piece of region is a character block.This character block just in time intactly can split the user's handwriting on the papery page.
The papery page-images of notebook captured in the present invention belongs to the page type that the application software such as existing CamScanner have been preserved in advance, therefore, it is possible to reference to the blank cutting template of the papery page of the type preserved in advance to obtain the image-region (regions at the multiple character block places namely after a character block or merging) at user's handwriting place, obvious accuracy can improve greatly.
Determine the character block at user's handwriting place in described square region, in units of character block, the user's handwriting be in any one character block is extracted in automatic segmentation.Wherein, described character block also can merge with adjacent character block, namely can by merge after character block in units of automatic segmentation extract the user's handwriting be in any one character block.In notebook papery page-images after calibration, with reference to the blank cutting template of described this notebook papery page preserved in advance, determine the position of user's handwriting in blank cutting template in the notebook page, and the handwriting of user is cut into the character block representing different literal lines.By method of the present invention, user manually can become one the region merging technique representing the multiple character blocks forming full sense closed on by shirtsleeve operation.What these cut out represent, and the content formed in the character block of full sense can be used in the list of the charg`e d'affaires's item joined in electronic equipment, also can utilize existing handwriting recognition technology to identify word wherein, save the trouble of user's manual input characters on an electronic device.
The present invention is by when carrying out electronization to the notebook page, assist with the blank cutting template Chinese block preserved in advance and obtain and split the hand-written character area of user, obtain the image block (also claiming character block) of the handwritten entries containing content intact, thus facilitate the subregion electronization of the papery page, and the using and managing of document after electronization.That is, the present invention is by when carrying out electronization to the papery page of notebook, assist by the blank cutting template of preserving in advance and obtain and split the hand-written word of user on the papery page, because described blank cutting template is made up of several character blocks, so each character block all can as the unit of writing on the cutting page, thus obtain the handwritten entries containing content intact, achieve automatic segmentation and the extraction of electronic document content.
Embodiment two
The present embodiment provides the method for handwritten entries in a kind of automatic segmentation electronization notebook, in itself and the automatic segmentation described in embodiment one electronization notebook, the difference of the method for handwritten entries is: the type of the known described papery page in advance, determines that the specific implementation of the type of the described papery page is: artificial type of specifying the described papery page according to described papery page-images; Namely user before capturing the image, or before the aftertreatment image of shooting image, artificial type belonging to the papery page of specifying notebook, such as selects one from a series of notebook page types be kept in advance the application software such as camScanner.
Embodiment three
The present embodiment provides the method for handwritten entries in a kind of automatic segmentation electronization notebook, in itself and the automatic segmentation described in embodiment one and two electronization notebook, the difference of the method for handwritten entries is: the type of the known described papery page in advance, determines that the specific implementation of the type of the described papery page is according to described papery page-images:
Fixed position place on the described papery page is printed with a type mark; Described type mark can be the combination of word, symbol, figure or any two or three.
Detect the type mark in described papery page-images, the type mark this detected compares one by one with type mark known in advance, finds out the type belonging to the described papery page.Fixed position place on the described papery page is printed with a type mark, an i.e. pre-designed mark (i.e. type mark) in the assigned address printing of each papery page of notebook in advance, after shooting obtains the image of the papery page of notebook, first detect four outward flanges of the papery page of notebook in the picture, with these four outward flanges for reference to determining the approximate location of described mark in the image of the papery page, thus realize the detection in the picture of described mark, then the mark of the mark detected with the papery page of the multiple dissimilar notebook of representative preserved in advance is compared one by one, find out the type belonging to the papery page of captured notebook.The mark of the mark detected with the multiple dissimilar notebook papery page of representative preserved in advance is compared one by one, find out the type belonging to the papery page of captured notebook, this step relates to handwriting recognition, Text region, mature technology in this areas such as images match, therefore not to repeat here.
Embodiment four
The present embodiment provides the method for handwritten entries in a kind of automatic segmentation electronization notebook, in itself and the automatic segmentation described in embodiment one electronization notebook, the difference of the method for handwritten entries is: the type of not knowing the described papery page in advance, in such cases, determine that according to described papery page-images the specific implementation of the type of the described papery page is:
Create the type of the new papery page, input size and the form of the papery page of this unknown.
If the papery page of namely captured notebook does not belong to, the application software such as CamScanner are known has in advance printed overstriking or/and point line that lengthens is or/and parse line is or/and the type of the papery page of Title area, then first the type of the papery page of this unknown is added in subsequent steps after in the type of the new papery page created, then carry out follow-up process.
The present invention is by when carrying out electronization to the papery page of notebook, assist by the blank cutting template of preserving in advance and obtain and split the hand-written word of user on the papery page, because described blank cutting template is made up of several character blocks, so each character block all can as the unit of writing on the cutting page, thus obtain the handwritten entries containing content intact, achieve automatic segmentation and the extraction of electronic document content.
In sum, the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.