Jewelry structure detection method and device, and storage medium

By using angle positioning technology, symmetry detection technology and view projection conversion algorithm in jewelry detection technology, the structure and defects of jewelry are constructed and analyzed, and the problem of low detection accuracy in the existing technology is solved, and high-precision jewelry structure detection is achieved.

CN120013917AInactive Publication Date: 2025-05-16SHENZHEN FUYUAN WORKSHOP CULTURAL DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510129064.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-05
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing jewelry inspection technology has shortcomings in high-precision and large-scale inspection, especially when dealing with the highly reflective surface and complex structure of jewelry, it is difficult to accurately extract the boundary profile and analyze the symmetry, resulting in low detection accuracy.

Method used

Angle positioning technology is used to detect edges and corners, obtain the characteristic angles and feature edges of jewelry, and input these features into the pre-trained jewelry structure construction model to construct the jewelry structure to be tested. Then, the calibration parameters between adjacent views are extracted through symmetry detection technology, and the central point of the symmetry axial symmetry of the oblique right view and the oblique left view is calculated using the view projection conversion algorithm. Finally, these parameters are input into the jewelry defect detection model to classify defect types.

Benefits of technology

The accuracy and robustness of jewelry structure detection are improved, the symmetry and defect types of jewelry are accurately analyzed, and the deviation of detection results caused by inaccurate feature extraction or projection errors in traditional methods are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120013917A_ABST
    Figure CN120013917A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of jewelry detection, and discloses a jewelry structure detection method and device and a storage medium, and the method comprises the steps: obtaining a to-be-detected jewelry image; according to the to-be-detected jewelry image, performing corner detection to obtain a feature angle and a feature side line; inputting the to-be-detected jewelry image, the feature angle and the feature side line into a pre-trained jewelry structure construction model to obtain a to-be-detected jewelry structure; analyzing according to the jewelry structure to be tested to obtain calibration parameters; performing view projection conversion according to the calibration parameters to obtain an oblique right view symmetric axis symmetric center point and an oblique left view symmetric axis symmetric center point; and inputting the calibration parameters, the symmetric center point of the oblique right view symmetric axis, the symmetric center point of the oblique left view symmetric axis, the feature angle and the feature sideline into a pre-trained jewelry defect detection model to obtain a defect detection type. According to the method, high-precision jewelry structure detection can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of jewelry detection, and in particular to a jewelry structure detection method, device, and storage medium. Background Art

[0002] At present, with the rapid development of the jewelry industry, the design and production of high-end jewelry have increasingly higher requirements for quality inspection. However, due to the complex shapes and diverse surface textures of jewelry, traditional manual inspection methods can no longer meet the needs of high-precision and large-scale inspection. In order to achieve automated and efficient inspection, technologies based on computer vision and artificial intelligence have gradually been introduced into the field of jewelry structure inspection. However, these emerging technologies still have certain bottlenecks in practical applications and need to be further optimized to improve inspection accuracy and applicability.

[0003] In one prior art, a two-dimensional image-based processing method is used to perform edge detection and shape feature extraction on jewelry images from multiple perspectives to generate a preliminary geometric model, which is then compared with a standard geometric model to evaluate the structural integrity and defects of the jewelry. Specifically, this method uses conventional image acquisition equipment to obtain the front view and oblique view of the jewelry, combines an edge detection algorithm to extract the boundary contour of the jewelry, and then determines whether there are defects by analyzing symmetry and size differences. However, due to the highly reflective surface and complex structure of jewelry, traditional edge detection algorithms find it difficult to distinguish between real boundaries and pseudo boundaries, resulting in inaccurate extracted boundary contours. In addition, prior art usually processes each view separately and fails to fully utilize the geometric relationship between multiple views. Therefore, deviations are easily generated when analyzing the axis of symmetry, boundary contours, and jewelry structures.

[0004] The existing technology has the problem of low detection accuracy. Summary of the invention

[0005] The present invention provides a jewelry structure detection method, device, and storage medium to achieve high-precision jewelry structure detection.

[0006] In a first aspect, in order to solve the above technical problems, the present invention provides a method for detecting a jewelry structure, comprising: Obtaining an image of the jewelry to be tested; According to the jewelry image to be tested, corner detection is performed using corner positioning technology to obtain characteristic angles and characteristic edges of the jewelry; Inputting the jewelry image to be tested, the characteristic angles and the characteristic edges into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested; According to the jewelry structure to be tested, symmetry detection technology is used to analyze and extract, and calibration parameters between adjacent views are obtained; According to the calibration parameters, a view projection conversion algorithm is used to obtain the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view; The calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line are input into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

[0007] In an optional implementation, the step of acquiring the jewelry image to be tested includes: By arranging multiple groups of image acquisition devices at different positions and angles to take pictures simultaneously, the original images of the jewelry to be tested from multiple perspectives are obtained; The original jewelry image to be tested includes a front view of the jewelry to be tested, an oblique view of the jewelry to be tested, an oblique left view of the jewelry to be tested, and an oblique right view of the jewelry to be tested; The original jewelry image to be tested is subjected to image filtering, and edge details of the image are enhanced to obtain the jewelry image to be tested.

