A method, apparatus, device and medium for detecting defects of a permanent magnet

By using machine vision recognition technology to quantify the uniformity of the adhesive layer thickness and the unevenness of the multi-pole ring permanent magnet, the problem of low detection accuracy in existing methods is solved, and efficient defect detection is achieved.

CN120741479BActive Publication Date: 2025-11-25HIGH MAG TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511135655.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-11-25
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

Existing defect detection methods for multi-pole ring permanent magnets have low detection accuracy, which affects production efficiency.

Method used

Using machine vision recognition technology, by acquiring detection and depth images of permanent magnets, the uniformity of adhesive layer thickness and unevenness are quantified, thresholds are set to determine defect types, and defective products are graded and marked.

Benefits of technology

This improves the accuracy and efficiency of defect detection, avoids redundant testing, and ensures the accuracy and efficiency of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120741479B_ABST
    Figure CN120741479B_ABST
Patent Text Reader

Abstract

The application discloses a permanent magnet defect detection method, device, equipment and medium, including the following steps: obtaining the detection image of the target end of the target permanent magnet; wherein, the target end is one end of the target permanent magnet with a permanent magnet block; obtaining the first defect characteristic value according to the detection image; wherein, the first defect characteristic value is used to represent the glue layer thickness uniformity defect degree; judging whether the first defect characteristic value is greater than the preset first threshold value; if yes, the target permanent magnet is marked as the first type of defective product, if not, the depth image of the target end of the target permanent magnet is obtained; obtaining the second defect characteristic value according to the depth image; wherein, the second defect characteristic value is used to represent the degree of glue layer protrusion or depression; judging whether the second defect characteristic value is greater than the preset second threshold value; if yes, the target permanent magnet is marked as the second type of defective product, if not, the target permanent magnet is marked as a qualified product, and the application has the advantage of improving the defect detection precision of the permanent magnet.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image data processing, in particular to a permanent magnet defect detection method, device, equipment and medium. BACKGROUND

[0002] Magnet that can keep its magnetism for a long time is called permanent magnet (abbreviation: permanent magnet), such as natural magnetite (magnetite) and artificial magnet (aluminum-nickel-cobalt alloy). According to different purposes of permanent magnet, the structure is also different, one of which is a multi-pole ring-shaped permanent magnet, which has high magnetic field strength and superior performance. The main body includes a magnetic ring main body, an inner core is built in the center of the magnetic ring main body, and a plurality of permanent magnet blocks are embedded in the magnetic ring main body and arranged in a ring array around the inner core. The permanent magnet blocks are fixed by the glue layer formed by the glue liquid, but during the glue liquid solidification process, the glue layer overflow, sunken glue (i.e. the glue layer is concave after forming) and uneven thickness defects are prone to occur due to the influence of glue liquid flow, glue coating process and external factors (such as temperature, vibration, etc.). Therefore, it is necessary to detect the defects of the permanent magnet of this structure, and the unqualified ones need to be repaired.

[0003] At present, the defect detection method for the above-mentioned multi-pole ring-shaped permanent magnet mainly relies on manual detection or simple tool detection, which has low detection accuracy and affects the detection efficiency, and ultimately affects the production efficiency. SUMMARY

[0004] The main purpose of the present application is to provide a permanent magnet defect detection method, device, equipment and medium, which aims to solve the technical problem of low detection accuracy of the existing defect detection method for multi-pole ring-shaped permanent magnet.

[0005] In order to achieve the above-mentioned purpose, the present application provides a permanent magnet defect detection method, which comprises the following steps:

[0006] Obtain the detection image of the target end of the target permanent magnet; wherein the target permanent magnet comprises a magnetic ring main body, an inner core is built in the center of the magnetic ring main body, a plurality of grooves are provided on one side of the magnetic ring main body and arranged in a ring array around the inner core, permanent magnet blocks are fixedly arranged in the grooves through a glue layer, and the target end is one end of the target permanent magnet with the permanent magnet blocks;

[0007] According to the detection image, a first defect feature value is obtained; wherein the first defect feature value is used to represent the glue layer thickness uniformity defect degree;

[0008] Determine whether the first defect feature value is greater than a preset first threshold value;

[0009] If yes, the target permanent magnet is marked as a first type of defective product, and if no, a depth image of the target end of the target permanent magnet is obtained;

[0010] According to the depth image, a second defect feature value is obtained; wherein the second defect feature value is used to represent the degree of protrusion or depression of the adhesive layer;

[0011] It is judged whether the second defect feature value is greater than a preset second threshold value;

[0012] If yes, the target permanent magnet is marked as a second type of defective product, and if no, the target permanent magnet is marked as a qualified product.

[0013] Optionally, according to the detection image, a first defect feature value is obtained, including:

