Embodiment
In daily life, we anytime anywhere in the identification of carrying out geometric configuration, are accustomed to, and are not bothered.But at area of pattern recognition, it is very low that the ability that allows machine discern geometric configuration remains.
Humans and animals with visual capacity all has the ability of identification geometric configuration, and in the existence basic activity, conscious or automatic had a this ability.This ability derives from thinking in images, and thinking in images is by perception presentation information, calls the vivid knowledge (presentation, image, experience etc.) in the brains, by thinking activities such as analysis, comparison, conclusion, the imaginations, finishes the understanding to things essence.With existing Geometric Shape Recognition technology contrast, these thinking activities are not used the complex mathematical theory, do not have the calculating of large amount of complex yet, but succinctly, fast and effectively.IQ with animal has objectively illustrated to have simplification, plane geometric shape description efficiently and recognition methods with regard to the correct identification geometric configuration of energy.
Simulation thinking in images, the character description method that designs a kind of plane geometric shape is a core concept of the present invention.According to the direct impression of the mankind to Geometric Shape Recognition, thinking in images is the contour feature by direct perception geometric configuration border as can be known, realizes the memory (description) to geometric configuration.Calculate the unique point on plane geometric shape border with mathematical method, ask for characteristic point information.Draw the advantage of thinking in images, overcome can not quantificational description shortcoming.With the accurate description of group of feature point information realization to the plane geometric shape principal character.
Simulation thinking in images is extracted the common characteristic of a class plane geometric shape and is realized that the classification and the retrieval of plane geometric shape are another main thought of the present invention.Thinking in images is particularly deep to the memory (description) of the feature such as protruding, recessed of geometric configuration.Simulate this feature, from a group of feature point information, extract the statistical information of describing the plane geometric shape global feature, realize classification and retrieval plane geometric shape.
Embodiment 1:
As shown in Figure 1, present embodiment provides a kind of character description method of plane geometric shape, may further comprise the steps:
Step 101, the boundary curve to the plane geometric shape that obtains calculates according to a certain direction, and knows the curvature information of each point on the boundary curve;
Can be clockwise or counterclockwise, can be from more arbitrarily, to border curve calculation curvature.According to the definition of curvature as can be known, along the curvature of different directions computation bound curve, the sign that obtains the result is different, and absolute value is identical.After the selected calculated direction, can not change; At the tie-point of two sectional-continuous functions, when two functions at the tie-point place, when derivative was discontinuous, the curvature of this point was the plus or minus infinity.
Step 102, ask for the reference point of described plane geometric shape boundary curve; Described reference point is included under rotation, the Pan and Zoom situation, with constant point or the initial point under rectangular coordinate system of border relative position;
Utilize plane geometric shape border or area information can calculate various reference point with translation, rotation, convergent-divergent unchangeability, ask for the boundary curve geometric center and have least amount calculation, therefore, setting boundary curve unit's arc length quality is 1, asking the mass centre of boundary curve, is exactly the boundary curve geometric center.When according to said method asking for the plane geometric shape reference point, also obtained another intermediate parameters: plane geometric shape border arc length.
Step 103, ask on the described plane geometric shape boundary curve, indicate the unique point of curved transition feature; Especially obtain curvature extreme point on the boundary curve, curvature and be at least one point at the infinite a little bigger and constant curvature place of plus or minus, as unique point; Described unique point further comprises: at least one point of curvature monotony variation place.
From more arbitrarily, along the direction of computation bound curvature of curve, search principal character point on boundary curve, coordinate, type code, the curvature of acquisition principal character point.The principal character point comprises: curvature extreme point, curvature are that plus or minus is infinite a little louder, the point at constant curvature place, also can comprise the point of curvature monotony variation place.The point at monotone variation place is in order to describe the careful feature of plane geometric shape and to describe very complex plane geometric configuration.The point at search monotone variation place comprises: tangent line is crossed the point on the boundary curve at center; Reference point plays the point of point vector Rotate 180 degree to the monotone variation segmentation; The mid point that separates the monotone variation section by above-mentioned principal character point.
Step 104, according to described unique point and described reference point and described curvature information calculated characteristics dot information, and according to the feature of the described plane geometric shape of a group of feature point information description that calculates.
The calculating of characteristic point information comprises:
With the reference point is limit, and the polar coordinates vector of calculated characteristics point comprises extreme value, polar angle;
The type code of unique point is set;
The supplementary features code of difference calculated characteristics point:
The supplementary features code of the protruding or concave point in the T1 category feature point is set to: the mean curvature of unit arc length before and after the unique point;
The supplementary features code of the straight-line segment in the T2 category feature point is set to: the ratio of length of straigh line and plane geometric shape boundary length, and the supplementary features code of arc section is set to: central angle;
The supplementary features code at the inside and outside point of contact in the T3 category feature point is set to 0;
The supplementary features code of the inside and outside waypoint of monotone variation in the T4 category feature point is set to: the arc length between adjacent two waypoints and the ratio of plane geometric shape boundary length;
The supplementary features code that the monotone variation of T5 category feature point is described point is set to: curvature monotony changes the ratio of segment boundary arc length and plane geometric shape boundary length.
The radius-of-curvature of calculated characteristics point.
Characteristic point information can be realized the description to principal character point with other form in addition.For example be that the relative coordinate of initial point or reference point and principal character point coordinate can both reflect that the principal character point is at borderline relative position relation with the reference point.By contrast, the polar coordinates vector is still described the preferably selection of principal character point.
Feature according to the described plane geometric shape of a group of feature point information description that calculates comprises:
With each characteristic point information the local principal character that plane geometric shape is determined the direction border is described;
Press the cyclic ordering relation with a group of feature point information, each of description plane geometric shape determined the principal character on direction border.
Wherein T1 class, T2 category feature dot information can be realized the description of most of plane geometric shape principal character; T3 class, T4 category feature dot information can be realized the more description of complex region principal character of plane geometric shape, for example resemble helix curved boundary etc.; T5 category feature dot information can be realized further describing the monotone variation section.
Arrive this, a group of feature point information of acquisition has realized the feature description to plane geometric shape.
In order further to obtain the description to the plane geometric shape global feature, this method can further comprise:
Step 105, constitute the retrieving information of describing the plane geometric shape global feature by a described group of feature point information extraction various statistic;
The multiple information that has comprised plane geometric shape in the one group of feature point information is extracted and plane geometric shape translation, rotation, the irrelevant parameter of convergent-divergent, describes the common characteristic of inhomogeneity plane geometric shape.But the following parameter of selective extraction for example:
The ratio of maximum vector and minimum vector extreme value in the characteristic point information;
The number that has the salient point type in the characteristic point information;
The number that has the concave point type in the characteristic point information;
The number that has the straight-line segment type in the characteristic point information;
The number that has the arc section type in the characteristic point information;
The number that has interior point of contact or circumscribed vertex type in the characteristic point information;
The characteristic point information sum;
Or the like.
These information constitute retrieving information.
Step 106, constitute the characteristic information of describing plane geometric shape by described group of feature point information and retrieving information.
Further the retrieving information that extracts has been described the common characteristic of a class plane geometric shape.
Embodiment 2:
The embodiment of the invention realizes the feature description to this geometric configuration by geometric configuration shown in Figure 2 is asked for characteristic information.The mathematical description Y=F (X) of random geometry boundary curve.Be without loss of generality, boundary curve constitutes { y=f1 (x), y=f2 (x) ... y=fn (x) } by n piecewise continuous function.The flow process of characteristic information acquiring method comprises the steps: as shown in Figure 3
Step 301: obtain the mathematical description Y=F (X) of geometric configuration boundary curve shown in Figure 1, as shown in Figure 1, boundary curve constitutes { y=f1 (x), y=f2 (x), y=f3 (x), y=f4 (x) } by 4 piecewise continuous functions; Wherein f2 (x) is the circular arc of semicircle, and f4 (x) is a straight line; Any 1 p from the boundary curve, the curvature on the computation bound curve along clockwise direction, according to the definition of curvature, along the curvature of different directions computation bound curve, the sign that obtains the result is different.After the selected calculated direction, can not change; At the tie-point of two sectional-continuous functions, when two functions at the tie-point place, when derivative was discontinuous, the curvature of this point was the plus or minus infinity;
Step 302: the reference point of asking geometric configuration, described function Y=F (X) to geometric configuration boundary curve shown in Figure 2, ask the geometric center point of boundary curve, for geometric configuration, the various central points that utilize border or area information to calculate are different, for example the geometric center of the geometric center of boundary curve, region area, circumscribed circle central point etc.These points all have the relative unchangeability of rotation, convergent-divergent, translation, all can be used as the reference point of geometric configuration.After selected a kind of reference point, can not change; Because the calculated amount of boundary curve geometric center much smaller than the calculated amount of other reference point, so select to ask the geometric center point of boundary curve, is designated as P
c(x, y); The arc length S c of computational geometry shape border;
Step 303: obtain boundary curve curvature and equal the infinitely-great unique point of plus or minus (T1 class); Search curvature equals the segment of curve of constant, gets its arc length mid point and is decided to be unique point (T2 class); Ask the extreme point (T1 class) of boundary curve curvature; Except that curvature equals the segment of curve of constant, be that curvature monotony changes by T1, T2, T3, T4 category feature point boundary curve section separately, get its arc length mid point and be decided to be unique point (T5 class); T3, T4 category feature point are the unique points for very complicated geometry design; There is not such unique point in geometric configuration shown in Figure 4, the unique point of trying to achieve be designated as tp (x, y, t, k), x wherein, y is a characteristic point coordinates; T is that (1,2...5 is corresponding T1 respectively, T2...T5) for the extraction type of unique point; K is the curvature of unique point; By the beginning of the point of the p on the boundary curve, the unique point ordering to obtaining in the direction of the clock;
Step 304: calculated characteristics point tp (x, y, t, k) characteristic of correspondence dot information tz (l, s, t, m, r), l in the characteristic point information, s are polar extreme value and polar angle, t, m, r are additional curvature information, and wherein r is the unique point radius-of-curvature, m is unique point supplementary features codes, t is the unique point type code, and type code is defined as follows: { 0: salient point, 1: concave point (belonging to the T1 class), 2: the straight-line segment unique point, 3: arc section unique point (belonging to the T2 class), 4: circumscribed line feature point, 5: internal tangent unique point (belonging to the T3 class), 6: the outer segmentation feature point of monotone variation, 7: segmentation feature point (belonging to the T4 class) in the monotone variation, 8: monotone increasing unique point, 9: monotone decreasing unique point (belonging to the T5 class) }; Put in order by unique point, the calculation procedure of calculated characteristics dot information is as follows:
A) with geometric center P
cBe polar limit, by special following formula, the extreme value of calculated characteristics dot information and polar angle, tz.l=Sqrt ((tp.x-P
c.x) * (tp.x-P
c.x)+(tp.y-P
c.y) * (tp.y-P
c.y)); Tz.s=ArcTan ((tp.y-P
c.y)/(tp.x-P
c.x)); Sqrt represents the extraction of square root function in the formula, and ArcTan represents the tan of negating;
B) calculate characteristic of correspondence dot information tz.t, tz.m and tz.r (clockwise direction is asked curvature) according to unique point tp.t and tp.k;
As tp.t=1 (T1 class), tp.k<0 o'clock tz.t=0 (salient point); Tz.r=1/abs (tp.k); Tp.k>0 o'clock tz.t=1 (concave point); Tz.r=1/abs (tp.k); Tz.m=(tp point 0.5 arc length place tangent line angle-tp point 0.5 arc length place tangent line angle) forward backward;
When tp.t=2 (T2 class), tz.t=2 during tp.k=0 (straight-line segment unique point); Tz.m=length of straigh line/Sc; Tz.r=1/abs (tp.k); Tp.k>0 o'clock tz.t=3 (arc section unique point); The central angle of tz.m=arc section; Tz.r=1/abs (tp.k);
When tp.t=3 (T3 class), tp.k<0 o'clock tz.t=4 (circumscribed line feature point); Tz.r=1/abs (tp.k); Tp.k>0 o'clock tz.t=5 (internal tangent unique point); Tz.r=1/abs (tp.k); Tz.m=0;
When tp.t=4 (T4 class), tp.k<0 o'clock tz.t=6 (the outer segmentation feature point of monotone variation); Tz.r=1/abs (tp.k); Tp.k>0 o'clock tz.t=7 (segmentation feature point in the monotone variation); Tz.r=1/abs (tp.k); Tz.m=(intersegmental arc length/Sc);
When tp.t=5 (T5 class), tp.k<0 o'clock tz.t=8 (monotone increasing unique point); Tz.r=1/abs (tp.k); Tp.k>0 o'clock tz.t=9 (monotone decreasing unique point); Tz.r=1/abs (tp.k); Tz.m=(monotone variation section arc length/Sc).
The unique point of this routine geometric configuration and characteristic point information are clear signal as shown in Figure 4, only mark T1, T2 class.
Step 305: the retrieving information of step 301 being described the geometric configuration global feature to 304 group of feature point information extractions that calculate.Retrieving information is designated as js (k
1, n
t, n
a, n
z, n
y, n
q, n
s, o
T1, o
T2... o
Tnt).K wherein
1Be the ratio of maximum vector and minimum vector extreme value; n
tIt is the salient point number; n
aIt is the concave point number; n
zIt is the straight-line segment number; n
yIt is the arc section number; n
qIt is the point of contact number; n
sIt is the unique point sum; o
T1, o
T2... o
T5Be the sequence number by the characteristic point information of the big minispread of extreme value, wherein o
T1It is unique point sequence number with maximum vector extreme value; The retrieving information that present embodiment is selected is and geometric configuration translation, rotation, the irrelevant parameter of convergent-divergent;
Step 306: retrieving information js and a group of feature point information constitute the characteristic information of describing geometric configuration, are designated as TZ (js, tz
1, tz
2, tz
3...).
Embodiment 3:
Ask for characteristic information by the geometric configuration that not closed curve shown in Figure 5 is constituted, the illustrated planar geometric configuration can be by closed curve and not the combination in any of closed curve constitute; Characteristic information ask for process and above-mentioned steps is in full accord, unique difference is the mathematical description that closed curve is not constituted geometric configuration, if the mathematical description function of not closed curve shown in Figure 5 is y=fa (x), (a is b) between 2 in Fig. 5 for function definition.In that (a b) defines a function y=fb (x) again between 2, and fb (x)=fa (x) is arranged, and fa (x) and fb (x) have just constituted closed curve like this, and therefore, using the same method just can be in the hope of the characteristic information of this geometric configuration; In like manner, by closed curve and not the geometric configuration that constitutes of the combination in any of closed curve also can use the same method and ask for characteristic information.
Embodiment 4:
In order to further specify description and the application of method of the present invention to geometric configuration, simple geometric shape shown in Figure 6 is asked for characteristic information, only demand retrieving information js (k
l, n
t, n
a, n
z, n
y, n
q, n
s); (a) is triangle among Fig. 6; (b) be rectangle; (c) be circular;
Triangle character information: TZ
a(js (2,3,0,3,0,0,6), tz
1, tz
2, tz
3...);
Rectangular characteristic information: TZ
b(js (1.414,4,0,4,0,0,8), tz
1, tz
2, tz
3...);
Circular feature information: TZ
c(js (1,0,0,0,1,0,1), tz
1);
Retrieval confidence according to geometric configuration can accurately be differentiated geometric configuration; Have 3 salient points, 3 straight-line segments, what do not have the other types unique point is triangle; Have 4 salient points, 4 straight-line segments, what do not have the other types unique point is quadrilateral; Have only 1 arc section unique point, what do not have the other types unique point is circular; Utilize characteristic point information can further judge the detail characteristic of geometric configuration.
Embodiment 5
Referring to shown in Figure 7, present embodiment provides a kind of device that is used for the feature description of plane geometric shape, comprises scan module, reference point module, unique point module and describing module.
Scan module is used for according to a certain direction the boundary curve of the plane geometric shape that obtains is calculated, and knows the curvature information of each point on the boundary curve;
The reference point module is used to ask for the reference point of described plane geometric shape boundary curve; Described reference point is included under rotation, the Pan and Zoom situation, with constant point or the initial point under rectangular coordinate system of border relative position;
The unique point module is used to ask for described plane geometric shape boundary curve, indicates the unique point of curved transition feature;
Describing module is used for according to described unique point and described reference point and described curvature information calculated characteristics dot information, and according to the feature of the described plane geometric shape of a group of feature point information description that calculates.
This device also comprises classifying module, type code module and supplementary features code module, referring to shown in Figure 8.
Described classifying module is used for:
Extreme point, curvature for curvature are that plus or minus is infinite a little bigger, and it is T1 category feature point that such unique point is set;
Equal at least one point of the boundary curve section of constant for curvature, it is T2 category feature point that such unique point is set;
In the boundary curve section for the curvature monotony variation, tangent line is crossed the point of reference point, and it is T3 category feature point that such unique point is set;
In the boundary curve section for the curvature monotony variation, reference point has arrived the point of point vector Rotate 180 degree, and it is T4 category feature point that such unique point is set;
For what separate by above-mentioned 4 category feature points, and at least one point in the boundary curve section of curvature monotony variation, it is T5 category feature point that such unique point is set.
Described type code module is used for:
Give the type code of protruding or concave point for T1 category feature point;
Give the type code of straight-line segment or circular arc for T2 category feature point;
Give the type code at interior point of contact or outer point of contact for T3 category feature point;
Give the type code of outer waypoint of monotone variation or interior waypoint for T4 category feature point;
For T5 category feature point is given the type code that monotone variation is described point.
Described supplementary features code module is used for:
The supplementary features code of the protruding or concave point in the T1 category feature point is set to: the mean curvature of unit arc length before and after the unique point;
The supplementary features code of the straight-line segment in the T2 category feature point is set to: the ratio of length of straigh line and plane geometric shape boundary length, and the supplementary features code of arc section is set to: central angle;
The supplementary features code at the inside and outside point of contact in the T3 category feature point is set to 0;
The supplementary features code of the inside and outside waypoint of monotone variation in the T4 category feature point is set to: the arc length between adjacent two waypoints and the ratio of plane geometric shape boundary length;
The supplementary features code that the monotone variation of T5 category feature point is described point is set to: curvature monotony changes the ratio of segment boundary arc length and plane geometric shape boundary length.
Described unique point module comprises:
Computing unit is used for the arbitrfary point from the border, and the direction of boundary curve during along calculating curvature is calculated and obtained unique point;
The sequence number unit is used for according to the sequencing of the unique point that obtains on the border, for each unique point is set sequence number.
Described describing module comprises the characteristic point information unit that is used to obtain characteristic point information, and this characteristic point information unit comprises:
The polar coordinates subelement, the reference point that is used for plane geometric shape is polar limit, extreme value, the polar angle of calculated characteristics point pole coordinate vector;
Computation subunit is used for calculating acquisition unique point type code, supplementary features code and radius-of-curvature according to curvature information;
The sequence number subelement, the sequence number that is used to be provided with characteristic point information equals the sequence number of unique point;
The synthon unit is used for extreme value, polar angle and unique point type code, supplementary features code and radius-of-curvature constitutive characteristic dot information by a polar coordinates vector.
For integral body is described plane geometric shape, described device can further include retrieving information module and characteristic information module on the basis that comprises scan module, reference point module, unique point module, describing module, and its structure is referring to shown in Figure 9.
The retrieving information module is used to utilize a described group of feature point information extraction various statistic to constitute the retrieving information of describing the plane geometric shape global feature;
The characteristic information module is used to utilize described group of feature point information and retrieving information to constitute the characteristic information of describing plane geometric shape.
The characteristic information of the plane geometric shape that described device obtains is the complete description to plane geometric shape, wherein, a group of feature point information accurate description principal character on plane geometric shape border; Retrieving information has been described the global feature of plane geometric shape.
The embodiment of the invention by with a group of feature point information to the plane geometric shape feature description, solved many defectives that prior art exists.
At first, the embodiment of the invention is to borderline each principal character of plane geometric shape, all have a characteristic point information that it is described, quantitative description the distance of this unique point and reference point, with angle, unique point type, additional feature information and the radius-of-curvature of pole axis.Thereby solved in the prior art can not accurate description plane geometric shape a certain local feature defective.
Secondly, the embodiment of the invention is asked for a group of feature point information by the calculating to boundary information.Its calculated amount is asked for the calculated amount of characteristic information in the prior art by integral transformation or double integral, and computing method are more simple.
Again secondly, the embodiment of the invention is described the principal character on plane geometric shape border by the cyclic ordering relation in proper order with a group of feature point information.Under the situation of rotation, translation, convergent-divergent, realize the uniqueness of plane geometric shape principal character is described.Solved and do not had a theoretic one-to-one relationship between the characteristic information and plane geometric shape in the prior art and produce the wrong defective of differentiating.
Further, the embodiment of the invention constitutes retrieving information by the statistical information of a group of feature point information extraction reflection planes geometric configuration global feature, has described the common characteristic of a class plane geometric shape.Solved in the prior art defective that can not be described a class plane geometric shape common characteristic.Retrieving information has the function that improves recognition speed and the plane geometric shape information bank is retrieved.
In sum, compared with prior art, it is more accurate, more careful, more comprehensively that the plane geometric shape character description method of the embodiment of the invention has description, asks for characteristic information speed remarkable result faster.
The present invention is not limited to the embodiment described in the embodiment, and those skilled in the art's technical scheme according to the present invention draws other embodiment, belongs to technological innovation scope of the present invention equally.