[0008] In an optional implementation, the corner detection is performed based on the jewelry image to be tested using an angle positioning technology to obtain characteristic angles and characteristic edges of the jewelry, including: Traversing the pixel points of the jewelry image to be tested, calculating the gradient direction angle, and obtaining the gradient amplitude of the pixel points; Comparing the gradient amplitude with a preset gradient threshold, and when the gradient amplitude is greater than the gradient threshold, determining that the edge judgment is passed, and determining the pixel point set that passes the edge judgment as an edge pixel point; Connect the edge pixels to obtain an edge contour; Performing closed curve analysis based on the edge contour to obtain the corners of the jewelry; According to the edge angles, feature classification is performed using angle positioning technology to obtain feature angles of the jewelry; According to the jewelry image to be tested and the characteristic angle, an edge-angle relationship analysis is performed to obtain the characteristic edge line of the jewelry.

[0009] In an optional implementation, the step of inputting the jewelry image to be tested, the characteristic angles, and the characteristic edges into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested includes: Taking historical jewelry images to be tested, historical feature angles and historical feature edges as inputs and historical jewelry structures as outputs, constructing an initial jewelry structure construction model and training it, and determining that the training is completed when the number of training times is greater than or equal to the preset number of training times, and obtaining a jewelry structure construction model that has been trained; The jewelry image to be tested, the characteristic angles and the characteristic edges are input into the trained jewelry structure construction model to obtain the jewelry structure to be tested.

[0010] In an optional implementation, the symmetry detection technology is used to analyze and extract the jewelry structure to be tested, and the calibration parameters between adjacent views are obtained, including: According to the jewelry structure to be tested, extract the overall geometric outline of the front view, and calculate to obtain the symmetry axis of the front view; According to the symmetry axis of the front view and in combination with the shape characteristics of the jewelry structure to be tested, a calculation is performed to determine the geometric center point of the symmetry axis of the front view as the center point of the symmetry axis of the front view; According to the symmetry axis of the front view, a symmetry detection technology is used to perform view projection transformation calculation to obtain the symmetry axis of the oblique view; According to the symmetry axis of the oblique view and in combination with the shape characteristics of the jewelry structure to be tested, calculation is performed to determine the geometric center point of the symmetry axis of the oblique view as the center point of the symmetry axis of the oblique view; The calibration parameters include the center point of the symmetry axis of the front view and the center point of the symmetry axis of the oblique view.

[0011] In an optional implementation, the method of obtaining the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view by using a view projection conversion algorithm according to the calibration parameters includes: According to the calibration parameters, the position of the center point of the symmetry axis of the front view on the projection plane of the oblique view is calculated, and the first distance between the front view and the oblique view is obtained by combining the depth direction projection formula of the multi-view calibration; According to the calibration parameter and the first distance, a translation vector required to translate the center point of the symmetry axis of the front view to the center point of the symmetry axis of the oblique view along the view depth direction is calculated, and determined as a first translation amount; A projection transformation is performed according to the calibration parameters and the first translation amount in combination with the geometric relationship between the views to obtain the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view.

[0012] In an optional implementation, the calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line are input into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure, including: Defining the jewelry structure features includes the calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line; Taking historical jewelry structural features as input and historical defect detection parameters as output, an initial jewelry defect detection model is constructed and trained. When the number of training times is greater than or equal to the preset number of training times, the training is determined to be completed, and a trained jewelry defect detection model is obtained; Inputting the jewelry structure features into the trained jewelry defect detection model to obtain jewelry structure defect detection parameters; When the defect detection parameter is less than a preset first defect detection threshold, determining that the jewelry defect type is a surface scratch defect; When the defect detection parameter is greater than a preset first defect detection threshold and less than a preset second defect detection threshold, determining that the jewelry defect type is a concave defect; When the defect detection parameter is greater than a preset second defect detection threshold, the jewelry defect type is determined to be a crack defect.

[0013] In a second aspect, the present invention provides a jewelry structure detection device, comprising: A data acquisition module, used to acquire the image of the jewelry to be tested; An edge and corner detection module is used to detect edges and corners according to the jewelry image to be tested by using an angle positioning technology to obtain characteristic angles and characteristic edges of the jewelry; A structure construction module, used for inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested; A symmetry analysis module is used to analyze and extract the symmetry detection technology according to the jewelry structure to be tested, and obtain calibration parameters between adjacent views; A projection conversion module, used to obtain the symmetric center point of the symmetric axis of the oblique right view and the symmetric center point of the symmetric axis of the oblique left view according to the calibration parameters and the view projection conversion algorithm; The result output module is used to input the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