[0014] An offset angle θ of each permanent magnet block deviating from the theoretical position in the detection image is obtained;

[0015] A first maximum value is obtained, and it is judged whether the first maximum value is greater than a preset offset angle threshold value; wherein the first maximum value is the maximum value of the plurality of offset angles θ;

[0016] If yes, the first maximum value is output as the first defect feature value;

[0017] If no, an offset feature evaluation value of all permanent magnets with offset features is obtained;

[0018] The offset feature evaluation value is output as the first defect feature value.

[0019] Optionally, the offset feature evaluation value of all permanent magnets with offset features is obtained, including:

[0020] An offset angle average value θ' of the plurality of offset angles θ is obtained;

[0021] The number n1 of permanent magnets with offset features is obtained;

[0022] According to the offset angle average value θ' and the number n1 of permanent magnets with offset features, an offset feature evaluation value Q1 is obtained; wherein Q1=K1·n1·θ', K1 is a first adjustment coefficient.

[0023] Optionally, the offset angle θ of each permanent magnet block deviating from the theoretical position in the detection image is obtained, including:

[0024] The groove profile in the detection image is recognized;

[0025] A first symmetry line is constructed based on the groove profile; wherein the groove profile is symmetrical based on the first symmetry line, and the first symmetry line passes through the center of the circular profile of the magnetic ring body;

[0026] The corresponding permanent magnet block profile located in the groove profile is recognized;

[0027] Two feature angle points symmetrical to each other in the permanent magnet block profile are connected to obtain an auxiliary line;

[0028] constructing a second symmetry line based on the midpoint of the auxiliary line; wherein the second symmetry line is perpendicular to the auxiliary line, and the permanent magnet block profile is symmetrical based on the second symmetry line;

[0029] outputting the included angle between the second symmetry line and the first symmetry line as the deviation angle θ.

[0030] Optionally, according to the depth image, a second defect feature value is obtained, comprising:

[0031] According to the depth image, the depth information of each adhesive layer region is identified;

[0032] According to the depth information, a concave-convex defect region in each adhesive layer region is identified; wherein the concave-convex defect region includes an overflow adhesive region and a sunken adhesive region;

[0033] A second maximum value is obtained, and it is determined whether the second maximum value is greater than a preset concave-convex deviation threshold value; wherein the second maximum value is the maximum value of the absolute value difference between the extreme depth value of the concave-convex defect region and the standard depth value, and the extreme depth value is the most convex point depth value of the overflow adhesive region or the most concave point depth value of the sunken adhesive region;

[0034] If yes, the second maximum value is output as the second defect feature value;

[0035] If no, a concave-convex feature evaluation value of all adhesive layers with concave-convex defect features is obtained;

[0036] The concave-convex feature evaluation value is output as the second defect feature value.

[0037] Optionally, the concave-convex feature evaluation value of all adhesive layers with concave-convex defect features is obtained, comprising:

[0038] The sum S of the areas of the concave-convex defect regions is obtained;

[0039] The number n2 of adhesive layers with concave-convex defect features is obtained;

[0040] According to the sum S of the areas and the number n2 of the adhesive layers, a concave-convex feature evaluation value Q2 is obtained; wherein Q2=K2·n2·S, K2 is a second adjustment coefficient.

[0041] Optionally, before the concave-convex feature evaluation value of all adhesive layers with concave-convex defect features is obtained, it further comprises:

[0042] The area values of the concave-convex defect regions are respectively obtained to obtain the maximum value of the area values;

[0043] It is determined whether the maximum value of the area values is greater than a preset area threshold value;

[0044] If yes, the maximum value of the area values is output as the second defect feature value;

[0045] If no, go to the next step.

[0046] To achieve the above object, the application further provides a permanent magnet defect detection device, comprising:

[0047] The detection image acquisition module is configured to acquire a detection image of a target end of a target permanent magnet; wherein the target permanent magnet comprises a magnetic ring body, an inner core is built-in at the center of the magnetic ring body, a plurality of grooves are arranged in a ring array around the inner core on one side of the magnetic ring body, permanent magnet blocks are fixedly arranged in the grooves through a glue layer, and the target end is one end of the target permanent magnet having the permanent magnet blocks.

[0048] The first feature acquisition module is configured to acquire a first defect feature value according to the detection image; wherein the first defect feature value is used to represent a glue layer thickness uniformity defect degree.

[0049] The first judgment module is configured to judge whether the first defect feature value is greater than a preset first threshold value.

[0050] The first data processing module is configured to, if yes, mark the target permanent magnet as a first type of defective product, and if no, acquire a depth image of the target end of the target permanent magnet.

[0051] The second feature acquisition module is configured to acquire a second defect feature value according to the depth image; wherein the second defect feature value is used to represent a glue layer protrusion or depression degree.

