CN107729898A - The method and apparatus for detecting the line of text in text image - Google Patents
The method and apparatus for detecting the line of text in text image Download PDFInfo
- Publication number
- CN107729898A CN107729898A CN201610654001.7A CN201610654001A CN107729898A CN 107729898 A CN107729898 A CN 107729898A CN 201610654001 A CN201610654001 A CN 201610654001A CN 107729898 A CN107729898 A CN 107729898A
- Authority
- CN
- China
- Prior art keywords
- link
- weight
- connected domain
- fusion
- text
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/158—Segmentation of character regions using character size, text spacings or pitch estimation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Theoretical Computer Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses the method and apparatus of the line of text in detection text image.Methods described includes:Binary conversion treatment is performed to text image, and extracts connected domain;Established the link between the adjacent connected domain with Similar size, to form the multilink to interweave;Cut based on the first weight come the link to multilink, to obtain main body link;Weight limit and link are searched for from main body link based on the first weight, the summation of the first weight of each link in the weight limit and link is more than the summation of the first weight of each link in other links;It is fused to meet following condition with the associated connected domain that links being cut in weight limit and link to obtain merging link, condition is:Perform summation of the summation less than the second weight of each link in the weight limit and link before fusion of the second weight of each link in the fusion link after fusion;And line of text is obtained based on fusion link.
Description
Technical field
The present invention relates to image processing techniques, more particularly to a kind of method and dress for detecting the line of text in text image
Put.
Background technology
Text image can electronically be stored in various media, network etc., and cost is cheap, so as in the daily of people
It is widely used in life.For understanding, content plays very important effect in text image for line of text detection.So
And line of text always includes different types of language, different colours and different relations so that line of text detection is more difficult from.
The content of the invention
In consideration of it, the method and apparatus that the present invention proposes the line of text in a kind of new detection text image.
According to an aspect of the present invention, there is provided a kind of method for detecting the line of text in text image, including:To text
Image performs binary conversion treatment, and extracts connected domain;Established the link between the adjacent connected domain with Similar size, with shape
Into the multilink of intertexture;Cut based on the first weight come the link to the multilink, to obtain main body link;Base
Weight limit and link are searched for from the main body link in the first weight, of each link in the weight limit and link
The summation of one weight is more than the summation of the first weight of each link in other links;Following condition will be met with it is cropped
The connected domain that the link fallen is associated is fused in the weight limit and link to obtain merging link, and the condition is:Hold
The summation of second weight of each link in fusion link after the row fusion is less than weight limit and link before fusion
In each link the second weight summation;And line of text is obtained based on fusion link.
According to another aspect of the present invention, there is provided a kind of device for detecting the line of text in text image, including:Connection
Domain extracting parts, for performing binary conversion treatment to text image, and extract connected domain;Link establish part, for
Established the link between the adjacent connected domain of Similar size to form the multilink to interweave;Part is cut, for based on first
Weight is cut come the link to the multilink to obtain main body link;Search parts, for based on the first weight from
Search for weight limit and link in the main body link, the summation of the first weight of each link in the weight limit and link
More than the summation of the first weight of each link in other links;Merge part, for by meet following condition with being cut out
The connected domain that the link cut is associated is fused in the weight limit and link to obtain merging link, and the condition is:
The summation for performing the second weight of each link in the fusion link after the fusion is less than weight limit and chain before fusion
The summation of second weight of each link in road;Line of text obtaining widget, for obtaining line of text based on fusion link.
In accordance with a further aspect of the present invention, a kind of storage medium is additionally provided.The storage medium includes machine readable
Program code, when performing described program code on message processing device, described program code causes described information processing to set
The standby above method performed according to the present invention.
According to another aspect of the invention, a kind of program is additionally provided.Described program includes the instruction that machine can perform, when
When performing the instruction on message processing device, the instruction causes described information processing equipment to perform according to the upper of the present invention
State method.
By excellent below in conjunction with detailed description of the accompanying drawing to highly preferred embodiment of the present invention, these and other of the invention
Point will be apparent from.
Brief description of the drawings
The embodiments of the present invention are read with reference to the drawings, other features and advantages of the present invention will be better understood,
Accompanying drawing described here is intended merely to the purpose schematically illustrated to embodiments of the present invention, and not all possible reality
Apply, and be not intended to limitation the scope of the present invention.In the accompanying drawings:
Fig. 1 shows the flow chart of the method for the line of text in detection text image according to an embodiment of the invention;
Fig. 2 shows the text obtained by the method for the line of text in detection text image according to an embodiment of the invention
Capable schematic diagram;
Fig. 3 to Fig. 6 is shown the method for the line of text in detection text image according to an embodiment of the invention
Schematic diagram applied to the process of example text image application;
Fig. 7 shows the structured flowchart of the device of the line of text in detection text image according to an embodiment of the invention;
And
Fig. 8 shows the schematic block diagram available for the computer for implementing method and apparatus according to embodiments of the present invention.
Embodiment
Embodiments of the present invention are described in detail referring now to accompanying drawing.It should be noted that following description is merely exemplary
, and it is not intended to limit the present invention.In addition, in the following description, it will adopt and be indicated with like reference numerals in different accompanying drawings
Same or analogous part.Different characteristic in different embodiments described below, it can be bonded to each other, to form this hair
Other embodiment in bright scope.
Fig. 1 shows the flow chart of the method 100 of the line of text in detection text image according to an embodiment of the invention.
As shown in figure 1, this method 100 includes step S110 to S180, wherein step S130 and S180 is not that the institute of implementation method 100 is necessary
, but preferably.
In step s 110, binary conversion treatment is carried out to text image, and extracts each connected domain of image.At binaryzation
Manage as the common technology in image preprocessing, the purpose is to the word foreground area of image and background area are separated.By
The image of binary conversion treatment turns into the binary map being made up of 0 and 1.After carrying out binary conversion treatment to image, it can obtain potential
Character area.Herein, connected domain refer in text image have same pixel value and position it is adjacent foreground pixel point composition
Image-region.
Then, in the step s 120, establish the link between the adjacent connected domain with Similar size, interweave so as to be formed
Multilink.Herein, the multilink formed is considered as Multiway Tree Structure, i.e., each connected domain is formed in multiway tree
Node, the link between connected domain form the branch between the node of multiway tree.For vivider description multilink, under
Multilink is also referred to as tree-structures link in text, and it is made up of root connected domain and some subtrees.
Here, closed loop link and as shown in Figure 3 non-legible may be included according to the tree-structures link obtained by step S120
Connected domain.In order to improve the accuracy of line of text extraction, it is preferable that according to the line of text detected in text image of the present invention
Method can also include step S130, and it is optimized to the link in tree-structures link to exclude closed loop link, excellent so as to obtain
The tree-structures link of change.
Specifically, the link that weight in tree-structures link is more than predetermined threshold is cut first.Those skilled in the art can root
The predetermined threshold is set according to practical application or experience.Weight herein is dependent between two connected domains established the link
Second weight of distance, such as second weight can be set as the distance between adjacent connected domain.Then, to resulting
Link application minimal spanning tree algorithm, to obtain the tree-structures link of the optimization of no closed loop link.
Then, in step S140, the link in tree-structures link is cut based on the first weight, to obtain main body chain
Road.Specifically, first the first weight in tree-structures link can be ranked up, then crops weight every time using greedy algorithm
Minimum link, until when total number of plies of tree-structures link changes, stop algorithm, thus obtain the main body of tree-structures link.
Herein, the first weight is counted according to the distance between two adjacent connected domains established the link and their size
Calculate, for example, can be calculated according to following formula:
For the link on vertical direction:
Wij=hi÷hj×d(cci, ccj), wherein hi< hj……(1)
Wherein, WijRepresent two adjacent connected domain cciWith connected domain ccjBetween link weight, hiRepresent connected domain
cciHeight, hjRepresent connected domain ccjHeight, and d (cci, ccj) represent connected domain cciWith connected domain ccjBetween away from
From.
For the link in horizontal direction:
Wij=wi÷wj×d(cci, ccj), wherein wi< wj……(2)
Wherein, WijRepresent connected domain cciWith connected domain ccjBetween link weight, wiRepresent connected domain cciWidth,
wjRepresent connected domain ccjWidth, and d (cci, ccj) represent connected domain cciWith connected domain ccjThe distance between.
Pay attention to, the first weight of link is unrelated with connected domain cci and connected domain ccj order, i.e. Wij=Wji.In the above
In expression formula (1) and (2), impose a condition hi < hj and wi< wjIt is suitable in order to exclude connected domain cci and connected domain ccj calculating
The influence of ordered pair weight.Alternately, hi > hj and w can also be set toi> wj。
The direction of link can judge according to following:If two connected domains associated are linked with some in the horizontal direction
On not overlapping and in the vertical direction the projection of projection have overlapping, then be horizontal direction;, whereas if link pass with some
Not overlapping and in the horizontal direction the projection of projection of two connected domain in the vertical directions of connection has overlapping, then is vertical side
To.
Then, in step S150, weight limit and link are searched for from main body link based on the first weight, wherein this is most
First weight summation of each link in big weight and link is more than the first weight summation of each link in other links.
Specifically, in the present invention, weight limit and link are searched for using following recursive algorithm.Go out from root connected domain r
The weight limit of hair and the weighted value Val of link can be expressed as:
Val=Max (Val (ri)+wr-ri), i ∈ T ... (3)
Wherein ri is one in root connected domain r T sub-connected domain;wr-riRepresent root connected domain r and sub-connected domain ri
Between link weight;And Val (ri) can be expressed as:
Val (ri)=MAX (Val (rit)+wri-rit), rit ∈ N ... (4)
Wherein rit is one in connected domain ri N number of sub-connected domain;wri-ritRepresent in connected domain ri and sub-connected domain
The weight of link between rit;And Val (rit) can carry out recursive operation like that similar to expression formula (3) and (4), and finally
Obtain weight limit and link.
Then, in step S160, it is fused to meet specified conditions with the associated connected domain that links being cut
To obtain merging link in the weight limit and link, the specified conditions are:Perform in the fusion link after the fusion
Each link the second weight summation be less than fusion before weight limit and link in each link the second weight summation.
Wherein, the second weight is calculated based on the distance between two adjacent connected domains established the link, for example, can be by two companies
The distance between logical domain is set as the weight of the link.
Preferably, by be cut link associated connected domain be fused to it is nearest in weight limit and link
In connected domain.Also, when calculating the summation of the second weight of each link of fusion link, the chain of first renewal fusion link
Connect, then calculate the second weight of each link, and then obtain the second weight summation.
Specifically, in step S160, it is assumed that link associated connection with some cropped in step S140
Domain is fused in the nearest connected domain in weight limit and link, so as to the connected domain nearest with this be merged into one it is new
Connected domain.Then, the link of the fusion link after renewal so fusion, and the weight of each link is calculated, to obtain fusion chain
The weight summation on road.If fusion after weight summation be less than fusion before weight summation, the decision fusion connected domain, otherwise
The connected domain is not merged.In the case of the decision fusion connected domain, the connected domain is fused in weight limit and link, and
And more new url.
Next, in step S170, line of text is obtained based on fusion link.
The line of text obtained in step S170 may include incoherent connected domain as shown in Figure 2, i.e., in fig. 2,
Word segment " Tokyo " and numerical portion " Tel.0265-83-2324 " are discontinuous.In order to remove this kind of incoherent connected domain,
Preferably, the method 100 of the line of text in the detection text image of the present invention can also include filtering line of text
To remove the step S180 of incoherent connected domain.
Specifically, each connected domain order in line of text can be numbered, is by each connected domain in Fig. 2
It is 1,2,3,4,5,6 ... 18 that " east ", " capital ", " T ", " e ", " l ", " ", " 0 ", " 2 " ... " 4 ", which are sequentially numbered,.Then, calculate
Each connected domain relative to reference position distance.The reference position can be with arbitrarily selected, such as the left margin of line of text or the right side
Border etc..Then, distance of the numbering of the connected domain with the connected domain relative to reference position is calculated for each connected domain
Between ratio R, i.e.,:
Numbering/connected domain of R=connected domains relative to reference position distance ... (5)
Also, each ratio R calculated is compared with preset range, if exceeding the preset range, filtered out
Connected domain corresponding with the ratio R.Those skilled in the art can set the preset range according to practical application or by rule of thumb.
The method of the line of text in detection text image according to an embodiment of the invention is described in detail above in association with Fig. 1
Flow.Below, by taking the text image in Fig. 3 to Fig. 6 as an example, the method 100 for detecting line of text is specifically described.
First, binary conversion treatment is carried out in step s 110, and extracts connected domain Then, in the step s 120, in the phase with Similar size
Established the link between adjacent connected domain, form the tree-structures link shown in Fig. 3.Then, in step s 130, to the tree-structures link
Optimize, remove the larger link of weight, i.e. connected domainWithBetween link, obtain as shown in Figure 4 excellent
The tree-structures link of change.In step S140, the tree-structures link of the optimization is cut, obtains main body link as shown in Figure 5,
Wherein connected domainLinking between main body link is cut, so as to the connected domainBy from main body link
Delete.After by aforesaid operations, example text image only obtains a main body link, in this case, it is convenient to omit
The step S150 scanned for weight limit and link, because the main body link is weight limit and link.Next,
In step S160, it is first determined whether being merged.First assume connected domainMerged with main body link, and then will connection
DomainWith connected domainMerge a new connected domainThen, the link after fusion is calculated (such as Fig. 6 institutes
Show) the second weight summation, including:Update connected domainWith adjacent connected domainWithBetween link, be based on
Chain after renewal fetches the second weight summation for calculating fusion link.Then, compare the link (as shown in Figure 5) before fusion and melt
Link after conjunction, it is clear that the link after fusion has smaller weight summation, because of the connected domain after fusionWith adjacent connected domain
The distance between it is shorter, and then the weight linked between adjacent connected domain is smaller.Compared according to this, it is possible to determine that will connect
DomainMerged with main body link.Thus, perform and merge and update peer link.Finally, based on fusion chain rood to text
One's own profession.There is no incoherent connected domain in resulting line of text, therefore omit the step S180 for filtering incoherent connected domain.
The method of line of text in the detection text image of the present invention, the company of image is extracted using binary conversion treatment
Logical domain.However, in the connected domain obtained by binary conversion treatment, both there may be by the stroke structure in single word or word
Into connected domain, it is also possible to the non-legible connected domain unrelated with word be present.It is therefore preferred that before step S120 is performed,
Non-legible connected domain can be filtered using image filtering method well known in the art.
The method of the line of text in detection text image according to an embodiment of the invention is carried out above in association with accompanying drawing
It is described in detail.The device of the line of text in detection text image according to an embodiment of the invention is carried out below in conjunction with accompanying drawing
Description.Fig. 7 shows the structured flowchart of the device of the line of text in detection text image according to an embodiment of the invention.
As shown in fig. 7, the device 700 of the line of text in detection text image includes connected domain extracting parts 710, link is built
Vertical part 720, cut part 740, search parts 750, fusion part 760 and line of text obtaining widget 770.
Connected domain extracting parts 710 is used to carry out binary conversion treatment to text image, and extracts each connected domain of image.
Part 720 is established in link, is established the link between the adjacent connected domain with Similar size, so as to form intertexture
Multilink.Here, the multilink formed is considered as Multiway Tree Structure, thus also known as tree-structures link.Preferably, link
Part 720 is established to establish the link between adjacent connected domain so that before forming the multilink to interweave, this area can be utilized
Well known image filtering method filters non-legible connected domain.
Part 740 is cut based on the first weight to be cut to link in tree-structures link, to obtain main body link.Specifically
Ground, cut part first can be ranked up to the first weight in link, then crop weight every time most using greedy algorithm
Small link, until when total number of plies of tree-structures link changes, stop algorithm, thus obtain the main body of tree-structures link.
Search parts 750 searches for weight limit and link based on the first weight from main body link.The wherein weight limit
It is more than the first weight summation of each link in other links with the first weight summation of each link in link.Specifically
Ground, search parts 750 recursively search for weight limit and link according to expression formula (3) and (4).
Fusion part 760 by meet specified conditions be cut link associated connected domain be fused to described in most
To obtain merging link in big weight and link, the specified conditions are:Perform each in the fusion link after the fusion
Second weight summation of link is less than the second weight summation of each link in the weight limit and link before fusion.Wherein,
When calculating the summation of the second weight of each link of fusion link, the link of first renewal fusion link, then calculate each
Second weight of link, and then obtain the second weight summation.
Line of text obtaining widget 770 obtains line of text based on fusion link.
Preferably, the device 700 of the line of text in the detection text image of the present invention can also include link optimizing
Part 730, it is cut in the link to tree-structures link before obtaining main body link, to be carried out to the link in tree-structures link
Optimization is linked with excluding closed loop, the tree-structures link optimized.Specifically, link optimizing part 730 cuts tree-structures link first
In the second weight be more than predetermined threshold link.It is predetermined that those skilled in the art can set this according to practical application or experience
Threshold value.Then, to resulting link application minimal spanning tree algorithm, to obtain the kinematic chains of the optimization of no closed loop link
Road.
Preferably, the device 700 of the line of text in the detection text image of the present invention can also include being used for text
Line of text acquired in one's own profession obtaining widget 770 is filtered to remove the filter element 780 of incoherent connected domain.Specifically
Each connected domain is sequentially numbered first for ground, filter element 780, then calculates each connected domain relative to reference position
Distance.Calculate ratio R corresponding with each connected domain followed by expression formula (5), and by respectively by each ratio R with it is pre-
Determine scope to compare, if exceeding the scope, filter out the connected domain corresponding with ratio R.
In addition, still need here, it is noted that in said system each building block can by software, firmware, hardware or
Its mode combined is configured.Specific means workable for configuration or mode are well known to those skilled in the art, herein not
Repeat again.In the case where being realized by software or firmware, from storage medium or network to the calculating with specialized hardware structure
Machine (such as all-purpose computer 800 shown in Fig. 8) installation forms the program of the software, and the computer is being provided with various programs
When, it is able to carry out various functions.
Fig. 8 shows the schematic frame available for the computer 800 for implementing method and apparatus according to embodiments of the present invention
Figure.
In fig. 8, CPU (CPU) 801 is according to the program stored in read-only storage (ROM) 802 or from depositing
The program that storage part 808 is loaded into random access memory (RAM) 803 performs various processing.In RAM 803, always according to need
Store the data required when CPU 801 performs various processing etc..CPU 801, ROM 802 and RAM 803 are via bus
804 are connected to each other.Input/output interface 805 is also connected to bus 804.
Components described below is connected to input/output interface 805:Importation 806 (including keyboard, mouse etc.), output section
Points 807 (including displays, such as cathode-ray tube (CRT), liquid crystal display (LCD) etc., and loudspeaker etc.), storage part
808 (including hard disks etc.), communications portion 809 (including NIC such as LAN card, modem etc.).Communications portion 809
Communication process is performed via network such as internet.As needed, driver 810 can be connected to input/output interface 805.
Detachable media 811 such as disk, CD, magneto-optic disk, semiconductor memory etc. can be installed in driver as needed
On 810 so that the computer program read out is installed in storage part 808 as needed.
It is such as removable from network such as internet or storage medium in the case where realizing above-mentioned series of processes by software
Unload the program that the installation of medium 811 forms software.
It will be understood by those of skill in the art that this storage medium be not limited to wherein having program stored therein shown in Fig. 8,
Separately distribute with equipment to provide a user the detachable media 811 of program.The example of detachable media 811 includes disk
(including floppy disk (registration mark)), CD (including compact disc read-only memory (CD-ROM) and digital universal disc (DVD)), magneto-optic disk
(including mini-disk (MD) (registration mark)) and semiconductor memory.Or storage medium can be ROM 802, storage part
Hard disk included in 808 etc., wherein computer program stored, and user is distributed to together with the equipment comprising them.
The present invention also proposes a kind of program product for the instruction code for being stored with machine-readable.The instruction code is by machine
When device reads and performed, the above-mentioned method according to embodiment of the present invention can perform.
Correspondingly, the storage medium of the program product for carrying the above-mentioned instruction code for being stored with machine-readable is also wrapped
Include within the scope of the invention.The storage medium includes but is not limited to floppy disk, CD, magneto-optic disk, storage card, memory stick etc.
Deng.
It should be noted that the method for the present invention be not limited to specifications described in time sequencing perform, can also be by
According to other order of order, concurrently or independently perform.Therefore, the execution sequence of the method described in this specification is not right
The technical scope of the present invention is construed as limiting.
Above the description to each embodiment of the present invention be for a better understanding of the present invention, what it was merely exemplary,
And it is not intended to limit the invention.It should be noted that in the above description, describe and/or show for a kind of embodiment
Feature can be used in a manner of same or similar in one or more other embodiments, and in other embodiment
Feature is combined, or substitutes the feature in other embodiment.It will be understood by those skilled in the art that do not departing from the present invention's
In the case of inventive concept, for the variations and modifications of embodiment progress described above, belong to the present invention's
In the range of.
To sum up, in an embodiment according to the present invention, the invention provides following technical scheme.
A kind of method for detecting the line of text in text image of scheme 1., comprises the following steps:
Binary conversion treatment is performed to text image, and extracts connected domain;
Established the link between the adjacent connected domain with Similar size, to form the multilink to interweave;
Cut based on the first weight come the link to the multilink, to obtain main body link;
Weight limit and link are searched for from the main body link based on the first weight, it is each in the weight limit and link
The summation of first weight of individual link is more than the summation of the first weight of each link in other links;
By meet following condition the weight limit and chain are fused to the associated connected domain that links being cut
To obtain merging link in road, the condition is:Perform the second weight of each link in the fusion link after the fusion
Summation be less than fusion before weight limit and link in each link the second weight summation;And
Line of text is obtained based on fusion link.
Method of the scheme 2. according to scheme 1, wherein, perform merge when, will be associated with linking of being cut
Connected domain blended with the nearest connected domain in the weight limit and link.
Scheme 3, according to the method described in scheme 2, wherein, it is described fusion link in each link the second weight it is total
Calculated with by following:The link in the fusion link is updated, and is fetched based on the chain after renewal and calculates the fusion
The summation of second weight of link.
Method of the scheme 4. according to any one of scheme 1-3, wherein, first weight depends on what is established the link
The size and distance of two connected domains, and second weight depends on the distance between two connected domains established the link.
Method of the scheme 5. according to scheme 4, wherein,
When link is distributed vertically, described first is calculated based on the height and distance for two connected domains for establishing link
Weight;And
When link level is distributed, width and distance based on two connected domains for establishing link calculate described first
Weight.
Method of the scheme 6. according to any one of scheme 1-3, in addition to:Should before search weight limit and link
Linked with minimal spanning tree algorithm to exclude closed loop.
Method of the scheme 7. according to any one of scheme 1-3, wherein, the cutting is performed using greedy algorithm.
Method of the scheme 8. according to any one of scheme 1-3, in addition to:Filter incoherent company in the line of text
Logical domain.
Method of the scheme 9. according to scheme 8, wherein, filtering incoherent connected domain in the line of text includes:It is right
Each connected domain is numbered successively, and the numbering based on connected domain and connected domain perform relative to the distance of reference position
Filtering.
Method of the scheme 10. according to any one of scheme 1-3, in addition to, before establishing the link, to the connection
Domain is filtered, to exclude non-legible connected domain.
A kind of device for detecting the line of text in text image of scheme 11., including:
Connected domain extracting parts, for extracting connected domain from text image;
Part is established in link, for establishing the link what is interweaved to be formed between the adjacent connected domain with Similar size
Multilink;
Part is cut, for being cut based on the first weight come the link to the multilink to obtain main body chain
Road;
Search parts, for searching for weight limit and link, the most authority from the main body link based on the first weight
The summation of first weight of each link in weight and link is more than the summation of the first weight of each link in other links;
Part is merged, for following condition will to be met with link of being cut described in associated connected domain is fused to
To obtain merging link in weight limit and link, the condition is:Perform each chain in the fusion link after the fusion
The summation of the second weight connect is less than the summation of the second weight of each link in the weight limit and link before fusion;And
Line of text obtaining widget, for obtaining line of text based on fusion link.
Device of the scheme 12. according to scheme 11, wherein, the fusion part, will be with being cut when performing fusion
The connected domain that the link fallen is associated blends with the nearest connected domain in the weight limit and link.
Device of the scheme 13. according to scheme 12, wherein, the fusion part calculates the fusion chain by following
The summation of second weight on road:The link in the fusion link is updated, and is fetched based on the chain after renewal and melted described in calculating
Close the summation of the second weight of link.
Device of the scheme 14. according to any one of scheme 11-13, wherein, first weight depends on and establishes chain
The size and distance of two connected domains connect, and second weight depend between two connected domains establishing the link away from
From.
Device of the scheme 15. according to scheme 14, wherein,
When link is distributed vertically, described first is calculated based on the height and distance for two connected domains for establishing link
Weight;And
When link level is distributed, width and distance based on two connected domains for establishing link calculate described first
Weight.
Device of the scheme 16. according to any one of scheme 11-13, in addition to:Link optimizing part, it is to the chain
Connect and establish the multilink application minimal spanning tree algorithm that part is formed, to exclude closed loop link.
Device of the scheme 17. according to any one of scheme 11-13, in addition to:The cutting part is calculated using greed
Method is cut.
Device of the scheme 18. according to any one of scheme 11-13, in addition to:Filter element, it filters the text
Incoherent connected domain in row.
Device of the scheme 19. according to scheme 18, wherein, the filter element is compiled successively to each connected domain
Number, and the numbering based on connected domain and connected domain perform filtering relative to the distance of reference position.
Claims (10)
1. a kind of method for detecting the line of text in text image, including:
Binary conversion treatment is performed to text image, and extracts connected domain;
Established the link between the adjacent connected domain with Similar size, to form the multilink to interweave;
Cut based on the first weight come the link to the multilink, to obtain main body link;
Weight limit and link are searched for from the main body link based on the first weight, each chain in the weight limit and link
The summation of the first weight connect is more than the summation of the first weight of each link in other links;
It is fused to meet following condition with the associated connected domain that links being cut in the weight limit and link
To obtain merging link, the condition is:Perform the total of the second weight of each link in the fusion link after the fusion
With the summation of the second weight less than each link in the weight limit and link before fusion;And
Line of text is obtained based on fusion link.
2. according to the method for claim 1, wherein, when performing fusion, associated company will be linked with what is be cut
Logical domain blends with the nearest connected domain in the weight limit and link.
3. according to the method for claim 2, wherein, the summation of the second weight of each link in the fusion link is led to
Cross following calculate:The link in the fusion link is updated, and is fetched based on the chain after renewal and calculates the fusion link
The second weight summation.
4. according to the method any one of claim 1-3, wherein, first weight depends on two established the link
The size and distance of connected domain, and second weight depends on the distance between two connected domains established the link.
5. the method according to claim 11, wherein,
When link is distributed vertically, first power is calculated based on the height and distance for two connected domains for establishing link
Weight;And
When link level is distributed, width and distance based on two connected domains for establishing link are weighed to calculate described first
Weight.
6. according to the method any one of claim 1-3, in addition to:Using most before search weight limit and link
Small spanning tree algorithm links to exclude closed loop.
7. according to the method any one of claim 1-3, wherein, the cutting is performed using greedy algorithm.
8. according to the method any one of claim 1-3, in addition to:Filter incoherent connection in the line of text
Domain.
9. according to the method for claim 8, wherein, filtering incoherent connected domain in the line of text includes:To each
Connected domain is numbered successively, and the numbering based on connected domain and connected domain performed relative to the distance of reference position
Filter.
10. a kind of device for detecting the line of text in text image, including:
Connected domain extracting parts, for performing binary conversion treatment to text image, and extract connected domain;
Part is established in link, for being established the link between the adjacent connected domain with Similar size with a plurality of of formation intertexture
Link;
Part is cut, for being cut based on the first weight come the link to the multilink to obtain main body link;
Search parts, for searching for weight limit and link from the main body link based on the first weight, the weight limit and
The summation of first weight of each link in link is more than the summation of the first weight of each link in other links;
Part is merged, for being fused to the maximum with the associated connected domain that links being cut by meet following condition
To obtain merging link in weight and link, the condition is:Perform each link in the fusion link after the fusion
The summation of second weight is less than the summation of the second weight of each link in the weight limit and link before fusion;And
Line of text obtaining widget, for obtaining line of text based on fusion link.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610654001.7A CN107729898B (en) | 2016-08-10 | 2016-08-10 | Method and device for detecting text lines in text image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610654001.7A CN107729898B (en) | 2016-08-10 | 2016-08-10 | Method and device for detecting text lines in text image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107729898A true CN107729898A (en) | 2018-02-23 |
CN107729898B CN107729898B (en) | 2020-12-22 |
Family
ID=61200205
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610654001.7A Active CN107729898B (en) | 2016-08-10 | 2016-08-10 | Method and device for detecting text lines in text image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107729898B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110135408A (en) * | 2019-03-26 | 2019-08-16 | 北京捷通华声科技股份有限公司 | Text image detection method, network and equipment |
CN111178346A (en) * | 2019-11-22 | 2020-05-19 | 京东数字科技控股有限公司 | Character area positioning method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140067631A1 (en) * | 2012-09-05 | 2014-03-06 | Helix Systems Incorporated | Systems and Methods for Processing Structured Data from a Document Image |
CN103810251A (en) * | 2014-01-21 | 2014-05-21 | 南京财经大学 | Method and device for extracting text |
CN104200209A (en) * | 2014-08-29 | 2014-12-10 | 南京烽火星空通信发展有限公司 | Image text detecting method |
JP2015103114A (en) * | 2013-11-26 | 2015-06-04 | コニカミノルタ株式会社 | Text data embedding device, image processing device having the same, text data embedding method and embedding program |
CN104732188A (en) * | 2013-12-19 | 2015-06-24 | 富士通株式会社 | Text extraction method and device |
US9129277B2 (en) * | 2011-08-30 | 2015-09-08 | Digimarc Corporation | Methods and arrangements for identifying objects |
CN105469086A (en) * | 2014-06-19 | 2016-04-06 | 夏普株式会社 | Equipment and method for identifying direction of text lines |
-
2016
- 2016-08-10 CN CN201610654001.7A patent/CN107729898B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9129277B2 (en) * | 2011-08-30 | 2015-09-08 | Digimarc Corporation | Methods and arrangements for identifying objects |
US20140067631A1 (en) * | 2012-09-05 | 2014-03-06 | Helix Systems Incorporated | Systems and Methods for Processing Structured Data from a Document Image |
JP2015103114A (en) * | 2013-11-26 | 2015-06-04 | コニカミノルタ株式会社 | Text data embedding device, image processing device having the same, text data embedding method and embedding program |
CN104732188A (en) * | 2013-12-19 | 2015-06-24 | 富士通株式会社 | Text extraction method and device |
CN103810251A (en) * | 2014-01-21 | 2014-05-21 | 南京财经大学 | Method and device for extracting text |
CN105469086A (en) * | 2014-06-19 | 2016-04-06 | 夏普株式会社 | Equipment and method for identifying direction of text lines |
CN104200209A (en) * | 2014-08-29 | 2014-12-10 | 南京烽火星空通信发展有限公司 | Image text detecting method |
Non-Patent Citations (2)
Title |
---|
YI-FENG PAN ET AL.: "《Improving Scene Text Detection by Scale-Adaptive Segmentation and Weighted CRF Verification》", 《2011 INTERNATIONAL CONFERENCE ON DOCUMENT ANALYSIS AND RECOGNITION》 * |
郭红梅 等: "《基于图挖掘的文本主题识别方法研究综述》", 《中国图书馆学报》 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110135408A (en) * | 2019-03-26 | 2019-08-16 | 北京捷通华声科技股份有限公司 | Text image detection method, network and equipment |
CN110135408B (en) * | 2019-03-26 | 2021-02-19 | 北京捷通华声科技股份有限公司 | Text image detection method, network and equipment |
CN111178346A (en) * | 2019-11-22 | 2020-05-19 | 京东数字科技控股有限公司 | Character area positioning method, device, equipment and storage medium |
CN111178346B (en) * | 2019-11-22 | 2023-12-08 | 京东科技控股股份有限公司 | Text region positioning method, text region positioning device, text region positioning equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107729898B (en) | 2020-12-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Regnauld | Contextual building typification in automated map generalization | |
CN110634291A (en) | High-precision map topology automatic construction method and system based on crowdsourcing data | |
CN107490385A (en) | Traffic path planing method and its device | |
CN111506310A (en) | Method, device and equipment for generating multi-platform style and storage medium | |
Archambault | Structural differences between two graphs through hierarchies | |
CN103218692B (en) | Workflow mining method based on dependence analysis between activity | |
US20130041962A1 (en) | Information Filtering | |
CN105279535A (en) | Intelligent processing system of identification code and processing method thereof | |
CN103761276A (en) | Tree-structure data comparison displaying method and device | |
Thomson et al. | Exploiting perceptual grouping for map analysis, understanding and generalization: The case of road and river networks | |
CN109583345A (en) | Roads recognition method, device, computer installation and computer readable storage medium | |
CN106657192A (en) | Method used for presenting service calling information and equipment thereof | |
CN107729898A (en) | The method and apparatus for detecting the line of text in text image | |
CN111831899A (en) | Navigation interest point recommendation method and device and server | |
CN102651030A (en) | Social network association searching method based on graphics processing unit (GPU) multiple sequence alignment algorithm | |
CN106980613B (en) | Search navigation method and device | |
Edwardes et al. | Intelligent generalisation of urban road networks | |
CN105653622A (en) | PRN data integrating method and system | |
Stum et al. | Partial polygon pruning of hydrographic features in automated generalization | |
CN110851540A (en) | Financial service map-based commercial bank customer loss early warning method | |
CN107292288B (en) | Method and device for extracting characteristic line supporting annular terrain and electronic equipment | |
CN109033210A (en) | A kind of method and apparatus for excavating map point of interest POI | |
CN113312364A (en) | Smart cloud service updating method based on block chain and block chain service system | |
CN107220831A (en) | A kind of user group's division methods and system based on anti-fake traceability system | |
CN109977419B (en) | Knowledge graph construction system |
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 |