[0014] In a third aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the above-mentioned methods for detecting jewelry structures when executing the computer program.

[0015] In a fourth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium comprising a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the jewelry structure detection methods described above.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The invention discloses a method for detecting a jewelry structure, comprising: acquiring a jewelry image to be detected; using an angle positioning technology to detect corners according to the jewelry image to be detected, and obtaining characteristic angles and characteristic edges of the jewelry; inputting the jewelry image to be detected, the characteristic angles and the characteristic edges into a pre-trained jewelry structure construction model to obtain the jewelry structure to be detected; using a symmetry detection technology to analyze and extract according to the jewelry structure to be detected, and obtaining calibration parameters between adjacent views; using a view projection conversion algorithm according to the calibration parameters, obtaining the symmetric center point of the symmetric axis of the oblique right view and the symmetric center point of the symmetric axis of the oblique left view; inputting the calibration parameters, the symmetric center point of the symmetric axis of the oblique right view, the symmetric center point of the symmetric axis of the oblique left view, the characteristic angles and the characteristic edges into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

[0017] The present invention obtains the jewelry images to be tested from multiple perspectives and enhances the edge details thereof, and uses the angle positioning technology to detect the characteristic angles and characteristic edges of the jewelry, thereby ensuring the accuracy of feature extraction; the jewelry structure to be tested is constructed by inputting the characteristic angles and characteristic edges into a pre-trained jewelry structure construction model, thereby improving the robustness of the structure construction; the calibration parameters between adjacent views are extracted by using the symmetry detection technology, and the symmetry center point of the symmetry axis of the oblique right view and the symmetry center point of the symmetry axis of the oblique left view are obtained in combination with the view projection conversion algorithm, thereby further improving the accuracy of calibration and symmetry analysis; finally, the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angles and the characteristic edges are input into a pre-trained jewelry defect detection model, and the obtained defect detection parameters are compared with the strictly classified defect detection threshold value, thereby determining the jewelry defect type, thereby avoiding the detection result deviation caused by inaccurate feature extraction or projection error in the traditional method, thereby realizing high-precision jewelry structure detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a schematic flow chart of a jewelry structure detection method provided by a first embodiment of the present invention; Figure 2 Schematic diagram of the structure of a jewelry structure detection device provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0019] 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.

[0020] Reference Figure 1 The first embodiment of the present invention provides a method for detecting a jewelry structure, comprising the following steps: S11, obtaining an image of the jewelry to be tested; S12, performing corner detection based on the jewelry image to be tested by using corner positioning technology to obtain characteristic angles and characteristic edges of the jewelry; S13, inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested; S14, analyzing and extracting the jewelry structure to be tested by using symmetry detection technology to obtain calibration parameters between adjacent views; S15, according to the calibration parameters, using a view projection conversion algorithm to obtain a symmetric center point of the symmetry axis of the oblique right view and a symmetric center point of the symmetry axis of the oblique left view; S16, inputting the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line into a pre-trained jewelry defect detection model to obtain a defect detection type of the jewelry structure.

[0021] In step S11, an image of the jewelry to be tested is obtained.

[0022] In one implementation, obtaining the image of the jewelry to be tested includes: By arranging multiple groups of image acquisition devices at different positions and angles to shoot simultaneously, original jewelry images to be tested at multiple viewing angles are obtained; the original jewelry images to be tested include a front view of the jewelry to be tested, an oblique view of the jewelry to be tested, an oblique left view of the jewelry to be tested, and an oblique right view of the jewelry to be tested; the original jewelry images to be tested are image filtered, and the edge details of the images are enhanced to obtain the jewelry images to be tested.

[0023] In step S12, according to the jewelry image to be tested, corner detection is performed using corner positioning technology to obtain characteristic corners and characteristic edges of the jewelry.

[0024] In one implementation, the corner detection is performed based on the jewelry image to be tested by using the corner positioning technology to obtain the characteristic angle and characteristic edge line of the jewelry, including: The pixel points of the jewelry image to be tested are traversed to calculate the gradient direction angle to obtain the gradient amplitude of the pixel points; the gradient amplitude is compared with a preset gradient threshold value, and when the gradient amplitude is greater than the gradient threshold value, it is determined that the edge judgment is passed, and the pixel point set that passes the edge judgment is determined as the edge pixel point; according to the edge pixel points, connection is performed to obtain the edge contour; according to the edge contour, closed curve analysis is performed to obtain the edge corner of the jewelry; according to the edge corner, corner positioning technology is used to perform feature classification to obtain the characteristic angle of the jewelry; according to the jewelry image to be tested and the characteristic angle, edge angle relationship analysis is performed to obtain the characteristic edge line of the jewelry.

