CN104751177B - A kind of method for being used in reference numbers image give fuzzy digit straightway - Google Patents
A kind of method for being used in reference numbers image give fuzzy digit straightway Download PDFInfo
- Publication number
- CN104751177B CN104751177B CN201510137710.3A CN201510137710A CN104751177B CN 104751177 B CN104751177 B CN 104751177B CN 201510137710 A CN201510137710 A CN 201510137710A CN 104751177 B CN104751177 B CN 104751177B
- Authority
- CN
- China
- Prior art keywords
- straightway
- bdss
- coordinate
- mrow
- fuzzy digit
- 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.)
- Active
Links
Landscapes
- Image Analysis (AREA)
Abstract
The present invention relates to a kind of method for being used in reference numbers image give fuzzy digit straightway, fuzzy digit straightway BDSS identification, fuzzy digit straightway BDSS save as recognition result in the form of gathering in fuzzy digit straightway BDSS recognizers are completed to digital picture;The fuzzy digit straightway BDSS given according to recognition result, calculates its geometry linear characteristic, and the rectangular shaped rim that the geometry linear characteristic is met using slope identifies given pixel set.The present invention is especially suitable for visual representation numeral straightway, there is the pixel set of rectilinear geometry feature in the digital pictures such as fuzzy digit straightway, in addition to rectangular shaped rim is added in digital picture, other raw informations in digital picture are not changed, and background is easier to observe;Implement simple, time-consuming and resolution ratio linearly stable increase substantially, performance efficiency.
Description
Technical field
The present invention relates to a kind of method for being used in reference numbers image give fuzzy digit straightway, i.e., by disperseing or even
The set of continuous pixel composition, carry out a kind of computational methods of visual representation.
Background technology
In Digital Image Processing, identify that the object with particular community is with very high science and application value in image,
Such as recognition of face, optical character identification etc..Digital straightway and derivative, the figure identification with rectilinear geometry feature belong to
Important branch in field of image recognition, its application include in satellite photo road Identification (S.Aliana,
V.A.Tolpekina,W.Bijkera,L.Kumarb,“Identifying curvature of overpass mountain
roads in Iran from high spatial resolution remote sensing data”,Int.J.of
Appl.Earth Observation and Geoinformation, vol.26, pp.21-25,2014.), the weld seam in welding
Identify (L.Jia, N.Sun, " A line segment detection algorithm based on statistical
analyses of quantified directions in digital image”,Comput.Modelling&New
Technologies, vol.18, no.6, pp.79-88,2014.) etc..For the automatic identification of digital straightway and derivative object
At home and abroad academia constantly weeds out the old and bring forth the new computational methods, although accuracy of identification and efficiency gradually rise, always using thicker
Rough method mark result, as shown in Fig. 1 in brief description of the drawings.Fig. 1 illustrates three kinds of common identification methods, is followed successively by from left to right
Endpoint ID method (P.Bhowmick and B.B.Bhattacharya, " Fast polygonal approximation of
digital curves using relaxed straightness properties”,IEEE Trans.Pattern
Anal.Mach.Intell., vol.29, no.9, pp.1590-1602, Sept.2007.), multi-color cord segment identification method (L.Jia,
N.Sun,“A line segment detection algorithm based on statistical analyses of
quantified directions in digital image”,Comput.Modelling&New Technologies,
Vol.18, no.6, pp.79-88,2014.) and slope covering marking method (L.Buzer, " A simple algorithm for
digital line recognition in the general case”,Pattern Recognition,vol.40,
no.6,pp:1675-1684,Jun.2007.).The common drawback of these three label methods is that mark pair is completely covered using monochrome
As excessively have modified original image data, causing background information to be lost, mark overlap-add region can not be understood, to eye-observation quilt
Identification object causes obstacle, and particularly when identification object only includes the partial pixel of overlay area, this object includes portion
The situation of point pixel is the common situations in real world images.Academia is often with the corresponding original image of (a) and (c) in similar Fig. 1
Carry out test, ideally monochrome covering the problem of causing is not notable this, but when being related to practical application, often needs
To carry out experiment repeatedly according to real image test result, similar to Figure 1 three kinds of label methods can cause in actual experiment
The complete loss of identified areas background information and it is difficult to differentiate between overlap-add region so that test result is difficult to be assessed with human eye.
Therefore, identified for figure, the identification of particularly digital straightway and derivative object, lack one kind and both implemented simple, and can phase
To the mark computational methods of intact preservation image background.
The content of the invention
The technical problem to be solved in the present invention is:After overcoming the automatic identification of existing digital straightway and derivative object
Label method mark object is completely covered using monochrome, excessively have modified original image data, cause background information to be lost, can not
Overlap-add region is clearly identified, the deficiency that object causes obstacle is identified to eye-observation, the present invention provides a kind of for identifying
The method that fuzzy digit straightway is given in digital picture is straight especially suitable for visual representation numeral straightway, fuzzy digit
There is the pixel set of rectilinear geometry feature in the digital pictures such as line segment, in addition to rectangular shaped rim is added in digital picture, do not repair
Change other raw informations in digital picture.
To make statement cheer and bright, existing centralized definition partial symbols involved in the present invention and concept.
Z+Represent Positive Integer Set.
Z represents to include zero integer set.
R+Expression includes zero arithmetic number set.
R represents to include zero real number set.
Max element | and the condition that element meets } represent to meet " maximum " element of condition.
Min element | and the condition that element meets } represent to meet " minimum " element of condition.
For r ∈ R+,
Represent the width of digital picture.
Represent the height of digital picture.
R be present1,r2∈R+, meet condition
Index value:
View data:The digital information for being identified and being preserved with index value.
Image space (is denoted as):Preserve the view data of digital picture.Each recording unit uniquely corresponds to a picture
Element.In view data, the pixel index value in the correspondence image information upper left corner isAccording to correspondence image information, first from a left side
To the right, the order arrangement pixel after from top to bottom, the kth ∈ Z in order+The index value of individual pixel is
piRepresent the pixel that index value is i in image space.
p(x, y)Represent in image space, the pixel of the point (x, y) in respective coordinates space, wherein x, y ∈ Z.
dist(o1,o2):Work as o1, o2For point in two-dimensional space when, dist (o1,o2) represent o1With o2Between Euclid
Distance;Work as o1, o2During point and straight line respectively in two-dimensional space, dist (o1,o2) represent from o1Do and o2Vertical straight line, hang down
Line and o2Intersection point to o1Euclidean distance;Work as o1,o2∈ R, dist (o1,o2)=| o1-o2|。
For r, round (r)=min { z ∈ Z+|dist(z,r)≥0}。
Offset:ForOffset is
Serializing:WillIn pixel by the incremental order of index value, arrangement in a row one by one to the right, when number of pixel per line isThe then newline immediately below first pixel of this journey, and continue arrangement pixel by the aligning method of lastrow, it is so anti-
It is multiple, untilMiddle all pixels are finished by the incremental order arrangement of index value, and now number of pels per line is It may be regarded as having
There is lengthIt is wideAnd unit Euclidean distance isTwo-dimensional space.
Coordinate space (is denoted as):SerializingAnd optionally one of pixel is the rectangular coordinate system of origin.For the seat
There are 2 points of (x of unit Euclidean distance in mark system1,y1) and (x2, y2), by formula
The unit Euclidean distance values provided areThe coordinate system is wide (x-axis) with endless (y-axis)
Two-dimensional space.
Mean center:ForWherein i=1,2 ... n, n are sum of all pixels contained by BDSS;It is average
CenterCoordinate be
Picture centre:That is pixel
Coordinate centralization:SerializingIfOrigin the right side that picture centre is expert at is pointed to by picture centre and x positive axis,
D is known as offsetiPixelWithMiddle coordinate is
Point correspond, (xi,yi) it is referred to as piCentre coordinate.Work as pixelCentre coordinate be known as (xi,yi) when, its
Offset is Index value is
Digital straightway (digital straight segment, DSS):Coordinate centralizationIf pixelWithCoordinate value be respectivelyWithip,iq,jp,jq∈ Z and ip< iq, cross the straight of p and q
Line is denoted asAnd its slope belongs to section (0,1), forCathetus x=i ∈ R wherein ip≤i≤iqIf straight lineWith it is straight
Line x=i intersecting point coordinate is (x, y), then unique pixel that coordinate value is (round (x), round (y)), itself and intersection point be present
Euclidean distance be not more thanIn section [ip,iq] in change i values, such pixel can be obtained
Set, the digital straightway DSS (p, q) determined by p and q is:
Fuzzy digit straightway (blurred digital straight segment, BDSS):Coordinate centralizationIf
I, j, a, b, μ, ω ∈ Z, b ≠ 0 and gcd (a, b)=1, then meet condition μ≤di-bj≤μ+ω'sIntersection
Referred to as fuzzy digit straightway BDSS (a, b, μ, ω), i.e.,:
On the basis of being as defined above, the technical solution adopted for the present invention to solve the technical problems is:
When fuzzy digit straightway BDSS recognizers are completed to widthIt is highDigital picture in fuzzy digit straightway
BDSS identification, fuzzy digit straightway BDSS save as recognition result in the form of gathering;
The fuzzy digit straightway BDSS given according to recognition result, calculates its geometry linear characteristic, uses slope
Meet the rectangular shaped rim mark given pixel set of the geometry linear characteristic.
Specifically include following steps:
Step 1:In coordinates computed centralization image space, respective coordinates spaceCentre coordinate;
Step 2:According to the centre coordinate of pixel in fuzzy digit straightway BDSS, mean center is calculated, and using linear
Return the direction θ for calculating fuzzy digit straightway BDSS;
Step 3:Calculate the conversion coordinate of pixel in fuzzy digit straightway BDSS:Coordinate corresponding to coordinate centralization is empty
BetweenOrigin translation to mean center, and x-axis positive axis is rotated to θ and overlapped;
Step 4:Fuzzy digit straightway BDSS is calculated according to the conversion coordinate of pixel in fuzzy digit straightway BDSS to exist
Change coordinate systemIn four boundary points;
Step 5:Generate the boundary line l parallel to direction θ1And l2, and calculate it and change coordinate, boundary line l1And l2Respectively
Pass through the two of which boundary point in step 4;
Step 6:Generate the boundary line l perpendicular to direction θ3And l4, and calculate it and change coordinate, boundary line l3And l4Respectively
Pass through two other boundary point in step 4, straight line l1, l2, l3And l4It is crossed to form rectangular shaped rim;
Step 7:The conversion coordinate generated according to step 5 and 6, calculates its centre coordinate;
Step 8:The centre coordinate generated according to step 7, calculate its offset and offset is saved as into result output.
Determine that the set of pixel is rectangular shaped rim according to offset, finally, pixel amending method can be used, known
The value of pixel contained by rectangular shaped rim is changed in other BDSS digital picture to identify fuzzy digit straightway BDSS.
In step 1 and 2, the digital picture for identifying fuzzy digit straightway BDSS is mapped asCoordinate centralizationIt is right
In any pixel p ∈ BDSS, if p offset is d, its centre coordinate calculates according to formula (1):
By the centre coordinate of BDSS pixels, BDSS mean center is calculated
According to linear regression theory, and BDSS direction θ ∈ [0, π), calculated by formula (2):
Wherein i=1,2 ... n, n are sum of all pixels contained by BDSS.
In step 3, forIt changes coordinateCalculated according to formula (3):
In step 4, coordinate system is changedIn four boundary points pass through all abscissa x for comparing conversion coordinate and vertical sit
Mark y is obtained.
Coordinate spaceThe conversion coordinate of origin be In step 7, forIts centre coordinateCounted according to formula (7)
Calculate:
In step 8, forThe offset d of pixel is calculated by formula (8):
In, because origin is located at BDSS mean center, there is four extreme values, i.e., horizontal seat in BDSS pixels conversion coordinate
Mark maximum x 'lmax, abscissa minimum value x 'lmin, ordinate maximum y 'wmaxWith ordinate minimum value y 'wmin;Middle presence
Corresponding conversion coordinate (x 'lmax, 0), (x 'lmin, 0), (0, y 'wmax) and (0, y 'wmin) pixel, these pixels are step 4 institute
The boundary point stated;
Wherein,Represent rectangular shaped rim, rectangular shaped rimDefinition provided by formula (4):
WhereinM=1,2,3,4,Represent from p '(x′,y′)
Do and lmVertical straight line, vertical line and lmIntersection point to p '(x′,y′)Euclidean distance.
Rectangular shaped rimActually it is made up of four line segments, formula (4) can be replaced by formula (5) and formula (6), formula (5) and formula
(6) it is respectively l1And l2On, l3And l5OnThe conversion coordinate of pixel:
The invention has the advantages that a kind of of the present invention is used to give fuzzy digit straightway in reference numbers image
Method, to giving digital straightway, fuzzy digit straightway etc., by the pixel set disperseed or contiguous pixels form, calculate it
Geometry linear characteristic, the computational methods of the rectangular shaped rim mark given pixel set of institute's estimated performance are met using slope, are had
Following advantage:
(1) the inventive method clearly designates given fuzzy digit on the premise of significantly background pixel is not changed
Straightway.With the rising of identified digital image resolution, the inventive method changes the quantity and image whole picture of pixel
The ratio between element rapid decrease, its visual effect are rendered as in high rate image respectively, and the BDSS backgrounds that the present invention identifies are easier to observe;
Even small image in different resolution, the inventive method is also relatively limited to the occupancy of image background.
(2) the inventive method is implemented simple, takes and linearly stablizes increase, performance efficiency substantially with resolution ratio.
Brief description of the drawings
The present invention is further described with reference to the accompanying drawings and examples.
Fig. 1 is currently used identification method.(a) Endpoint ID method, (b) multi-color cord segment identification method, (c) slope covering mark
Knowledge method.
Fig. 2 is a kind of schematic diagram for being used in reference numbers image give the method for fuzzy digit straightway of the present invention.
(a) former coordinate system is rotated into conversion coordinate system, (b) rotates back to former coordinate system by coordinate system is changed.
Fig. 3 is that a kind of of the present invention is used in reference numbers image Point classes in the method for given fuzzy digit straightway
Data structure.
Fig. 4 is a kind of principle frame for being used in reference numbers image give the method for fuzzy digit straightway of the present invention
Figure.
Fig. 5 is that a kind of of the present invention is used in reference numbers image step 2 in the method for given fuzzy digit straightway
Theory diagram.
Fig. 6 is that a kind of of the present invention is used in reference numbers image step 5 in the method for given fuzzy digit straightway
Theory diagram.
Fig. 7 is that a kind of of the present invention is used in reference numbers image step 6 in the method for given fuzzy digit straightway
Theory diagram.
Fig. 8 is the result figure that fuzzy digit straightway is given in the image of present invention mark 128*128 resolution ratio.(a) figure
As cameraman, (b) image house, (c) image lena, (d) image puzzle.
Fig. 9 is the result figure that fuzzy digit straightway is given in the image of present invention mark 256*256 resolution ratio.(a) figure
As cameraman, (b) image house, (c) image lena, (d) image puzzle.
Figure 10 is the result figure that fuzzy digit straightway is given in the image of present invention mark 512*512 resolution ratio.(a) figure
As cameraman, (b) image house, (c) image lena, (d) image puzzle.
Figure 11 is a kind of method different step for being used in reference numbers image give fuzzy digit straightway of the present invention
The averagely time-consuming situation analysis figure of all BDSS frames in one width figure of drafting is completed.
Figure 12 is a kind of method different step for being used in reference numbers image give fuzzy digit straightway of the present invention
Complete the time-consuming situation analysis figure of BDSS frames most long in one width figure of drafting.
Figure 13 is a kind of method different step for being used in reference numbers image give fuzzy digit straightway of the present invention
Complete the time-consuming situation analysis figure of BDSS frames most short in one width figure of drafting.
Figure 14 be the present invention a kind of method total time-consuming for being used in reference numbers image giving fuzzy digit straightway with
The situation analysis figure that image resolution ratio increases and changed.
Embodiment
In conjunction with the accompanying drawings, the present invention is further explained in detail.
When BDSS recognizers are completed to widthIt is highDigital picture in fuzzy digit straightway (BDSS) identification,
BDSS saves as recognition result in the form of gathering.
For any BDSS, defined according to BDSS, shown in Fig. 2 (a) and Fig. 2 (b) of the similar brief description of the drawings of its form.Fig. 2
(a) pixel group represented with Fig. 2 (b) with square respectively show a BDSS, and Fig. 2 (a), which represents to rotate to former coordinate system, to be turned
Coordinate system is changed, Fig. 2 (b) represents conversion coordinate system rotating back to former coordinate system.It is an object of the present invention to according to given one
BDSS, by the calculating based on mathematical principle, obtain as shown in Fig. 2 (a), by straight line l1, l2, l3And l4The rectangle being crossed to form
Frame is in the digital picture for identifying the BDSS, the offset of corresponding pixel.One boundary point of every straight-line pass, and l1, l2
It is parallel with BDSS directions θ, l3, l4It is vertical with θ.
The collection for determining pixel according to offset is collectively referred to as rectangular shaped rim, the various pixels beyond the present invention can be used to repair
Change method, the value of pixel contained by rectangular shaped rim is changed in identification BDSS digital picture to identify BDSS.
For a given BDSS, the digital picture for identifying BDSS is mapped asCoordinate centralization Middle pixel
Coordinate system corresponding to centre coordinateRepresented in fig. 2 by orthogonal arrow straight line, the arrow for indicating x represents x-axis just half
Axle.For any pixel p ∈ BDSS, if p offset is d, its centre coordinate calculates according to formula (1):
By the centre coordinate of BDSS pixels, BDSS mean center can be calculatedWith solid dot in Fig. 2
With character markAccording to linear regression theory, and BDSS direction θ ∈ [0, π) calculated by formula (2):
N is sum of all pixels contained by BDSS.
L in Fig. 2 (a)1And l2It is parallel, l1And l2WithThe smaller angle of middle x-axis positive axis is θ.According to θ and BDSS pixels
Though centre coordinate can directly calculate l1, l2, l3And l4Parameter and intersection point, but calculating process is more complicated, and enforcement difficulty is larger.
The present invention has evaded direct calculating l1, l2, l3And l4The conventional method of intersection point, by translating with rotating coordinate system simultaneously
The minimum and maximum coordinate value of BDSS in coordinate system after conversion is calculated, completes the calculating of rectangular shaped rim.Translation be byOriginal
Point is moved to BDSS mean center, and rotation is rotate counterclockwiseX-axis positive axis, and ensure postrotational x-axis positive axis
Angle with former x-axis positive axis is θ, and the coordinate system obtained by this translation and rotation is referred to as changing coordinate system, is denoted asFigure
In 2 (a),Represented by orthogonal arrow straight line, the arrow for indicating x ' represents x-axis positive axis, and the arrow for indicating y ' represents
Y-axis positive axis, curved arrow dotted line fromOrigin points toOriginRepresenting willOrigin translation extremelyWithX-axis
The angle of positive axis is θ, and direction of rotation is represented by curved arrow solid line.BDSS pixels existIn coordinate be referred to as change coordinate.
ForIt changes coordinateCalculated according to formula (3):
In, because origin is located at BDSS mean center, there are four extreme values in BDSS pixels conversion coordinate, i.e., horizontal
Coordinate maximum x 'lmax, abscissa minimum value x 'lmin, ordinate maximum y 'wmaxWith ordinate minimum value y 'wmin。In deposit
In corresponding conversion coordinate (x 'lmax, 0), (x 'lmin, 0), (0, y 'wmax) and (0, y 'wmin) pixel, these pixels are referred to as side
Boundary's point, with solid dot and coordinates logo boundary point is changed in Fig. 2 (a).
Pass through boundary point, θ, l1With l2It is parallel, l3With l4Parallel and l1With l3Vertical condition, for Fig. 2 (a)Middle institute
Situation about showing, rectangular shaped rimDefinition provided by formula (4):
Wherein dm=dist (p '(x′,y′),lm), m=1,2,3,4, dist (p '(x′,y′),lm) represent from p '(x′,y′)Do and lm
Vertical straight line, vertical line and lmIntersection point to p '(x′,y′)Euclidean distance.
For Fig. 2 (a)Shown in situation,Actually it is made up of four line segments, formula (4) can be by formula (5) and formula
(6) substitute:
Formula (5) and formula (6) sets forth l1And l2On, l3And l4OnThe conversion coordinate of pixel.Pass throughPixel turns
Coordinate is changed, its pixel-shift amount can be calculated, the value of respective pixel in identification BDSS digital picture can be changed by offset.
Calculating the process of offset includes calculating offset according to conversion coordinating calculating center coordinate and according to centre coordinate successively.
According to conversion coordinating calculating center coordinate, equivalent to pass through byOrigin translation returnIt is original, and clockwise
RotationMiddle x-axis positive axis is extremelyX-axis positive axis, willIt is reduced toIn Fig. 2 (b) of brief description of the drawings,By being mutually perpendicular to
Arrow straight line represent, indicate x ' arrow represent x-axis positive axis, indicate y ' arrow represent y-axis positive axis,By orthogonal
Arrow straight line represents that the arrow for indicating x represents x-axis positive axis, fromOriginPoint toThe curved arrow dotted line of origin represents origin
Translation, fromX-axis positive axis point toX-axis positive axis curved arrow solid line represent rotate counterclockwise.Reduction process needs
The conversion coordinate of origin, its conversion coordinate are
For Its centre coordinateCalculated according to formula (7):
According toThe centre coordinate of pixel, forThe offset d of pixel is calculated by formula (8):
Pass throughThe offset of pixel, you can changed in the digital picture used in identification BDSSThe value of pixel, so as to
Complete mark fuzzy digit straightway BDSS purpose.
Specifically, the embodiment of computational methods of the present invention is completed by writing computer program.
Program input includes:One BDSS, identify digital picture used in BDSS and its widthAnd heightWherein
BDSS pixel is represented with the accompanying drawing data structure shown in Fig. 3 that is right.Fig. 3 illustrates Point classes, and its attribute includes being used to store partially
The Deviation of shifting amount, it is respectively used to storage center coordinate abscissa x attribute XtoImageCenter and ordinate y category
Property YtoImageCenter, be respectively used to storage conversion coordinate abscissa x attribute XtoCollectionCenter and ordinate
Y attribute YtoCollectionCenter.Attribute Deviation data type is integer, is represented with integer, other
The data type of Point generic attributes is double-precision floating pointses, is represented with double.
Program output is to be calculated according to input BDSS, the pixel set defined by formula (4).
Program includes eight steps, sees Fig. 4 of brief description of the drawings.Eight steps are now introduced successively.
Step 1:In coordinates computed centralization image space, the centre coordinate of the Point objects in respective coordinates space.
Digital picture is mapped to image spaceAccording toThe index value of middle pixel, inputWithIt can calculate
To the offset and coordinate centralization of each Point objectsFor offset be d Point objects, its centre coordinate according to
Formula (1) calculates, and the abscissa x and ordinate y of centre coordinate are respectively with attribute XtoImageCenter and YtoImageCenter
Preserve.
Step 2:According to Point object coordinates in BDSS, mean center is calculated, and its direction θ is calculated using linear regression.
Each Point object centers coordinate in the BDSS calculated according to step 1, calculate BDSS mean centerBased on linear regression theory, according to formula (2) calculating BDSS direction θ.Idiographic flow is shown in the figure of brief description of the drawings
6。
Step 3:By the origin translation of coordinate space corresponding to coordinate centralization to mean center, and x-axis positive axis is revolved
Go to and overlapped with θ, calculate the conversion coordinate of Point objects in BDSS.
The conversion coordinate of Point objects calculates according to formula (3), changes the abscissa x and ordinate y of coordinate respectively with attribute
XtoCollectionCenter and YtoCollectionCenter is preserved.
Step 4:Boundary point is calculated according to the conversion coordinate of Point objects in BDSS.
Middle BDSS coordinates extreme value is to change coordinate by comparing all Point objects in BDSS
XtoCollectionCenter property values and YtoCollectionCenter attributes are worth to.According to the extreme value for comparing to obtain,
Boundary point (x ' in Fig. 2 of the similar brief description of the drawings of generationlmax, 0), (x 'lmax, 0), (0, y 'wmax) and (0, y 'wmax) Point pairs
As.These boundary points are to complete the basis that step 5 and step 6 calculate.
Step 5:The Point objects of the boundary line parallel to direction θ are generated, and calculates it and changes coordinate.
L in corresponding diagram 2 is generated according to formula (5)1And l2Point objects, idiographic flow is shown in Fig. 6 of brief description of the drawings.Boundary point
Coordinate use variable X respectivelystart, Xend, YstartAnd YendPreserve.With the boundary point (x ' in Fig. 2 of brief description of the drawingslmax, 0),
(x′lmin, 0), (0, y 'wmax) and (0, y 'wmin) exemplified by, Xstart, Xend, YstartAnd YendValue be respectively x 'lmin, x 'lmax,
y′wminWith y 'wmax, i.e. abscissa x minimum value and maximum, ordinate y minimum value and maximum.Keeping YstartWith
YendConstant and XstarNo more than XendOn the premise of, with XstartTo change coordinate abscissa x initial value and circulating X every timestartFrom
Increase 1 mode, circulation generation conversion coordinate is respectively (Xstart,Ystart) and (Xend,Ystart) two Point objects.It will follow
All Point objects are stored in rectangular shaped rim caused by ring.
Step 6:The Point objects perpendicular to direction θ boundary line are generated, and calculates it and changes coordinate.
L in corresponding diagram 2 is generated according to formula (6)3And l4Point objects, idiographic flow is shown in Fig. 7 of brief description of the drawings.Use side
Boundary point abscissa x minimum value reinitializes variable Xstart, keeping XstartAnd XendConstant and YstartNo more than YendBefore
Put, with YstartTo change coordinate abscissa y initial value and circulating Y every timestartFrom the mode for increasing 1, circulation generation conversion coordinate
Respectively (Xstart,Ystart) and (Xstart,Yend) two Point objects.All Point objects caused by circulation are stored in
In rectangular shaped rim.
Step 7:According to the conversion coordinate of generated Point objects, its centre coordinate is calculated.
For all Point objects in rectangular shaped rim, the calculating of its centre coordinate is completed according to formula (7).
Step 8:According to the centre coordinate of generated Point objects, calculate its offset and offset is saved as into result
Output.
For all Point objects in rectangular shaped rim, the calculating of its offset is completed according to formula (8).
According to output result, pixel amending method can be used, rectangular shaped rim is changed in identification BDSS digital picture
The value of contained pixel is to identify fuzzy digit straightway BDSS.
It is divided into two below and introduces beneficial effects of the present invention, Part I is the intuitive visual effect of the inventive method;
Part II is analyzed for computational efficiency:
1st, visual effect:
Fig. 8 to Figure 10, which illustrates, to be identified given BDSS result figure using the inventive method (rectangular shaped rim is with 1 picture in figure
The wide black line of element, white line, the line segment that the laminated structure of black line forms represent).Fig. 8 into Figure 10, the resolution ratio of digital picture according to
Secondary is 128 × 128,256 × 256 and 512 × 512.After paying attention to image resolution ratio change, the BDSS of input can also change, this hair
The output of bright method can change therewith, be not amplification identical result.Fig. 8 to Figure 10 is used to illustrate to improve with resolution ratio, calculates
The background pixel of method pollution is accordingly reduced, visual to be experienced as the background that frame blocks and tail off, and is easier to differentiate mutually folded
The BDSS added.
Compare result shown in Fig. 8 to Figure 10 and result shown in Fig. 1, it is easy to show that the inventive method is not changing the back of the body significantly
On the premise of scene element, given BDSS is clearly designated, the algorithm ID resolution that can be just think according to Fig. 1 (c) displayings
The relatively low image of rate, such as Fig. 8, then it can be represented by the BDSS of the inventive method mark with the rectangle of monochrome filling, so as to cause
Human eye can not recognize BDSS background areas.With the rising of identified digital image resolution, the inventive method changes pixel
Quantity and the ratio between image whole pixel rapid decrease, its visual effect be rendered as in high rate image respectively, what the present invention identified
BDSS backgrounds are easier to observe, such as Figure 10, even small image in different resolution, the inventive method to the occupancy of image background also compared with
It is limited, such as Fig. 8.
2nd, computational efficiency:
Figure 11 of brief description of the drawings to Figure 13 block diagram illustrate described in embodiment eight steps consumption when
Between, pay attention to Figure 11 to the logarithm that Figure 13 longitudinal axis unit is cpu clock periodicity.Figure 11 presses image to Figure 13 transverse axis first
Cameraman, lena, house and puzzle order from left to right arrange, for each width figure, then by rate 128 respectively ×
128,256 × 256 and 512 × 512 order from left to right arranges.By taking Figure 11 as an example, transverse axis comment " image
It is 128 × 128 that column above cameraman " from left to right corresponds to rate respectively respectively, 256 × 256 and 512 × 512 consumption
When.The region representation different step of different colours is time-consuming in each column, and region is bigger, then the step takes more, column
Higher, then total time-consuming is more.The each square of same column from the bottom to top in Figure 11 to Figure 13 represents specific embodiment party successively
The time that each step of step 1 to step 8 described in formula is consumed.Figure 11, which is illustrated, averagely to be taken, i.e., to a width digitized map
Each step of mark and total time-consuming average value of all given BDSS as in.Figure 12 illustrates maximum and taken, i.e., to width numeral
Each step and total time-consuming in the marks of the BDSS with most Point objects given in image.Figure 13 illustrates minimum and taken, i.e.,
Each step and total time-consuming in being identified to the BDSS with minimum Point objects given in a width digital picture.Figure 11-13 is aobvious
Show the time-consuming distribution of different step in varied situations, for illustrating that algorithm core procedure 5,6,7 is time-consuming less.
By observing Figure 11 to Figure 13, step 8 shared region in multiple columns is most, i.e., the step is most time-consuming.This is
It is converted into meeting caused by subsequent treatment form because step 8 computation complexity is higher, and by rectangular shaped rim.For each
Point objects, 4 multiplication and 6 sub-addition computings to be completed according to formula (7) step 7, and step 8 need to complete 1 multiplication, removed for 2 times
Method, 3 sub-additions and 2 rounding operationsAlthough step 8 operation times are slightly smaller, its be related to it is mostly be division and round it is such
More complicated computing.Step 5 and step 6 for calculating rectangular shaped rim are generally taken less than step 3 and step in Figure 11 to Figure 13
Rapid 4, particularly when BDSS includes less Point objects, i.e., shown in Figure 13.This has reacted the inventive method from efficiency and has implemented letter
The characteristics of single, because step 5 is to produce the key step of rectangular shaped rim with step 6, because its implementation process is not directed to complicated fortune
Calculation or data structure, with other steps, compared with step 8, step 5 takes less particularly step 7 with step 6.
Figure 14 is the situation analysis figure that total time-consuming increases and changed with image resolution ratio, and total time-consuming is exactly to handle piece image
In the time-consuming summations of all BDSS.Figure 14 is illustrated from rate 128 × 128 to 512 × 512 respectively, at interval of 32 × 32 this hair
Bright computational methods total time-consuming situation, notice that Figure 14 transverse axis illustrate only the one-dimensional size of image.By above-mentioned rate respectively sequentially, i.e.,
128,160,192 ..., image cameraman, lena, house and puzzle different resolution version is taken with filled circles
Point mark uses the straightway with same line section shape to connect in fig. 14, for the round dot of identical content but different rate images respectively
Connect, specific line segment shape explanation refers to Figure 14.Four lines in Figure 14 are substantially linear, i.e., it is time-consuming with resolution ratio substantially into
Direct ratio, wherein typically image cameraman time-consuming distribution, although image lena and image puzzle time-consuming distribution rises
Volt is very big but smaller with the difference of ideal line from the angle analysis of linear regression, its distribution.
In Figure 14, image house time-consuming distribution increases with resolution ratio, downward trend occurs, but due to other images
Do not occur this trend, house situation is only some phenomena.To sum up, by Figure 14 time-consuming distribution, the present invention is not found
Method increases with resolution ratio, hence it is evident that time-consuming non-linear quick increased situation is presented, i.e. the inventive method takes and resolution ratio base
This linear stable increase.This illustrates that the performance of computational methods of the present invention is more efficient.
Claims (7)
- A kind of 1. method for being used in reference numbers image give fuzzy digit straightway, it is characterised in thatWhen fuzzy digit straightway BDSS recognizers are completed to widthIt is highDigital picture in fuzzy digit straightway BDSS Identification, fuzzy digit straightway BDSS save as recognition result in the form of pixel set;The fuzzy digit straightway BDSS given according to recognition result, is calculated its geometry linear characteristic, is met using slope The rectangular shaped rim mark given pixel set of the geometry linear characteristic;Specifically include following steps:Step 1:In coordinates computed centralization image space, respective coordinates spaceCentre coordinate;Step 2:According to the centre coordinate of pixel in fuzzy digit straightway BDSS, mean center is calculated, and use linear regression Calculate fuzzy digit straightway BDSS direction θ;Step 3:Calculate the conversion coordinate of pixel in fuzzy digit straightway BDSS:By coordinate space corresponding to coordinate centralization Origin translation to mean center, and x-axis positive axis is rotated to θ and overlapped;Step 4:Fuzzy digit straightway BDSS is calculated according to the conversion coordinate of pixel in fuzzy digit straightway BDSS changing Coordinate systemIn four boundary points;Step 5:Generate the boundary line parallel to direction θWithAnd calculate it and change coordinate, boundary lineWithPass through respectively Two of which boundary point in step 4;Step 6:Generation is perpendicular to direction θ boundary lineWithAnd calculate it and change coordinate, boundary lineWithPass through respectively Two other boundary point in step 4, straight lineWithIt is crossed to form rectangular shaped rim;Step 7:The conversion coordinate generated according to step 5 and 6, calculates its centre coordinate;Step 8:The centre coordinate generated according to step 7, calculate its offset and offset is saved as into result output.
- 2. the method for being used in reference numbers image give fuzzy digit straightway as claimed in claim 1, it is characterised in that: In step 1 and 2, the digital picture for identifying fuzzy digit straightway BDSS is mapped asCoordinate centralizationFor any picture Plain p ∈ BDSS, if p offset is d, its centre coordinate calculates according to formula (1):By the centre coordinate of BDSS pixels, BDSS mean center is calculatedAccording to linear regression theory, and BDSS direction θ ∈ [0, π), calculated by formula (2):Wherein i=1,2...n, n are sum of all pixels contained by BDSS.
- 3. the method for being used in reference numbers image give fuzzy digit straightway as claimed in claim 2, it is characterised in that: In step 3, forIt changes coordinateCalculated according to formula (3):<mrow> <mfenced open = "{" close = ""> <mtable> <mtr> <mtd> <mrow> <msup> <mi>x</mi> <mo>&prime;</mo> </msup> <mo>=</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>-</mo> <mover> <mi>x</mi> <mo>&OverBar;</mo> </mover> <mo>)</mo> </mrow> <mi>cos</mi> <mi>&theta;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mi>y</mi> <mo>-</mo> <mover> <mi>y</mi> <mo>&OverBar;</mo> </mover> <mo>)</mo> </mrow> <mi>sin</mi> <mi>&theta;</mi> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <msup> <mi>y</mi> <mo>&prime;</mo> </msup> <mo>=</mo> <mo>-</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>-</mo> <mover> <mi>x</mi> <mo>&OverBar;</mo> </mover> <mo>)</mo> </mrow> <mi>sin</mi> <mi>&theta;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mi>y</mi> <mo>-</mo> <mover> <mi>y</mi> <mo>&OverBar;</mo> </mover> <mo>)</mo> </mrow> <mi>cos</mi> <mi>&theta;</mi> </mrow> </mtd> </mtr> </mtable> </mfenced> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>3</mn> <mo>)</mo> </mrow> <mo>.</mo> </mrow>
- 4. the method for being used in reference numbers image give fuzzy digit straightway as claimed in claim 3, it is characterised in that: In step 4, coordinate system is changedIn four boundary points by compare conversion coordinate all abscissa x and ordinate y obtain.
- 5. the method for being used in reference numbers image give fuzzy digit straightway as claimed in claim 4, it is characterised in that: Coordinate spaceThe conversion coordinate of origin beIn step 7, for Its centre coordinateCalculated according to formula (7):
- 6. the method for being used in reference numbers image give fuzzy digit straightway as claimed in claim 5, it is characterised in that: In step 8, forThe offset d of pixel is calculated by formula (8):In, because origin is located at BDSS mean center, there are four extreme values, i.e. abscissa most in BDSS pixels conversion coordinate Big value x 'lmax, abscissa minimum value x 'lmin, ordinate maximum y 'wmaxWith ordinate minimum value In there is right Coordinate (x ' should be changedlmax, 0), (x 'lmax, 0), (0, y 'wmax) and (0, y 'wmax) pixel, these pixels be step 4 described in Boundary point;Wherein,Represent rectangular shaped rim, rectangular shaped rimDefinition provided by formula (4):WhereinRepresent from p′(x ', y ')Do withVertical straight line, vertical line withIntersection point to p '(x ', y ')Euclidean distance.
- 7. the method for being used in reference numbers image give fuzzy digit straightway as claimed in claim 6, it is characterised in that: Formula (5) and formula (6) are respectivelyWithOn,WithOnThe conversion coordinate of pixel:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510137710.3A CN104751177B (en) | 2015-03-26 | 2015-03-26 | A kind of method for being used in reference numbers image give fuzzy digit straightway |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510137710.3A CN104751177B (en) | 2015-03-26 | 2015-03-26 | A kind of method for being used in reference numbers image give fuzzy digit straightway |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104751177A CN104751177A (en) | 2015-07-01 |
CN104751177B true CN104751177B (en) | 2018-01-12 |
Family
ID=53590830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510137710.3A Active CN104751177B (en) | 2015-03-26 | 2015-03-26 | A kind of method for being used in reference numbers image give fuzzy digit straightway |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104751177B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105513044B (en) * | 2015-11-20 | 2018-07-17 | 常州大学 | A kind of digital direct straight line segments recognition method based on statistical measures linear feature |
Citations (4)
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 |
CN102156884A (en) * | 2011-04-25 | 2011-08-17 | 中国科学院自动化研究所 | Straight segment detecting and extracting method |
CN102819743A (en) * | 2012-08-14 | 2012-12-12 | 常州大学 | Detection method for quickly identifying straight-line segments in digital image |
CN103150741A (en) * | 2012-11-30 | 2013-06-12 | 常州大学 | Method for rapidly skeletonizing graph of binary digital image |
-
2015
- 2015-03-26 CN CN201510137710.3A patent/CN104751177B/en active Active
Patent Citations (4)
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 |
CN102156884A (en) * | 2011-04-25 | 2011-08-17 | 中国科学院自动化研究所 | Straight segment detecting and extracting method |
CN102819743A (en) * | 2012-08-14 | 2012-12-12 | 常州大学 | Detection method for quickly identifying straight-line segments in digital image |
CN103150741A (en) * | 2012-11-30 | 2013-06-12 | 常州大学 | Method for rapidly skeletonizing graph of binary digital image |
Non-Patent Citations (1)
Title |
---|
一种新的不规则直线段识别方法;李沛等;《光学技术》;20100315;第295-301页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104751177A (en) | 2015-07-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Simo-Serra et al. | Real-time data-driven interactive rough sketch inking | |
CN107610200B (en) | Character library rapid generation method based on characteristic template | |
CN101923707B (en) | Watershed algorithm-based high spatial resolution multi-spectral remote sensing image segmentation method | |
CN107564087A (en) | A kind of Three-D linear symbol rendering intent based on screen | |
CN106960451A (en) | A kind of method for lifting the weak texture region characteristic point quantity of image | |
CN102567731A (en) | Extraction method for region of interest | |
CN104952102B (en) | Towards the unified antialiasing method of delay coloring | |
CN104376535A (en) | Rapid image repairing method based on sample | |
CN106971404A (en) | A kind of robust SURF unmanned planes Color Remote Sensing Image method for registering | |
Du et al. | Segmentation and sampling method for complex polyline generalization based on a generative adversarial network | |
CN106408626A (en) | Graphics processing systems | |
US20200279415A1 (en) | Efficiently Computed Distance Fields | |
CN107506765A (en) | A kind of method of the license plate sloped correction based on neutral net | |
CN104751463B (en) | A kind of threedimensional model optimal viewing angle choosing method based on sketch outline feature | |
CN105447452A (en) | Remote sensing sub-pixel mapping method based on spatial distribution characteristics of features | |
CN106023276A (en) | Pencil drawing making method and pencil drawing making device based on image processing | |
CN110232693A (en) | A kind of combination thermodynamic chart channel and the image partition method for improving U-Net | |
Li et al. | ColorSketch: A drawing assistant for generating color sketches from photos | |
CN111179193A (en) | Dermatoscope image enhancement and classification method based on DCNNs and GANs | |
Shen et al. | A progressive method for the collapse of river representation considering geographical characteristics | |
Zhou et al. | Identifying designs from incomplete, fragmented cultural heritage objects by curve-pattern matching | |
CN109636894A (en) | A kind of dynamic 3 D thermal calculation method and system based on pixel rasterizing | |
Wei et al. | Domain-based structure-aware image inpainting | |
Oka et al. | Vectorization of contour lines from scanned topographic maps | |
CN105023288B (en) | Collimation error removing method of the two-dimensional vector solid line in three-dimensional scenic |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20230414 Address after: Room 306, Block C, Tianrun Technology Building, Changzhou Science and Education City, No. 18-3 Changwu Middle Road, Wujin District, Changzhou City, Jiangsu Province, 213000 Patentee after: Changzhou Jingxun Micro Information Technology Co.,Ltd. Address before: Gehu Lake Road Wujin District 213164 Jiangsu city of Changzhou province No. 1 Patentee before: CHANGZHOU University |