CN101042734A - Method for rapid making image connection element - Google Patents

Method for rapid making image connection element Download PDF

Info

Publication number
CN101042734A
CN101042734A CN 200710039540 CN200710039540A CN101042734A CN 101042734 A CN101042734 A CN 101042734A CN 200710039540 CN200710039540 CN 200710039540 CN 200710039540 A CN200710039540 A CN 200710039540A CN 101042734 A CN101042734 A CN 101042734A
Authority
CN
China
Prior art keywords
swimming
distance
check result
tree
steps
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
CN 200710039540
Other languages
Chinese (zh)
Other versions
CN100501762C (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.)
East China Normal University
Original Assignee
East China Normal University
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 East China Normal University filed Critical East China Normal University
Priority to CNB2007100395400A priority Critical patent/CN100501762C/en
Publication of CN101042734A publication Critical patent/CN101042734A/en
Application granted granted Critical
Publication of CN100501762C publication Critical patent/CN100501762C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

This invention relates to image technique field and discloses one binary image connection element aim rapid label method, which comprises the following steps: a, processing initial work to direct label j into initial row and total journey number k as 0; b, scanning image j rows of data to get Zj journey for recording; c, testing whether Zj is zero, if yes, then jumping steps d, e for f; d, if not, then recording j row each journey to label to relative tree; e, total journey number adds to Zj; f, row label j plus one; g, testing whether the label is upper image height range with result of no for step b; h, if yes, then outputting journey and tree structure information.

Description