[0025] It should be noted that the characteristic angle of the jewelry is the inflection point of the geometric characteristics of the jewelry structure to be tested, which is located at the sharp change of the outer contour curve of the jewelry; the characteristic edge line of the jewelry is a line segment formed by connecting the vertices of the characteristic angle, reflecting the key morphological characteristics of the overall contour of the jewelry. To obtain the characteristic angle and the characteristic edge line, the pixel points of the jewelry image to be tested must be traversed first, the gradient direction angle calculation is performed to obtain the gradient amplitude, and the edge pixel points are screened out by comparing with the preset gradient threshold; then the edge contour is formed by connecting the edge pixel points, and the closed curve analysis is used to obtain the edge corners of the jewelry; further, these edges and corners are characterized by combining the angle positioning technology to obtain the characteristic angles of the jewelry; finally, the edge angle relationship analysis of the characteristic angle is performed to obtain the characteristic edge line of the jewelry. The characteristic angle and the characteristic edge line of the jewelry extract the core information of the geometric structure of the jewelry to be tested, and provide data support for the subsequent jewelry structure construction, symmetry detection and defect analysis.

[0026] In step S13, the jewelry image to be tested, the characteristic angles and the characteristic edges are input into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested.

[0027] In one implementation, the step of inputting the jewelry image to be tested, the characteristic angle, and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested includes: Taking historical jewelry images to be tested, historical characteristic angles and historical characteristic edges as inputs and historical jewelry structures as outputs, an initial jewelry structure construction model is constructed and trained. When the number of training times is greater than or equal to a preset number of training times, the training is determined to be completed, and a trained jewelry structure construction model is obtained; the jewelry images to be tested, the characteristic angles and the characteristic edges are input into the trained jewelry structure construction model to obtain the jewelry structure to be tested.

[0028] It should be noted that the jewelry structure to be tested refers to a mathematical model that can reflect the overall geometric shape and structural characteristics of the jewelry through analysis and feature extraction of the jewelry image to be tested. The jewelry structure to be tested is obtained by inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line as input into a pre-trained jewelry structure construction model. The jewelry structure construction model is based on a large number of historical jewelry images to be tested, historical characteristic angles and historical characteristic edges as input, and historical jewelry structures are used as output for training, so that the model learns by comparing its predicted structure with the actual structure, thereby continuously adjusting its internal parameters to improve the accuracy of the prediction; the jewelry structure construction model after training can generate the jewelry structure to be tested according to the input jewelry image to be tested, characteristic angles and characteristic edges. The jewelry structure to be tested provides a basis for symmetry detection and defect analysis, thereby further ensuring high-precision jewelry structure analysis and improving the efficiency and accuracy of the overall detection process.

[0029] In step S14, according to the jewelry structure to be tested, symmetry detection technology is used to analyze and extract, and calibration parameters between adjacent views are obtained.

[0030] In one implementation, the symmetry detection technology is used to analyze and extract the jewelry structure to be tested, and the calibration parameters between adjacent views are obtained, including: According to the jewelry structure to be tested, the overall geometric outline of the front view is extracted and calculated to obtain the symmetry axis of the front view; according to the symmetry axis of the front view, combined with the shape characteristics of the jewelry structure to be tested, calculation is performed to determine that the geometric center point of the symmetry axis of the front view is the center point of the symmetry axis of the front view; according to the symmetry axis of the front view, symmetry detection technology is used to perform view projection conversion calculation to obtain the symmetry axis of the oblique view; according to the symmetry axis of the oblique view, combined with the shape characteristics of the jewelry structure to be tested, calculation is performed to determine that the geometric center point of the symmetry axis of the oblique view is the center point of the symmetry axis of the oblique view; the calibration parameters include the center point of the symmetry axis of the front view and the center point of the symmetry axis of the oblique view.

[0031] It should be noted that the calibration parameters between adjacent views refer to the key parameters used to describe and associate the geometric position relationship between different perspectives in multiple perspective images of jewelry, including the center point of the symmetry axis of the front view and the center point of the symmetry axis of the oblique view. The acquisition of calibration parameters is based on the symmetry characteristics of the jewelry structure to be tested, and is achieved through geometric analysis of the front view and the oblique view. Specifically, the overall geometric outline of the front view in the jewelry structure to be tested is first extracted, and the symmetry axis of the front view is calculated; combined with the shape characteristics of the jewelry structure to be tested, the geometric center point of the symmetry axis of the front view is determined as the center point of the symmetry axis of the front view. Then, the symmetry axis of the oblique view is obtained through symmetry detection technology and view projection conversion calculation, and the geometric center point of the symmetry axis of the oblique view is further calculated in combination with the shape characteristics of the jewelry structure to be tested. The calibration parameters are used to accurately calculate the projection relationship and position mapping between views, provide a basis for the symmetry center point of the symmetry axis of the oblique right view and the symmetry center point of the symmetry axis of the oblique left view, thereby supporting the implementation of the view projection conversion algorithm and providing support for high-precision jewelry structure detection and defect analysis.

[0032] In step S15, according to the calibration parameters, a view projection conversion algorithm is used to obtain the symmetry center point of the symmetry axis of the oblique right view and the symmetry center point of the symmetry axis of the oblique left view.

