Automatic fingerprint classification method
Technical Field
The invention relates to the technical field of computers, in particular to an automatic fingerprint classification method.
Background
Each person's fingerprint is unique and is often used to identify a person. Fingerprinting requires finding a given fingerprint among a large number of fingerprints in a fingerprint library. In order to reduce the search range, the fingerprints are classified firstly, and then the fingerprints of the same category are compared, so that the identification speed is increased.
The general fingerprint classification is performed through the following steps: and (4) fingerprint segmentation, calculating a block direction field, searching singular points and fingerprint classification.
First, fingerprint segmentation
The original fingerprint image (figure 1) is divided into a foreground part and a background part, and only the foreground is processed. The segmentation usually divides the fingerprint image into small blocks with the same size, and divides the blocks according to the characteristics of the image, such as gray scale, variance, direction consistency, contrast and the like, so as to generate a segmentation mask.
Secondly, calculating the direction field
According to the gray level change of the fingerprint image, the direction is calculated in a blocking mode, and a block directional diagram is generated (fig. 2).
Third, searching singular points
The localization of singularities usually employs directional rotation characteristics (Poincare index): in a certain point field, rotating a circle around a closed curve of the point, calculating the sum of the variable quantity of the direction rotation, wherein the direction variable quantity of the central point is 180, the direction variable quantity of the triangular point is-180, and the other positions are 0.
Four, fingerprint classification
The Henry classification mode classifies the fingerprints into five types according to the positions and the number of singular points, the direction field, the streak line tracking and the texture characteristics: left loop, right loop, bucket, arch, and pointed arch. They have the following characteristics:
the left skip-type grain line enters from the left side and exits from the left side, and has 1 central point and 1 triangular point (located on the right side of the central point);
the right skip-shaped grain line enters from the right side and exits from the right side, and has 1 central point and 1 triangular point (positioned on the left side of the central point);
the hopper shape has at least one grain line which rotates 360 degrees and has 2 central points and 2 triangular points;
one part of lines of the arch enters from one side of the fingerprint and goes out from the other side of the fingerprint without singular points;
the pointed arch shape is similar to the arch shape, and at least one grain line has a more obvious pointed arch, and has 1 central point and 1 triangular point (positioned right below a singular point).
When the fingerprint quality is low or the fingerprint is incomplete, singular point detection of the fingerprint is difficult or impossible to detect, the fingerprint cannot be directly judged to be the arch form without finding the singular point, and misjudgment is easily caused only by the singular point characteristics. At present, this problem is not well solved.
Disclosure of Invention
The invention aims to design an automatic fingerprint classification method. The method is not easily influenced by the quality of the fingerprints, and the fingerprints are divided into five types and an undecidable type according to the characteristics of the block directional diagram and the number and the positions of singular points (central points and triangular points) of the fingerprints.
In order to achieve the object, the present invention provides an automatic fingerprint classification method, comprising the steps of: the steps (1) to (4) are training processes (as shown in fig. 4) for generating a classification database (the number of direction blocks 4, the direction position of the direction block 4, and the direction position of the direction block 8, and the database cannot be determined), the classification database is updatable, and the steps (5) to (13) are testing processes, as shown in fig. 5:
(1) the training fingerprint images are manually classified into six types, and the fingerprints judged to be the first five types are trained. Dividing an H multiplied by W fingerprint image into blocks with the size of 16 multiplied by 16, wherein the images have bi multiplied by bj blocks in total, calculating the characteristics (4-direction block number and 8-direction position of a direction block), and storing the characteristics and the fingerprint type of a block directional diagram into a characteristic array feature (14 rows, wherein the 1 st row to the 4 th row respectively represent the 1 st block number in the direction, the 2 nd block number in the direction, the 3 rd block number in the direction, the 4 th block number in the direction, the 5 th row to the 13 th row store the 8-direction position of the centroid of each block, and the 14 th row is the fingerprint type);
(2) taking block directional diagram features (4-direction block number) and fingerprint types in feature array feature, deleting repeated rows, deleting rows with the same features (4-direction block number) but different types, and generating a 4-direction block number database class _ dire _ num (5 columns, which are respectively the direction 1 block number, the direction 2 block number, the direction 3 block number, the direction 4 block number and the fingerprint type);
(3) taking a feature array feature, deleting rows which can be classified according to the number of 4-direction blocks, calculating the 4-direction position (quadrant) of a direction block according to the 8-direction position of the direction block, deleting repeated rows, deleting rows which have the same features (the number of 4-direction blocks and the 4-direction position of the direction block) but different types, and generating a 4-direction position database class _ dire4 of the direction block (14 columns, 1 to 4 columns respectively represent the number of 1 direction block, 2 direction block, 3 direction block and 4 direction block, 5 to 13 columns store the 4-direction position of the centroid of each block, and 14 columns are fingerprint types);
(4) taking a feature array feature, deleting rows which can be classified according to 4-direction block number and 4-direction position of a direction block, deleting repeated rows, deleting rows which have the same feature (4-direction block number and 8-direction position of the direction block) but different types, generating a direction block 8-direction position database class _ di 8(14 columns, 1 to 4 columns respectively represent the direction 1 block number, the direction 2 block number, the direction 3 block number, the direction 4 block number, 5 to 13 columns store 8-direction positions of each block centroid, the 14 column is a fingerprint type), generating a database candjudge (of the same format as class _ di 8) which has the same feature (4-direction block number and 8-direction position) but different types;
(5) preprocessing the test fingerprint, and calculating the characteristics of a block directional diagram (the number of blocks in the 4 directions and the position of a direction block in the 8 directions);
(6) searching a 4-direction block number database class _ two _ num according to the 4-direction block number of the test fingerprint, if the 4-direction block number of the test fingerprint is found, outputting the fingerprint type, and finishing the test, otherwise, executing the step (7);
(7) calculating the direction position of a direction block 4 according to the direction position of a direction block 8 of the test fingerprint, searching a direction block 4 direction position database class _ two 4 according to the direction block number of 4 directions and the direction block 4 direction position, if the direction block number and the direction block 4 direction position are found, outputting the fingerprint type, finishing the test, otherwise, executing the step (8);
(8) searching a direction block 8 direction position database class _ dire8 according to the direction block number of 4 directions and the direction position of a direction block 8, if the direction block number and the direction position are found, outputting a fingerprint type, finishing the test, and if the direction block number and the direction position are not found, executing the step (9);
(9) searching a database cantjudge by using 4 direction block numbers and 8 direction positions of direction blocks, if a plurality of rows are found, storing possible types into a type array lx, otherwise, recording the type array lx (1) as 0 to show that the fingerprint with the characteristics does not appear in the training fingerprint;
(10) searching singular points, and recording the positions and the number of the blocks where the singular points are located;
(11) deleting the pseudo singular points;
(12) if no singular point is found, the range is expanded to search a central point;
(13) judging the fingerprint type according to a Henry classification method (number and position of singular points) and a type array lx, and judging that the fingerprint type cannot be judged.
The six types in the step (1) are 1, left skip type, 2, right skip type, 3 skip type, 4 arch type, 5, pointed arch type and 6, which cannot be judged;
the calculation of the block pattern features comprises the following steps:
a. calculating a block pattern dirbo by using a gradient method, and calculating a mask fmsk in blocks;
b. taking the four direction characteristic (as shown in fig. 6), the block directional diagram dirbo is changed into the block directional diagram dir4 (as shown in fig. 7) by
c. Generating a directional diagram 1 from a four-direction diagram dir4, calculating a connecting component of the corrosion rear direction diagram 1 (shown in fig. 8(a)) by using a disc-shaped structural element corrosion directional diagram 1 with the radius of 1, and calculating 8-direction positions pos8 (shown in fig. 9) of centroids of the connecting components (when the number of pixels in the connecting components is less than or equal to 4, the block is ignored); the number of blocks and centroid positions for directions 2, 3, 4 are similarly calculated (as shown in fig. 8(b),8(c),8 (d)), and stored in the feature array feature, one line for each fingerprint.
The method for calculating the direction position pos4 (1-4, respectively representing 1-4 quadrants, as shown in FIG. 10)) of the
direction block 4 in the step (3) according to the direction position pos8 of the
direction block 8 is that
The singular points in the step (10) comprise a central point and triangular points, and the method comprises the following steps:
a. singular point center point number singularcore and triangular point number singulardelta are initialized to 0;
b. for each block except for the image edge (first row, last row, first column, last column) in the fingerprint block pattern dirbo, the sum of the variance of the direction rotation Poincare is calculated (as shown in fig. 9):
△dk=dk-d(k+1)mod 8,k=0,1……7;
if Δ dk≥90,△dk=△dk-180;
If Δ dk≤-90,△dk=△dk+180;
c. If the Poincare values of block (i, j), block (i-1, j-1), block (i, j-1) are all 180, block (i, j) is a foreground block, and more than 5 blocks in 3 × 3 neighborhood are foreground blocks, the number of the center point is singularcore plus 1, and the position i, j is recorded in position arrays xx1 and yy 1;
d. if block (i, j), block (i-1, j) or block (i-1, j-2), block (i-1, j-1), Poincare value of-180 for block (i, j-1), block (i, j) is a foreground block, and more than 5 blocks in its 3 × 3 neighborhood are foreground blocks, the number of triangle points singulardelta is 0 or singulardelta is 1 and the distance from the previous triangle point is more than 3, the number of triangle points singulardelta is increased by 1, and position record i, j is in position arrays xx2 and yy 2.
The method for deleting the pseudo singular points in the step (11) is as follows:
a. for each block containing the central point, if the 5 multiplied by 5 domain contains a block with a Poincare value of-180, the block does not contain the central point, the number of the central points is singularcore minus 1, and the corresponding positions recorded in the position arrays xx1 and yy1 are deleted;
b. for each block containing triangular points, if the 5 x 5 field contains a block with a Poincare value of 180, the block does not contain the triangular points, the number of the triangular points is singulardelta minus 1, and the corresponding positions recorded in the position arrays xx2 and yy2 are deleted;
the step (12) of searching for a center point comprises the following steps:
for the block (i, j) whose Poincare value is 180 and not at the image edge ( row 1,2, line 1,2, column 2), the sum Poincare of the variation of the directional rotation is calculated as shown in fig. 11 (b):
△dk=dk-d(k+1)mod 8,k=0,1……7;
if Δ dk≥90,△dk=△dk-180;
If Δ dk≤-90,△dk=△dk+180;
If Poincare (i, j) ═ 180 and the center number singulare ═ 1, the position i, j is recorded in the position arrays xx1 and yy1, and step (13) is performed.
The step (13) of the classification method is as follows:
a. if the center point number singularcore is 2 or the triangular point number singulardelta is 2 and the type array lx contains 3 or the type array lx (1) is 0, the model is judged to be a funnel type;
b. if the center point number singularcore is 1 or the triangular point number singulardelta is 1, the type array lx has two elements, and one of the two elements is 4, the type array lx is judged to be the other type;
c. if the center point number singularcore is 0 and the triangular point number singulardelta is 0 and the type array lx contains the element 4, the arch is judged;
d. if the center point number singularcore is 1 and the triangle point number singulardelta is 0, judging according to the following method:
if the foreground of the left lower part or the right lower part of the central point is less than 5 blocks, the central point is not in an arch shape, but cannot be judged;
let s1 be the number of blocks of the lower left part of the center point, except the left boundary and the lower boundary, which is greater than-90 degrees and less than 0 degree, and s2 be the number of blocks of the lower right part of the center point, except the right boundary and the lower boundary, which is greater than 0 degrees and less than 90 degrees;
if s1 is less than 2 and the type array lx contains 1, judging the type to be a left skip type;
if s2 is less than 2 and the type array lx contains 2, judging the type to be a right skip type;
if s1-s 2> thre1, s2< thre2 and the type array lx contains 2, the model is judged to be a right skip type;
if s2-s1> thre3, s1< thre4 and the type array lx contains 1, the model is judged to be a left skip model;
if s1> thre5, s2> thre5 and the type array contains 3, judging the type to be a bucket type;
thre1, thre2, thre3, thre4, and thre5 are thresholds;
e. if the center point number singularcore is 0 and the triangular point number singulardelta is 1, calculating the relative position yy2(1)/bj (bj is the image width and unit block) of the triangular point position in the graph;
if yy2/bj is greater than thre6 and the type array lx contains 1, judging the type to be a left skip type;
if yy2/bj is less than thre7 and the type array lx contains 2, judging the type to be a right skip type;
thre6, thre7 as thresholds;
f. if the number of the center points is singularcore equal to 1 and the number of the triangular points is singulardelta equal to 1, calculating the included angle between the connecting line of the center points and the triangular points and the central line
The judgment is made as follows:
If pi/12 is greater than slope > -pi/12 and the type array lx contains 5, judging the shape to be a sharp arch shape;
if pi/12 is greater than slope > -pi/12 and the type array lx does not contain 5, s1 is the number of blocks of the lower left part of the center point, except the left boundary and the lower boundary, which is greater than-90 degrees and less than 0 degree, and s2 is the number of blocks of the lower right part of the center point, except the right boundary and the lower boundary, which is greater than 0 degree and less than 90 degrees;
if s1 is less than 2 and the type array lx contains 1, judging the type to be a left skip type;
if s2 is less than 2 and the type array lx contains 2, judging the type to be a right skip type;
if s1-s 2> thre1, s2< thre2 and the type array lx contains 2, the model is judged to be a right skip type;
if s2-s1> thre3, s1< thre4 and the type array lx contains 1, the model is judged to be a left skip model;
if s1> thre5, s2> thre5 and the type array lx contains 3, judging the type to be the bucket type;
thre1, thre2, thre3, thre4, and thre5 are the same as step d and are threshold values;
if slope is more than or equal to pi/12 and the type array lx contains 1, judging the type to be a left skip type;
if slope is less than or equal to-pi/12 and the type array lx contains 2, judging the type to be a right skip type;
g. if the a, b, c, d, e and f are not satisfied, the judgment is not possible.
Drawings
Fig. 1 is an original fingerprint image.
Fig. 2 is a block diagram.
Fig. 3 shows the mask, the foreground white and the background black.
Fig. 4 is a flow chart of the training process.
Fig. 5 is a flow chart of a test procedure.
Fig. 6 shows four directions of the directional diagram.
Fig. 7 is a four-way diagram, with directions 1 to 4, direction 1 being black, the color gradually becoming lighter, direction 4 being light gray, and the background being white.
Fig. 8 shows the respective patterns, in which (a) is pattern 1, (b) is pattern 2, (c) is pattern 3, and (d) is pattern 4.
Fig. 9 shows the 8-way position.
Fig. 10 shows the 4-way position.
Fig. 11 shows the fingerprint direction rotation characteristic, in which (a) is a 3 × 3 neighborhood and (b) is a 5 × 5 neighborhood.
Detailed Description
Examples
The flow of the present invention is as shown in fig. 2, the training fingerprint images are numbered, and the fingerprints manually determined as the first five types are trained, wherein the training process is as follows:
h x W fingerprint image is divided into 16 x 16 size blocks with block image height
The width of the block image is
For each 16 × 16 partition, the block direction and mask are calculated as follows:
Block gray contrast
(n1 is the number of points where the block median gray value is greater than or equal to the block median gray value avgb, n2 is the number of points where the block median gray value is less than the block median gray value avgb, t1 is the sum of all the point gray values where the block median gray value is greater than or equal to the block median gray value avgb, and t2 is the sum of all the point gray values where the block median gray value is less than the block median gray value avgb);
S
x,S
yis a Sobel operator;
block direction uniformity
Block direction
The block patterns are shown in FIG. 2;
background blocks when avgb < thre6, varb < thre7, zb < thre8, and cohb < thre9, otherwise foreground blocks, thre6, thre7, thre8, and thre9 are thresholds, and the mask fmsk is shown in fig. 3.
2. Calculating the characteristics of the block directional diagram, wherein the method comprises the following steps:
block four directions
The block four direction diagram is shown in FIG. 7;
diag1 ═ diag1 Θ se; etching diag1 with se, as shown in FIG. 8(a) in FIG. 1;
if the number n1 of pixels in the connected component is greater than 5, the 8-direction position pos8 of the center of mass of the connected component is calculated by:
xi, yi being pixels (i.e. blocks)Coordinates;
similarly, calculating a directional diagram 2, a directional diagram 3 and a directional diagram 4;
directional diagram 2:
etching diag2 with se, and after etching, as shown in fig. 2 (b) of fig. 8, the number n2 of the
pattern 2 pieces is 2;
directional diagram 3:
etching diag3 with se, and etching the 3-direction block number n3 being 2 (not calculated when the number n of pixels in the connected component is 4 or less) as shown in fig. 3 (c) of fig. 8;
and (4) directional diagram:
after etching diag4 with se, as shown in fig. 4 (d), the number n4 of
pattern 2 pieces is 2.
3. Generating a feature array feature:
feature(k,1)=n1;feature(k,2)=n2;feature(k,3)=n3;feature(k,4)=n4;
feature (k,14) ═ fingerprint type (1-5); storing 8-direction positions of the mass centers of the blocks in the 5 th to 13 th rows;
k is a training fingerprint number;
4. and generating a class _ dire _ num database with 4 directions of block numbers, wherein the method comprises the following steps:
taking the 1 st to 4 th columns and the 14 th column of the feature array feature to generate an array class _ two _ num (5 columns in total);
deleting the repeated row of the array class _ dial _ num;
deleting rows in the 1 st to 4 th columns of the class _ fire _ num, which are the same but different from the 5 th column.
5. The direction block 4 direction location database class _ dire4 is generated as follows:
copying a characteristic array: class _ dial 4 ═ feature;
deleting the rows which can be classified according to the number of 4-direction blocks by deleting the rows with the same 1 st to 4 th columns in the class _ dire4 and the 1 st to 4 th columns in the rows of the class _ dire _ num of the 4-direction block number database;
and 4, calculating the direction position of the direction block by converting the 5 th to 13 th column number pos8 in class _ dire 4:
deleting the array: class _ dire4 repeat the row;
the rows in the array class _ die 4 are deleted in the same way as in rows 1-13 but in different rows 14.
6. The method for generating the class _ dire8 and the undeterminable database cantJudge for the direction block 8 is as follows:
copying a characteristic array: class _ dial 8 ═ feature;
deleting the rows which can be classified according to the number of 4-direction blocks by deleting the rows with the same 1 st to 4 th columns in the class _ dire8 and the 1 st to 4 th columns in the rows of the class _ dire _ num of the 4-direction block number database;
deleting the lines which can be classified according to 4-direction positions, wherein the method comprises the following steps:
transforming the values pos8 of the 5 th to 13 th columns in class _ dire 8:
storing the data into a temporary array class _ dire8_ temp;
recording row number id of rows with the same 1 st to 13 th columns in the temporary array class _ dire8_ temp and the same 1 st to 13 th columns in the rows of the direction block 4 direction position database class _ dire 4;
deleting the line with the line number id in class _ dire 8;
deleting the array: class _ dire8 repeat the row;
copying an array: class _ dire 8;
deleting the rows of the array class _ share 8 with the same 1 st to 13 th rows but different 14 th columns to obtain a class _ share 8 of the direction block 8 direction position database.
The array cantjudge removes the row contained in class _ dire8, and obtains the undeterminable database cantjudge.
The test procedure was as follows:
1. preprocessing the test fingerprint, and calculating the characteristics of a block directional diagram (the number of blocks in the 4 directions and the positions of the direction blocks in the 8 directions), wherein the method comprises the steps 1 and 2 in the training process;
2. searching 1 st to 4 th columns of a class _ dire _ num in a 4-direction block number database according to 4-direction block numbers n1, n2, n3 and n4, if the 4-direction block number database is found, outputting the 5 th column of the row, namely the fingerprint type, finishing the test, and if the 4-direction block number database is not found, executing a step 3;
3. the
directional block 8 directional position pos8 is transformed:
searching columns 1-13 of a class _ dire4 of a
direction block 4 direction position database according to the 4 direction block numbers n1, n2, n3 and n4 and the 4 direction position pos4 of the direction block, if the column is found, outputting the 14 th column of the row, namely the fingerprint type, and finishing the test, otherwise, executing the
step 4;
4. searching columns 1-13 of a class _ dire8 of a direction block 8 according to 4 direction block numbers n1, n2, n3 and n4 and a direction position pos8 of the direction block 8, if the column is found, outputting the 14 th column of the row, namely the fingerprint type, and finishing the test, otherwise, executing a step 5;
5. according to the 4-direction block number n1, n2, n3, n4 and the 8-direction position pos8 of the direction block, if the search cannot judge that the database cantjudge finds a plurality of rows, the 14 th row of the row is stored in a type array lx, otherwise, the type array lx (1) is recorded as 0;
6. finding singular points, and recording the positions and the number of the blocks where the singular points are located, wherein the method comprises the following steps:
a. singular point center point number singularcore and triangular point number singulardelta are initialized to 0;
b. for each block except for the image edge (first row, last row, first column, last column) in the fingerprint block pattern dirbo, the sum of the variation in direction rotation Poincare is calculated (as shown in fig. 11 (a)):
△dk=dk-d(k+1)mod8,k=0,1……7;
if Δ dk≥90,△dk=△dk-180;
If Δ dk≤-90,△dk=△dk+180;
c. If the Poincare values of block (i, j), block (i-1, j-1), block (i, j-1) are all 180, block (i, j) is a foreground block, and more than 5 blocks in 3 × 3 neighborhood are foreground blocks, the number of the center points is singularcore plus 1, and the position i, j is recorded in position arrays xx1 and yy 1;
d. if block (i, j), block (i-1, j) or block (i-1, j-2), block (i-1, j-1), Poincare value of-180 for block (i, j-1), block (i, j) is a foreground block, and more than 5 blocks in 3 × 3 neighborhood are foreground blocks, the number of triangle points, singularduldelta, is 0 or singulardelta, is 1, and has a distance greater than 3 from the previous triangle point, the number of triangle points, singulardelta, plus 1, records position i, j in position arrays xx2 and yy 2.
7. The method for deleting the pseudo singular points comprises the following steps:
a. for each block containing the central point, if the 5 multiplied by 5 domain contains a block with a Poincare value of-180, the block does not contain the central point, the number of the central points is singularcore minus 1, and the corresponding positions recorded in the position arrays xx1 and yy1 are deleted;
b. for each block containing triangular points, if the 5 x 5 field contains a block with a Poincare value of 180, the block does not contain the triangular points, the number of the triangular points is singulardelta minus 1, and the corresponding positions recorded in the position arrays xx2 and yy2 are deleted;
8. if no singular point is found, the range is expanded to search a central point, and the method comprises the following steps: for a block (i, j) having a Poincare value of 180 and not at the edge of the image ( line 1,2, column 1, 2), the sum of the amounts of change in the direction rotation, Poincare calculated in fig. 11(b), of the Poincare values in step 6:
△dk=dk-d(k+1)mod8,k=0,1……7;
if Δ dk≥90,△dk=△dk-180;
If Δ dk≤-90,△dk=△dk+180;
If Poincare (i, j) ═ 180 and the center point number singulare ═ 1, note that the block location i where the center point is located, j is recorded in location arrays xx1 and yy1, step (9) is performed.
9. Judging the fingerprint type according to a Henry classification method (singular point number and position) and a type array lx, wherein the method is as follows:
a. if the center point number singularcore is 2 or the triangular point number singulardelta is 2 and the type array lx contains 3 or the type array lx (1) is 0, the model is judged to be a funnel type;
b. if the center point number singularcore is 1 or the triangular point number singulardelta is 1, the type array lx has two elements, and one of the two elements is 4, the type array lx is judged to be the other type;
c. if the center point number singularcore is 0 and the triangular point number singulardelta is 0 and the type array lx contains the element 4, the arch is judged;
d. if the center point number singularcore is 1 and the triangle point number singulardelta is 0, judging according to the following method:
if the foreground of the left lower part or the right lower part of the central point is less than 5 blocks, the central point is not in an arch shape, but cannot be judged;
let s1 be the number of blocks of the lower left part of the center point, except the left boundary and the lower boundary, which is greater than-90 degrees and less than 0 degree, and s2 be the number of blocks of the lower right part of the center point, except the right boundary and the lower boundary, which is greater than 0 degrees and less than 90 degrees;
if s1 is less than 2 and the type array lx contains 1, judging the type to be a left skip type;
if s2 is less than 2 and the type array lx contains 2, judging the type to be a right skip type;
if s1-s 2> thre1, s2< thre2 and the type array lx contains 2, the model is judged to be a right skip type;
if s2-s1> thre3, s1< thre4 and the type array lx contains 1, the model is judged to be a left skip model;
if s1> thre5, s2> thre5 and the type array lx contains 3, judging the type to be the bucket type;
thre1, thre2, thre3, thre4, and thre5 are thresholds;
e. if the center point number singularcore is 0 and the triangular point number singulardelta is 1, calculating the relative position yy2(1)/bj (bj is the image width and unit block) of the triangular point position in the graph;
if yy2/bj is greater than thre6 and the type array lx contains 1, judging the type to be a left skip type;
if yy2/bj is less than thre7 and the type array lx contains 2, judging the type to be a right skip type;
thre6, thre7 as thresholds;
f. if the number of the center points is singularcore equal to 1 and the number of the triangular points is singulardelta equal to 1, calculating the included angle between the connecting line of the center points and the triangular points and the central line
The judgment is carried out according to the following method:
if pi/12 is greater than slope > -pi/12 and the type array lx contains 5, judging the shape to be a sharp arch shape;
if pi/12 is greater than slope > -pi/12 and the type array lx does not contain 5, s1 is the number of blocks of the lower left part of the center point, except the left boundary and the lower boundary, which is greater than-90 degrees and less than 0 degree, and s2 is the number of blocks of the lower right part of the center point, except the right boundary and the lower boundary, which is greater than 0 degree and less than 90 degrees;
if s1 is less than 2 and the type array lx contains 1, judging the type to be a left skip type;
if s2 is less than 2 and the type array lx contains 2, judging the type to be a right skip type;
if s1-s 2> thre1, s2< thre2 and the type array lx contains 2, the model is judged to be a right skip type;
if s2-s1> thre3, s1< thre4 and the type array lx contains 1, the model is judged to be a left skip model;
if s1> thre5, s2> thre5 and the type array lx contains 3, judging the type to be the bucket type;
thre1, thre2, thre3, thre4, and thre5 are the same as step d and are threshold values;
if slope is more than or equal to pi/12 and the type array lx contains 1, judging the type to be a left skip type;
if slope is less than or equal to-pi/12 and the type array lx contains 2, judging the type to be a right skip type;
g. if the a, b, c, d, e and f are not satisfied, the judgment is not possible.