The method of rapid making image connection element
Technical field
The present invention relates to graphical analysis and recognition technology field, particularly a kind of quick labeling method of connected member target of bianry image.
Background technology
In most graphical analysis and recognition system, the connected member mark is a basic operation, is the basis of subsequent treatment.The purpose of mark connected member is in order to convert bianry image to glyph image, to distribute a label that they are made a distinction promptly for each connected member.
In the prior art, the most frequently used method is that image is handled in order, and sets up the relevant information that the equivalence class table is preserved equivalence class.In scanning for the first time, distribute a temporary marker for each prospect (target) pixel based on the value of adjacent image point.If the situation that two adjacent prospect pixels have different marks takes place, these two marks are considered as equivalence class so, and record in the equivalence class table.In scanning for the second time, the pixel that belongs to same equivalence class in the image is represented with identical mark.
Because the connected member mark is the processing of image pixel level, and is relatively time-consuming, and need take a large amount of internal memories.Along with the fast development of computer technology, though memory space problem is no longer outstanding,, how at faster speed image handling, people expect just.
For this reason, people are devoted to the research of connected member labeling method always, to improve processing speed and to reduce storage space.
Summary of the invention
For most image identification system, the mark of connected member is one of time-consuming procedure, and is especially all the more so to the image of large-size.In order to reduce the mark time of connected member, improve the signature velocity of connected member, the present invention proposes following technical scheme.
1. the labeling method of an image connectivity unit may further comprise the steps;
A. carry out initial work, promptly rower j sensing initial row, total number of runs K are changed to 0;
B. the scanning image j line data obtains Zj the distance of swimming,
And be recorded as: R k (j)(k=K+1, K+2 ..., K+Zj);
C. check whether Zj is 0, if check result is for being that then skips steps d, e carry out step f;
If d. step c check result is not for, then write down each capable distance of swimming of j and with their marks to the tree of correspondence;
E. total distance of swimming quantity increases Zj, is K+Zj total distance of swimming quantity by original K total number of runs quantitative change promptly;
F. line label j increases by 1, promptly becomes line label j+1 by original line label j;
G. check whether line label exceeds the picture altitude scope, if check result is then returned step b for not;
If h. the step g check result is for being then to export the distance of swimming and tree structure information.
2. each distance of swimming that described record j is capable and with their marks to the tree of correspondence, its method may further comprise the steps;
A. the distance of swimming label k that puts when pre-treatment is K+1;
B. to distance of swimming R k (j), seek the coupled distance of swimming of lastrow;
C. check whether there is the situation about being connected described in the step b, if after check result, is then carried out steps d earlier for being, skips steps e directly carries out step f again; If check result then behind the skips steps d, is directly carried out step e for not;
D. determine and record: with distance of swimming R k (j)Some distances of swimming of the lastrow that links to each other are R k (j)Father's distance of swimming;
E. generate a new tree, distance of swimming R k (j)As its root node;
F. k is increased by 1;
G. whether check k greater than K+Zj, if check result is then returned step b for not;
If h. the step g check result is for being, then change the subsequent step that other links to each other over to.
3. described definite and record: with distance of swimming R k (j)Some distances of swimming of the lastrow that links to each other are R k (j)Father's distance of swimming, its method may further comprise the steps;
A. lastrow and distance of swimming R k (j)The distance of swimming that links to each other is by from left to right being designated as in proper order: R l (j-1), R L+1 (j-1)...., R r (j-1)
B. check that whether lastrow has only a continuous distance of swimming, promptly checks R l (j-1)Whether equal R r (j-1)If check result is for being that then skips steps c directly carries out steps d;
If c. step b check result is provided with R for not m (j-1)(m=l+1 ..., father's distance of swimming R of root node r) l (j-1)Corresponding tree root;
Described R m (j-1)(m=l+1 ..., r), R m (j-1)And R l (j-1)Belong to different trees;
D. determine and record: R l (j-1)Be R k (j)Father's distance of swimming;
E. change the subsequent step that other links to each other over to.
The invention has the beneficial effects as follows: only just can obtain characteristics such as the boundary rectangle of digital picture and elemental area with single pass, owing to improved the signature velocity of connected member widely, so, can significantly be improved to image processing speed, especially to large-sized image processing speed.
Description of drawings
Accompanying drawing 1 is the input and output synoptic diagram.
Accompanying drawing 2 is main flow charts of the inventive method, also is the process flow diagram of claim 1.
The method flow diagram that accompanying drawing 3 is the capable distance of swimming marks of j to the tree also is the process flow diagram of claim 2.
Accompanying drawing 4 is to determine record distance of swimming R k (j)The method flow diagram of father's distance of swimming, also be the process flow diagram of claim 3.
Accompanying drawing 5 is the connection type synoptic diagram between the distance of swimming; Wherein: x is various man-to-man connection types; Y is the connection type of one-to-many; Z is many-to-one connection type.
Accompanying drawing 6 is synoptic diagram of embodiment, be example with a connected member, illustrates how the distance of swimming to be handled; A among the figure, B, C, D, E, F, G are the distances of swimming; J, j+1, j+2, j+3 are docile and obedient the continuous row of preface.
Accompanying drawing 7 is tree construction synoptic diagram, and on behalf of root node, unicoil, the two-wire circle among the figure represent internal node or leaf node.
The tree construction of a part in the accompanying drawing 7, promptly the tree construction of j part is corresponding with the j line scanning in the accompanying drawing 6; The tree construction of b part in the accompanying drawing 7, promptly the tree construction of j+1 part is corresponding with the j+1 line scanning in the accompanying drawing 6; The tree construction of c part in the accompanying drawing 7, promptly the tree construction of j+2 part is corresponding with the j+2 line scanning in the accompanying drawing 6; The tree construction of part among the accompanying drawing 7d, promptly the tree construction of j+3 part is corresponding with the j+3 line scanning in the accompanying drawing 6.
Accompanying drawing 6 and accompanying drawing 7 should be mapped one by one and understand.
The present invention is described in further detail below in conjunction with the drawings and specific embodiments.
Embodiment
The purpose of mark connected member is in order to convert bianry image to glyph image, to distribute a label that they are made a distinction promptly for each connected member.In the prior art, the most frequently used method is that image is handled in order, and sets up the relevant information that the equivalence class table is preserved equivalence class.In scanning for the first time, distribute a temporary marker for each prospect (target) pixel based on the value of adjacent image point.If the situation that two adjacent prospect pixels have different marks takes place, these two marks are considered as equivalence class so, and record in the equivalence class table.In scanning for the second time, the pixel that belongs to same equivalence class in the image is represented with identical mark.
The objective of the invention is to realize a kind of method of the quick mark connected member of representing based on the distance of swimming and with tree construction.At first, from image, extract the distance of swimming line by line, and relation information between their position is stored.Represent that with tree the distance of swimming of current line and the position between the lastrow distance of swimming concern, every just corresponding connected member of tree, Fig. 1 is the input and output synoptic diagram of this method.This method only needs single pass just can obtain useful informations such as the boundary rectangle frame of connected member and pixel sum.
Below, be described in conjunction with figure.
At first to image, by from top to bottom and order from left to right scan, in each row, seek and write down each distance of swimming.
The distance of swimming is defined as the set with the prospect of left and right sides continuous adjacent in the delegation (also claiming target) picture element.We are with five-tuple (k, a y k, s k, t k, p k) represent a distance of swimming R k (y)
K: the sequence number of the expression distance of swimming in image;
y K:: the row-coordinate of the expression distance of swimming;
s k: the row coordinate of expression distance of swimming starting point;
t k: the row coordinate of expression distance of swimming terminating point;
p k: this distance of swimming is in father's distance of swimming of lastrow.
Relation between the distance of swimming in each connected member is represented with tree construction.Each distance of swimming correspondence a node in the tree, if a distance of swimming of current line is connected with a distance of swimming of lastrow, these two distances of swimming corresponding node in tree links to each other so.Connected relation between the distance of swimming is defined as follows:
Definition: suppose R k (y)It is a capable distance of swimming of y.R m (y-1)Be the capable distance of swimming of y-1, if they satisfy in the following condition any one, we claim R so k (y)With R m (y-1)Be communicated with.
(1)s k-n≤s m≤t k
(2)s k≤t m≤t k+n
(3)s m-n≤s k≤t m
(4)s m≤t k≤t m+n
For 8 situation about being communicated with n=1; And 4 situation about being communicated with n=0.
If R k (y)With R m (y-1)Be communicated with, then claim R m (y-1)Be R k (y)Father's distance of swimming, or claim R k (y)Be R m (y-1)The sub-distance of swimming.
When a new distance of swimming produces, its starting point and terminating point coordinate are compared with the distance of swimming of lastrow, judge whether to be connected with the distance of swimming of lastrow.Relation between two adjacent lines (current line and lastrow) distance of swimming can be summarized as three types, and promptly one to one, totally three types of one-to-many and many-ones are shown in the last figure among Fig. 5, middle figure, figure below.In man-to-man type, current line has a distance of swimming to be connected with a distance of swimming of lastrow; In the type of one-to-many, current line has a plurality of distances of swimming to be connected with a distance of swimming of lastrow; In many-to-one type, current line has a distance of swimming to be connected with a plurality of distances of swimming of lastrow.
Be not attached thereto the logical distance of swimming if a distance of swimming finds in lastrow, this distance of swimming is just as the root node of setting so.The corresponding new connected member of this tree.Be attached thereto the logical distance of swimming if a distance of swimming finds in lastrow, this distance of swimming is just as the child node that is attached thereto the logical distance of swimming in the lastrow.In type one to one, the current distance of swimming is the unique child node of the distance of swimming of linking to each other in the lastrow, and in the type of one-to-many, the corresponding distance of swimming of lastrow has a plurality of distances of swimming that are connected at current line, so a plurality of child nodes are arranged.
If many-to-one type occurs, also be a plurality of distances of swimming to be arranged in the lastrow and link to each other when the previous distance of swimming, must do special processing so.We at first observe and are attached thereto all logical distances of swimming in the lastrow and whether belong to different trees.If tree that should these are different merges.In this method, this processing is very simple, only need the root node of the tree that comprises the Far Left node is kept, and the root node of other trees is merged into the child node of the root node of reservation.Based on above-mentioned processing, every tree is only corresponding to a connected member in the image.
In order better to understand this method, in following examples, be described in more detail.
Embodiment one.
Now, be further detailed in conjunction with Fig. 6, Fig. 7.The content of Fig. 6 and Fig. 7 should contrast one by one and see.
When scanning proceeds to j when capable, found distance of swimming A, this distance of swimming is the root node of a new tree, shown in (a) among Fig. 7 part.
When scanning j+1 when capable, found distance of swimming B and C, shown in (b) among Fig. 7 part, B is connected with A, so A is the father node of B, and C is root node that another is newly set.Continue to be scanned up to j+2 when capable, shown in (c) among Fig. 7 part, find distance of swimming D, E and F, D is connected with B with E.Therefore, they are child nodes of B, and F is connected with C, so F is the child node of C.When being scanned up to j+3 when capable, find distance of swimming G, because E is connected with G with F, G is as the child node of Far Left distance of swimming E.In addition, we must check whether E and F belong to same one tree.If they belong to different trees, must merge them so.Here, A is the root of E, and C is the root of F.Therefore, these two trees need to merge to get up.Wherein the root node of one tree becomes internal node, becomes the child node of other one tree.Shown in (d) among Fig. 7 part, distance of swimming C is the child node of A.
After the entire image been scanned, all distances of swimming have all been noted, every corresponding connected member of tree.According to one tree, we can obtain all information of that corresponding connected member, as wide, the height of connected member boundary rectangle and the pixel sum of connected member etc.
For a connected member C n, all belong to C nThe distance of swimming sequence number with the set Ψ nExpression.C nThe upper left corner coordinate and the lower right corner coordinate of boundary rectangle use (x respectively n (l), y n (t)) and (x n (r), y n (b)) expression, their coordinate figure can be by following calculating:
x n ( l ) = min i ∈ Ψ n s i
y n ( t ) = min i ∈ Ψ n y i
x n ( r ) = max i ∈ Ψ n t i
y n ( b ) = max i ∈ Ψ n y i
Wherein min represents to minimize, and max represents maximizing.Wide and the height of this connected member boundary rectangle is respectively:
Wide: x n (r)-x n (l)
High: y n (b)-y n (t)
Pixel sum in this connected member can directly be calculated by following formula:
Σ i ∈ Ψ n ( t i - s i + 1 )

Claims (3)

1. the labeling method of an image connectivity unit may further comprise the steps;
A. carry out initial work, promptly rower j sensing initial row, total number of runs K are changed to 0;
B. the scanning image j line data obtains Zj the distance of swimming,
And be recorded as: R k (j)(k=K+1, K+2 ..., K+Zj);
C. check whether Zj is 0, if check result is for being that then skips steps d, e carry out step f;
If d. step c check result is not for, then write down each capable distance of swimming of j and with their marks to the tree of correspondence;
E. total distance of swimming quantity increases Zj, is K+Zj total distance of swimming quantity by original K total number of runs quantitative change promptly;
F. line label j increases by 1, promptly becomes line label j+1 by original line label j;
G. check whether line label exceeds the picture altitude scope, if check result is then returned step b for not;
If h. the step g check result is for being then to export the distance of swimming and tree structure information.
2. the labeling method of a kind of image connectivity according to claim 1 unit, each distance of swimming that described record j is capable and with their marks to the tree of correspondence, its method may further comprise the steps;
A. the distance of swimming label k that puts when pre-treatment is K+1;
B. to distance of swimming R k (j), seek the coupled distance of swimming of lastrow;
C. check whether there is the situation about being connected described in the step b, if after check result, is then carried out steps d earlier for being, skips steps e directly carries out step f again; If check result then behind the skips steps d, is directly carried out step e for not;
D. determine and record: with distance of swimming R k (j)Some distances of swimming of the lastrow that links to each other are R k (j)Father's distance of swimming;
E. generate a new tree, distance of swimming R k (j)As its root node;
F. k is increased by 1;
G. whether check k greater than K+Zj, if check result is then returned step b for not;
If h. the step g check result is for being, then change the subsequent step that other links to each other over to.
3. the labeling method of a kind of image connectivity according to claim 2 unit is describedly determined and record: with distance of swimming R k (j)Some distances of swimming of the lastrow that links to each other are R k (j)Father's distance of swimming, its method may further comprise the steps;
A. lastrow and distance of swimming R k (j)The distance of swimming that links to each other is by from left to right being designated as in proper order: R l (j-1), R L+1 (j-1)...., R r (j-1)
B. check that whether lastrow has only a continuous distance of swimming, promptly checks R l (j-1)Whether equal R r (j-1)If check result is for being that then skips steps c directly carries out steps d;
If c. step b check result is provided with R for not m (j-1)(m=l+1 ..., father's distance of swimming of root node r) is R l (j-1)Corresponding tree root;
Described R m (j-1)(m=l+1 ..., r), R m (j-1)And R l (j-1)Belong to different trees;
D. determine and record: R l (j-1)Be R k (j)Father's distance of swimming;
E. change the subsequent step that other links to each other over to.
CNB2007100395400A 2007-04-17 2007-04-17 Method for rapid marking image connection element Expired - Fee Related CN100501762C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100395400A CN100501762C (en) 2007-04-17 2007-04-17 Method for rapid marking image connection element

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100395400A CN100501762C (en) 2007-04-17 2007-04-17 Method for rapid marking image connection element

Publications (2)

Publication Number Publication Date
CN101042734A true CN101042734A (en) 2007-09-26
CN100501762C CN100501762C (en) 2009-06-17

Family

ID=38808235

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100395400A Expired - Fee Related CN100501762C (en) 2007-04-17 2007-04-17 Method for rapid marking image connection element

Country Status (1)

Country Link
CN (1) CN100501762C (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050487A (en) * 2014-06-06 2014-09-17 华东师范大学 Mail image direction distinguishing method based on layout information analysis
CN104574448A (en) * 2014-11-28 2015-04-29 浙江工商大学 Method for identifying connected pixel blocks
CN107067400A (en) * 2016-11-30 2017-08-18 南京航空航天大学 A kind of bianry image method for marking connected region based on the distance of swimming
CN107564015A (en) * 2017-08-24 2018-01-09 佛山市国方商标软件有限公司 A kind of segmentation and labeling method and device based on polychrome level image connectivity domain
CN108876701A (en) * 2018-06-21 2018-11-23 西北工业大学 A kind of single sweep operation based on the distance of swimming leads to field mark method and its hardware configuration
CN110473250A (en) * 2019-07-31 2019-11-19 苏州中科全象智能科技有限公司 Accelerate the method for Blob analysis in a kind of processing of machine vision

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9292763B2 (en) 2013-07-25 2016-03-22 Analog Devices Global System, method, and medium for image object and contour feature extraction

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6188805B1 (en) * 1996-07-16 2001-02-13 Acer Communications And Multimedia Inc. Method for aligning charge coupled device of a scanner
US6463168B1 (en) * 1998-12-04 2002-10-08 General Electric Company Apparatus and method for rapid connectivity processing of images
KR20050018494A (en) * 2003-08-14 2005-02-23 삼성전자주식회사 Method for compansating image data from scanner
US8055027B2 (en) * 2004-06-30 2011-11-08 Bio-Key International, Inc. Generation of directional field information in the context of image processing
CN1312625C (en) * 2004-07-02 2007-04-25 清华大学 Character extracting method from complecate background color image based on run-length adjacent map

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050487A (en) * 2014-06-06 2014-09-17 华东师范大学 Mail image direction distinguishing method based on layout information analysis
CN104050487B (en) * 2014-06-06 2017-06-16 华东师范大学 A kind of mail image direction identification method based on layout information analysis
CN104574448A (en) * 2014-11-28 2015-04-29 浙江工商大学 Method for identifying connected pixel blocks
CN107067400A (en) * 2016-11-30 2017-08-18 南京航空航天大学 A kind of bianry image method for marking connected region based on the distance of swimming
CN107564015A (en) * 2017-08-24 2018-01-09 佛山市国方商标软件有限公司 A kind of segmentation and labeling method and device based on polychrome level image connectivity domain
CN108876701A (en) * 2018-06-21 2018-11-23 西北工业大学 A kind of single sweep operation based on the distance of swimming leads to field mark method and its hardware configuration
CN108876701B (en) * 2018-06-21 2022-08-02 西北工业大学 Run-length-based single-scanning connected domain marking method and hardware structure thereof
CN110473250A (en) * 2019-07-31 2019-11-19 苏州中科全象智能科技有限公司 Accelerate the method for Blob analysis in a kind of processing of machine vision

Also Published As

Publication number Publication date
CN100501762C (en) 2009-06-17

Similar Documents

Publication Publication Date Title
US10853565B2 (en) Method and device for positioning table in PDF document
CN101042734A (en) Method for rapid making image connection element
CN1218274C (en) On-line handwrited script mode identifying editing device and method
CN1497502A (en) Image processing method and image processing device
CN1746898A (en) Method, device and recording medium for positioning bar code
CN1207924C (en) Method for testing face by image
CN1655178A (en) Local localization using fast image match
CN103093181A (en) License plate image locating method and device
CN1786965A (en) Method for acquiring news web page text information
CN101039396A (en) Image output apparatus and method using numbers of chroma key color
CN111967313A (en) Unmanned aerial vehicle image annotation method assisted by deep learning target detection algorithm
CN106446888A (en) Camera module multi-identifier identification method and camera module multi-identifier identification equipment
CN113920117A (en) Panel defect area detection method and device, electronic equipment and storage medium
CN1766907A (en) Multi-target image recognition method based on cluster genetic algorithm
CN1959704A (en) Method for converting 2D bar code symbols to coded information
CN101079108A (en) DSP based multiple channel mechanical digital display digital gas meter automatic detection device
CN1804861A (en) Document image geometry fault correction method
CN105069455A (en) Method and device for filtering official seal of invoice
CN116921260A (en) Light-emitting chip sorting method and device
CN1110018C (en) Eigenvalue extracting method and equipment, storage medium for memory image parser
CN1107280C (en) Chinese and English table recognition system and method
CN1641686A (en) Confused stroke order library establishing method and on-line hand-writing Chinese character identifying and evaluating system
CN1741040A (en) Cigarette batch counting method based on form matching and apparatus thereof
CN1352796A (en) Memory with call out function
CN1924893A (en) QR code image sampling and recognition method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090617

Termination date: 20120417