CN115375891A - Cultural relic fragment similarity identification and transformation matching method based on machine learning - Google Patents

Cultural relic fragment similarity identification and transformation matching method based on machine learning Download PDF

Info

Publication number
CN115375891A
CN115375891A CN202210966747.7A CN202210966747A CN115375891A CN 115375891 A CN115375891 A CN 115375891A CN 202210966747 A CN202210966747 A CN 202210966747A CN 115375891 A CN115375891 A CN 115375891A
Authority
CN
China
Prior art keywords
contour line
contour
characteristic
similar
cultural relic
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.)
Pending
Application number
CN202210966747.7A
Other languages
Chinese (zh)
Inventor
赵书良
穆翔宇
孙婧涵
杨依涵
丁雪怡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hebei Normal University
Original Assignee
Hebei Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hebei Normal University filed Critical Hebei Normal University
Priority to CN202210966747.7A priority Critical patent/CN115375891A/en
Publication of CN115375891A publication Critical patent/CN115375891A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4038Image mosaicing, e.g. composing plane images from plane sub-images
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/75Organisation of the matching processes, e.g. simultaneous or sequential comparisons of image or video features; Coarse-fine approaches, e.g. multi-scale approaches; using context analysis; Selection of dictionaries
    • G06V10/753Transform-based matching, e.g. Hough transform
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/74Image or video pattern matching; Proximity measures in feature spaces
    • G06V10/761Proximity, similarity or dissimilarity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • G06V10/763Non-hierarchical techniques, e.g. based on statistics of modelling distributions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a cultural relic fragment similarity identification and transformation matching method based on machine learning, which comprises the steps of image preprocessing, contour line extraction, feature point clustering, similar contour line pair extraction, judgment of similarity of two contour lines, calculation of a rotation angle and a movement distance between the two similar contour line segments to form a rigid transformation matrix, and circular splicing of cultural relic fragments from bottom to top. According to the invention, the image binarization and machine learning are combined by a maximum between-class variance method, so that the problems of more interference contour lines when the ceramic cultural relic fragments are subjected to contour line extraction and difficulty in selecting feature points when the contour lines are matched are solved, ceramic fragment samples can be spliced into a complete image, and the robustness is better.

Description