[0033] In one implementation, the step of obtaining the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view by using a view projection conversion algorithm according to the calibration parameters includes: According to the calibration parameters, the position of the center point of the symmetry axis of the front view on the projection plane of the oblique view is calculated, and the first distance between the front view and the oblique view is obtained by combining the depth direction projection formula of the multi-view calibration; according to the calibration parameters and the first distance, the translation vector required to translate the center point of the symmetry axis of the front view along the depth direction of the view to the center point of the symmetry axis of the oblique view is calculated and determined as the first translation amount; according to the calibration parameters and the first translation amount, a projection transformation is performed in combination with the geometric relationship between the views to obtain the symmetry center point of the symmetry axis of the oblique right view and the symmetry center point of the symmetry axis of the oblique left view.

[0034] It should be noted that the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view are the key geometric feature points of the jewelry structure in different viewing angle projections, and characterize the spatial symmetry characteristics of the jewelry. The acquisition of the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view depends on the calibration parameters and the view projection conversion algorithm. First, according to the calibration parameters, the position of the center point of the symmetry axis of the front view on the projection plane of the oblique view is calculated; combined with the projection formula in the depth direction, the first distance between the front view and the oblique view is determined. Then, according to the calibration parameters and the first distance, the translation vector required to translate the center point of the symmetry axis of the front view to the center point of the symmetry axis of the oblique view along the depth direction of the view is calculated, which is called the first translation amount. Finally, combined with the geometric relationship between the views, the calibration parameters and the first translation amount, the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view are obtained through view projection conversion. The center point of the symmetry axis of the oblique right view and the center point of the symmetry axis of the oblique left view provide a basis for further analysis and defect detection of the jewelry structure. The overall symmetry of the jewelry can be quantified, and high-precision symmetry detection and defect location can be supported, thereby improving the accuracy of jewelry structure detection.

[0035] In step S16, the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line are input into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

[0036] In one implementation, the calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line are input into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure, including: The jewelry structure features are defined to include the calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line; the historical jewelry structure features are used as input and the historical defect detection parameters are used as output to construct an initial jewelry defect detection model and perform training, and the training is determined to be completed when the number of training times is greater than or equal to the preset number of training times, and a trained jewelry defect detection model is obtained; the jewelry structure features are input into the trained jewelry defect detection model to obtain the defect detection parameters of the jewelry structure; when the defect detection parameter is less than a preset first defect detection threshold, the jewelry defect type is determined to be a surface scratch defect; when the defect detection parameter is greater than the preset first defect detection threshold and less than the preset second defect detection threshold, the jewelry defect type is determined to be a concave defect; when the defect detection parameter is greater than the preset second defect detection threshold, the jewelry defect type is determined to be a crack defect.

[0037] It should be noted that in the actual detection operation, the jewelry defect detection model can be trained according to the different types of jewelry to be tested, using specific historical jewelry structure features as input and corresponding specific historical defect detection parameters as output in the pre-training process; accordingly, the defect detection threshold and jewelry defect type corresponding to this specific jewelry defect detection model should also be changed accordingly. This enhances the versatility of the present invention and ensures that the present invention can achieve high-precision jewelry structure detection when facing different types of jewelry detection tasks. According to the distribution of defect detection parameters, reasonable defect detection thresholds are selected, and these thresholds should be able to distinguish different types of jewelry defects. For example, in the actual detection operation, the first defect detection threshold is determined to be 0.25, and the second defect detection threshold is determined to be 0.85. When the defect detection parameter is less than 0.25, the jewelry defect type is determined to be a surface scratch defect; when the defect detection parameter is greater than 0.25 and less than 0.85, the jewelry defect type is determined to be a concave defect; when the defect detection parameter is greater than 0.85, the jewelry defect type is determined to be a crack defect. At the same time, the defect detection threshold and jewelry defect type are updated according to experimental results, machine learning and user feedback.

[0038] In order to facilitate the understanding of the present invention, some preferred embodiments of the present invention are further described below.

[0039] The following describes the working process of the present invention using a common scenario as an example. Figure 2 , which is Figure 1 Schematic diagram of the working scenario of the method.

[0040] In a jewelry testing laboratory, technicians need to perform precision testing on a batch of high-end jewelry with complex geometric structures to determine their structural integrity and potential defects. These jewelry have multiple symmetries and complex design details. It is difficult to accurately identify their tiny defects through traditional manual testing methods, which can easily lead to judgment errors and affect the accuracy of subsequent processing or quality assessment. To solve this problem, the jewelry structure testing method of the present invention is applied.

[0041] First, obtain multi-view images of the jewelry to be tested taken by a high-definition industrial camera and perform image preprocessing. Through appropriate shooting angles and light source directions, ensure that the collected original jewelry images to be tested clearly present every detail of the jewelry, perform image preprocessing on the original jewelry images to enhance the edge details of the image, and obtain the jewelry images to be tested. The jewelry images to be tested will serve as input data for subsequent processing and as the basis for jewelry structure detection in subsequent steps.