[0052] The second judgment module is configured to judge whether the second defect feature value is greater than a preset second threshold value.

[0053] The second data processing module is configured to, if yes, mark the target permanent magnet as a second type of defective product, and if no, mark the target permanent magnet as a qualified product.

[0054] To achieve the above object, the application further provides a computer device, which comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to realize the above method.

[0055] To achieve the above object, the application further provides a computer readable storage medium, which stores a computer program, and the processor executes the computer program to realize the above method.

[0056] The application can achieve the following beneficial effects:

[0057] The application obtains a detection image of one end of the target permanent magnet with a permanent magnet block, which contains profile feature information of a magnetic ring body, an inner core, a permanent magnet block and a glue layer, so that the machine vision recognition technology can be used to identify the glue layer thickness uniformity, and the first defect feature value is used to quantify the defect degree of the glue layer thickness uniformity. Considering a certain allowable error, the first threshold value is set here. When the first defect feature value is greater than the first threshold value, the target permanent magnet can be marked as a first type of defective product, so that the staff can quickly repair according to the defect type without the need to find the defect type again. If the first defect feature value is less than or equal to the first threshold value, the glue overflow or sunken glue condition (i.e. concave-convex condition) of the glue layer is further detected. At this time, the depth image of the target end of the target permanent magnet can be obtained, which contains the distance information of each pixel point in the glue layer area to the camera, so as to represent the concave-convex condition of the glue layer area, and the second defect feature value is used to quantify the degree of glue layer protrusion or depression. Similarly, considering the allowable error, the second threshold value is set here. When the second defect feature value is greater than the second threshold value, the target permanent magnet is marked as a second type of defective product, so that the staff can repair according to the defect type. Otherwise, the target permanent magnet is marked as a qualified product, indicating that the target permanent magnet does not have the above two defects. In summary, the machine vision recognition technology can effectively and accurately identify the defects of the glue layer, and improve the detection accuracy. At the same time, the application first detects the glue layer thickness uniformity, and then detects the concave-convex condition of the glue layer area. When the glue layer thickness uniformity does not meet the standard, the entire permanent magnet block and glue layer need to be removed and re-coated and solidified, so there is no need to detect the glue layer concave-convex condition. Only when the glue layer thickness uniformity meets the standard, the glue layer concave-convex condition detection step is entered. If the glue layer concave-convex condition does not meet the standard, only the sunken glue needs to be supplemented or the overflowed glue part needs to be cut off, without the need to remove the glue layer. Therefore, the application reasonably plans the defect type detection sequence, ensures the detection accuracy, avoids repeated detection, and ensures the detection efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. In all the drawings, similar elements or parts are generally identified by similar reference signs. In the drawings, the elements or parts are not necessarily drawn according to the actual proportions.

[0059] Figure 1 A flowchart of a permanent magnet defect detection method in an embodiment of the present application;

[0060] Figure 2 A principle diagram when the target end of the target permanent magnet is obtained based on the detection image in an embodiment of the present application;

[0061] Figure 3A structure schematic diagram when the glue layer has overflow glue in the embodiment of the present application;

[0062] Figure 4 A structure schematic diagram when the glue layer has sunken glue in the embodiment of the present application;

[0063] Figure 5 A schematic diagram of identifying the concave-convex defect area in the glue layer in the embodiment of the present application.

[0064] Reference signs:

[0065] 110-magnetic ring body, 111-groove, 120-inner core, 130-glue layer, 140-permanent magnet block, 150-first symmetry line, 160-feature angle point, 170-assistant line, 180-second symmetry line, 190-concave-convex defect area.

[0066] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0067] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0068] It should be noted that if the present application has a description of "first", "second", etc. in the embodiments, the "first", "second", etc. are only for the purpose of description, and cannot be understood as indicating or implying the relative importance of the indicated technical features or implicitly indicating the number of the indicated technical features. Therefore, the features with "first", "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions of each embodiment can be combined with each other, but it must be based on the realization of those skilled in the art, when the combination of technical solutions appears contradictory or unachievable, it should be considered that the combination of technical solutions does not exist, and is not within the scope of protection claimed by the present application.

[0069] Embodiment 1:

[0070] With reference to Figures 1-5 The present embodiment provides a permanent magnet defect detection method, comprising the following steps:

[0071] An inspection image of the target end of the target permanent magnet is acquired; wherein the target permanent magnet comprises a magnetic ring body 110, an inner core 120 is built in the center of the magnetic ring body 110, a plurality of grooves 111 are arranged in a ring array around the inner core 120 on one side of the magnetic ring body 110, permanent magnet blocks 140 are fixedly arranged in the grooves 111 through a glue layer 130, and the target end is one end of the target permanent magnet with the permanent magnet blocks 140;

