CN102156884A - Straight segment detecting and extracting method - Google Patents

Straight segment detecting and extracting method Download PDF

Info

Publication number
CN102156884A
CN102156884A CN 201110103720 CN201110103720A CN102156884A CN 102156884 A CN102156884 A CN 102156884A CN 201110103720 CN201110103720 CN 201110103720 CN 201110103720 A CN201110103720 A CN 201110103720A CN 102156884 A CN102156884 A CN 102156884A
Authority
CN
China
Prior art keywords
straight
line segment
line
local
detection
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 201110103720
Other languages
Chinese (zh)
Other versions
CN102156884B (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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN 201110103720 priority Critical patent/CN102156884B/en
Publication of CN102156884A publication Critical patent/CN102156884A/en
Application granted granted Critical
Publication of CN102156884B publication Critical patent/CN102156884B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention provides a straight segment detecting and extracting method. The method comprises the following steps: S1, scanning a binary image, calculating a runlength histogram on the peripheries of pixels of the binary image, and extracting the corresponding runlength direction and length characteristics; S2, constructing an arc-shaped neighborhood structure for each foreground pixel point on the binary image, and detecting local straight segments by utilizing the runlength characteristics on the peripheries of the pixels; and S3, clustering and combining the detected local straight segments to obtain a global long straight segment. Compared with the traditional method, the technology ensures that false detection and missed detection in the traditional straight segment detection method can be effectively avoided only by setting the minimum length of the straight segment to be detected. The method is applied to automatic detection and extraction of graphic targets in a bill image, and has a wide application prospect in the fields of graphic vectorization, form analysis, bank bill automatic processing and the like.

Description

A kind of straight-line segment detects and extracting method
Technical field
The present invention relates to the text image processing, graphic primitive detects and extract particularly a kind of straight-line segment detection and extracting method.
Background technology
The detection of straight-line segment is a text image analysis and an important topic of understanding in the research with extracting, it has a wide range of applications in fields such as pattern vectorization, graphic feature extraction, Target Recognition, as in the bank money automated processing system, being used for automatic analysis to form, and to the automatic identification of seal graphics in the bill and extraction etc.
Existing straight-line segment detection technique is broadly divided into two classes: based on the method for Hough transformation (Hough Transform) and the method for non-Hough transformation.At first by the point in the image space is mapped to the corresponding parameters space, and the accumulation of voting is sought the local maximum point then and is come detection of straight lines in totalizer based on the line Segment Detection of Hough transformation.At last detected line reflection is incident upon original image, determines the end points of straight-line segment.This method has higher robustness, and anti-noise ability is strong, can detect fracture or damaged straight-line segment.Yet owing to will adopt a bigger two-dimentional totalizer, the Hough transformation method can take more internal memory usually, and calculated amount is big.In addition,, can produce a large amount of falseness ballots in the voting process, thereby cause when parameter space is sought Local Extremum difficulty, easily detect a large amount of false straight-line segments because Hough transformation has adopted a kind of voting mechanism of one-to-many in essence.At this situation, many researchers have proposed multiple improvement algorithm successively, as randomized hough transform (Randomized Hough Transform), level Hough transformation (Hierarchical Hough Transform), sequence Hough transformation (Sequential Hough Transform), and rear orientation projection's method (Back Projection) etc.These improve and have improved the precision that straight-line segment detects to a certain extent, but still have a large amount of flase drops and omission in the testing result.
The method of non-Hough transformation is regarded straight-line segment detection problem as the Linear correlative analysis problem of image local area pixel point.Carry out principal component analysis by pixel, and the eigenwert of calculating this area pixel point divergence matrix is come the detection of straight lines section to the image local zone.If there is straight-line segment in this zone, pixel point set that then should the zone has very high correlativity, and therefore, the minimal eigenvalue of corresponding divergence matrix is very little usually.So, can judge whether this zone comprises straight-line segment by analyzing minimal eigenvalue.There is the researcher that this method is improved, extracts the connected component of different directions, judge by analyzing minimal eigenvalue whether they are straight-line segment then by in advance the pixel in the image being classified.Owing to be subject to picture noise influence, shortcoming such as this class methods ubiquity precision is not high, false drop rate is big.
The fast detecting of straight-line segment and extraction are challenging problems, and wherein partly cause is the quantization error of straight line.On image, because the existence of quantization error, closely the straight line number of pixel is not unique to connect two.This has caused difficulty for the direction of accurately determining straight-line segment.On the other hand, because the influence of picture noise, fracture, incompleteness can appear in straight-line segment usually, thereby have influenced the precision of straight-line segment endpoint location greatly.Yet human eye but often is not subjected to the interference of these factors in the performance of straight-line segment context of detection, and, very big advantage is arranged detecting on the performance to compare with existing method.This has hinted to a certain extent that in the straight-line segment context of detection present algorithm still exists big not enough, and the place of many worth improvement and raising is arranged.
Human eye is when carrying out the straight-line segment detection, as if following a kind of bottom-up testing process, at first detect the straight-line segment in the regional area, begin it is extended tracking, on the overall situation, the straight-line segment of being followed the tracks of is verified at last by detected local straight-line segment.Because the special structure of human eye and the restriction in the visual field thereof, often can't carry out on the whole judgement to straight line at the very start, as if therefore, this process is very natural.And local detection has perhaps been explained the outstanding representation of human eye on straight-line segment detects.And traditional method based on Hough transformation then is to come the detection of straight lines section on the whole, and does not pay close attention to the local property of straight-line segment, as connectedness etc.This causes a large amount of non-rectilinear section pixel to participate in ballot, thereby makes the Local Extremum that occurs many falsenesses in the totalizer, and the polling place of straight-line segment that will be real generation floods.
In addition, as if human eye is not that all pixels in the zone of blindness attempt carrying out fitting a straight lines, but at first the interior pixel in zone is classified according to the local feature of certain priori and pixel when straight-line segment is carried out local detection.A large amount of constraints has been introduced in this detection that is categorized as local straight-line segment, thereby can reduce the straight-line segment search volume and the computation complexity thereof in when coupling greatly.This process is similar to the perception cluster of pixel, and the feature of pixel and priori have then constituted the perception clustering rule on the straight line.By analyzing, often be not difficult to sum up these clustering rule, for example for two pixels on the same straight-line segment, brigade commander's feature at these two pixel places often has certain consistance, as the shortest brigade commander's direction and length or the like.By concluding these clustering rule, and be applied to the detection of local straight-line segment, then can improve the detection efficiency of straight-line segment greatly, and can effectively suppress the generation of false ballot in the Hough transformation process.
Summary of the invention
In view of this, purpose of the present invention aim to provide a kind of fast and the straight-line segment of robust detect and extracting method, be used for the text image graphic object, as the detection and the analysis of form, rectangle seal, track etc.
For realizing described purpose, straight-line segment provided by the invention detects and the technical scheme of extracting method comprises that step is as follows:
Step S1: to width of cloth scanning bianry image, calculate the brigade commander's histogram around each pixel on the bianry image, and extract corresponding brigade commander's direction and length characteristic;
Step S2: to each foreground pixel point on the bianry image, construct a circular arc neighbour structure, and utilize the brigade commander's feature around the pixel to carry out the detection of local straight-line segment;
Step S3: detected local straight-line segment is carried out cluster merge the long straight-line segment that obtains having global sense.
Wherein, brigade commander's histogram feature comprises the width information WL of straight-line segment and the directional information DL of straight-line segment, is used to improve the detection efficiency of local straight-line segment.
Wherein, the detection of described local straight-line segment comprises the steps:
Step S21: initialization straight-line segment detected parameters, and the minimum length of straight-line segment to be detected is set;
Step S22: construct a circular arc neighbour structure, and set up corresponding two-dimensional polling list.It is the end points coordinate of all local straight-line segments of starting point that this question blank is used for determining with the circular arc center of circle fast;
Step S23: each pixel on the bianry image, utilize brigade commander's histogram feature, determine fast that on its circular arc neighbour structure match point is right;
Step S24: right to each match point, calculation level between interconnectedness, thereby judge that this is a pair of to whether having local straight-line segment, and current pixel point is done the starting point mark; Repeating step S23 to S24 disposes up to all pixels.
Wherein, the merging of the cluster of described local straight-line segment comprises the steps:
Step S31: initialization straight-line segment detected set is combined into sky;
Step S32: utilize Hough transformation that local straight-line segment is played point diagram and carry out straight-line detection, the totalizer threshold value is made as 1, and writes down the ballot number of every straight line correspondence in totalizer;
Step S33:, choose and be arranged in the straight line that its type zone, angle has maximum votes for each local straight-line segment;
Step S34: scan all one by one and be positioned at local straight-line segment on this straight line, judge whether current straight-line segment and its satisfy the merging condition; If current straight-line segment is merged with it, and upgrades the terminal point information of straight-line segment; Repeating step S33 to S34 disposes up to all local straight-line segments.
Wherein, by calculated line section L i(A is B) to straight line l (ρ, following distance D (L θ) i, l) judge whether this part straight-line segment is positioned on certain straight line:
D ( L i , l ) = 2 | d 1 + d 2 | h , ifsgn ( d 1 ) = sgn ( d 2 ) h ( d 1 2 + d 2 2 ) 2 | d 1 - d 2 | , ifsgn ( d 1 ) ≠ sgn ( d 2 ) ,
D (L wherein i, l) be straight-line segment L i(A, B) (A and B represent straight-line segment L respectively for ρ, distance θ) to straight line l i(A, B) about two end points, ρ and θ be straight line l (ρ, pole coordinate parameter θ),
Figure BDA0000057221170000042
Be straight-line segment L i(A is B) at straight line l (ρ, the θ) projected length on, d 1, d 2Be respectively straight-line segment L i(A, left and right sides two-end-point B) is to straight line l (ρ, symbolic distance θ).
Wherein, when local straight-line segment is played point diagram and carries out straight-line detection, adopt 5 * 5 neighborhood window to scan the straight-line detection totalizer, and the threshold value that the ballot totalizer is set is 1.
Beneficial effect of the present invention: the present invention is subjected to the inspiration of human eye some characteristic in the straight-line segment testing process, is that a kind of bottom-up straight-line segment of robust detects and extractive technique.This technology is at first according to brigade commander's feature of pixel, carries out the fast detecting of straight-line segment at the regional area of image, merges the long straight-line segment that obtains having global sense by these detected local straight-line segments being carried out cluster then.This technology has advantages such as detection speed is fast, accuracy of detection is high, robustness is good.Compare with classic method, this technology only need be provided with the minimum length of straight-line segment to be detected, can effectively avoid a large amount of empty inspection that exists in the traditional line section detection method.The present invention is used for the text image graphic object, described technology can be widely used in the automatic detection and the analysis of form in the bank money image, seal, track figures target, in fields such as pattern vectorization, tabular analysis, the automatic processing of bill wide application prospect is arranged.
Description of drawings
Fig. 1 a and Fig. 1 b are brigade commander's histogram features at pixel place in the image;
Fig. 2 is the circular arc neighbour structure that is adopted during local straight-line segment detects;
Fig. 3 a to Fig. 3 d is local straight-line segment testing result;
Fig. 4 is the straight line set synoptic diagram by pixel A and pixel B;
Fig. 5 is the distance of straight-line segment to straight line;
Fig. 6 is with the current local straight-line segment and the merging synoptic diagram of detection of straight lines section;
Fig. 7 a to Fig. 7 d is that the straight-line segment of straight-line segment detection algorithm of the present invention on real scan figure detects effect comparison;
Fig. 8 is a process flow diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing, each detailed problem related to technical solution of the present invention described in detail.
As Fig. 8 straight-line segment fast detecting and the extracting method that the present invention proposes is shown, this method mainly may further comprise the steps:
Step S1: the extraction of image brigade commander histogram feature;
Step S2: the detection of local straight-line segment;
Step S3: the cluster of local straight-line segment merges.
The histogram that the pixel place is made of the brigade commander of different directions in the image has comprised a large amount of information around this pixel usually.This brigade commander's histogram feature is very important feature of bianry image, and it has comprised width information, directional information and other important local messages etc. by the straight-line segment of this point.In outline map before the detection of straight lines section, extracting this brigade commander's feature in advance from original image is very useful for the auxiliary judgment and the identification of straight-line segment.The brigade commander at certain some place is defined as along the number of certain direction by the continuous black pixel point of this point in the image.For reflecting this some feature on every side, need usually extract brigade commander's feature at this some place along a plurality of directions, constitute brigade commander's histogram at last.Usually, the shortest brigade commander is corresponding to the width of the straight-line segment by this point in the histogram, and the pairing angle of the longest brigade commander is then corresponding to the direction of this straight-line segment.
Step S1 calculates the brigade commander's histogram around each pixel on the bianry image to width of cloth scanning bianry image, and extracts corresponding brigade commander's direction and length characteristic; Described brigade commander's histogram feature extraction algorithm performing step is as follows:
Step S11. initialization brigade commander's to be extracted direction set D={d 1..., d n, wherein n is the number of brigade commander's direction;
Step S12. is for each direction d i(i=1 ..., n), calculate the direction vector of this direction correspondence
Figure BDA0000057221170000061
And define a storage space R identical with image size i, be used for writing down brigade commander's size at this each pixel place of direction hypograph;
Step S13. determines the starting point set S={s that the brigade commander calculates in image 1..., s M, wherein M is the number of starting point;
Step S14. is for each starting point s j(j=1 ..., M), from this point, along direction vector
Figure BDA0000057221170000062
Increase progressively image is scanned, each section black run length of record process, and at each pixel corresponding memory space R iIn the corresponding position write down this brigade commander's size;
Step S15. repeating step S12 is to step S14, up to the direction set D={d of straight-line segment 1..., d nIn the equal been scanned of all directions.
If two points are located along the same line, their brigade commander's histogram is very similar usually.Therefore, when the regional area of image carries out the straight-line segment detection, can carry out right the choosing of combined spot by brigade commander's histogram of 2 of comparisons.Generally speaking, adopt whole histogram feature and judge for it defines certain similarity measurement whether two points belong to same straight-line segment, and calculated amount is often bigger, therefore, can from histogram feature, extract some simple statistic and judge.For a histogram feature, width information and directional information about straight-line segment that it comprised are very useful features.Angle by the shortest brigade commander and the longest brigade commander's correspondence in the calculating brigade commander histogram is extracted this two features.For brigade commander's histogram H, the brigade commander's feature that is defined as follows:
WL = min 1 ≤ i ≤ n H ( i ) , DL = max 1 ≤ i ≤ n H ( i ) , - - - ( 1 )
WL has comprised the width information of straight-line segment, and DL has comprised the directional information of straight-line segment.
It is worthy of note that do not need to adopt a lot of brigade commander's directions to calculate brigade commander's histogram feature when extracting above-mentioned two features, a few direction is just enough usually.This is mainly for following consideration: for the straight-line segment by a bit, the brigade commander who investigates this a few direction of some place just can obtain fine being similar to of this straight-line segment width.And the pairing direction of the shortest brigade commander is vertical mutually with the pairing direction of the longest brigade commander usually.In the actual computation process, adoptable brigade commander's direction set is combined into { 0 °, 45 °, 90 °, 135 ° }.Accompanying drawing 1a and Fig. 1 b have provided straight-line segment width and the direction character that adopts the described brigade commander's histogram feature of step S1 extraction algorithm that each pixel in one width of cloth bianry image is calculated.Fig. 1 a is that the straight-line segment direction character at pixel place (adopts different colors to carry out mark among the figure, pixel with same color, corresponding straight-line segment direction character is identical), Fig. 1 b is that the straight-line segment width characteristics at pixel place (adopts different brightness to carry out mark among the figure, brightness value is big more, and is big more to putting place's straight-line segment width).
Step S2: to each foreground pixel point on the bianry image, construct a circular arc neighbour structure, and utilize the brigade commander's feature around the pixel to carry out the detection of local straight-line segment; The detection performing step of described local straight-line segment is as follows:
Step S21: initiation parameter, and specify the minimum length of straight-line segment to be detected.It is pointed out that when the detection of straight lines section, the length that straight-line segment to be detected is set is inevitable.Otherwise single pixel also can be thought the straight line section in the image;
Step S22: construct a circular arc neighbour structure, and set up a corresponding two-dimensional polling list, in the table every line item on the center of circle and the circular arc each point between all pixels to position coordinates, be that local straight-line segment detects the circular arc neighbour structure that adopts shown in the accompanying drawing 2;
Step S23: image is lined by line scan, for each the marginal point e in the image I, j, (1≤i<M, 1≤j<N) investigate this radius and are each marginal point on the circular arc neighbour structure of r
Figure BDA0000057221170000071
If brigade commander's feature of these two points is approximate, promptly
DL ( v i , j k ) = DL ( e i , j ) , | WL ( v i , j k ) - WL ( e i , j ) | ≤ τ , - - - ( 2 )
In the formula:
DL ()---the direction character of the straight-line segment at certain some place;
WL ()---the width characteristics of the straight-line segment at certain some place;
τ---the threshold value that sets in advance is used for judging whether 2 straight-line segment width of locating are consistent.Then that this is a pair of as match point;
Step S24: by the bivariate table set up among the query steps S22 calculate match point between the number of black picture element, be designated as
Figure BDA0000057221170000074
Judge the interconnectedness between these 2 thus.If Greater than certain preset threshold value, think that then there is the straight line section in this point-to-point transmission, and write down the information such as position, direction of this straight-line segment.For improving the detection efficiency of straight-line segment, detected local straight-line segment is done certification mark in former figure, be on this straight-line segment of mark have a few, make them not be re-used as the starting point of certain straight-line segment, in remaining marginal point, continue the detection of straight-line segment then.Repeating step S23 is to S24, and all marginal points dispose in image.
Usually, the point that satisfies constraint condition in the formula (2) in local neighborhood is considerably less to number, and it is several right to have only usually, so the described method of step S2 is in that to carry out combined spot efficient when choosing very high.Calculation level between interconnectedness the time because the influence of quantization error in the image, the common out of true of the number of pixels that obtains, thereby the judgement of straight-line segment is caused certain influence.Therefore, need outline map is at first carried out the morphology expansive working, on the outline map after the expansion, carry out the calculating of interconnectedness then.
Accompanying drawing 3a to Fig. 3 d has provided the testing result of local straight-line segment on the width of cloth bianry image, wherein Fig. 3 a is 300 * 300 two-value text image, Fig. 3 b is the outline map that utilizes mathematical morphology refinement and removal method to obtain, Fig. 3 c is the starting point of detected local straight-line segment and direction (indicating direction with different colors among the figure) thereof, and Fig. 3 d is detected local straight-line segment (short lines segment length be made as 50).From Fig. 3 a to Fig. 3 d as can be seen, the described method of step S2 can well detect each the bar straight-line segment in publishing picture.
After obtaining local straight-line segment, need carry out cluster to it and merge, obtain comprising the long straight-line segment of this part straight-line segment.When carrying out the merging of local straight-line segment, analyze the zone (as border circular areas) that a pixel is regarded as on the plane more appropriate.Accompanying drawing 4 is not difficult to find out that for the straight line set synoptic diagram by pixel A and pixel B these straight lines are positioned at an angular domain.
The subtended angle size and the straight-line segment of angular domain
Figure BDA0000057221170000081
Length relevant.Straight-line segment is long more, and its deflection error is more little, thereby the subtended angle of angular domain is just more little.The note length of straigh line is d, and the rectilinear direction that connects straight-line segment terminal A and terminal B is θ, and the subtended angle α scope that then can calculate angular domain is approximately:
θ-tan -1(1/d)≤α≤θ+tan -1(1/d)。(3)
For the straight-line segment L that connects A and B i(A, B) (ρ, θ), wherein ρ and θ are that (ρ, pole coordinate parameter θ) is if L for straight line l with straight line l iBe positioned on this straight line, then the two-end-point of straight-line segment need satisfy following constraint:
|dist(A,l)|≤δ,|dist(B,l)|≤δ,(4)
Wherein dist () is the symbolic distance of point to straight line, and δ is the allowable error of straight-line segment end points to its affiliated air line distance, under the ideal case
Figure BDA0000057221170000082
Yet because the existence of error in the image, it is more bigger that this allowable error need be provided with usually.
Formula (4) is launched, have
ρ-δ≤x Acosθ+y Asinθ≤ρ+δ (5)
ρ-δ≤x Bcosθ+y Bsinθ≤ρ+δ
(x wherein A, y A) be the coordinate of straight-line segment terminal A on grating image, (x B, y B) be the coordinate of straight-line segment terminal B on grating image.For reflection straight-line segment and the distance relation of straight-line segment under it, define straight-line segment L i(A, B) to straight line l (ρ, distance θ) is:
D ( L i , l ) = ∫ L i | dist ( p , l ) | dp = ∫ 0 1 | x ( t ) cos θ + y ( t ) sin θ - ρ | dt , - - - ( 6 )
If further (ρ, distance θ) is respectively d to straight line l for note straight-line segment terminal A and B 1=dist (A, l) and d 2=dist (B, l), D (L then i, the form that is expressed as that l) can be explicit (straight-line segment is to the distance of straight line as shown in Figure 5):
D ( L i , l ) = 2 | d 1 + d 2 | h , ifsgn ( d 1 ) = sgn ( d 2 ) h ( d 1 2 + d 2 2 ) 2 | d 1 - d 2 | , ifsgn ( d 1 ) ≠ sgn ( d 2 ) - - - ( 7 )
Wherein
Figure BDA0000057221170000093
Be straight-line segment L i(A, B) (d is straight-line segment L for ρ, the θ) projected length at straight line l i(A, length B).
For carrying out the merging of local straight-line segment, need at first obtain the affiliated candidate's straight line of local straight-line segment.We adopt a kind of improved Hough transformation to obtain these candidate's straight lines.Compare with traditional Hough transformation, improved Hough transformation can reduce the quantity of false ballot, and when determining the local extremum of ballot totalizer, the common selection of threshold problem that does not have difficulties.
Be not difficult to find out that by preceding surface analysis if the straight line section is positioned on certain bar straight line, then this straight line must be arranged in the angular domain of this straight-line segment.Therefore, when straight-line segment was voted in the parameter space of straight line, only need vote to the straight line that is arranged in its angular domain got final product.Here, for avoiding obtaining false candidate's straight line, the ballot value is carried out following weighted according to straight-line segment to the distance of straight line:
v i = e - D i / σ 2 , - - - ( 8 )
V wherein iBe the ballot weights of straight-line segment, D iBe the distance of straight-line segment to straight line, σ is default parameter, is used for controlling the shape of voting right value function.So, for every local straight-line segment, in the parameter space of straight line,, at first calculate distance between the two to being arranged in every straight line of its angular domain, then to corresponding accumulator element by the following formula accumulation of voting.At last, in the totalizer that obtains, seek local maximum and determine candidate's straight line.
It is pointed out that because every local straight-line segment all will belong to certain the bar straight-line segment in the final detection result therefore, the threshold value of ballot totalizer should be made as the maximal value v of single hop straight-line segment ballot Max=1.In addition, in order to determine local extremum in totalizer, the neighborhood window that adopts 5 * 5 scans totalizer.If the ballot value of window center greater than the ballot value of every other position in the window, is then kept this point as Local Extremum.Through after the above-mentioned stage, can obtain some candidate's straight lines.Then, all local straight-line segments are followed the tracks of merging along these candidate's straight lines.
To sum up, step S3: detected local straight-line segment is carried out cluster merge the long straight-line segment that obtains having global sense.Described straight-line segment cluster merge algorithm performing step is as follows:
The set of step S31. initialization straight-line segment is for empty;
Step S32. utilizes improved Hough transformation that local straight-line segment is played point diagram to carry out straight-line detection, and writes down the ballot number of every candidate's straight line;
The line by line scan point diagram that rises of local straight-line segment of step S33. for the local straight-line segment of each bar, calculates the candidate's straight line that is arranged in its dihedral territory.If candidate's straight line number greater than 1, is then selected the candidate's straight line with maximum ballot value; If candidate's straight line number is 0, then abandon this part straight-line segment;
Whether step S34. scans all and is positioned at straight-line segment on this candidate's straight line, calculate current local straight-line segment and coincide with wherein certain bar straight-line segment.If then current local straight-line segment is integrated with this straight-line segment, and recomputates the end points of the straight-line segment after the merging; If not, then current local straight-line segment is added in the straight-line segment set as a new straight-line segment; Repeat said process, dispose up to all local straight-line segments.
When step S34 carries out the straight-line segment merging, be necessary for the interval between the straight-line segment is provided with a threshold value, can effectively handle like this in the image because the straight-line segment that noise causes fracture situation.The merging process of current local straight-line segment and detection of straight lines section as shown in Figure 6.Be detected straight-line segment
Figure BDA0000057221170000101
Setting one allows can obtain comprising a rectangle of this straight-line segment at interval.If straight-line segment to be combined An end points fall within this rectangle, then will
Figure BDA0000057221170000103
With
Figure BDA0000057221170000104
Merge, promptly upgrade the terminal point information of former straight-line segment.
For verifying method of the present invention, we utilize the text image of real scan, are being configured to Intel (R) Core (TM) 2Quad CPU, and RAM has carried out experimental verification to it on the PC of 3.25GB.Provide the comparing result that straight-line segment that the inventive method obtains detected and extracted result and classic method among accompanying drawing 7a to Fig. 7 d, wherein Fig. 7 a is 765 * 726 bianry image, Fig. 7 b is the straight-line segment testing result (totalizer local extremum threshold value is made as 60) of traditional Hough transformation, Fig. 7 c is the straight-line segment testing result (totalizer local extremum threshold value is made as 60) that rear orientation projection's method obtains, and Fig. 7 d is the straight-line segment testing result (length of straigh line is made as 50) that the technology of the present invention obtains.As can be seen from the figure, traditional Hough transformation can produce the straight-line segment of more falseness usually when the detection of straight lines section.Rear orientation projection's method can effectively be avoided the generation of false straight-line segment, but can therefore lose some real straight-line segment.The method of the invention then can effectively be avoided the problems referred to above.In addition, when the method for the invention detects at straight-line segment, except that the length of straigh line condition is set, need not to be provided with other parameters.And traditional Hough transformation and rear orientation projection's method need set in advance a good threshold value and get rid of false straight line, and this threshold value need be provided with respectively at different images when determining straight line in totalizer.
The above; only be the embodiment among the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with the people of this technology in the technical scope of institute of the present invention dewfall; conversion or the replacement expected can be understood, all of the present invention comprising within the scope should be encompassed in.

Claims (6)

1. a straight-line segment detects and extracting method, it is characterized in that comprising that step is as follows:
Step S1: to width of cloth scanning bianry image, calculate the brigade commander's histogram around each pixel on the bianry image, and extract corresponding brigade commander's direction and length characteristic;
Step S2: to each foreground pixel point on the bianry image, construct a circular arc neighbour structure, and utilize the brigade commander's feature around the pixel to carry out the detection of local straight-line segment;
Step S3: detected local straight-line segment is carried out cluster merge the long straight-line segment that obtains having global sense.
2. straight-line segment according to claim 1 detects and extracting method, it is characterized in that brigade commander's histogram feature comprises the width information WL of straight-line segment and the directional information DL of straight-line segment, is used to improve the detection efficiency of local straight-line segment.
3. straight-line segment according to claim 1 detects and extracting method, it is characterized in that the detection of described local straight-line segment comprises the steps:
Step S21: initialization straight-line segment detected parameters, and the minimum length of straight-line segment to be detected is set;
Step S22: construct a circular arc neighbour structure, and set up corresponding two-dimensional polling list; It is the end points coordinate of all local straight-line segments of starting point that this question blank is used for determining with the circular arc center of circle fast;
Step S23: each pixel on the bianry image, utilize brigade commander's histogram feature, determine fast that on its circular arc neighbour structure match point is right;
Step S24: right to each match point, calculation level between interconnectedness, thereby judge that this is a pair of to whether having local straight-line segment, and current pixel point is done the starting point mark; Repeating step S23 to S24 disposes up to all pixels.
4. straight-line segment according to claim 1 detects and extracting method, it is characterized in that, the cluster merging of described local straight-line segment comprises the steps:
Step S31: initialization straight-line segment detected set is combined into sky;
Step S32: utilize Hough transformation that local straight-line segment is played point diagram and carry out straight-line detection, the totalizer threshold value is made as 1, and writes down the ballot number of every straight line correspondence in totalizer;
Step S33:, choose and be arranged in the straight line that its type zone, angle has maximum votes for each local straight-line segment;
Step S34: scan all one by one and be positioned at local straight-line segment on this straight line, judge whether current straight-line segment and its satisfy the merging condition; If current straight-line segment is merged with it, and upgrades the terminal point information of straight-line segment; Repeating step S33 to S34 disposes up to all local straight-line segments.
5. straight-line segment according to claim 4 detects and extracting method, it is characterized in that, by calculated line section L i(A is B) to straight line l (ρ, following distance D (L θ) i, l) judge whether this part straight-line segment is positioned on certain straight line:
D ( L i , l ) = 2 | d 1 + d 2 | h , ifsgn ( d 1 ) = sgn ( d 2 ) h ( d 1 2 + d 2 2 ) 2 | d 1 - d 2 | , ifsgn ( d 1 ) ≠ sgn ( d 2 ) ,
D (L wherein i, l) be straight-line segment L i(A, B) (A and B represent straight-line segment L respectively for ρ, distance θ) to straight line l i(A, B) about two end points, ρ and θ be straight line l (ρ, pole coordinate parameter θ), Be straight-line segment L i(A is B) at straight line l (ρ, the θ) projected length on, d 1, d 2Be respectively straight-line segment L i(A, left and right sides two-end-point B) is to straight line l (ρ, symbolic distance θ).
6. straight-line segment according to claim 4 detects and extracting method, it is characterized in that, when local straight-line segment is played point diagram and carries out straight-line detection, adopts 5 * 5 neighborhood window to scan the straight-line detection totalizer, and the threshold value that the ballot totalizer is set is 1.
CN 201110103720 2011-04-25 2011-04-25 Straight segment detecting and extracting method Expired - Fee Related CN102156884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110103720 CN102156884B (en) 2011-04-25 2011-04-25 Straight segment detecting and extracting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110103720 CN102156884B (en) 2011-04-25 2011-04-25 Straight segment detecting and extracting method

Publications (2)

Publication Number Publication Date
CN102156884A true CN102156884A (en) 2011-08-17
CN102156884B CN102156884B (en) 2012-12-12

Family

ID=44438374

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110103720 Expired - Fee Related CN102156884B (en) 2011-04-25 2011-04-25 Straight segment detecting and extracting method

Country Status (1)

Country Link
CN (1) CN102156884B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102819743A (en) * 2012-08-14 2012-12-12 常州大学 Detection method for quickly identifying straight-line segments in digital image
CN103198468A (en) * 2011-09-08 2013-07-10 株式会社Pfu Image processing apparatus, image processing method, and image processing system
CN103440671A (en) * 2013-08-23 2013-12-11 方正国际软件有限公司 Seal detecting method and system
CN104751177A (en) * 2015-03-26 2015-07-01 常州大学 Method for identifying given blurred digital straight-line segment in digital image
CN105354571A (en) * 2015-10-23 2016-02-24 中国科学院自动化研究所 Curve projection-based distorted text image baseline estimation method
WO2016055031A1 (en) * 2014-10-09 2016-04-14 北京配天技术有限公司 Straight line detection and image processing method and relevant device
CN108074255A (en) * 2016-11-11 2018-05-25 中国石油化工股份有限公司抚顺石油化工研究院 Sulfide information extracting method, apparatus and system based on isomerism parallel
CN108345893A (en) * 2018-03-15 2018-07-31 京东方科技集团股份有限公司 A kind of line detection method, device, computer storage media and terminal
CN108647697A (en) * 2018-05-11 2018-10-12 武汉鸿瑞达信息技术有限公司 A kind of object boundary detection method and device based on Improved Hough Transform
CN110148221A (en) * 2018-08-30 2019-08-20 杭州维聚科技有限公司 A kind of method of lines fitting when image reconstruction
CN110490935A (en) * 2019-08-20 2019-11-22 哈尔滨工业大学 Linear feature detection method, device and equipment
CN110532840A (en) * 2018-05-25 2019-12-03 深圳市优必选科技有限公司 A kind of deformation recognition methods, device and the equipment of square objects
CN113269732A (en) * 2021-05-14 2021-08-17 成都真实维度科技有限公司 Linear object detection method based on feature scanning image
CN114037682A (en) * 2021-11-08 2022-02-11 中国科学院光电技术研究所 Two-dimensional automatic detection method for optical element surface defects

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4901365A (en) * 1988-12-19 1990-02-13 Ncr Corporation Method of searching binary images to find search regions in which straight lines may be found
JPH04101284A (en) * 1990-08-20 1992-04-02 Nippon Telegr & Teleph Corp <Ntt> Highly-accurate hough transformation device
CN101315698A (en) * 2008-06-25 2008-12-03 中国人民解放军国防科学技术大学 Characteristic matching method based on straight line characteristic image registration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4901365A (en) * 1988-12-19 1990-02-13 Ncr Corporation Method of searching binary images to find search regions in which straight lines may be found
JPH04101284A (en) * 1990-08-20 1992-04-02 Nippon Telegr & Teleph Corp <Ntt> Highly-accurate hough transformation device
CN101315698A (en) * 2008-06-25 2008-12-03 中国人民解放军国防科学技术大学 Characteristic matching method based on straight line characteristic image registration

Cited By (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103198468B (en) * 2011-09-08 2016-03-16 株式会社Pfu Image processing apparatus, image processing method and image processing system
CN103198468A (en) * 2011-09-08 2013-07-10 株式会社Pfu Image processing apparatus, image processing method, and image processing system
CN102819743A (en) * 2012-08-14 2012-12-12 常州大学 Detection method for quickly identifying straight-line segments in digital image
CN102819743B (en) * 2012-08-14 2015-03-11 常州大学 Detection method for quickly identifying straight-line segments in digital image
CN103440671B (en) * 2013-08-23 2016-12-28 方正国际软件有限公司 A kind of seal detection method and system
CN103440671A (en) * 2013-08-23 2013-12-11 方正国际软件有限公司 Seal detecting method and system
WO2016055031A1 (en) * 2014-10-09 2016-04-14 北京配天技术有限公司 Straight line detection and image processing method and relevant device
US10430951B2 (en) 2014-10-09 2019-10-01 Beijing A&E Technologies Co., Ltd. Method and device for straight line detection and image processing
CN104751177A (en) * 2015-03-26 2015-07-01 常州大学 Method for identifying given blurred digital straight-line segment in digital image
CN104751177B (en) * 2015-03-26 2018-01-12 常州大学 A kind of method for being used in reference numbers image give fuzzy digit straightway
CN105354571A (en) * 2015-10-23 2016-02-24 中国科学院自动化研究所 Curve projection-based distorted text image baseline estimation method
CN105354571B (en) * 2015-10-23 2019-02-05 中国科学院自动化研究所 Distortion text image baseline estimation method based on curve projection
CN108074255A (en) * 2016-11-11 2018-05-25 中国石油化工股份有限公司抚顺石油化工研究院 Sulfide information extracting method, apparatus and system based on isomerism parallel
CN108074255B (en) * 2016-11-11 2022-03-08 中国石油化工股份有限公司抚顺石油化工研究院 Method, device and system for extracting sulfide information based on heterogeneous parallel
CN108345893B (en) * 2018-03-15 2021-01-26 京东方科技集团股份有限公司 Straight line detection method and device, computer storage medium and terminal
CN108345893A (en) * 2018-03-15 2018-07-31 京东方科技集团股份有限公司 A kind of line detection method, device, computer storage media and terminal
CN108647697A (en) * 2018-05-11 2018-10-12 武汉鸿瑞达信息技术有限公司 A kind of object boundary detection method and device based on Improved Hough Transform
CN108647697B (en) * 2018-05-11 2020-06-23 武汉鸿瑞达信息技术有限公司 Target boundary detection method and device based on improved Hough transformation
CN110532840A (en) * 2018-05-25 2019-12-03 深圳市优必选科技有限公司 A kind of deformation recognition methods, device and the equipment of square objects
CN110532840B (en) * 2018-05-25 2022-05-10 深圳市优必选科技有限公司 Deformation identification method, device and equipment for square object
CN110148221A (en) * 2018-08-30 2019-08-20 杭州维聚科技有限公司 A kind of method of lines fitting when image reconstruction
CN110148221B (en) * 2018-08-30 2023-09-01 杭州维聚科技有限公司 Line fitting method during image reconstruction
CN110490935A (en) * 2019-08-20 2019-11-22 哈尔滨工业大学 Linear feature detection method, device and equipment
CN113269732A (en) * 2021-05-14 2021-08-17 成都真实维度科技有限公司 Linear object detection method based on feature scanning image
CN113269732B (en) * 2021-05-14 2024-03-29 成都真实维度科技有限公司 Linear object detection method based on characteristic scanning image
CN114037682A (en) * 2021-11-08 2022-02-11 中国科学院光电技术研究所 Two-dimensional automatic detection method for optical element surface defects

Also Published As

Publication number Publication date
CN102156884B (en) 2012-12-12

Similar Documents

Publication Publication Date Title
CN102156884B (en) Straight segment detecting and extracting method
CN102880877B (en) Target identification method based on contour features
Lee et al. Partial fingerprint matching using minutiae and ridge shape features for small fingerprint scanners
Kumar et al. Writer-independent off-line signature verification using surroundedness feature
CN102270308B (en) Facial feature location method based on five sense organs related AAM (Active Appearance Model)
CN104463866A (en) Local shape matching method based on outline random sampling
CN104464079A (en) Multi-currency-type and face value recognition method based on template feature points and topological structures of template feature points
CN103679118A (en) Human face in-vivo detection method and system
CN102567993B (en) Fingerprint image quality evaluation method based on main component analysis
CN101650784B (en) Method for matching images by utilizing structural context characteristics
CN102750531B (en) Method for detecting handwriting mark symbols for bill document positioning grids
CN102542660A (en) Bill anti-counterfeiting identification method based on bill watermark distribution characteristics
CN106936964A (en) A kind of mobile phone screen angular-point detection method based on Hough transformation template matches
Cao et al. Fingerprint matching by incorporating minutiae discriminability
Nguyen et al. An improved ridge features extraction algorithm for distorted fingerprints matching
CN102855461A (en) Method and equipment for detecting fingers in images
CN101996401A (en) Target analysis method and device based on intensity image and range image
CN105160303A (en) Fingerprint identification method based on mixed matching
CN104574401A (en) Image registration method based on parallel line matching
Cao et al. Combining features for distorted fingerprint matching
CN104331885A (en) Circular target detection method based on voting line clustering
CN103927539A (en) Efficient feature extraction method for off-line recognition of Uyghur handwritten signature
Shu et al. Detecting 3D points of interest using projective neural networks
CN101894154B (en) Method for extracting key pattern from image file
CN102156869B (en) Method and device for detecting shapes formed by combining arbitrary line segments

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121212

CF01 Termination of patent right due to non-payment of annual fee