Dental crown matching method based on contour features
By extracting the contour features of the bottom surface of the crown, including Hu moments and bounding box features, and comparing them, the individual matching problem in crown matching is solved, and efficient crown matching in a small-scale database is achieved.
Patent Information
- Application Number
- CN202411394877.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
The existing image matching algorithms lack individual matching applications in the field of artifact matching, especially in crown matching, it is difficult to effectively match the same category but different individuals.
The crown matching method based on contour features is used to extract the invariant feature moment Hu moment of the crown bottom contour, the aspect ratio of the OBB bounding box, the size ratio of the contour and the height function features for comparison, and the output feature matching cost is minimal. matching results.
The efficient description and matching of the contour of the crown, with high description capabilities and tolerance capabilities for local deformation, suitable for matching tasks in small -scale databases.
Smart Images

Figure CN119360061A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image matching, and in particular to a tooth crown matching method based on contour features. Background Art
[0002] At present, the existing image matching algorithms can be divided into methods based on contour features, regional features, and skeleton features. However, whether it is a traditional image matching method or a method based on deep learning, most of them are applied to image classification problems. There are fewer applications to matching problems of different individuals in the same category. The more classic one is face recognition, but there is no application of individual matching in the field of workpiece matching. Inspired by face recognition, the present invention applies individual matching in the field of workpiece matching. A database is established for each crown. The crowns in the database can be regarded as "faces" entered in advance, and the input crown photo is equivalent to the facial image of a person standing in front of the camera. By extracting the contour features of the bottom surface of the crown of the input photo, traversing the two-dimensional view of the bottom surface of the crown in the database, extracting the contour features, comparing, and outputting the seat matching result with the minimum feature matching cost. Summary of the invention
[0003] The purpose of the present invention is to provide a crown matching method based on contour features. The feature extraction is simple, the requirements for photographic equipment are low, it is insensitive to light and shadow changes, it has a high description ability for the overall area, local and overall shapes of the contour, and it also has a certain tolerance for local deformation. Through experiments, the method has a certain matching accuracy in a small-scale database.
[0004] To achieve the above object, the present invention provides a crown matching method based on contour features, comprising the following steps:
[0005] S1, extracting the bottom view of the designed three-dimensional model of the tooth crown to form a two-dimensional image database of the bottom surface of the tooth crown to be retrieved;
[0006] S2. Input the bottom surface photo of the actual crown after production and processing, perform grayscale processing and mean filtering on the bottom surface photo, extract the bottom surface contour of the crown through adaptive canny edge detection and contour screening, calculate the invariant characteristic moment Hu moment of the bottom surface contour of the crown, the aspect ratio of the OBB bounding box, the size ratio of the contour, perform fixed number of equal-interval sampling on the contour point set, and calculate the feature descriptor height function of the sampling points;
[0007] S3, traverse the two-dimensional images in the database in S1, and perform the same operations and calculations on the two-dimensional images as in step S2;
[0008] S4. Calculate the matching cost of each feature of the currently traversed two-dimensional image and the input bottom surface photo, obtain the total weighted matching cost after weighting, store it in a list, and after the traversal is completed, output the bottom surface view of the crown with the smallest total weighted matching cost as the matching result.
[0009] Preferably, in step S2, the OBB bounding box of the contour is obtained by a PCA principal component analysis method, and the aspect ratio of the bounding box, the size ratio of the contour and the invariant characteristic moment Hu of the contour are calculated.
[0010] Preferably, the Hu moment constructs 7 invariant moments using the second-order and third-order center distances. The calculation formulas for the geometric moment and the center moment required to calculate the Hu moment are as follows:
[0011] Geometric moments:
[0012]
[0013] Where f(x,y) is array(x,y), N and M correspond to images with a width and height of N*M, and the 0th-order moment m 00 is the contour area, the first-order moment m 10 and m 01 Used to describe the center of mass position;
[0014] The central moment constructed through the center of mass is rotationally invariant, the central moment:
[0015]
[0016] In the formula,
[0017] By normalizing the central moment, we can obtain the normalized central moment with rotation, translation, and scaling invariance:
[0018]
[0019] The calculation formulas for the 7 invariant moments of Hu moment are as follows:
[0020] h0=η 20 +η 02 ;
[0021] h1=η 20 +η 02 ;
[0022]
[0023] h3=(η 30 -3η 12 ) 2 +3(η 21 -η 03 ) 2 ;
[0024] h4=(h 30 -3rd 12 )(or 30 +n 12 )[(or 30 +n 12 ) 2 -3(h 12 +n 03 ) 2 ]+(3rd 21 -
[0025] or 03 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 12 +n 03 ) 2 ];
[0026] h5=(h 20 -or 02 )[(or 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ]+4th 11 (or 30 +n 12 )(or 21 +n 03 );
[0027] h6=(3rd) 21 -or 03 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ]-(or 30 -
[0028] or 12 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ];
[0029] The 7 invariant moments constitute a seven-dimensional vector with rotation, translation and scaling invariance. As the basis for contour matching, it has a certain degree of accuracy and the ability to screen contours.
[0030] Preferably, in step S2, let X = {x i}(i=1, ..., N) represents a sequence of equidistant sampling points on the outer contour of a given shape, where index i determines the coordinate axis according to the order of sampling points in the counterclockwise direction along the contour. For each sample point x i , its tangent line l i Denotes the reference axis, tangent line l i The direction of the contour line is inherited from the direction of the x i-1 to x i+1 ; The jth (j=1, ..., N) sample point x j With tangent l i The distance between them is defined as the height h i,j , calculate the distance from each sample point to axis l i The height value of point x i A shape descriptor relative to a shape X is an ordered sequence of height values:
[0031]
[0032] Where h i,j (j=1, ..., N) represents the jth sample point x j Relative to point x i The reference axis l i The height value of
[0033] The descriptor defined above consists of the relative position of each single sample point to the reference axis. This precise description may be too sensitive to local boundary deformation. Take an integer k and divide the integer sequence 1, 2, ..., N into non-intersecting intervals [1, k], [k+1, 2k], ..., and calculate the mean of the height values in each interval:
[0034]
[0035] Where j = 1, 2, ..., M, M = the integer part of N / k, and a new feature vector is obtained, representing the sampling point x i The smoothed height value is:
[0036]
[0037] F i As H iThe smoothed version. The smoothing process improves the robustness of the descriptor to local deformation, and since k>1 and M<N, the descriptor is reduced from N dimensions to M dimensions. If N = 100 and k = 5, the dimension of the descriptor is reduced from 100 to M = 20;
[0038] For each sampling point x i (i = 1,..., N), a descriptor F i (i = 1,..., N) is obtained as the descriptor of shape X, and the matrix:
[0039] F = F(X) = (F1,F2,...,F N );
[0040] Normalize F by dividing each row of F by the maximum absolute value of that row to make the shape representation scale-invariant:
[0041]
[0042] Preferably, in step S4, assume that the input dental crown physical bottom surface photo is X, the current traversed dental crown bottom surface two-dimensional view in the database is Y, p and q respectively represent the contour points of X and Y, F p and F q are the height features calculated for X and Y respectively, and the matching cost is calculated by comparing the height features of p and q:
[0043]
[0044] In the formula, ω t is the weight coefficient of each component of the height feature. In order to tolerate boundary deformation, the height features of points far from p and q are regarded as less important. The weight coefficient is set as follows:
[0045]
[0046] Finally, the minimum solution DPmin(c(p,q)) of the dissimilarity of the contour points of X and Y is obtained by using dynamic programming; then the Euclidean distances of the invariant feature moments Hu moments, the aspect ratio of the bounding box, and the size ratio of the contour are calculated as the matching cost, and the final total weighted matching cost is obtained after weighting;
[0047] For each dental crown bottom surface two-dimensional view read from the database, the total weighted matching cost between this two-dimensional view and the input dental crown physical bottom surface photo is obtained. After traversing and reading the entire database, the total weighted matching costs between all dental crown corresponding two-dimensional views and this photo are obtained, and the smallest one is output as the matching result.
[0048] Therefore, the present invention adopts the above-mentioned dental crown matching method based on contour features and has the following
[0049] beneficial effects:
[0050] (1) Feature extraction is simple, has low requirements for photographic equipment, can tolerate a certain amount of background noise, and is insensitive to changes in light and shadow;
[0051] (2) It has a high ability to describe the overall area, local and overall shapes of the contour, and also has a certain tolerance for local deformation;
[0052] (3) It has a certain matching accuracy in small-scale databases.
[0053] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 is a flow chart of an embodiment of the present invention;
[0055] Figure 2 A database consisting of bottom surface views derived from a designed three-dimensional model of a tooth crown according to an embodiment of the present invention;
[0056] Figure 3 A picture of the bottom surface of a tooth crown inputted by an embodiment of the present invention;
[0057] Figure 4 The bottom surface contour image of the tooth crown extracted by the embodiment of the present invention;
[0058] Figure 5 The OBB bounding box obtained after the contour point set and PCA principal component analysis in the embodiment of the present invention;
[0059] Figure 6 It is a scatter plot of equally spaced sampling points of the contour of an embodiment of the present invention;
[0060] Figure 7 Schematic diagram of the height value and the tangent line of the height function according to the embodiment of the present invention;
[0061] Figure 8 The matching result graph (including the input image) is finally outputted by the embodiment of the present invention. DETAILED DESCRIPTION
[0062] Example
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] like Figure 1-Figure 8The present invention discloses a crown matching method based on contour features, comprising the following steps:
[0065] S1. Extract the bottom view of the designed three-dimensional model of the tooth crown to form a two-dimensional image database of the bottom surface of the tooth crown to be retrieved.
[0066] Open the 3D model of the designed crown with software that can read 3D models, such as Materialise Magics, click on the bottom view, export or manually capture it, and these 2D views of the bottom surface of the crown will form a database to be searched.
[0067] S2. Input the bottom surface photo of the actual crown after production and processing, perform grayscale processing and mean filtering on the bottom surface photo, extract the bottom surface contour of the crown through adaptive canny edge detection and contour screening, calculate the invariant feature moment Hu moment of the bottom surface contour of the crown, the aspect ratio of the OBB bounding box, the size ratio of the contour, perform fixed number of equal-interval sampling on the contour point set, and calculate the feature descriptor height function of the sampling points.
[0068] The OBB bounding box of the contour is obtained by the PCA principal component analysis method, and the aspect ratio of the bounding box, the size ratio of the contour and the invariant characteristic moment Hu of the contour are calculated.
[0069] The Hu moment constructs 7 invariant moments using the second-order and third-order center distances. The calculation formulas for the geometric moment and central moment required to calculate the Hu moment are as follows:
[0070] Geometric moments:
[0071]
[0072] Where f(x,y) is array(x,y), N and M correspond to images with a width and height of N*M, and the 0th-order moment m 00 is the contour area, the first-order moment m 10 and m 01 Used to describe the center of mass position;
[0073] The central moment constructed through the center of mass is rotationally invariant, the central moment:
[0074]
[0075] In the formula,
[0076] By normalizing the central moment, we can obtain the normalized central moment with rotation, translation, and scaling invariance:
[0077]
[0078] The calculation formulas for the 7 invariant moments of Hu moment are as follows:
[0079] h0=h 20 +n 02 ;
[0080] h1=h 20 +n 02 ;
[0081]
[0082] h3=(h 30 -3rd 12 ) 2 +3(h 21 -or 03 ) 2 ;
[0083] h4=(h 30 -3rd 12 )(or 30 +n 12 )[(or 30 +n 12 ) 2 -3(h 12 +n 03 ) 2 ]+(3rd 21 -
[0084] or 03 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 12 +n 03 ) 2 ];
[0085] h5=(h 20 -or 02 )[(or 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ]+4th 11 (or 30 +n 12 )(or 21 +
[0086] or 03 );
[0087] h6=(3rd) 21 -or 03 )(or 21 +n 03 )[3(h30 +η 12 ) 2 -(η 21 +η 03 ) 2 ]-(η 30 -
[0088] η 12 )(η 21 +η 03 )[3(η 30 +η 12 ) 2 -(η 21 +η 03 ) 2 ];
[0089] The 7 invariant moments constitute a seven-dimensional vector with rotation, translation and scaling invariance. As the basis for contour matching, it has a certain degree of accuracy and the ability to screen contours.
[0090] The contour point set is sampled at equal intervals with a fixed number of points. Let X = {x i}(i=1, ..., N) represents a sequence of equidistant sampling points on the outer contour of a given shape, where index i determines the coordinate axis according to the order of sampling points in the counterclockwise direction along the contour. For each sample point x i , the direction of the tangent is from the point before the sampling point to the point after the sampling point, translate to the sampling point to get the tangent, and change its tangent l i Denotes the reference axis, tangent line l i The direction of the contour line is inherited from the direction of the x i-1 to x i+1 ; The jth (j=1, ..., N) sample point x j With tangent l i The distance between them is defined as the height h i,j , calculate the distance from each sample point to axis l i The height value of the point x is defined as the distance from other sampling points to the above tangent line as the height value from other points to this tangent line, thus obtaining the i The shape descriptor for shape X is an ordered sequence of height values. i A shape descriptor relative to a shape X is an ordered sequence of height values:
[0091]
[0092] Where h i,j (j=1, ..., N) represents the jth sample point x j Relative to point x i The reference axis l i The height value of
[0093] The descriptors defined above consist of the relative positions of each individual sample point to the reference axis. Such precise description may be overly sensitive to local boundary deformation. To smooth the shape descriptor, a positive integer k is determined. Given N sampling points, the sampling points are divided into M groups, where M = N / k, with k sampling points in each group. The height values of all sampling points in each group are calculated, and the mean of all height values in the group is taken as the height value of the group.
[0094] Take a positive integer k, divide the integer sequence 1, 2,..., N into non - overlapping intervals [1, k], [k + 1, 2k],..., and calculate the mean of the height values within each interval:
[0095]
[0096] where j = 1, 2,..., M, and M is the integer part of N / k, obtaining a new feature vector representing the sampling point x i The smoothed height value is:
[0097]
[0098] F i As the smoothed version of H, the smoothing process improves the robustness of the descriptor to local deformation. And since k > 1, M < N, the descriptor is reduced from N - dimensional to M - dimensional. If N = 100 and k = 5, then the dimension of the descriptor is reduced from 100 to M = 20; i For each sampling point, there is a 1×M vector as the feature vector. Then for the contours of all N sampling points, the dimension of the feature vector is N×M.
[0099] For each sampling point x
[0100] Scale normalization is performed on the shape descriptor. Each row vector of the N×M - dimensional feature vector is divided by the element with the largest absolute value in that row to ensure the scale invariance of the height function. The features used for the contour consist of the above - mentioned features.
[0101] For each sampling point x i (i = 1, …, N), a descriptor F i (i = 1, …, N) is obtained as the descriptor of the shape X, resulting in a matrix:
[0102] F = F(X)=(F1,F2,...,F N );
[0103] Normalize F by dividing each row in F by the largest absolute value in that row to make the shape representation scale - invariant:
[0104]
[0105] S3, traverse the two-dimensional images in the database in S1, and perform the same operations and calculations on the two-dimensional images as in step S2.
[0106] S4. Calculate the matching cost of each feature of the currently traversed two-dimensional image and the input bottom surface photo, obtain the total weighted matching cost after weighting, store it in a list, and after the traversal is completed, output the bottom surface view of the crown with the smallest total weighted matching cost as the matching result.
[0107] Assume that the photo of the actual bottom surface of the crown input is X, the two-dimensional view of the bottom surface of the crown currently traversed in the database is Y, p and q represent the contour points of X and Y respectively, and F p and F q The height features calculated for X and Y are calculated separately, and the matching cost is calculated by comparing the height features of p and q:
[0108]
[0109] In the formula, ω t is the weight coefficient of each component of the height feature. In order to tolerate boundary deformation, the height features of points far away from p and q are considered less important. The weight coefficients are set as follows:
[0110]
[0111] Finally, dynamic programming is used to obtain the minimum solution DPmin(c(p,q)) of the dissimilarity between the X and Y contour points; the invariant feature moment Hu moment, the aspect ratio of the bounding box, and the Euclidean distance of the contour size ratio are calculated as the matching cost, and the final total weighted matching cost is obtained after weighting;
[0112] Each time a two-dimensional view of the bottom surface of a crown is read from the database, the total weighted matching cost between the two-dimensional view and the input crown physical bottom surface photo is obtained. After traversing and reading the database, the total weighted matching cost of all corresponding two-dimensional views of the crown and the photo is obtained, and the smallest one is output as the matching result.
[0113] Therefore, the present invention adopts the above-mentioned crown matching method based on contour features, which has simple feature extraction, low requirements for photographic equipment, can tolerate a certain background noise, and is insensitive to light and shadow changes; it has a high description ability for the overall area, local and overall shapes of the contour, and at the same time has a certain tolerance for local deformation; it has a certain matching accuracy in a small-scale database.
[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A crown matching method based on contour features, characterized in that: The following steps are involved: S1, extracting the bottom view of the designed three-dimensional model of the tooth crown to form a two-dimensional image database of the bottom surface of the tooth crown to be retrieved; S2. Input the bottom surface photo of the actual crown after production and processing, perform grayscale processing and mean filtering on the bottom surface photo, extract the bottom surface contour of the crown through adaptive canny edge detection and contour screening, calculate the invariant characteristic moment Hu moment of the bottom surface contour of the crown, the aspect ratio of the OBB bounding box, the size ratio of the contour, perform fixed number of equal-interval sampling on the contour point set, and calculate the feature descriptor height function of the sampling points; S3, traverse the two-dimensional images in the database in S1, and perform the same operations and calculations on the two-dimensional images as in step S2; S4. Calculate the matching cost of each feature of the currently traversed two-dimensional image and the input bottom surface photo, obtain the total weighted matching cost after weighting, store it in a list, and after the traversal is completed, output the bottom surface view of the crown with the smallest total weighted matching cost as the matching result.
2. The method for matching a crown based on contour features according to claim 1, characterized in that: In step S2, the OBB bounding box of the contour is obtained by the PCA principal component analysis method, and the aspect ratio of the bounding box, the size ratio of the contour and the invariant characteristic moment Hu of the contour are calculated.
3. The method for matching a crown based on contour features according to claim 2, characterized in that: The Hu moment constructs 7 invariant moments using the second-order and third-order center distances. The calculation formulas for the geometric moment and central moment required to calculate the Hu moment are as follows: Geometric moments: Where f(x,y) is array(x,y), N and M correspond to images with a width and height of N*M, and the 0th-order moment m 00 is the contour area, the first-order moment m 10 and m 01 Used to describe the center of mass position; Central moment: In the formula, Normalizing the central moment gives the normalized central moment: The calculation formulas for the 7 invariant moments of Hu moment are as follows: h0=h 20 +n 02 ; h1=h 20 +n 02 ; h3=(h 30 -3rd 12 ) 2 +3(h 21 -or 03 ) 2 ; h4=(h 30 -3rd 12 )(or 30 +n 12 )[(or 30 +n 12 ) 2 -3(h 12 +n 03 ) 2 ]+(3rd 21 -or 03 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 12 +n 03 ) 2 ]; h5=(h 20 -or 02 )[(or 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ]+4th 11 (or 30 +n 12 )(or 21 +n 03 ); h6=(3rd) 21 -or 03 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ]-(or 30 -or 12 )(or 21 +n 03 )[3(h 30 +n 12 ) 2 -(or 21 +n 03 ) 2 ]; The 7 invariant moments form a seven-dimensional vector, which serves as the basis for contour matching.
4. The method for matching a crown based on contour features according to claim 3, characterized in that: In step S2, let X = {x i }(i=1, ..., N) represents a sequence of equidistant sampling points on the outer contour of a given shape, where index i determines the coordinate axis according to the order of sampling points in the counterclockwise direction along the contour. For each sample point x i , its tangent line l i Denotes the reference axis, tangent line l i The direction of the contour line is inherited from the direction of the x i-1 to x i+1 ; The jth (j=1, ..., N) sample point x j With tangent l i The distance between them is defined as the height h i,j , calculate the distance from each sample point to axis l i The height value of point x i A shape descriptor relative to a shape X is an ordered sequence of height values: Where h i,j (j=1, ..., N) represents the jth sample point x j Relative to point x i The reference axis l i The height value of The descriptor defined above consists of the relative position of each single sample point to the reference axis. Take an integer k and divide the integer sequence 1, 2, ..., N into non-overlapping intervals [1, k], [k+1, 2k], ..., and calculate the mean of the height values in each interval: Where j = 1, 2, ..., M, M = the integer part of N / k, and a new feature vector is obtained, representing the sampling point x i The smoothed height value is: F i As a smoothed version of H i smoothing improves the robustness of the descriptor to local deformation, and since k>1, M<N, the descriptor is reduced from N dimensions to M dimensions. If N = 100 and k = 5, the dimension of the descriptor is reduced from 100 to M = 20; For each sampling point x i (i=1, ..., N), get a descriptor F i (i=1, ..., N), as the descriptor of shape X, we get the matrix: F=F(X)=(F1,F2,...,F N ); Normalize F by dividing each row in F by the maximum absolute value of the row, making the shape representation scale invariant:
5. The method for matching a crown based on contour features according to claim 4, characterized in that: In step S4, assume that the input photo of the bottom surface of the crown is X, the two-dimensional view of the bottom surface of the crown currently traversed in the database is Y, p and q represent the contour points of X and Y respectively, and F p and F q The height features calculated for X and Y are calculated separately, and the matching cost is calculated by comparing the height features of p and q: In the formula, ω t is the weight coefficient of each component of the height feature, and the weight coefficient is set as follows: Finally, dynamic programming is used to obtain the minimum solution DPmin(c(p,q)) of the dissimilarity between the X and Y contour points; the invariant feature moment Hu moment, the aspect ratio of the bounding box, and the Euclidean distance of the contour size ratio are calculated as the matching cost, and the final total weighted matching cost is obtained after weighting; Each time a two-dimensional view of the bottom surface of a crown is read from the database, the total weighted matching cost between the two-dimensional view and the input crown physical bottom surface photo is obtained. After traversing and reading the database, the total weighted matching cost of all corresponding two-dimensional views of the crown and the photo is obtained, and the smallest one is output as the matching result.