[0042] According to the jewelry image to be tested, the system first uses the corner positioning technology to detect the edges and corners. Specifically, by traversing each pixel point and calculating the gradient direction angle, the gradient amplitude of the pixel point is obtained. Then, the gradient amplitude is compared with the preset gradient threshold. When the gradient amplitude is greater than the preset gradient threshold, the pixel point is determined to be located at the edge position of the jewelry, and the set of pixels that pass the edge judgment is defined as the edge pixel point. Then, a connection operation is performed based on the edge pixel points to generate the edge contour of the jewelry. Based on this contour, the system further performs closed curve analysis to extract the edges and corners of the jewelry, and then combines the corner positioning technology to perform feature classification to obtain the characteristic angles of the jewelry. Afterwards, according to the jewelry image to be tested and the characteristic angles, the edge and angle relationship analysis is performed to obtain the characteristic edge line of the jewelry.

[0043] Next, the jewelry image to be tested, the characteristic angles and the characteristic edges are input into the pre-trained jewelry structure construction model to output the jewelry structure to be tested. In the process of constructing the jewelry structure construction model, the historical jewelry image to be tested, the historical characteristic angles and the historical characteristic edges are used as input, and the historical jewelry structure is used as output to construct an initial jewelry structure construction model and train it. The model performance is optimized through multiple iterative training until the preset accuracy requirements are met. The pre-trained jewelry structure construction model can accurately output the jewelry structure to be tested based on the jewelry image to be tested, the characteristic angles and the characteristic edges, and provide an accurate description of its internal geometric relationship and external three-dimensional structure.

[0044] Subsequently, according to the jewelry structure to be tested, the symmetry characteristics are analyzed in depth using symmetry detection technology. Specifically, the overall geometric outline of the front view of the jewelry is first extracted, and the symmetry axis of the front view is calculated, and then combined with the shape characteristics of the jewelry structure to be tested, calculations are performed to determine the geometric center point of the symmetry axis of the front view as the center point of the symmetry axis of the front view. Then, symmetry detection technology is used to perform view projection transformation calculations to obtain the symmetry axis of the oblique view, and combined with the shape characteristics of the jewelry structure to be tested, calculations are performed to determine the geometric center point of the symmetry axis of the oblique view as the center point of the symmetry axis of the oblique view. In this process, the system extracts and analyzes the geometric relationship between the front view of the jewelry and the oblique view of the jewelry, and extracts key calibration parameters through symmetry detection technology, including the center point of the symmetry axis of the front view and the center point of the symmetry axis of the oblique view.

[0045] After obtaining the calibration parameters, the view projection conversion algorithm is used to further calculate the symmetric center point of the symmetry axis of the oblique right view of the jewelry and the symmetric center point of the symmetry axis of the oblique left view of the jewelry. Specifically, firstly, the position of the center point of the symmetry axis of the front view on the projection plane of the oblique view is calculated based on the calibration parameters, and the first distance between the front view and the oblique view is obtained by combining the depth direction projection formula of the multi-view calibration. Subsequently, the translation vector required to translate the center point of the symmetry axis of the front view to the center point of the symmetry axis of the oblique view along the depth direction of the view is calculated and determined as the first translation amount, and then the geometric relationship between the views is projected and transformed to obtain the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view.

[0046] Finally, the system inputs the calibration parameters, the symmetric center point of the symmetric axis of the oblique right view, the symmetric center point of the symmetric axis of the oblique left view, the characteristic angle and the characteristic edge line into the pre-trained jewelry defect detection model to classify and identify the potential defects of the jewelry structure. In the process of constructing the jewelry defect detection model, the historical calibration parameters, the symmetric center point of the symmetric axis of the historical oblique right view, the symmetric center point of the symmetric axis of the historical oblique left view, the historical characteristic angle and the historical characteristic edge line are used as inputs, and the historical defect detection parameters are used as outputs to construct the initial jewelry defect detection model and train it. The model performance is optimized through multiple iterative training until the preset accuracy requirements are met. Through the pre-trained jewelry defect detection model, the defect detection parameters of the jewelry structure can be accurately output based on the jewelry structure characteristics. When the defect detection parameter is less than the preset first defect detection threshold, the jewelry defect type is determined to be a surface scratch defect; when the defect detection parameter is greater than the preset first defect detection threshold and less than the preset second defect detection threshold, the jewelry defect type is determined to be a concave defect; when the defect detection parameter is greater than the preset second defect detection threshold, the jewelry defect type is determined to be a crack defect. During this working process, the present invention makes full use of a number of advanced technologies such as image processing, symmetry detection, deep learning and view projection conversion, and realizes high-precision jewelry structure detection in actual scenarios, providing a reliable basis for subsequent processing and quality assessment.

[0047] In summary, the present invention discloses a method for detecting jewelry structure, comprising acquiring a jewelry image to be detected; performing corner detection according to the jewelry image to be detected by using an angle positioning technology to obtain characteristic angles and characteristic edges of the jewelry; inputting the jewelry image to be detected, the characteristic angles and the characteristic edges into a pre-trained jewelry structure construction model to obtain the jewelry structure to be detected; performing analysis and extraction according to the jewelry structure to be detected by using a symmetry detection technology to obtain calibration parameters between adjacent views; obtaining the symmetric center point of the symmetric axis of the oblique right view and the symmetric center point of the symmetric axis of the oblique left view according to the calibration parameters by using a view projection conversion algorithm; inputting the calibration parameters, the symmetric center point of the symmetric axis of the oblique right view, the symmetric center point of the symmetric axis of the oblique left view, the characteristic angles and the characteristic edges into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

[0048] The present invention obtains the jewelry images to be tested from multiple perspectives and enhances the edge details thereof, and uses the angle positioning technology to detect the characteristic angles and characteristic edges of the jewelry, thereby ensuring the accuracy of feature extraction; the jewelry structure to be tested is constructed by inputting the characteristic angles and characteristic edges into a pre-trained jewelry structure construction model, thereby improving the robustness of the structure construction; the calibration parameters between adjacent views are extracted by using the symmetry detection technology, and the symmetry center point of the symmetry axis of the oblique right view and the symmetry center point of the symmetry axis of the oblique left view are obtained in combination with the view projection conversion algorithm, thereby further improving the accuracy of calibration and symmetry analysis; finally, the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angles and the characteristic edges are input into a pre-trained jewelry defect detection model, and the obtained defect detection parameters are compared with the strictly classified defect detection threshold value, thereby determining the jewelry defect type, thereby avoiding the detection result deviation caused by inaccurate feature extraction or projection error in the traditional method, thereby realizing high-precision jewelry structure detection.

[0049] Reference Figure 2 A second embodiment of the present invention provides a jewelry structure detection device, comprising: A data acquisition module, used to acquire the image of the jewelry to be tested; An edge and corner detection module is used to detect edges and corners according to the jewelry image to be tested by using an angle positioning technology to obtain characteristic angles and characteristic edges of the jewelry; A structure construction module, used for inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested; A symmetry analysis module is used to analyze and extract the symmetry detection technology according to the jewelry structure to be tested, and obtain calibration parameters between adjacent views; A projection conversion module, used to obtain the symmetric center point of the symmetric axis of the oblique right view and the symmetric center point of the symmetric axis of the oblique left view according to the calibration parameters and the view projection conversion algorithm; The result output module is used to input the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

[0050] It should be noted that the jewelry structure detection device provided in the embodiment of the present invention is used to execute all the process steps of the jewelry structure detection method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be described in detail.

[0051] The embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a jewelry structure detection program. When the processor executes the computer program, the steps in the above-mentioned jewelry structure detection method embodiments are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are implemented, such as the corner detection module.

[0052] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0053] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0054] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0055] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0056] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0057] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0058] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting a jewelry structure, characterized in that: Executed by a computer, including: Obtaining an image of the jewelry to be tested; According to the jewelry image to be tested, corner detection is performed using corner positioning technology to obtain characteristic angles and characteristic edges of the jewelry; Inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested; According to the jewelry structure to be tested, symmetry detection technology is used to analyze and extract, and calibration parameters between adjacent views are obtained; According to the calibration parameters, a view projection conversion algorithm is used to obtain a symmetric center point of the symmetry axis of the oblique right view and a symmetric center point of the symmetry axis of the oblique left view; The calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line are input into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

2. The method for detecting a jewelry structure according to claim 1, characterized in that: The step of obtaining the jewelry image to be tested comprises: By arranging multiple groups of image acquisition devices at different positions and angles to take pictures simultaneously, the original images of the jewelry to be tested from multiple perspectives are obtained; The original jewelry image to be tested includes a front view of the jewelry to be tested, an oblique view of the jewelry to be tested, an oblique left view of the jewelry to be tested, and an oblique right view of the jewelry to be tested; The original jewelry image to be tested is subjected to image filtering, and edge details of the image are enhanced to obtain the jewelry image to be tested.

3. The method for detecting a jewelry structure according to claim 1, characterized in that: The method of detecting corners and edges of the jewelry by using the corner positioning technology according to the jewelry image to be tested, and obtaining the characteristic corners and characteristic edges of the jewelry, comprises: Traversing the pixel points of the jewelry image to be tested, calculating the gradient direction angle, and obtaining the gradient amplitude of the pixel points; Comparing the gradient amplitude with a preset gradient threshold, and when the gradient amplitude is greater than the gradient threshold, determining that the edge judgment is passed, and determining the pixel point set that passes the edge judgment as an edge pixel point; Connect the edge pixels to obtain an edge contour; Performing closed curve analysis based on the edge contour to obtain the corners of the jewelry; According to the edge angles, feature classification is performed using angle positioning technology to obtain feature angles of the jewelry; According to the jewelry image to be tested and the characteristic angle, an edge-angle relationship analysis is performed to obtain the characteristic edge line of the jewelry.