Cultural relic fragment similarity identification and transformation matching method based on machine learning
Technical Field
The invention relates to a cultural relic fragment similarity recognition and transformation matching method, in particular to a cultural relic fragment similarity recognition and transformation matching method based on machine learning, and belongs to the technical field of computer vision.
Background
In the archaeological field, a large amount of ceramic fragments are excavated, and if similarity identification and matching are carried out only by the pure manual work of experts, the efficiency is very low. With the development of the technical field of computer vision, a computer can be used for intelligently identifying similar ceramic fragments and carrying out correct rotation transformation on the similar ceramic fragments so as to prepare for splicing work. At present, chinese and foreign scholars make more researches on splicing work of fragments, and Jizhou dynasty proposes a two-dimensional fragment contour matching algorithm for representing contours by using the position relationship between each point and six adjacent points in a novel contour matching method of two-dimensional fragments. The method is very simple in calculation processing, and can efficiently improve the matching speed of the outline of the fragment, but the algorithm cannot process the situation when the fragment rotates. Dujiali et al propose to use B-spline curve in "matching of object contour curve based on B-spline representation" to approximate the contour curve of two-dimensional debris and extract data points based on the contour curve, and match and splice by using the curvature of the data points and the flexibility of the data points as the feature set of the contour line. Leitao, A Multi-scale method for the reconstruction of two dimensional fragmented objects, proposes a method of multi-scale based fragment stitching in which the contours of the fragments are represented by using the curvature of each discrete point. However, in this method, the selection of discrete points of the contour line is only simple by adopting different sampling scales, and the inherent shape characteristic information of the contour line is not well utilized. Most existing defragmentation synthesis algorithms in splicing work will use some greedy strategy, such as best first, spanning tree growth or variants thereof, such as the method used by k.zhang and x.li in a graph-based optimization for fragmented image reconstruction, but if a similar contour line pair is encountered with an incorrect judgment and has a high matching score, the contour line pair will be easily selected for global splicing and will occupy the positions of other correct contour line pairs, eventually leading to global splicing work failure due to such local minimum.
Disclosure of Invention
The invention aims to provide a cultural relic fragment similarity identification and transformation matching method based on machine learning.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a cultural relic fragment similarity identification and transformation matching method based on machine learning comprises the following steps:
step 1: image preprocessing: performing two-dimensional sampling on the archaeological ceramic fragments to obtain m & n pixel cultural relic fragment images, and converting the cultural relic fragment images into binary cultural relic fragment images;
and 2, step: contour line extraction: extracting contour lines, extracting contour lines in the binary cultural relic fragment image one by one through a contour tracing algorithm, and constructing a contour line set CL = { CL = 1 ,cl 2 ,...,cl cj ,...,cl lks Lks is the number of extracted contour lines;
and step 3: characteristic point clustering: the characteristic point clustering extracts the characteristic points of each contour line one by one through a K-means clustering method, and a characteristic point set K of each contour line is constructed i ={k i,1 ,k i,2 ...k i,j ...k i,km }; i represents a contour line to which the current feature point set belongs, and the value range of i is more than or equal to 1 and is not more than lks; the feature points in the feature point set of each contour line have the same number, namely km;
and 4, step 4: extracting similar contour line pairs one by one, comprising the following specific steps:
step 4-1: the curvature of the characteristic points of each contour line is calculated one by one to construct each contour lineFeature point curvature set Q of contour line i ={q i,1 ,q i,2 ,...,q i,j ,...,q i,qmi I represents a contour line to which the current feature point set belongs, wherein the value range of i is more than or equal to 1 and is not more than lks; dividing each 3 continuous characteristic points on the contour line into a section of characteristic segment; qmi represents the number of feature segments of the ith contour,
Figure BDA0003795184230000031
the curvature of the jth characteristic segment of the ith contour line is calculated by the following method:
Figure BDA0003795184230000032
Figure BDA0003795184230000033
m (j) is the abscissa of three characteristic points of the j-th characteristic segment of the i-th contour line
Figure BDA0003795184230000034
A first parameter equation is fitted, n (j) is the ordinate of three characteristic points of the j characteristic segment of the i contour line
Figure BDA0003795184230000035
Fitted second parametric equation, a 1 ,a 2 ,a 3 First to third coefficients of the abscissa equation, b 1 ,b 2 ,b 3 First to third coefficients for an ordinate equation, m '(j), m "(j) being the first and second derivatives of the parametric equation m (j), n' (j), n" (j) being the first and second derivatives of the parametric equation n (j);
step 4-2: sequentially calculating the Euclidean distance of the curvature of the corresponding characteristic segment of each two contour lines, and constructing the Euclidean distance sets of the two contour lines, namely the Euclidean distance sets of the ith 1 contour line and the ith 2 contour line
Figure BDA0003795184230000036
Euclidean distance of the ith feature segment
Figure BDA0003795184230000037
The calculation method comprises the following steps:
Figure BDA0003795184230000038
step 4-3: judging two contour lines cl one by one i1 ,cl i2 Whether the characteristic segments of (a) are similar: if the Euclidean distance of the feature segments of the two contour lines
Figure BDA0003795184230000039
If the number of the similar characteristic segments is less than a preset first threshold value, judging the similar characteristic segments, and adding 1 to the number of the similar characteristic segments of the ith 1 contour line and the ith 2 contour line;
step 4-4: calculate two contour lines cl one by one i1 ,cl i2 Is given a similarity score of FS i1,i2
Figure BDA0003795184230000041
XST in the formula i1,i2 The number of similar characteristic segments of the ith 1 contour line and the ith 2 contour line is set;
and 4-5: determine two contour lines cl i1 ,cl i2 Whether or not they are similar: if two contour lines cl i1 ,cl i2 Is given a similarity score of FS i1,i2 Greater than a second predetermined threshold, two contour lines cl i1 ,cl i2 Similar contour lines;
and 5: calculating two similar contour line segments cl one by one i1 ,cl i2 The rotation angle delta and the moving distance between the two rigid body transformation matrixes form a rigid body transformation matrix;
horizontal direction movement distance:
Figure BDA0003795184230000042
vertical direction movement distance:
Figure BDA0003795184230000043
rigid body transformation matrix GT i1,i2
Figure BDA0003795184230000044
Wherein (x) g ,y g ),(x h ,y h ) For two similar contours cl i1 ,cl i2 Coordinates of the selected feature points; delta is contour line cl i1 ,cl i2 Fitting the included angle of two crossed straight lines through linear regression;
step 6: splicing cultural relic fragments circularly from bottom to top, which comprises the following specific steps:
step 6-1: build an induced cycle set L 0 ={l 0 ,l 1 ,...,l lp ,l lQ ,...l ln H, ln is equal to or greater than 1 and less than lks: each contour line is a node, edges are established between similar contour lines, and connected subgraphs form a connected subgraph set W = { W = 1 ,...,w wj ,...,w zt And zt is the number of connected subgraphs, whether the product of rigid body transformation matrixes of similar contour lines corresponding to edges in each connected subgraph is a unit matrix or not is judged one by one, and if yes, the connected subgraphs are used as induction cycles l lj Adding an induction cycle set;
step 6-2: merging induction circulation: in the induction cycle set L 0 In (1), searching one by one whether there is a combinable induction cycle L lp And L lQ Delete L lp And L lQ Common edge in between, will L lp And L lQ Are combined into an induced cycle set L 1 The process is executed iteratively to obtain an induced loop set L 2 ,L 3 ,..,L ln Induction cycle set L ln There are no induction cycles that can be combined;
combinable induction cycles L lQ And L lQ Simultaneously, the following conditions are met:
condition 1: induction cycle L lp And L lQ Having common edges, the rigid transformation moments of the common edgesArray GT lp,lq In the induction cycle L lp And L lQ Medium and equal;
condition 2: after the induction cycles are combined, the rigid body transformation matrixes of all edges in the newly generated induction cycle are multiplied to be an identity matrix.
Further, the step 1 comprises the following specific steps:
step 1-1: converting the cultural relic fragment image into a gray map, and calculating the average gray value mu of the cultural relic fragment image:
Figure BDA0003795184230000051
wherein n (i) is the number of pixels having a pixel value of i; y is the number of pixel values; step 1-2: image division: setting i as foreground and background segmentation threshold t one by one x And calculating the inter-class variance:
G=W 1 ·(μ 1 -μ) 2 +W 2 ·(μ 2 -μ) 2
wherein, W 2 The proportion of background pixels in the image is taken; mu.s 1 Is the average gray level, μ, of the foreground pixels 2 Average gray level of background pixels and average gray level of foreground pixels 1 Average gray level mu with background pixel 2 The calculation method is the same, and the average gray level mu of the foreground pixel 1 The calculating method comprises the following steps:
Figure BDA0003795184230000052
wherein, W 1 In order to record the proportion of foreground pixels in the image, the calculation method comprises the following steps:
Figure BDA0003795184230000053
wherein, y 1 Is the pixel value is greater than t x The statistical number of the pixels;
step 1-3: and converting the gray-scale image of the cultural relic fragment image into a binary cultural relic fragment image according to the foreground-background segmentation threshold value when the inter-class variance is maximum.
Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:
1. the invention determines the binarization threshold value by a maximum between-class variance method so as to carry out binarization processing on the ceramic fragment image and extract the fragment image contour line, thereby effectively reducing noise caused by shooting problems.
2. The contour line feature point extraction based on clustering is a method with accurate and convenient calculation, accurately extracts the feature points of the contour line, and then performs preliminary matching on ceramic fragments by using a method of taking Euclidean distance based on feature segments as a matching contour line, thereby effectively reducing the time required by contour line matching.
3. The invention provides a novel method for calculating rigid body transformation of similar contour lines, which obtains a fitting straight line of the similar contour lines through linear regression analysis, and obtains a rigid body transformation matrix of image fragments through rotation and translation for splicing. The method effectively improves the efficiency of rigid body transformation calculation between similar contour lines and has higher accuracy.
4. The method carries out global splicing on the ceramic fragment images based on the circular splicing method, strengthens closed-loop constraint in the global splicing work, cuts out the fragment pairs with wrong similar identification but high similarity score, and has higher robustness.
Drawings
FIG. 1 is a block diagram of a model of the present invention.
Fig. 2 is an example of an induction cycle.
Fig. 3 merges examples of loops.
Fig. 4 is an original fragmentation diagram of this patent.
Fig. 5 is an effect diagram after splicing.
Detailed Description
The following examples serve to illustrate the invention.
Example 1
A cultural relic fragment similarity identification and transformation matching method based on machine learning comprises the following steps:
step 1: image preprocessing: performing two-dimensional sampling on the archaeological ceramic fragments to obtain m & n pixel cultural relic fragment images, and converting the cultural relic fragment images into binary cultural relic fragment images;
the step 1 comprises the following specific steps:
step 1-1: converting the cultural relic fragment image into a gray map, and calculating the average gray value mu of the cultural relic fragment image:
Figure BDA0003795184230000071
wherein n (i) is the number of pixels having a pixel value of i; y is the number of pixel values;
step 1-2: image division: setting i as foreground and background segmentation threshold t one by one x And calculating the inter-class variance:
G=W 1 ·(μ 1 -μ) 2 +W 2 ·(μ 2 -μ) 2
wherein, W 2 The proportion of background pixels in the image is taken; mu.s 1 Is the average gray level, μ, of the foreground pixels 2 Is the average gray level of the background pixels and the average gray level mu of the foreground pixels 1 Average gray level mu with background pixel 2 The calculation method is the same, and the average gray level mu of the foreground pixel 1 The calculation method comprises the following steps:
Figure BDA0003795184230000072
wherein, W 1 In order to record the proportion of foreground pixels in the image, the calculation method comprises the following steps:
Figure BDA0003795184230000081
wherein, y 1 Is the pixel value is greater than t x The statistical number of the pixels;
and converting the gray-scale image of the cultural relic fragment image into a binary cultural relic fragment image according to the foreground-background segmentation threshold value when the inter-class variance is maximum.
Step 2: contour lines in the binary cultural relic fragment image are extracted one by one through a contour tracing algorithm, and a contour line set CL = { CL ] is constructed 1 ,cl 2 ,...,cl cj ,...,cl lks Lks is the number of extracted contour lines;
and 3, step 3: extracting the characteristic points of each contour line one by one through a k-means clustering method, and constructing a characteristic point set Ki = { k } of each contour line i,1 ,k i,2 ...k i,j ...k i,km }; i represents the contour line to which the current characteristic point set belongs, and the value range of i is more than or equal to 1 and is not more than lks; the feature point number of each contour line is the same, and is km, and the specific operation steps are as follows:
step 3-1: all coordinate points on the contour line are taken as a data set of the k-means clustering, k samples are randomly selected from the data set as cluster centers, and 15 cluster centers are selected in the embodiment: CZ = { CZ 1 ,cz 2 ,...,cz cj ,...,cz 15 And calculating Euclidean distances between all data in the data set and the K cluster centers, dividing each data into clusters where the cluster center closest to the data set is located, updating new cluster centers of all clusters through an averaging method for new clusters formed after training, and repeating the training process until no new cluster center is generated or the number of training rounds is reached, wherein in the embodiment, each K-means clustering is performed, the upper limit of the number of training rounds is 15 rounds, and the cluster center in the final result is the feature point set K of the current contour line i ={k i,1 ,k i,2 ...k i,j ...k i,km };
And 4, step 4: extracting similar contour line pairs one by one, comprising the following specific steps:
step 4-1: the curvature of the characteristic point of each contour line is obtained one by one, and a curvature set Q of the characteristic point of each contour line is constructed i ={q i,1 ,q i,2 ,...,q i,j ,...,q i,qmi I represents a contour line to which the current feature point set belongs, wherein the value range of i is more than or equal to 1 and is not more than lks;dividing each 3 continuous characteristic points on the contour line into a section of characteristic segment; qmi represents the number of feature segments of the ith contour,
Figure BDA0003795184230000091
in this embodiment, 3 continuous feature points constitute a segment of feature segment, each contour line segment can be divided into 5 feature segments, and the feature point curvature set of each contour line is Q i ={q i,1 ,q i,2 ......q i,5 }。
The coordinates of three feature points in the feature segment are:
Figure BDA0003795184230000092
Figure BDA0003795184230000093
and
Figure BDA0003795184230000094
the method for calculating the curvature of the jth characteristic segment of the ith contour line of the abscissa and the ordinate of the jth characteristic point which is currently the ith contour line segment comprises the following steps:
Figure BDA0003795184230000095
Figure BDA0003795184230000096
m (j) is the abscissa of three characteristic points of the j-th characteristic segment of the i-th contour line
Figure BDA0003795184230000097
A first parameter equation is fitted, n (j) is the ordinate of three characteristic points of a j characteristic segment of a characteristic segment of an i contour line
Figure BDA0003795184230000098
Fitting of the firstTwo parameter equation a 1 ,a 2 ,a 3 First to third coefficients of the abscissa equation, b 1 ,b 2 ,b 3 First to third coefficients for an ordinate equation, m '(j), m "(j) being the first and second derivatives of the parametric equation m (j), n' (j), n" (j) being the first and second derivatives of the parametric equation n (j);
step 4-2: sequentially calculating the Euclidean distance of the curvature of the corresponding characteristic segment of each two contour lines, and constructing the Euclidean distance sets of the two contour lines, namely the Euclidean distance sets of the ith 1 contour line and the ith 2 contour line
Figure BDA0003795184230000099
Euclidean distance of the ith feature segment
Figure BDA00037951842300000910
The calculation method comprises the following steps:
Figure BDA00037951842300000911
step 4-3: judge one by one two contour lines cl i1 ,cl i2 Whether the characteristic segments of (a) are similar: if the Euclidean distance of the feature segments of the two contour lines
Figure BDA0003795184230000101
If the number of the similar characteristic segments is less than a preset first threshold value, judging the similar characteristic segments, and adding 1 to the number of the similar characteristic segments of the ith 1 contour line and the ith 2 contour line; the first threshold value in this embodiment is 0.001;
step 4-4: calculate two contour lines cl one by one i1 ,cl i2 (ii) a similarity score FS i1,i2
Figure BDA0003795184230000102
XST in the formula i1,i2 The number of similar characteristic segments of the ith 1 contour line and the ith 2 contour line is set;
and 4-5: determine two contour lines cl i1 ,cl i2 Whether or not they are similar: if two contour lines cl i1 ,cl i2 Is given a similarity score of FS i1,i2 Greater than a second predetermined threshold, two contour lines cl i1 ,cl i2 Similar contour lines; in this embodiment, the second threshold is 0.6, that is, there are more than 3 feature segments that are similar, and the contour segments are considered to be similar.
And 5: two contour lines cl i1 ,cl i2 Inputting the characteristic points into a linear regression analysis model, and calculating two similar contour lines cl one by one through two straight lines fitted by the linear regression analysis model i1 ,cl i2 The rotation angle delta and the moving distance between the two rigid body transformation matrixes form a rigid body transformation matrix:
horizontal direction movement distance:
Figure BDA0003795184230000103
vertical direction movement distance:
Figure BDA0003795184230000104
rigid body transformation matrix GT i1,i2
Figure BDA0003795184230000105
In the formula (x) g ,y g ),(x h ,y h ) In the present embodiment two similar contours cl i1 ,cl i2 Coordinates of the median of (a); δ is the contour line cl i1 ,cl i2 Fitting an included angle of two crossed straight lines through linear regression;
in the embodiment, a feature point set K of two similar contour line segments i, j is used i ={k i,1 ,k i,2 ......k i,30 }、K j ={k j,1 ,k j,2 ......k j,30 Are respectively input into a linear regression analysis model to fit two straight lines l 1 ,l 2 Calculating the intersection point of the two straight lines as lambda (x) λ ,y λ ) Randomly on two straight lines l 1 ,l 2 Selecting each point alpha (x) α ,y α ),β(x β ,y β ) Calculating the rotation angle delta of two straight lines through three points of alpha, lambda and beta, and selecting the median M (x) of the two contour lines m ,y m ),N(x n ,y n ) As a reference point for calculating the contour line movement distance, the horizontal direction movement distance and the vertical direction movement distance are calculated. And forming a 3x3 rigid body transformation matrix GT by the calculated rotation angle, the horizontal moving distance and the vertical moving distance.
And 6: the method for splicing cultural relic fragments circularly from bottom to top comprises the following specific steps:
step 6-1: build an induced cycle set L 0 ={l 0 ,l 1 ,...,l lp ,l lQ ,...l ln H, ln is equal to or greater than 1 and less than lks: each contour line is a node, edges are established between similar contour lines, and connected subgraphs form a connected subgraph set W = { W = 1 ,...,w wj ,...,w zt And zt is the number of connected subgraphs, whether the product of rigid body transformation matrixes of similar contour lines corresponding to edges in each connected subgraph is a unit matrix or not is judged one by one, and if yes, the connected subgraphs are used as induction cycles l lj Adding an induction cycle set;
step 6-2: merging induction circulation: in the induction cycle set L 0 In (1), searching one by one whether there is a combinable induction cycle L lp And L lQ Delete L lp And L lQ Common edge in between, will L lp And L lQ Are combined into an induced cycle set L 1 The process is executed iteratively to obtain an induced loop set L 2 ,L 3 ,..,L ln Induction cycle set L ln There are no induction cycles that can be combined;
combinable induction cycles L lQ And L lQ Simultaneously, the following conditions are met:
condition 1: induction cycle L lp And L lQ Rigid transformation matrix GT with common edges lp,lq In the induction cycle L lp And L lQ Medium and equal;
condition 2: after the induction cycles are combined, the rigid body transformation moments of all sides in the newly generated induction cycleThe matrix multiplication is an identity matrix. In the embodiment, the archaeological ceramic fragments are photographed and subjected to two-dimensional sampling to obtain fragment images, the fragments are spliced as much as possible by a circular splicing method according to the similarity between the fragments calculated in the step 3 and the rigid body transformation matrix between the similar fragments calculated in the step 4, and the algorithm undergoes a bottom-up merging stage and then a top-down merging stage. Two nouns are defined in a specific step, an induction cycle and a combination cycle; in the induction loop, the fragments are compared with nodes in the loop, if two nodes have connected edges, the fragments represented by the two nodes are considered to be similar in pairs and can be spliced, and each edge is associated with a rigid transformation matrix GT i,j ,GT i,j Indicating that the patches i, j are similar and that patch j passes through the rigid body transformation matrix GT i,j And the position spliced with the fragment i can be transformed, if the rigid body transformation matrixes of 3 and 4 fragments which are similar pairwise are multiplied into an identity matrix, the fragment set can form an induction cycle, and the induction cycle is shown in figure 3.
In step 4-1, the similar fragments are firstly formed into a plurality of small induction cycles, the induction cycles are merged and spliced with other induction cycles through the common edges to form a merged cycle, see fig. 4, the common edges in the merged cycle are deleted to form a larger induction cycle, and the process is continuously cycled in a bottom-up and top-down mode to finally generate a complete image.
The bottom-up merge begins with a small induction cycle of approximately 3, 4 in length generated in step 5-1. The set of induction cycles found in this step is denoted L 0 ={l 0 ,l 1 ......l n }. We are at L 0 The internal trial searches for induction cycles that can be combined with the following conditions:
condition 1: two combinable induced loops have a common edge and the rigid transformation matrix GT associated with the common edge i,j Equal in both inductive loops.
Condition 2: after the two induction loops are merged and a new induction loop is generated, the rigid transformation matrix GT associated with each edge in the loop satisfies the formula (17).
When both combinable cycles satisfy condition 1 and condition 2, we can splice them into one larger induction cycle. This will generate an effective composite picture. If any of the two loops that can be spliced violates any of the conditions, the loop after splicing is discarded, effectively pruning the pairs of fragments whose similarity identification is wrong but whose similarity score is high.
We merge data from L 0 And adding the newly combined induction cycle to the new set L 1 In (1). Then, we iteratively repeat the process to obtain L 2 ,L 3 ,..,L n Until no more cycles can be combined. With the increase of compatible cycles, set L in the last cycle n In (1), we select a cycle containing the most fragments and denote it as L * 。L * Is the image of the largest reassembled fragment that we have obtained so far through the bottom-up merging process.
If all fragments are combined into one large cycle, L * Giving the final stitched image, but L * Not all fragments may be contained, i.e. the induction cycle. Some tiles that are stitched correctly, such as induced loops, that may not be detected and similarly stitched because of their relatively poor compatibility, may need to be stitched to the main tile composite map by individual edge connections. Therefore, we further perform a top-down merge to stitch these remaining fragments, i.e., the loop.
Merge from L from top to bottom * Initially, first check L n-1 Each cycle of steps. If a cycle is found with L * Compatible, and newly discovered induction cycles are different from L * Node(s) in (c), then we merge the newly discovered induction cycle into L * . We proceed by iteratively matching L * And from L n-1 Are combined to increase L * The contained fragment, then L n-2 And finally L 0
The method combines the otus algorithm and machine learning, and solves the problems of more interference contour lines when the ceramic cultural relic fragments are subjected to contour line extraction and difficult feature point selection when the contour lines are matched. The otus algorithm automatically computes a threshold value in the bimodal image according to the histogram of the bimodal image to binarize the image. And the clustering randomly divides the contour feature points into K clusters, and takes the mean value of the data values in each cluster as the center of the cluster. Linear regression analysis fits the discrete points to a straight line and minimizes the loss function. A rigid body transformation matrix between similar contour lines can be calculated through linear regression analysis, closed loop constraint in global Splicing work is strengthened and contour line pairs which are incorrect but have high scores are pruned through a Layered Circular Splicing (LCS) method, and compared with a greedy strategy, layered Circular Splicing has higher robustness. The ceramic fragment sample can be spliced into a complete image by the method.
The invention combines image binaryzation and machine learning by a maximum between-class variance method, and solves the problems of more interference contour lines when the ceramic cultural relic fragments are subjected to contour line extraction and difficult feature point selection when the contour lines are matched. The image binarization is carried out by a maximum inter-class variance method, wherein a certain threshold value is used, a gray level image is divided into a foreground part and a background part according to the size of gray level, and when the inter-class variance of the two types is maximum, the obtained threshold value is the optimal binarization threshold value. The clustering randomly divides the contour feature points into K clusters, and takes the mean value of the data values in each cluster as the center of the cluster. Linear regression analysis fits the discrete points to a straight line and minimizes the loss function. A rigid body transformation matrix between similar contour lines can be calculated through linear regression analysis, closed loop constraint in global splicing work is strengthened and contour line pairs which are incorrect but have high similarity scores are pruned through a circular splicing method, and circular splicing has higher robustness compared with a greedy strategy. The ceramic fragment sample can be spliced into a complete image by the method.
Need to explain: at present, the method of the invention has developed application investigation in a small scale range, and the investigation result shows that the user satisfaction is higher, which lays a foundation for wide application, and meanwhile, the applicant also performs intellectual property risk early warning investigation.

Claims (2)

1. A cultural relic fragment similarity identification and transformation matching method based on machine learning is characterized by comprising the following steps:
step 1: image preprocessing: performing two-dimensional sampling on the archaeological ceramic fragments to obtain m & n pixel cultural relic fragment images, and converting the cultural relic fragment images into binary cultural relic fragment images;
step 2: contour line extraction: contour lines in the binary cultural relic fragment image are extracted one by one through a contour tracing algorithm, and a contour line set CL = { CL ] is constructed 1 ,cl 2 ,...,cl cj ,...,cl lks Lks is the number of extracted contour lines;
and step 3: characteristic point clustering: extracting the characteristic points of each contour line one by one through a k-means clustering method, and constructing a characteristic point set Ki = { k ] of each contour line i,1 ,k i,2 ...k i,j ...k i,km }; i represents a contour line to which the current feature point set belongs, and the value range of i is more than or equal to 1 and is not more than lks; the feature points in the feature point set of each contour line have the same number, namely km;
and 4, step 4: extracting similar contour line pairs one by one, comprising the following specific steps:
step 4-1: the curvature of the characteristic point of each contour line is obtained one by one, and a curvature set Q of the characteristic point of each contour line is constructed i ={q i,1 ,q i,2 ,...,q i,j ,...,q i,qmi I represents a contour line to which the current feature point set belongs, wherein the value range of i is more than or equal to 1 and is not more than lks; dividing every 3 continuous feature points on the contour line into a segment of feature segment; qmi represents the number of feature segments of the ith contour,
Figure FDA0003795184220000011
the curvature of the jth characteristic segment of the ith contour line is calculated by the following method:
Figure FDA0003795184220000012
Figure FDA0003795184220000013
m (j) is the abscissa of three characteristic points of the j-th characteristic segment of the i-th contour line
Figure FDA0003795184220000014
A first parameter equation is fitted, n (j) is the ordinate of three characteristic points of a j characteristic segment of a characteristic segment of an i contour line
Figure FDA0003795184220000021
Fitted second parametric equation, a 1 ,a 2 ,a 3 First to third coefficients of the abscissa equation, b 1 ,b 2 ,b 3 First to third coefficients for ordinate equations, m '(j), m "(j) being the first and second derivatives of the parametric equation m (j), n' (j), n" (j) being the first and second derivatives of the parametric equation n (j);
step 4-2: sequentially calculating the Euclidean distance of the curvature of the corresponding characteristic segment of each two contour lines, and constructing the Euclidean distance sets of the two contour lines, namely the Euclidean distance sets of the ith 1 contour line and the ith 2 contour line
Figure FDA0003795184220000022
Euclidean distance of the ith feature segment
Figure FDA0003795184220000023
The calculation method comprises the following steps:
Figure FDA0003795184220000024
step 4-3: judging two contour lines cl one by one i1 ,cl i2 Whether the characteristic segments of (a) are similar: if the Europe of the feature segments of the two contour linesDistance between two adjacent points
Figure FDA0003795184220000025
If the number of the similar characteristic segments is less than a preset first threshold value, judging the similar characteristic segments, and adding 1 to the number of the similar characteristic segments of the ith 1 contour line and the ith 2 contour line;
step 4-4: calculate two contour lines cl one by one i1 ,cl i2 Is given a similarity score of FS i1,i2
Figure FDA0003795184220000026
XST in the formula i1,i2 The number of similar characteristic segments of the ith 1 contour line and the ith 2 contour line is set;
and 4-5: determine two contour lines cl i1 ,cl i2 Whether it is similar: if two contour lines cl i1 ,cl i2 (ii) a similarity score FS i1,i2 Greater than a second predetermined threshold, two contour lines cl i1 ,cl i2 Similar contour lines;
and 5: calculating two similar contour line segments cl one by one i1 ,cl i2 The rotation angle delta and the moving distance between the two parts form a rigid body transformation matrix;
horizontal direction movement distance:
Figure FDA0003795184220000027
vertical direction movement distance:
Figure FDA0003795184220000028
rigid body transformation matrix GT i1,i2
Figure FDA0003795184220000031
In the formula (x) g ,y g ),(x h ,y h ) For two similar contours cl i1 ,cl i2 Coordinates of the selected feature points; delta is the contour linecl i1 ,cl i2 Fitting the included angle of two crossed straight lines through linear regression;
step 6: the method for splicing cultural relic fragments circularly from bottom to top comprises the following specific steps:
step 6-1: build an induced cycle set L 0 ={l 0 ,l 1 ,...,l lp ,l lQ ,...l ln And ln is more than or equal to 1 and less than lks: each contour line is a node, edges are established between similar contour lines, and connected subgraphs form a connected subgraph set W = { W = 1 ,...,w wj ,...,w zt And (5) judging whether the product of rigid body transformation matrixes of similar contour lines corresponding to edges in each connected subgraph is a unit matrix one by one, if so, connecting the subgraphs as an induction cycle l lj Adding an induction cycle set;
step 6-2: merging induction circulation: in the induction cycle set L 0 In (1), searching one by one whether there is a combinable induction cycle L lp And L lQ Delete L lp And L lQ Common edge in between, will L lp And L lQ Are combined into an induced cycle set L 1 The process is executed iteratively to obtain an induced loop set L 2 ,L 3 ,..,L ln Induction cycle set L ln There are no induction cycles that can be combined;
combinable induction cycles L lQ And L lQ Simultaneously, the following conditions are met:
condition 1: induction cycle L lp And L lQ Rigid transformation matrix GT with common edges lp,lq In the induction cycle L lp And L lQ Medium and equal;
condition 2: after the induction cycles are combined, the rigid body transformation matrixes of all edges in the newly generated induction cycle are multiplied to be an identity matrix.
2. The method for identifying and transforming matching of cultural relic fragment similarity based on machine learning of claim 1, wherein:
the step 1 comprises the following specific steps:
step 1-1: converting the cultural relic fragment image into a gray map, and calculating the average gray value mu of the cultural relic fragment image:
Figure FDA0003795184220000041
wherein n (i) is the number of pixels having a pixel value of i; y is the number of pixel values;
step 1-2: image division: setting i as foreground and background segmentation threshold t one by one x And calculating the inter-class variance:
G=W 1 ·(μ 1 -μ) 2 +W 2 ·(μ 2 -μ) 2
wherein, W 2 The proportion of background pixels in the image is taken; mu.s 1 Is the average gray level, mu, of the foreground pixels 2 Is the average gray level of the background pixels and the average gray level mu of the foreground pixels 1 Average gray level mu with background pixel 2 The calculation method is the same, and the average gray level mu of the foreground pixels 1 The calculation method comprises the following steps:
Figure FDA0003795184220000042
wherein, W 1 In order to record the proportion of foreground pixels in the image, the calculation method comprises the following steps:
Figure FDA0003795184220000043
wherein, y 1 Is the pixel value is greater than t x The statistical number of pixels of (2);
step 1-3: and converting the gray-scale image of the cultural relic fragment image into a binary cultural relic fragment image according to the foreground-background segmentation threshold value when the inter-class variance is maximum.
CN202210966747.7A 2022-08-12 2022-08-12 Cultural relic fragment similarity identification and transformation matching method based on machine learning Pending CN115375891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210966747.7A CN115375891A (en) 2022-08-12 2022-08-12 Cultural relic fragment similarity identification and transformation matching method based on machine learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210966747.7A CN115375891A (en) 2022-08-12 2022-08-12 Cultural relic fragment similarity identification and transformation matching method based on machine learning

Publications (1)

Publication Number Publication Date
CN115375891A true CN115375891A (en) 2022-11-22

Family

ID=84066017

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210966747.7A Pending CN115375891A (en) 2022-08-12 2022-08-12 Cultural relic fragment similarity identification and transformation matching method based on machine learning

Country Status (1)

Country Link
CN (1) CN115375891A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117079397A (en) * 2023-09-27 2023-11-17 青海民族大学 Wild human and animal safety early warning method based on video monitoring

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117079397A (en) * 2023-09-27 2023-11-17 青海民族大学 Wild human and animal safety early warning method based on video monitoring
CN117079397B (en) * 2023-09-27 2024-03-26 青海民族大学 Wild human and animal safety early warning method based on video monitoring

Similar Documents

Publication Publication Date Title
CN105844669B (en) A kind of video object method for real time tracking based on local Hash feature
Guo et al. Efficient center voting for object detection and 6D pose estimation in 3D point cloud
CN106600600A (en) Wafer defect detection method based on characteristic matching
CN114220124A (en) Near-infrared-visible light cross-modal double-flow pedestrian re-identification method and system
Dibeklioglu et al. 3D facial landmarking under expression, pose, and occlusion variations
CN107424161B (en) Coarse-to-fine indoor scene image layout estimation method
CN105574063A (en) Image retrieval method based on visual saliency
CN111767952B (en) Interpretable lung nodule benign and malignant classification method
CN107230203A (en) Casting defect recognition methods based on human eye vision attention mechanism
CN108520204A (en) A kind of face identification method
Ning et al. Segmentation of architecture shape information from 3D point cloud
CN107527054B (en) Automatic foreground extraction method based on multi-view fusion
CN104182973A (en) Image copying and pasting detection method based on circular description operator CSIFT (Colored scale invariant feature transform)
CN109214397A (en) The dividing method of Lung neoplasm in a kind of lung CT image
CN105046694A (en) Quick point cloud registration method based on curved surface fitting coefficient features
CN103345617A (en) Method and system for recognizing traditional Chinese medicine
CN104298995A (en) Three-dimensional face identification device and method based on three-dimensional point cloud
CN111062928A (en) Method for identifying lesion in medical CT image
CN111784653A (en) Multi-scale network MRI pancreas contour positioning method based on shape constraint
CN112613551A (en) Automobile part identification method, storage medium and system
CN110866547B (en) Automatic classification system and method for traditional Chinese medicine decoction pieces based on multiple features and random forests
CN115375891A (en) Cultural relic fragment similarity identification and transformation matching method based on machine learning
CN102087742B (en) Tortoise shell fragment conjugating method based on image processing
CN110969101A (en) Face detection and tracking method based on HOG and feature descriptor
CN106415606A (en) Edge-based recognition, systems and methods

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination