A wheel 3D modeling similarity retrieval method

By converting the 3D shape of a wheel into a feature image and performing mean square error and similarity calculations, the problems of high computational cost and information redundancy in existing technologies are solved, achieving efficient similarity retrieval and accurate matching of 3D wheel shapes.

CN116955679BActive Publication Date: 2026-02-17CITIC DICASTAL CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311047643.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-19
Publication Date
2026-02-17
Estimated Expiration
2043-08-19

AI Technical Summary

Technical Problem

Existing 3D model similarity retrieval methods suffer from problems such as high computational cost, information redundancy, cumbersome calculations, and strong dependence on projection technology, especially in the similarity retrieval of 3D wheel shapes, where the results are not good.

Method used

By converting the 3D shape of the wheel into a feature image, scanning is performed using a dynamic radial stepping algorithm and a line segment intersection finder to generate a 2D feature image. The similarity of the 3D wheel shape is then calculated using mean square error and similarity calculation.

Benefits of technology

It achieves efficient dimensionality reduction and similarity retrieval for 3D wheel models, improving the versatility and accuracy of the method, and is able to handle 3D wheel models of different sizes and states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955679B_ABST
    Figure CN116955679B_ABST
Patent Text Reader

Abstract

A wheel 3D modeling similarity retrieval method comprises steps S1 and S2. S1 comprises wheel 3D modeling feature extraction: constructing a scene and sequentially obtaining a storage path of the wheel 3D modeling; creating a model node and a matrix transformation node, preprocessing the wheel 3D modeling and adding it to the scene created in the previous step; calculating the size of the wheel 3D modeling bounding box; performing modeling normalization; initializing parameters and constructing a canvas; using a dynamic step radial stepping algorithm and a line segment intersection device to scan the wheel 3D modeling, using the bounding box data to calculate and store the shape information of the wheel 3D modeling; and extracting all wheel 3D modeling feature images. S2 comprises similarity calculation: reading the feature images and normalizing; intercepting the spoke corresponding part; gray-scale and binarizing the spoke feature image, solving the mean square error and similarity of the binary image and storing; and sorting and outputting the to-be-matched and candidate wheel 3D modeling according to the similarity value, thereby realizing fast calculation and retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial 3D shape similarity retrieval, and in particular to a method for retrieval of 3D wheel shapes similarity. Background Technology

[0002] 3D models are widely used in various fields, and 3D model retrieval technology has been continuously developed in these fields. Among these, feature extraction methods based on global function transformations are known. These methods mathematically transform the overall geometric information of the model and use the transformation coefficients as global feature descriptions. This method is intuitive for processing 3D models and yields relatively compact feature descriptions. Additionally, there are statistical global feature extraction methods. These methods, guided by statistical principles, use specific statistical quantities obtained from the global scope of the 3D model as its features. This method has the advantages of simple and clear principles and high computational efficiency. Furthermore, there are projection-based global feature extraction methods. These methods convert the 3D model into a 2D image and then use mature 2D image processing techniques to extract features from the 3D model. This method has good stability and aligns well with human visual perception of 3D shapes. Finally, there are topology-based global feature extraction methods. In this method, the topological structure of the 3D model reflects its global spatial architecture, showing the connection relationships between different components within the model. This method can record the structural relationships within the model and is less sensitive to deformation of 3D objects.

[0003] The above methods also have the following shortcomings:

[0004] (1) Feature extraction methods based on global function transformation have a large computational load and often require model normalization and voxelization.

[0005] (2) The global statistical data relied upon by the statistical global feature extraction method is often too general, which hinders the ability of the extracted features to distinguish different three-dimensional models.

[0006] (3) Global feature extraction methods based on projection are highly dependent on projection technology. In order to ensure the accuracy of feature extraction, a large number of projections need to be collected. Therefore, these methods generally suffer from information redundancy due to overlapping projection regions and cumbersome calculation of similarity between different models.

[0007] (4) The computational cost of constructing the topology graph using the topology-based global feature extraction method is large, and the similarity between models needs to be calculated through complex graph matching. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a method for similarity retrieval of 3D wheel shapes. By converting the 3D wheel shape into a corresponding feature image and calculating the mean square error and similarity between the feature images, similarity retrieval of 3D wheel shapes is realized.

[0009] To solve the above-mentioned technical problems, the present invention adopts the following technical solution.

[0010] A method for retrieval of 3D wheel shapes includes the following steps:

[0011] S1. Extraction of 3D wheel features, including:

[0012] S1.1 Construct the scene and sequentially obtain the 3D model of the wheels to the storage path;

[0013] S1.2 creates model nodes and matrix transformation nodes, preprocesses the 3D shape of the wheel, and adds it to the scene created in S1.1;

[0014] S1.3 Calculate the size of the 3D modeling bezel box for the wheel;

[0015] S1.4 Normalizes the orientation and size of the 3D wheel model;

[0016] S1.5 Initialize parameters such as the intersection line movement step size and rotation angle, and construct the canvas;

[0017] S1.6 uses a dynamic step-length radial stepping algorithm and a line segment intersection algorithm to perform 3D model scanning of the wheel, uses bounding box data to calculate the 3D model shape information of the wheel, and stores it as a feature image in PNG format.

[0018] S1.7 Repeat the operations of S1.2~1.6 to extract the feature images of all wheel 3D shapes;

[0019] S2. Similarity calculation between the 3D model of the wheel to be matched and the 3D model of the candidate wheel, including:

[0020] S2.1 Reads the feature image of the 3D shape of the wheel and normalizes the image;

[0021] S2.2 Extract the portion corresponding to the spokes from the feature image;

[0022] S2.3 Grayscale and binarize the wheel spoke feature image, solve for the mean square error and similarity of the binary image and store it, and repeat this S2.3 process for all feature images.

[0023] S2.4 Sort the 3D models of the wheels to be matched and the candidate 3D models of the wheels in descending order of similarity value, and output the results.

[0024] A further improvement of the technical solution of the present invention is that, in S1.4, by normalizing the position orientation and size of the 3D model of the wheel, the versatility of the method for 3D models of wheels in different states and sizes is enhanced.

[0025] A further improvement to the technical solution of this invention lies in the following: In S1.5, the step size of the radial stepping algorithm is dynamically changed, which accelerates the scanning process of the 3D wheel model. The feature image extracted based on this algorithm and its corresponding 3D wheel model are shown below. Figure 3 As shown.

[0026] A further improvement of the technical solution of the present invention is that, in S2.1, the versatility and accuracy of the method are further improved by normalizing the 3D shape feature image of the wheel.

[0027] A further improvement to the technical solution of this invention lies in: In S2.2, the two wheel spoke feature images are of the same size, and their binary images are compared. The formula for calculating the mean square error of the two feature images is:

[0028]

[0029] In the formula, MSE is the mean square error of the two binary plots, x i y i These are the pixel values ​​at the same coordinate positions in the binary image X and Y, respectively, and n is the total number of pixels in the binary image.

[0030] The formula for calculating the similarity between two wheel spoke feature images is:

[0031]

[0032] 1.0 is the maximum possible value of MSE. The 3D model of the wheel to be matched and its spoke feature image, and candidate wheel number 1 and its feature image used in the embodiment are as follows: Figure 4 As shown.

[0033] The technological advancements achieved by this invention due to the adoption of the above technical solutions are as follows:

[0034] 1. This invention obtains the 3D shape structure information of a wheel by using dynamic radial rotation scanning and a line segment intersection finder, and stores it in a 2D feature image to realize the 2D representation of the 3D shape of the wheel.

[0035] 2. This invention designs a 3D wheel shape similarity calculation algorithm, which converts the similarity calculation of 3D wheel shapes into the mean square error calculation of 2D feature images, thereby realizing the similarity retrieval of 3D wheel shapes.

[0036] 3. This invention can reduce the dimensionality of all 3D wheel shapes, thus having better versatility.

[0037] 4. This invention satisfies the need for comparison between 3D models of wheels of different sizes. Attached Figure Description

[0038] Figure 1 This is a flowchart of the wheel 3D shape similarity retrieval method in this invention;

[0039] Figure 2 This is a schematic diagram of the 3D shape of the wheel to be scanned in this invention;

[0040] Figure 3 These are the wheels to be matched and their feature maps;

[0041] Figure 4 This is a comparison diagram of the spoke feature maps of the 3D model of the wheel to be matched and the 3D model of candidate wheel No. 1 in this invention;

[0042] Figure 5 This is a schematic diagram of the 3D wheel shape similarity search results in this invention. Detailed Implementation

[0043] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0044] like Figure 1 As shown, a method for retrieval of 3D wheel shapes includes the following steps S1 and S2.

[0045] S1. Extraction of 3D wheel shape features, specifically including the following steps S1.1 to S1.7.

[0046] S1.1 Construct the scene and obtain the storage path of the 3D wheel shape in sequence.

[0047] In the IDE Visual Studio 2022, the scene is constructed using osg::Group() in OpenSceneGraph (hereinafter referred to as OSG or osg), and the storage paths of the wheel 3D models in the local folder are read sequentially using the file path reading method in osg.

[0048] S1.2 creates model nodes and matrix transformation nodes, preprocesses the 3D shape of the wheel, and adds it to the scene created in S1.1.

[0049] Specifically, the `readNodeFile()` method in `osgDB` is used, with the file path of the 3D wheel model as the parameter, to load the 3D wheel model from the file. This function returns an `osg::Node` object to store the 3D wheel model; this `osg::Node` object is called the model node. A new matrix transformation node is created using `osg::PositionAttitudeTransform()`, and the `addChild()` method is used to add the model node as a child node to the matrix transformation node. At this point, the 3D wheel model can be rotated through the matrix transformation node. Finally, the preprocessed 3D wheel model is added to the appropriate position in the scene created in S1.1.

[0050] S1.3 Calculate the size of the 3D modeling bezel box for the wheel.

[0051] The getBoundingBox() method is used to calculate the bounding box size of the 3D wheel shape, which is used for subsequent coordinate parameter calculations.

[0052] S1.4 performs 3D modeling of the wheel, normalizing its orientation and size.

[0053] If the bounding box has the shortest length in the x-direction, then this direction should be rotated to the z-axis of the coordinate system, i.e., rotated 90° around the y-direction of the bounding box. If the bounding box has the shortest length in the y-direction, then this direction should be rotated to the z-axis of the coordinate system, i.e., rotated 90° around the x-direction of the bounding box. If the bounding box has the shortest length in the z-direction, then this direction should be taken as the z-axis of the coordinate system, and no rotation is performed in this case. After rotation, the dimensions of the 3D wheel model are normalized, and the radius of all sizes of the 3D wheel models is uniformly scaled to L. Therefore, the scaling factor of the 3D wheel model in each direction is L / R, where R is the radius of the 3D wheel model.

[0054] S1.5 initializes parameters such as the intersection line movement step size and rotation angle, and constructs the canvas.

[0055] Initialize the parameters of the dynamic step size radial stepping algorithm, set the initial step size and initial rotational angular velocity, and make a backup for dynamic step size changes, and build an SVG canvas.

[0056] S1.6 uses a dynamic step-length radial stepping algorithm and a line segment intersection algorithm to perform 3D model scanning of the wheel, calculates the 3D model shape information of the wheel using bounding box data, and saves it as a PNG image.

[0057] Collision and intersection detection are performed using osg::LineSegmentIntersector() and osg::IntersectionVisitor(). Intersection information is cached, and combined with bounding box data to calculate the 3D shape information of the wheel, which is then stored as an SVG file. Finally, the SVG file is converted to a PNG feature image using the svg2png method from Python's cairosvg library.

[0058] During collision and intersection detection, if no intersection is detected, the step size is dynamically increased by `fixed_len`, which is the minimum step size. If an intersection is detected, the step size is checked. If the current step size is not equal to `fixed_len`, a binary search is used to backtrack the position, taking the midpoint between the new detection point and the intersection determined in the previous round, and the step size becomes the minimum step size. If the current step size is the minimum step size, the new detection point is the new intersection. The 3D shape information of the wheel at the new intersection is calculated, and the difference between the shape information of the new intersection and the previous intersection is further checked. If the shape information is the same, the step size is dynamically increased by `fixed_len`, which is the minimum step size. If the shape information is significantly different, the step size remains the minimum step size. After the above process is completed, a new round of collision and intersection detection begins.

[0059] Once the 3D model of the wheel is scanned, the wheel shape information is saved into a .svg file. The cairosvg and os libraries are imported into the PyCharm IDE. The .svg file is read, and the svg2png method in the cairosvg library of Python is used to save the .svg file as a .png feature image.

[0060] S1.7 determines whether the locally stored 3D wheel model has been processed. If not, it returns to S1.2 and repeats the operations from S1.2 to S1.6. If the processing is complete, it proceeds to step S2. By performing S1.7, the feature images of all 3D wheel models can be extracted and stored in PNG format.

[0061] S2. Calculate the similarity between the 3D model of the wheel to be matched and the 3D model of the candidate wheel, specifically including the following steps S2.1~S2.4.

[0062] S2.1 Reads the feature image of the 3D shape of the wheel and normalizes the feature image.

[0063] First, the PNG feature image generated in step S1 is read using the OpenCV library's `cv.imread()` function. Based on the pixel distribution of the feature image, if it's obtained from a frontal view, the pixels are mainly distributed in the lower half of the image; if it's obtained from a rear view, the pixels are mainly distributed in the upper half. After reading the feature image, image binarization is performed. The type of feature image is distinguished by the number of pixels in the upper and lower parts of the left half. Finally, the feature image is normalized to a frontal view feature image using the image flipping function `cv.flip()`.

[0064] S2.2 Extract the portion corresponding to the spokes from the feature image.

[0065] The spoke portion of the complete feature image with a size of 300*20000 is cropped. cut_png = png[start_height: end_height, start_width: end_width], where start_height is the starting position of the vertical pixels of the spoke portion of the feature image, end_height is the ending position of the vertical pixels of the spoke portion of the feature image, start_width is the starting position of the horizontal pixels of the spoke portion of the feature image, and end_width is the ending position of the horizontal pixels of the spoke portion of the feature image.

[0066] S2.3 Convert the wheel spoke feature image to grayscale and binarize it, calculate the mean square error and similarity of the binary image, and store it. Determine whether the feature image processing is complete. If the image is not complete, repeat step S2.3. If the image processing is complete, proceed to step S2.4.

[0067] The two wheel spoke feature images are of the same size, and their binary images are compared. The formula for calculating the mean square error of the two feature images is as follows:

[0068]

[0069] In the formula, MSE is the mean square error of the two binary plots, x i y i These are the pixel values ​​at the same coordinate positions in the binary image X and Y, respectively, and n is the total number of pixels in the binary image.

[0070] The formula for calculating the similarity between two wheel spoke feature images is:

[0071]

[0072] 1.0 is the maximum possible value for MSE. After calculation, the similarity results are saved in key-value pair format, where the key is the file name of the current candidate wheel 3D model.

[0073] S2.4 Sort the 3D models of the wheels to be matched and the candidate 3D models of the wheels in descending order of similarity value, and output the results.

[0074] The similarity values ​​are sorted from largest to smallest, with higher similarity values ​​indicating greater similarity between the 3D wheel designs. Finally, the 3D wheel designs to be matched and the candidate 3D wheel designs are output according to the sorted results.

[0075] Example

[0076] The method for retrieving similar 3D wheel shapes specifically includes the following steps S1 and S2.

[0077] S1. Extraction of 3D wheel shape features, specifically including the following steps S1.1 to S1.7.

[0078] S1.1 Build the scene and obtain the storage path of the 3D model of the wheel.

[0079] In the Visual Studio 2022 IDE, use osg::Group() to construct the scene and use the osg file path reading method to obtain the storage path of the wheel 3D model in the local folder in turn.

[0080] S1.2 creates model nodes and matrix transformation nodes, preprocesses the 3D shape of the wheel, and adds it to the scene created in S1.1.

[0081] Specifically, the `readNodeFile()` method in `osgDB` is used, with the file path of the 3D wheel model as the parameter, to load the 3D wheel model from the file. This function returns an `osg::Node` object to store the 3D wheel model; this `osg::Node` object is called the model node. A new matrix transformation node is created using `osg::PositionAttitudeTransform()`, and the `addChild()` method is used to add the model node as a child node to the matrix transformation node. At this point, the 3D wheel model can be rotated through the matrix transformation node. Finally, the preprocessed 3D wheel model is added to the appropriate position in the scene created in S1.1.

[0082] S1.3 Calculate the size of the 3D modeling bezel box for the wheel.

[0083] The bounding box size of the 3D wheel shape is calculated using the osg::getBoundingBox() method, which is used for subsequent coordinate parameter calculations.

[0084] S1.4 normalizes the 3D model of the wheel.

[0085] This method achieves general applicability in terms of wheel 3D model size and initial position by normalizing the wheel 3D model. The specific method is as follows:

[0086] Based on the bounding box dimensions of the 3D wheel model, the initial position of the 3D wheel model is normalized: if the length of `boundingBox1.xMax()` is the shortest, then this direction should be rotated to the z-axis of the coordinate system, i.e., the wheel model should be rotated 90° around the y-axis of the bounding box using the `matrix.makeRotate()` function; if the length of `boundingBox1.yMax()` is the shortest, then this direction should be rotated to the z-axis of the coordinate system, i.e., the wheel model should be rotated 90° around the x-axis of the bounding box; if the length of the bounding box in the z-direction is the shortest, then this direction should be used as the z-axis of the coordinate system, and no rotation is performed. After rotation, the dimensions of the 3D wheel model are normalized, and the radius of all sizes of the 3D wheel model is uniformly scaled to 100. Therefore, the scaling factor of the 3D wheel model in each direction is 100 / R, where R is the radius of the 3D wheel model.

[0087] S1.5 initializes parameters such as the intersection line movement step size and rotation angle, and constructs the canvas.

[0088] Initialize a 300*20000 canvas. At the central axis of the 3D wheel shape, create a straight line perpendicular to the 3D wheel shape. Use this line as... A spatial rectangular coordinate system is established along the axis, and the 3D model of the wheel is as follows: Figure 2 As shown. An initial step size and initial rotational angular velocity are set, and a backup is created as the increment value when dynamically increasing the step size. The initial step size, step_len, is set to the wheel radius / 20000, and is used as the increment for each dynamic step increase, denoted as fixed_len. The initial rotational angular velocity is set to 1.8°.

[0089] S1.6 uses a dynamic step-size radial stepping algorithm and a line segment intersection algorithm to perform 3D model scanning of the wheel, calculates the 3D model shape information of the wheel using bounding box data, and stores it as a PNG feature image.

[0090] Each time the algorithm takes a step, the 3D model of the wheel rotates along the Z-axis. A straight line originating from the wheel's central axis intersects the 3D model, generating an even number of intersection points. The step size is adjusted accordingly based on whether the line intersects the 3D model of the wheel.

[0091] 1. If no intersection is detected in the current collision detection and intersection detection, the step size is dynamically increased, and the value of each increase is the minimum step size, i.e., fixed_len.

[0092] 2. If the new collision detection and intersection detection find an intersection point, and the current step size is != fixed_len, then a binary search method is used for position backtracking. The backtracking position is the midpoint between the new detection point and the intersection point determined by the previous round of detection, i.e., len = pre_len + (len - pre_len). The dynamic step size step_len is changed to the minimum step size fixed_len. If there is an intersection point and the dynamic step size step_len is the minimum step size fixed_len, then coordinate mapping is performed, and the 3D shape information of the wheel at this intersection point is recorded.

[0093] If an intersection exists at the current position, and another intersection is detected in the next step, calculate the difference between the two wheel shape parameters. If the difference is less than EPS = 0.00001, it is approximately assumed that the wheel shapes at the two intersections are the same, and the dynamic step size is increased. Each increase is the initial step size fixed_len, and the 3D shape information of the wheel at this intersection is recorded. If the difference is greater than EPS, only the 3D shape information of the wheel at this intersection is recorded, and the minimum step size is still used.

[0094] Coordinate Mapping: Each time a line enters and exits an entity, it generates two values. The current value is the true value in 3D space, and the two corresponding intersection points are called intersection pairs. These true values ​​need to be mapped to 2D coordinates in the SVG canvas. The mapping process is as follows:

[0095] For the first intersection point in a pair of intersection points, the actual coordinates of the intersection point are marked as (x1, y1), where x1 is the radial displacement len ​​of the intersection point, and y1 is the coordinate value in the Z direction obtained using getWorksIntersectionPoint().z(), mapped to the canvas coordinates as (X1, Y1). The calculation formula is as follows:

[0096]

[0097] Where endlength is the radius of the 3D wheel model, width=20000 is the length of the canvas, height=300 is the width of the canvas, Zmin is the minimum value of the bounding box's Z-axis coordinate, and Zmax is the maximum value of the bounding box's Z-axis coordinate.

[0098] For the second intersection point in the intersection point pair, the coordinate mapping process is the same, and (X2,Y2) can be obtained. Y1 and Y2 are the values ​​of the vertical coordinates of the corresponding intersection points on the canvas, and Y2-Y1 is the thickness of the 3D model body of the wheel.

[0099] After the 3D modeling scan of the wheel is completed, the wheel shape information is stored in an.svg file. In the IDE Pycharm, import the cairosvg and os libraries, read the above.svg file, and use the svg2png method in the cairosvg library of python to store the.svg file as a.png feature image.

[0100] S1.7 Determine whether the 3D modeling of the locally stored wheel is processed. If it is not processed, return to S1.2 to loop through the operations of S1.2~1.6. If it is processed, enter the following step S2. By performing this S1.7, the feature images of all wheel 3D models can be extracted and the images can be stored in the png format.

[0101] S2. Calculate the similarity between the 3D modeling of the wheel to be matched and the 3D modeling of the candidate wheel, specifically including the following steps S2.1~S2.4.

[0102] S2.1 Read the feature image of the 3D modeling of the wheel and normalize the image.

[0103] In the IDE Pycharm, import the OpenCV, os, and numpy libraries, and use cv.imread() to read the png feature image generated in S1.

[0104] According to the pixel distribution of the feature image, if the feature image is obtained from the front view perspective, its pixels are mainly distributed in the lower half of the image; if the feature image is obtained from the rear view perspective, its pixels are mainly distributed in the upper half of the image. After reading the feature image, perform image binarization and intercept the upper left 1 / 4 part of the image, denoted as top = png[0:height / 2, 0:10000], and intercept the lower left 1 / 4 part, denoted as bottom = png[height / 2:height, 0:10000]. Count the number of white pixels in the top and bottom parts, denoted as top_sum and bottom_sum. If top_sum < bottom_sum, it means that the current image is a rear view feature image, and use the cv.flip() function to flip the current feature image to convert it into a front view feature image, achieving the normalization of the feature image.

[0105] S2.2 Intercept the corresponding part of the spokes in the feature image.

[0106] Intercept the spoke part of the complete feature image with a size of 300*20000, cut_png = png[200:300, 8000:16000].

[0107] S2.3 Convert the wheel spoke feature image to grayscale and binarize it, calculate the mean square error and similarity of the binary image, and store it. Determine whether the feature image processing is complete. If the image is not complete, repeat step S2.3. If the image processing is complete, proceed to step S2.4.

[0108] The two wheel spoke feature images are of the same size, and their binary images are compared. The formula for calculating the mean square error of the two feature images is as follows:

[0109]

[0110] In the formula, MSE is the mean square error of the two binary plots, x i y i These are the pixel values ​​at the same coordinate positions in the binary image X and Y, respectively, and n is the total number of pixels in the binary image.

[0111] The formula for calculating the similarity between two wheel spoke feature images is:

[0112]

[0113] 1.0 is the maximum possible value of MSE. After calculation, the similarity between the two feature images is returned, denoted as value. The similarity result is saved as a key-value pair, where the key is the file name of the current candidate wheel 3D model.

[0114] S2.4 Sort the 3D models of the wheels to be matched and the candidate 3D models of the wheels in descending order of similarity value, and output the results.

[0115] The similarity values ​​are sorted from largest to smallest, with higher similarity values ​​indicating greater similarity between the 3D wheel designs. Finally, the 3D wheel designs to be matched and the candidate 3D wheel designs are output according to the sorted results.

[0116] This invention employed multiple 3D wheel models for experimentation and obtained experimental results. The comparison results of the image atlases are as follows: Figure 5 As shown.

[0117] In summary, this invention extracts feature images of 3D wheel shapes and calculates the image mean square error and similarity based on the images to provide similarity results for 3D wheel shapes, thus realizing similarity retrieval of 3D wheel shapes.

Claims

1. A method for retrieving similar 3D wheel shapes, characterized in that, Includes the following steps: S1. Extraction of 3D model features of the wheel, including: S1.1 Construct the scene and obtain the storage path of the 3D wheel shape in sequence; S1.2 creates model nodes and matrix transformation nodes, preprocesses the 3D shape of the wheel, and adds it to the scene created in S1.1; S1.3 Calculate the size of the 3D modeling bezel box for the wheel; S1.4 Normalizes the orientation and size of the 3D wheel model; S1.5 initialization includes parameters such as the intersection line movement step size and rotation angle, and constructs the canvas; S1.6 uses a dynamic step-length radial stepping algorithm and a line segment intersection algorithm to perform 3D model scanning of the wheel, uses bounding box data to calculate the 3D model shape information of the wheel, and stores it as a feature image in PNG format. S1.7 Repeat the operations of S1.2~1.6 to extract the feature images of all wheel 3D shapes; S2. Similarity calculation between the 3D model of the wheel to be matched and the 3D model of the candidate wheel, including: S2.1 Reads the feature image of the 3D shape of the wheel and normalizes the image; S2.2 Extract the portion corresponding to the spokes from the feature image; S2.3 Grayscale and binarize the wheel spoke feature image, solve for the mean square error and similarity of the binary image and store it, and repeat this S2.3 process for all feature images. S2.4 Store the similarity results. Sort the 3D models of the wheel to be matched and the candidate 3D models of the wheel in descending order of similarity value, and output the results. In S1.4, the initial position orientation of the 3D wheel model is normalized according to the bounding box size of the 3D wheel model: if the length of the bounding box in the x direction is the shortest, then this direction should be rotated to the z-axis direction of the coordinate system, that is, rotated 90° around the y-direction of the bounding box; if the length of the bounding box in the y direction is the shortest, then this direction should be rotated to the z-axis direction of the coordinate system, that is, rotated 90° around the x-direction of the bounding box; if the length of the bounding box in the z direction is the shortest, then this direction should be taken as the z-axis direction of the coordinate system, and no rotation is performed. After the rotation is completed, the size of the 3D wheel model is normalized, and the radius of the 3D wheel models of various sizes is uniformly scaled to L. The scaling scale of all 3D wheel models in each direction is L / R, where R is the radius of the 3D wheel model.

2. The wheel 3D shape similarity retrieval method according to claim 1, characterized in that: In S1.6, when the line segment intersection finder has no intersection with the 3D wheel model, the step size is dynamically increased, and each increase is the initial step size value; when the line segment intersection finder has an intersection with the 3D wheel model, the previous intersection is checked to determine if there is an intersection: if there is an intersection, the step size is dynamically increased, and each increase is the initial step size value. If there is no intersection, the binary search method is used to backtrack. The backtrack position is the midpoint between the new detection point and the intersection point determined in the previous round of detection, and the step size is changed to the initial step size value.

3. The wheel 3D shape similarity retrieval method according to claim 1, characterized in that: In S2.1, the types of feature images are distinguished based on the number of pixels in the upper left 1 / 4 and lower left 1 / 4 of the feature image. Through image inversion, all feature images are finally normalized to feature images from the front view perspective.

4. The wheel 3D shape similarity retrieval method according to claim 1, characterized in that: In S2.2, the two spoke feature images are of the same size, and their binary images are compared. The formula for calculating the mean square error of the two feature images is: , In the formula, MSE is the mean square error of the two binary plots, x i y i These are the pixel values ​​at the same coordinate positions in the X and Y axes of the binary image, respectively, where n is the total number of pixels in the binary image. The formula for calculating the similarity between two wheel spoke feature images is: , 1.0 is the maximum possible value of MSE.

5. The wheel 3D shape similarity retrieval method according to claim 1, characterized in that: The similarity calculation results of the wheel spoke feature images are stored in key-value pairs. The 3D model of the wheel to be matched and the 3D model of the candidate wheel are sorted from high to low according to the similarity value and then output.

Citation Information

Patent Citations

  • Image characterization method for shaft type and wheel disc type three-dimensional models

    CN114373175A