4. The method for detecting a jewelry structure according to claim 1, characterized in that: The step of inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested comprises: Taking historical jewelry images to be tested, historical feature angles and historical feature edges as inputs and historical jewelry structures as outputs, constructing an initial jewelry structure construction model and training it, and determining that the training is completed when the number of training times is greater than or equal to the preset number of training times, and obtaining a jewelry structure construction model that has been trained; The jewelry image to be tested, the characteristic angles and the characteristic edges are input into the trained jewelry structure construction model to obtain the jewelry structure to be tested.

5. The method for detecting a jewelry structure according to claim 1, characterized in that: According to the jewelry structure to be tested, symmetry detection technology is used to analyze and extract, and calibration parameters between adjacent views are obtained, including: According to the jewelry structure to be tested, extract the overall geometric outline of the front view, and calculate to obtain the symmetry axis of the front view; According to the symmetry axis of the front view and in combination with the shape characteristics of the jewelry structure to be tested, a calculation is performed to determine the geometric center point of the symmetry axis of the front view as the center point of the symmetry axis of the front view; According to the symmetry axis of the front view, a symmetry detection technology is used to perform view projection transformation calculation to obtain the symmetry axis of the oblique view; According to the symmetry axis of the oblique view and in combination with the shape characteristics of the jewelry structure to be tested, calculation is performed to determine the geometric center point of the symmetry axis of the oblique view as the center point of the symmetry axis of the oblique view; The calibration parameters include the center point of the symmetry axis of the front view and the center point of the symmetry axis of the oblique view.

6. The method for detecting a jewelry structure according to claim 1, characterized in that: The method of obtaining the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view by using the view projection conversion algorithm according to the calibration parameters includes: According to the calibration parameters, the position of the center point of the symmetry axis of the front view on the projection plane of the oblique view is calculated, and the first distance between the front view and the oblique view is obtained by combining the depth direction projection formula of the multi-view calibration; According to the calibration parameter and the first distance, a translation vector required to translate the center point of the symmetry axis of the front view to the center point of the symmetry axis of the oblique view along the view depth direction is calculated, and determined as a first translation amount; A projection transformation is performed according to the calibration parameters and the first translation amount in combination with the geometric relationship between the views to obtain the symmetric center point of the symmetry axis of the oblique right view and the symmetric center point of the symmetry axis of the oblique left view.

7. The method for detecting a jewelry structure according to claim 1, characterized in that: The step of inputting the calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line into a pre-trained jewelry defect detection model to obtain a defect detection type of the jewelry structure includes: Defining the jewelry structure features includes the calibration parameters, the symmetric center point of the symmetry axis of the oblique right view, the symmetric center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line; Taking historical jewelry structural features as input and historical defect detection parameters as output, an initial jewelry defect detection model is constructed and trained. When the number of training times is greater than or equal to the preset number of training times, the training is determined to be completed, and a trained jewelry defect detection model is obtained; Inputting the jewelry structure features into the trained jewelry defect detection model to obtain jewelry structure defect detection parameters; When the defect detection parameter is less than a preset first defect detection threshold, determining that the jewelry defect type is a surface scratch defect; When the defect detection parameter is greater than a preset first defect detection threshold and less than a preset second defect detection threshold, determining that the jewelry defect type is a concave defect; When the defect detection parameter is greater than a preset second defect detection threshold, the jewelry defect type is determined to be a crack defect.

8. A jewelry structure detection device, characterized in that: include: A data acquisition module, used to acquire the image of the jewelry to be tested; An edge and corner detection module is used to detect edges and corners according to the jewelry image to be tested by using an angle positioning technology to obtain characteristic angles and characteristic edges of the jewelry; A structure construction module, used for inputting the jewelry image to be tested, the characteristic angle and the characteristic edge line into a pre-trained jewelry structure construction model to obtain the jewelry structure to be tested; A symmetry analysis module is used to analyze and extract the symmetry detection technology according to the jewelry structure to be tested, and obtain calibration parameters between adjacent views; A projection conversion module, used to obtain the symmetric center point of the symmetric axis of the oblique right view and the symmetric center point of the symmetric axis of the oblique left view according to the calibration parameters and the view projection conversion algorithm; The result output module is used to input the calibration parameters, the symmetry center point of the symmetry axis of the oblique right view, the symmetry center point of the symmetry axis of the oblique left view, the characteristic angle and the characteristic edge line into a pre-trained jewelry defect detection model to obtain the defect detection type of the jewelry structure.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the jewelry structure detection method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the jewelry structure detection method according to any one of claims 1 to 7.