[0072] A first defect feature value is acquired according to the inspection image; wherein the first defect feature value is used to represent the degree of glue layer 130 thickness uniformity defect;

[0073] It is judged whether the first defect feature value is greater than a preset first threshold value;

[0074] If yes, the target permanent magnet is marked as a first type of defective product, and if no, a depth image of the target end of the target permanent magnet is acquired;

[0075] A second defect feature value is acquired according to the depth image; wherein the second defect feature value is used to represent the degree of glue layer 130 protrusion or depression;

[0076] It is judged whether the second defect feature value is greater than a preset second threshold value;

[0077] If yes, the target permanent magnet is marked as a second type of defective product, and if no, the target permanent magnet is marked as a qualified product.

[0078] In this embodiment, a detection image is acquired based on one end of the target permanent magnet having the permanent magnet block 140. This detection image simultaneously includes contour feature information of the magnetic ring body 110, inner core 120, permanent magnet block 140, and adhesive layer 130. Machine vision recognition technology can then be used to identify the thickness uniformity of the adhesive layer 130. The degree of thickness uniformity defect in the adhesive layer 130 is quantified by a first defect feature value. Considering a certain allowable error, a first threshold is set. When the first defect feature value is greater than the first threshold, the target permanent magnet can be marked as a first-type defective product, allowing workers to quickly rework according to the defect type without further searching for the defect type. If the first defect feature value is less than or equal to the first threshold, further detection is performed to check whether there is overflow in the adhesive layer 130. In cases of adhesive layer 130 with a sunken or concave appearance (i.e., unevenness), a depth image of the target end of the permanent magnet can be acquired. This depth image can contain distance information from each pixel in the adhesive layer 130 region to the camera, thus characterizing the unevenness of the adhesive layer 130 region. The degree of protrusion or depression of the adhesive layer 130 is quantified by a second defect feature value. Considering the allowable error, a second threshold is set. When the second defect feature value is greater than the second threshold, the permanent magnet is marked as a second type of defective product, so that the staff can rework it according to the defect type. Conversely, the permanent magnet is marked as a qualified product, indicating that the permanent magnet does not have the above two types of defects. In summary, this embodiment can effectively and accurately identify defects in the adhesive layer 130 based on machine vision recognition technology, thus improving the detection accuracy. Meanwhile, in this embodiment, the uniformity of the adhesive layer 130 thickness is detected first, followed by the inspection of the unevenness of the adhesive layer 130 area. This is because if the uniformity of the adhesive layer 130 thickness does not meet the standard, the entire permanent magnet block 140 and the adhesive layer 130 need to be removed and re-applied with adhesive to solidify. In this case, there is no need to inspect the unevenness of the adhesive layer 130. Only when the uniformity of the adhesive layer 130 thickness is met will the step of inspecting the unevenness of the adhesive layer 130 be entered. If the unevenness of the adhesive layer 130 does not meet the standard, only the sunken adhesive needs to be replenished or the excess adhesive needs to be cut off. There is no need to remove the adhesive layer 130. Therefore, this embodiment, by rationally planning the defect type inspection sequence, not only ensures the inspection accuracy but also avoids repeated inspections, thus ensuring inspection efficiency.

[0079] As an optional implementation, obtaining a first defect feature value based on the detected image includes:

[0080] Obtain the deviation angle θ of each permanent magnet block in the detection image from its theoretical position by 140°.

[0081] Obtain the first maximum value and determine whether the first maximum value is greater than a preset deflection angle threshold; where the first maximum value is the maximum value among several deflection angles θ;

[0082] If so, the first maximum value will be output as the first defect feature value;

[0083] If not, then obtain the deviation characteristic evaluation value of all permanent magnets with deviation characteristics;

[0084] The deviation feature evaluation value is output as the first defect feature value.

[0085] In this embodiment, since poor uniformity of adhesive layer 130 thickness will cause permanent magnet block 140 to deviate significantly from its theoretical position, the uniformity of adhesive layer 130 thickness can be indirectly characterized by calculating the deviation angle θ of permanent magnet block 140 from its theoretical position. If the thickness of adhesive layer 130 is directly calculated, it is difficult to accurately calculate the thickness of each region of adhesive layer 130 because adhesive layer 130 needs to wrap around permanent magnet block 140 and its shape is not linear. Moreover, the calculation amount is large and the calculation efficiency is low. Therefore, this embodiment uses deviation angle θ to indirectly characterize the uniformity of adhesive layer 130 thickness more accurately and efficiently. After calculating several deviation angles θ, the most representative first maximum value is selected, and it is determined whether the first maximum value is greater than a preset deviation angle threshold (the deviation angle threshold is the minimum allowable deviation angle). If so, the first maximum value is output as the first defect. The feature value is then compared with the first threshold (where the first threshold is the maximum allowable deviation angle). If not, considering that although the thickness uniformity of multiple adhesive layers 130 meets the standard, there are a large number of thickness uniformity defect features, which will also affect the overall performance, the overall thickness uniformity is also comprehensively evaluated here. The deviation feature evaluation value is output as the first defect feature value for quantitative assessment of the overall thickness uniformity of multiple adhesive layers 130 (where the first threshold is the first evaluation threshold for the deviation feature evaluation value, used to characterize the minimum defect degree of the overall thickness uniformity of multiple adhesive layers 130). By calculating the first defect feature value in a graded manner, a comprehensive assessment can be carried out from two dimensions: obvious defects in the thickness uniformity of a single adhesive layer 130 and the overall defect distribution of multiple adhesive layers 130, thereby improving the detection accuracy of the thickness uniformity of adhesive layers 130.

[0086] It should be noted that the above-mentioned first threshold includes two threshold parameters: the maximum deviation angle and the first evaluation threshold. The corresponding threshold parameters can be matched according to the attributes of the output first defect feature value.

[0087] As an optional implementation, the deviation characteristic evaluation value of all permanent magnets exhibiting deviation characteristics is obtained, including:

[0088] Obtain the average angle θ' of several deviation angles θ;

[0089] Obtain the number n1 of permanent magnets with deviation characteristics;

[0090] Based on the average deviation angle θ' and the number of permanent magnets with deviation characteristics n1, the deviation characteristic evaluation value Q1 is obtained; where Q1=K1·n1·θ', and K1 is the first adjustment coefficient.

[0091] In this embodiment, when quantifying the deviation feature evaluation value, the product of two key parameters, the average deviation angle θ' of several deviation angles θ and the number of permanent magnets n1 with deviation features, is used for assessment. This approach is more targeted and representative. At the same time, the first adjustment coefficient K1 is used to adjust the different attribute parameters of the average deviation angle θ' or the number of permanent magnets n1, thereby controlling the final result value (i.e., the deviation feature evaluation value Q1) within a reasonable range. This allows for effective data comparison in the future, thereby enabling an overall evaluation and assessment of the thickness uniformity of multiple adhesive layers 130.

[0092] As an optional implementation, obtaining the deviation angle θ of each permanent magnet block 140° from its theoretical position in the detection image includes:

[0093] Identify and detect groove contours in images;

[0094] A first symmetry line 150 is constructed based on the groove profile; wherein the groove profile is symmetrical about the first symmetry line 150, and the first symmetry line 150 passes through the center of the circular profile of the magnetic ring body 110.

[0095] Identify the corresponding permanent magnet block contour located within the groove contour;

[0096] Connect the two symmetrical feature corner points 160 in the outline of the permanent magnet block to obtain the auxiliary line 170.

[0097] A second symmetry line 180 is constructed based on the midpoint of the auxiliary line 170; wherein, the second symmetry line 180 is perpendicular to the auxiliary line 170, and the outline of the permanent magnet block is symmetrical about the second symmetry line 180.

[0098] The angle between the second symmetry line 180 and the first symmetry line 150 is output as the deviation angle θ.

[0099] In this embodiment, when calculating the deviation angle θ, since the shape and position of the groove 111 are fixed, the first symmetry line 150 constructed based on the groove contour can be used as a reference line. Then, the corresponding permanent magnet block contour located within the groove contour is identified. Since the permanent magnet block 140 is also symmetrical and has obvious corner point positions, the auxiliary line 170 is obtained by connecting the two characteristic corner points 160. The second symmetry line 180 of the permanent magnet block 140 can be constructed based on the midpoint of the auxiliary line 170. Finally, the angle between the second symmetry line 180 and the first symmetry line 150 is calculated as the deviation angle θ. The calculation is accurate and reliable, and can accurately calculate various deviations of the permanent magnet block 140 to ensure the reliability of the data.

[0100] As an optional implementation, obtaining the second defect feature value based on the depth image includes:

[0101] Based on the depth image, identify the depth information of 130 regions in each adhesive layer;

[0102] Based on the depth information, identify the uneven defect region 190 in each adhesive layer 130 region; wherein, the uneven defect region 190 includes the overflow adhesive region and the sunken adhesive region;

[0103] Obtain the second maximum value and determine whether the second maximum value is greater than the preset concave-convex deviation threshold; wherein, the second maximum value is the maximum value of the absolute difference between the limit depth value and the standard depth value of several concave-convex defect regions 190, and the limit depth value is the depth value of the most convex point of the overflow glue region or the depth value of the most concave point of the sunken glue region.

[0104] If so, the second maximum value will be output as the second defect feature value;

[0105] If not, obtain the overall roughness feature evaluation value of all adhesive layers 130 with roughness defect characteristics;

[0106] The evaluation value of the concave-convex feature is output as the second defect feature value.

[0107] In this embodiment, when calculating the second defect feature, the depth information of each adhesive layer 130 region can be identified based on the depth image, thereby identifying the uneven defect region 190 in each adhesive layer 130 region, including overflow adhesive region and sunken adhesive region. If it is an overflow adhesive region, the absolute value of the difference between the depth value of the most convex point of the overflow adhesive region and the standard depth value is calculated. If it is a sunken adhesive region, the absolute value of the difference between the depth value of the most concave point of the sunken adhesive region and the standard depth value is calculated, thereby obtaining multiple sets of calculated values. The most representative second maximum value is selected and compared with the unevenness deviation threshold (this threshold is the minimum allowable unevenness deviation value). If the second maximum value is greater than the unevenness deviation threshold, the second maximum value is output as the second defect feature value, so that it can be compared with the second threshold (at this time, the second threshold is the maximum allowable unevenness deviation value) in subsequent calculations. By comparison, if the second maximum value is less than or equal to the concavity deviation threshold, the concavity depth of the adhesive layer 130 meets the qualification standard. However, considering that multiple adhesive layers 130 with concavity defects will also have a certain impact on the overall performance of the permanent magnet, the concavity feature evaluation value is further calculated to comprehensively evaluate the overall concavity of multiple adhesive layers 130. The concavity feature evaluation value is output as the second defect feature value (at this time, the second threshold is the second evaluation threshold for the concavity feature evaluation value, used to characterize the minimum defect degree of the overall concavity of multiple adhesive layers 130). By calculating the second defect feature value in stages, a comprehensive assessment can be carried out from two dimensions: obvious concavity defects of a single adhesive layer 130 and the overall concavity defect distribution of multiple adhesive layers 130, thereby improving the detection accuracy of concavity defects of the adhesive layer 130.

[0108] It should be noted that the aforementioned second threshold includes two threshold parameters: the maximum unevenness deviation value and the second evaluation threshold. The corresponding threshold parameters should be matched according to the attributes of the output second defect feature value for comparison. If only one adhesive layer 130 has an overflow or sunken adhesive defect, the absolute value of the difference between the calculated limit depth value of the overflow or sunken adhesive area and the standard depth value is the second maximum value.

[0109] As an optional implementation, the unevenness feature evaluation value of the adhesive layer 130, which integrates all the unevenness defect characteristics, is obtained, including:

[0110] Obtain the sum of the areas S of several uneven defect regions 190;

[0111] Obtain the number n2 of adhesive layers with uneven defects;

[0112] The unevenness feature evaluation value Q2 is obtained based on the sum of the areas S and the number of adhesive layers n2; where Q2 = K2·n2·S, and K2 is the second adjustment coefficient.

[0113] In this embodiment, when calculating the evaluation value of unevenness features, the product of the sum of the areas S of several unevenness defect regions 190 (i.e., local areas in the adhesive layer 130 with overflow or sunken adhesive) and the number n2 of adhesive layers with unevenness defect features is used for evaluation. This method is more representative and targeted in characterizing the overall unevenness situation. Both excessive sum of areas S and excessive number of adhesive layers n2 with unevenness defect features will affect the overall performance. At the same time, the second adjustment coefficient K2 is used to adjust the key parameters of the above two different attributes, thereby controlling the final result value (i.e., the unevenness feature evaluation value Q2) within a reasonable range so that subsequent data comparison can be carried out effectively, thereby achieving an overall evaluation of the unevenness of multiple adhesive layers 130.

[0114] As an optional implementation, before obtaining the overall roughness feature evaluation value of the adhesive layer 130 with all roughness defect characteristics, the method further includes:

[0115] Obtain the area values ​​of several uneven defect regions 190 respectively, and then obtain the maximum area value;

[0116] Determine whether the maximum area value is greater than a preset area threshold;

[0117] If so, the maximum area value will be output as the second defect feature value;

[0118] If not, proceed to the next step.

[0119] In this embodiment, before calculating the evaluation value of the unevenness feature, it is first verified whether there is a situation in the multiple adhesive layers 130 where the maximum value of the area of ​​the corresponding unevenness defect region 190 exceeds the preset area threshold (i.e., the minimum allowable area value of the unevenness defect). If so, it indicates that the area value of the unevenness defect region 190 of the adhesive layer 130 is large, which will also affect the overall performance of the permanent magnet. At this time, the maximum value of the area is output as the second defect feature value, and then compared with the second threshold (at this time, the second threshold is the maximum allowable area value of the unevenness defect). Otherwise, the calculation step of the unevenness feature evaluation value is entered, thereby further improving the detection accuracy of the unevenness defect of the adhesive layer 130. By rationally planning the order of its detection parameters, graded detection is achieved, thereby improving the detection efficiency while ensuring the detection accuracy.

[0120] Example 2:

[0121] Based on the same inventive concept as the foregoing embodiments, this embodiment also provides a permanent magnet defect detection device, comprising:

[0122] The detection image acquisition module is used to acquire the detection image of the target end of the target permanent magnet; wherein, the target permanent magnet includes a magnetic ring body 110, an inner core 120 is built into the center of the magnetic ring body 110, and a plurality of grooves 111 arranged in a ring array around the inner core 120 are opened on one side of the magnetic ring body 110. Permanent magnet blocks 140 are fixedly disposed in the grooves 111 by adhesive layer 130, and the target end is the end of the target permanent magnet that has permanent magnet blocks 140.

[0123] The first feature acquisition module is used to acquire a first defect feature value based on the detected image; wherein the first defect feature value is used to characterize the degree of uniformity defect in the thickness of the adhesive layer 130.

[0124] The first judgment module is used to determine whether the first defect feature value is greater than a preset first threshold.

[0125] The first data processing module is used to mark the target permanent magnet as a first-class defective product if the condition is met, and to obtain a depth image of the target end of the target permanent magnet if the condition is not met.

[0126] The second feature acquisition module is used to acquire a second defect feature value based on the depth image; wherein the second defect feature value is used to characterize the degree of protrusion or depression of the adhesive layer 130;

[0127] The second judgment module is used to determine whether the second defect feature value is greater than a preset second threshold.

[0128] The second data processing module is used to mark the target permanent magnet as a second-class defective product if the condition is met, and to mark the target permanent magnet as a qualified product if the condition is not met.

[0129] The explanations and examples of each module in the device of this embodiment can be referred to the methods of the foregoing embodiments, and will not be repeated here.

[0130] Example 3:

[0131] Based on the same inventive concept as the foregoing embodiments, this embodiment provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.

[0132] Example 4:

[0133] Based on the same inventive concept as the foregoing embodiments, this embodiment provides a computer-readable storage medium storing a computer program, and a processor executes the computer program to implement the above-described method.

[0134] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for detecting defects in permanent magnets, characterized in that, Includes the following steps: Acquire a detection image of the target end of the target permanent magnet; wherein, the target permanent magnet includes a magnetic ring body, an inner core is built into the center of the magnetic ring body, and multiple grooves arranged in a ring array around the inner core are opened on one side of the magnetic ring body. Permanent magnet blocks are fixedly set in the grooves by adhesive layers, and the target end is the end of the target permanent magnet with permanent magnet blocks. Based on the detected image, a first defect feature value is obtained; wherein the first defect feature value is used to characterize the degree of defect in the uniformity of the adhesive layer thickness; including: obtaining the deviation angle θ of each permanent magnet block in the detected image from its theoretical position; obtaining a first maximum value and determining whether the first maximum value is greater than a preset deviation angle threshold; wherein the first maximum value is the maximum value among several deviation angles θ; if yes, the first maximum value is output as the first defect feature value; if no, the deviation feature evaluation value of all permanent magnets with deviation features is obtained; the deviation feature evaluation value is output as the first defect feature value; wherein obtaining the deviation angle θ of each permanent magnet block in the detected image from its theoretical position includes: identifying the groove contour in the detected image; constructing a first symmetry line based on the groove contour; wherein the groove contour is based on the first symmetry line... The process involves: a first symmetry line passing through the center of the circular outline of the magnetic ring body; identifying the corresponding permanent magnet block outline located within the groove outline; connecting two symmetrical feature corner points in the permanent magnet block outline to obtain an auxiliary line; constructing a second symmetry line based on the midpoint of the auxiliary line; wherein the second symmetry line is perpendicular to the auxiliary line, and the permanent magnet block outline is symmetrical based on the second symmetry line; outputting the angle between the second symmetry line and the first symmetry line as the deviation angle θ; obtaining a comprehensive deviation feature evaluation value for all permanent magnets with deviation features, including: obtaining the average deviation angle θ' of several deviation angles θ; obtaining the number of permanent magnets with deviation features n1; and obtaining the deviation feature evaluation value Q1 based on the average deviation angle θ' and the number of permanent magnets with deviation features n1; wherein Q1 = K1·n1·θ', and K1 is the first adjustment coefficient. Determine whether the first defect feature value is greater than a preset first threshold; If yes, mark the target permanent magnet as a Class I defective product; otherwise, obtain a depth image of the target end of the target permanent magnet. Based on the depth image, a second defect feature value is obtained; wherein, the second defect feature value is used to characterize the degree of protrusion or depression of the adhesive layer; Determine whether the second defect feature value is greater than a preset second threshold; If yes, the target permanent magnet is marked as a Class II defective product; otherwise, the target permanent magnet is marked as a qualified product.

2. The method for detecting defects in permanent magnets as described in claim 1, characterized in that, Based on the depth image, the second defect feature value is obtained, including: Based on the depth image, identify the depth information of each adhesive layer region; Based on depth information, identify uneven defect areas in each adhesive layer region; these uneven defect areas include overflow adhesive areas and sunken adhesive areas. Obtain the second maximum value and determine whether the second maximum value is greater than the preset concave-convex deviation threshold; wherein, the second maximum value is the maximum value of the absolute difference between the limit depth value and the standard depth value of several concave-convex defect areas, and the limit depth value is the depth value of the most convex point of the overflow area or the depth value of the most concave point of the sunken area. If so, the second maximum value will be output as the second defect feature value; If not, then obtain the comprehensive evaluation value of the unevenness features of all adhesive layers with unevenness defects; The evaluation value of the concave-convex feature is output as the second defect feature value.

3. The method for detecting defects in permanent magnets as described in claim 2, characterized in that, Obtain the comprehensive evaluation value of the unevenness feature of all adhesive layers with unevenness defects, including: Obtain the sum of the areas S of several concave and convex defect regions; Obtain the number n2 of adhesive layers with uneven defects; The unevenness feature evaluation value Q2 is obtained based on the sum of the areas S and the number of adhesive layers n2; where Q2 = K2·n2·S, and K2 is the second adjustment coefficient.

4. The method for detecting defects in permanent magnets as described in claim 2, characterized in that, Before obtaining the comprehensive evaluation value of the unevenness features of all adhesive layers with unevenness defects, the following steps are also included: Obtain the area values ​​of several uneven defect regions, and then obtain the maximum area value; Determine whether the maximum area value is greater than a preset area threshold; If so, the maximum area value will be output as the second defect feature value; If not, proceed to the next step.

5. A permanent magnet defect detection device, characterized in that, include: The detection image acquisition module is used to acquire the detection image of the target end of the target permanent magnet; wherein, the target permanent magnet includes a magnetic ring body, an inner core is built into the center of the magnetic ring body, and multiple grooves arranged in a ring array around the inner core are opened on one side of the magnetic ring body. Permanent magnet blocks are fixedly set in the grooves by adhesive layers, and the target end is the end of the target permanent magnet with permanent magnet blocks. The first feature acquisition module is used to acquire a first defect feature value based on the detection image; wherein the first defect feature value is used to characterize the degree of defect in the uniformity of the adhesive layer thickness; including: acquiring the deviation angle θ of each permanent magnet block in the detection image from its theoretical position; acquiring a first maximum value and determining whether the first maximum value is greater than a preset deviation angle threshold; wherein the first maximum value is the maximum value among several deviation angles θ; if yes, then the first maximum value is output as the first defect feature value; if no, then the deviation feature evaluation value of all permanent magnets with deviation features is acquired; and the deviation feature evaluation value is output as the first defect feature value; wherein acquiring the deviation angle θ of each permanent magnet block in the detection image from its theoretical position includes: identifying the groove contour in the detection image; constructing a first symmetry line based on the groove contour; wherein the groove contour is based on The first symmetry line is symmetrical and passes through the center of the circular outline of the magnetic ring body; the corresponding permanent magnet block outline located within the groove outline is identified; two mutually symmetrical feature corner points in the permanent magnet block outline are connected to obtain an auxiliary line; a second symmetry line is constructed based on the midpoint of the auxiliary line; wherein, the second symmetry line is perpendicular to the auxiliary line, and the permanent magnet block outline is symmetrical based on the second symmetry line; the angle between the second symmetry line and the first symmetry line is output as the deviation angle θ; the deviation feature evaluation value of all permanent magnets with deviation features is obtained, including: obtaining the average deviation angle θ' of several deviation angles θ; obtaining the number of permanent magnets with deviation features n1; obtaining the deviation feature evaluation value Q1 based on the average deviation angle θ' and the number of permanent magnets with deviation features n1; wherein, Q1=K1·n1·θ', K1 is the first adjustment coefficient; The first judgment module is used to determine whether the first defect feature value is greater than a preset first threshold. The first data processing module is used to mark the target permanent magnet as a first-class defective product if the condition is met, and to obtain a depth image of the target end of the target permanent magnet if the condition is not met. The second feature acquisition module is used to acquire a second defect feature value based on the depth image; wherein the second defect feature value is used to characterize the degree of protrusion or depression of the adhesive layer; The second judgment module is used to determine whether the second defect feature value is greater than a preset second threshold. The second data processing module is used to mark the target permanent magnet as a second-class defective product if the condition is met, and to mark the target permanent magnet as a qualified product if the condition is not met.

6. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores a computer program and the processor executes the computer program to implement the method as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Method and system for detecting appearance defect of magnet

    CN108776966A

  • Visual inspection equipment and method

    CN120044053A