A method and system for automatically controlling flaw detection of a neodymium iron boron magnetic ring
By adjusting the magnetic ring posture and acquiring multi-dimensional images in the neodymium iron boron magnetic ring flaw detection system, combined with intelligent defect judgment, the problem of false rejection caused by high-brightness misjudgment was solved, the detection accuracy and efficiency were improved, and the production cost was reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG JINNEODYMIUM NEW MATERIAL TECH CO LTD
- Filing Date
- 2026-05-27
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional automated flaw detection systems for neodymium iron boron magnetic rings suffer from high rejection rates, waste of production costs, and reduced production efficiency due to unstable magnetic ring posture on high-speed production lines.
By adjusting the magnetic ring's posture with electromagnets around the conveyor belt, combined with multi-dimensional image acquisition and intelligent defect judgment, including the acquisition of specular reflection and diffuse reflection image data, the system uses multi-dimensional image data to refine the defect type and send rejection instructions.
It significantly improves the accuracy and reliability of defect identification, reduces the false rejection rate, increases production efficiency and yield, and reduces production costs.
Smart Images

Figure CN122273837B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of defect detection technology, and in particular to an automated control method and system for flaw detection of neodymium iron boron magnetic rings. Background Technology
[0002] Traditional automated flaw detection systems for NdFeB magnetic rings, when operating on high-speed production lines, experience slight deflections or positional shifts in the rings due to conveyor belt vibrations, collisions between rings, or initial positional deviations. Additionally, when a fixed light source illuminates an inclined reflective surface, localized areas of high brightness and reflection, known as "highlights," are created.
[0003] These highlight areas appear as irregularly shaped, extremely bright spots in the image, with very high grayscale gradients at their edges. They are very similar to the image features of some real defects (such as surface scratches or peeling of coating edges), causing image processing programs to frequently misidentify bright spots caused by reflection as product defects, resulting in an excessively high false rejection rate, serious waste of raw materials and reduced production line output. Summary of the Invention
[0004] This application provides an automated control method and system for flaw detection of neodymium iron boron magnetic rings, aiming to solve the problem in the prior art that the posture of neodymium iron boron magnetic rings is unstable during high-speed transmission, resulting in false high-brightness judgments during image acquisition, which in turn leads to high rejection rates, waste of production costs, and reduced production efficiency.
[0005] The technical solution of this application is as follows: In a first aspect, this application discloses an automated control method for flaw detection of NdFeB magnetic rings, comprising the following steps: before the NdFeB magnetic ring on the conveyor belt enters the flaw detection area, controlling the electromagnets around the conveyor belt to adjust the attitude of the NdFeB magnetic ring to a preset attitude; after the NdFeB magnetic ring on the conveyor belt enters the flaw detection area, by switching the lighting conditions, performing two image acquisitions on the NdFeB magnetic ring to obtain multi-dimensional image data; the multi-dimensional image data includes specular reflection image data and diffuse reflection image data; based on... Based on multi-dimensional image data, suspected defect areas are identified. The brightness values of these suspected defect areas are used to determine if they are actual defects. If a suspected defect area is an actual defect, its defect type is determined based on its brightness value. If a suspected defect area is an actual defect, a rejection command is sent to remove the NdFeB magnetic ring from the conveyor belt, generating and storing target information. The target information includes the NdFeB magnetic ring's number and the defect type of the actual defect.
[0006] Furthermore, based on the above method, the electromagnets around the conveyor belt include electromagnets located on both sides of the conveyor belt, and the neodymium iron boron magnetic ring is provided with a magnetic pole direction indicator. The electromagnets around the conveyor belt are controlled to adjust the attitude of the neodymium iron boron magnetic ring to adjust the neodymium iron boron magnetic ring to a preset attitude. Specifically, this includes: obtaining the directional deviation angle between the magnetic pole direction indicator of the neodymium iron boron magnetic ring and the preset direction; the preset direction is the direction of the line connecting the electromagnets on both sides of the conveyor belt; determining the target current based on the directional deviation angle; and controlling the electromagnets around the conveyor belt to adjust the attitude of the neodymium iron boron magnetic ring to adjust the neodymium iron boron magnetic ring to the preset attitude based on the target current.
[0007] Based on this, the target current is determined according to the directional deviation angle, specifically including: obtaining a first correspondence and the friction coefficient of the conveyor belt; the first correspondence includes a one-to-one correspondence between multiple directional deviation angle ranges and multiple original currents; the original current corresponding to the directional deviation angle range in the first correspondence is taken as the intermediate current; the product of the intermediate current and the first value is taken as the target current; the first value is the product of the friction coefficient of the conveyor belt and the preset friction adjustment coefficient.
[0008] In some preferred embodiments, the electromagnets around the conveyor belt also include an electromagnet located at the bottom of the conveyor belt. The electromagnets around the conveyor belt are controlled according to a target current to adjust the orientation of the NdFeB magnetic ring to a preset orientation. Specifically, this includes: passing a target current to the electromagnets on both sides of the conveyor belt to make the magnetic pole direction of the NdFeB magnetic ring parallel to a preset direction; obtaining the weight of the NdFeB magnetic ring; and passing an adsorption current to the electromagnet at the bottom of the conveyor belt to increase the pressure between the NdFeB magnetic ring and the conveyor belt, thereby adjusting the NdFeB magnetic ring to the preset orientation. The adsorption current is the product of the weight of the NdFeB magnetic ring and a preset weight adjustment coefficient.
[0009] As a technical improvement, the lighting conditions are either a light source with an illumination angle of 45° and 90°, or a light source polarizer with a polarization angle of 0° and 90°. By switching the lighting conditions, two image acquisitions are performed on the NdFeB magnetic ring to obtain multi-dimensional image data. Specifically, this includes: controlling the first set of light sources to illuminate the NdFeB magnetic ring and controlling the image acquisition device to acquire specular reflection image data of the NdFeB magnetic ring; the illumination angle of the first set of light sources is 90°; controlling the second set of light sources to illuminate the NdFeB magnetic ring and controlling the image acquisition device to acquire diffuse reflection image data of the NdFeB magnetic ring; the illumination angle of the second set of light sources is 45°; or, controlling the polarization angle of the light source polarizer to be 0° and controlling the image acquisition device to acquire diffuse reflection image data of the NdFeB magnetic ring; controlling the polarization angle of the light source polarizer to be 90° and controlling the image acquisition device to acquire specular reflection image data of the NdFeB magnetic ring.
[0010] To enhance functionality, suspected defect areas in multi-dimensional image data are identified. Specifically, this includes: determining the brightness difference value of each pixel in two images; obtaining the quality requirement index and a second correspondence for the NdFeB magnetic ring; the second correspondence includes a one-to-one correspondence between multiple quality requirement index ranges and multiple brightness difference thresholds; using the brightness difference threshold corresponding to the quality requirement index range of the NdFeB magnetic ring in the second correspondence as the target brightness difference threshold; and identifying the areas where pixels with brightness difference values greater than the target brightness difference threshold are located as suspected defect areas.
[0011] To further address the issue, the brightness value of the suspected defect area is used to determine whether it is a real defect. If the suspected defect area is a real defect, the defect type of the real defect is determined based on the brightness value of the suspected defect area. Specifically, this includes: determining whether the brightness value of the pixels in the suspected defect area in the specular reflection image data is greater than a first preset brightness threshold; determining whether the brightness value of the pixels in the suspected defect area in the diffuse reflection image data is greater than a second preset brightness threshold; if the second preset brightness threshold is less than the first preset brightness threshold; determining whether the brightness gradient direction of the pixels in the suspected defect area in the specular reflection image data is consistent with the brightness gradient direction of the pixels in the suspected defect area in the diffuse reflection image data; if both are true, the suspected defect area is determined not to be a real defect; otherwise, the suspected defect area is determined to be a real defect, and the defect type of the real defect is determined based on the brightness value of the suspected defect area.
[0012] Furthermore, the defect type of the actual defect is determined based on the brightness value of the suspected defect area. Specifically, this includes: determining whether the brightness value of the pixels in the suspected defect area in the specular reflection image data is less than a second preset brightness threshold; determining whether the brightness gradient direction of the pixels in the suspected defect area in the specular reflection image data is consistent with the brightness gradient direction of the pixels in the suspected defect area in the diffuse reflection image data; if both are true, the defect type of the actual defect is determined to be a crack; determining whether the brightness value of the pixels in the suspected defect area in the specular reflection image data is greater than a first preset brightness threshold; determining whether the brightness value of the pixels in the suspected defect area in the diffuse reflection image data is greater than a first preset brightness threshold; determining whether the brightness gradient direction of the pixels in the suspected defect area in the specular reflection image data is inconsistent with the brightness gradient direction of the pixels in the suspected defect area in the diffuse reflection image data; if both are true, the defect type of the actual defect is determined to be coating peeling; when the defect type of the actual defect is not coating peeling and the defect type of the actual defect is not a crack, the defect type of the actual defect is determined to be an unknown defect.
[0013] Based on the above, after determining that the actual defect type is an unknown defect, the method further includes: obtaining the number of unknown defects on the NdFeB magnetic ring; when the number of unknown defects is greater than a preset number threshold, generating and sending target information to the production personnel to indicate that there are too many unknown defects on the NdFeB magnetic ring; when the number of unknown defects is less than or equal to the preset number threshold, generating and storing image information of unknown defects on the NdFeB magnetic ring.
[0014] Secondly, this application also discloses an automated control system for flaw detection of NdFeB magnetic rings, including an acquisition device and a processing device. The acquisition device is used to control electromagnets around the conveyor belt to adjust the posture of the NdFeB magnetic ring to a preset posture before the NdFeB magnetic ring enters the flaw detection area. The processing device is used to perform two image acquisitions on the NdFeB magnetic ring after it enters the flaw detection area by switching lighting conditions, obtaining multi-dimensional image data. The multi-dimensional image data includes specular reflection image data and diffuse reflection image data. The device is further configured to determine suspected defect areas in the multi-dimensional image data based on the multi-dimensional image data; the processing device is further configured to determine whether the suspected defect area is a real defect based on the brightness value of the suspected defect area in the multi-dimensional image data, and when the suspected defect area is a real defect, determine the defect type of the real defect based on the brightness value of the suspected defect area; the processing device is further configured to send a rejection instruction to remove the NdFeB magnetic ring from the conveyor belt when the suspected defect area is a real defect, and generate and store target information; the target information includes the number of the NdFeB magnetic ring and the defect type of the real defect of the NdFeB magnetic ring.
[0015] Beneficial effects The automated control method for flaw detection of NdFeB magnetic rings disclosed in this application adjusts the attitude of the NdFeB magnetic ring using electromagnets around the conveyor belt before it enters the flaw detection area, ensuring that the magnetic ring enters the detection area in a preset attitude, thus eliminating the problem of high-light reflection caused by magnetic ring attitude deviation at the source. Subsequently, two image acquisitions are performed by switching lighting conditions to obtain multi-dimensional information such as specular reflection image data and diffuse reflection image data. This multi-angle, multi-mode image acquisition method can more comprehensively capture the optical characteristics of the magnetic ring surface and effectively distinguish between real defects and false defects caused by high light. In the defect judgment stage, this method determines whether a suspected defect area is a real defect based on the brightness value of the suspected defect area in the multi-dimensional image data, and if it is confirmed to be a real defect, it further determines the defect type based on the brightness value.
[0016] This refined judgment mechanism based on multi-dimensional image data and brightness features significantly improves the accuracy and reliability of defect identification, effectively avoiding the problem of false rejection caused by specular highlight misjudgment in traditional methods. Finally, for magnetic rings with genuine defects, the system sends a rejection instruction and stores detailed target information, achieving accurate rejection of non-conforming products and quality traceability. In summary, this application, through the combination of attitude pre-adjustment, multi-dimensional image acquisition, and refined defect judgment, effectively solves the problems of high specular highlight misjudgment and high false rejection rates caused by unstable magnetic ring attitude in existing technologies. It significantly improves the accuracy, efficiency, and yield of automated flaw detection for NdFeB magnetic rings, reduces production costs, and has significant industrial application value. Attached Figure Description
[0017] Figure 1 A flowchart illustrating an automated control method for flaw detection of neodymium iron boron magnetic rings provided in this application; Figure 2 A flowchart illustrating another automated control method for flaw detection of neodymium iron boron magnetic rings provided in this application; Figure 3 This is a schematic diagram of the architecture of an automated control system for flaw detection of neodymium iron boron magnetic rings provided in this application. Detailed Implementation
[0018] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0019] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0020] like Figure 1 As shown, this application proposes an automated control method for flaw detection of NdFeB magnetic rings, including: S101. Before the neodymium iron boron magnetic ring on the conveyor belt enters the flaw detection area, the electromagnets around the conveyor belt are controlled to adjust the attitude of the neodymium iron boron magnetic ring so as to adjust the neodymium iron boron magnetic ring to a preset attitude.
[0021] S102. After the neodymium iron boron magnetic ring on the conveyor belt enters the flaw detection area, the neodymium iron boron magnetic ring is imaged twice by switching the lighting conditions to obtain multi-dimensional image data. The multi-dimensional image data includes specular reflection image data and diffuse reflection image data.
[0022] S103. Determine the suspected defect areas in the multi-dimensional image data based on the multi-dimensional image data.
[0023] S104. Determine whether the suspected defect area is a real defect based on the brightness value of the suspected defect area in the multi-dimensional image data, and if the suspected defect area is a real defect, determine the defect type of the real defect based on the brightness value of the suspected defect area.
[0024] S105. When the suspected defect area is a real defect, send a rejection instruction to remove the NdFeB magnetic ring from the conveyor belt, generate and store target information; the target information includes the number of the NdFeB magnetic ring and the defect type of the real defect of the NdFeB magnetic ring.
[0025] This application effectively avoids false positives due to high light levels by adjusting the magnetic ring posture before flaw detection and employing multi-dimensional image acquisition and intelligent defect judgment. This improves the accuracy and efficiency of detection, significantly reduces the false rejection rate, and enhances the yield rate and economic benefits of the production line.
[0026] To better understand the technical solution proposed in this application, it is necessary to explain some key terms and implementation environments involved. The neodymium iron boron (NdFeB) magnetic ring involved in this application is a high-performance permanent magnet material, typically ring-shaped with a specific magnetic pole orientation, and widely used in various precision motors and sensors. In automated inspection processes, the NdFeB magnetic ring is transported via a conveyor belt, which can be a common industrial belt conveyor, and its operating speed can be adjusted according to production needs.
[0027] The flaw detection area is a dedicated zone on the conveyor belt for defect inspection, typically equipped with image acquisition devices and lighting. Within this area, the attitude of the neodymium iron boron magnetic ring needs precise control. This attitude primarily refers to the ring's spatial position and orientation on the conveyor belt, particularly the relative angle between its magnetic poles and the image acquisition device.
[0028] Electromagnets are key actuators used to adjust the attitude of neodymium iron boron (NdFeB) magnetic rings. They interact with the NdFeB magnetic ring by generating a magnetic field, thereby achieving non-contact attitude adjustment. The arrangement and control method of the electromagnets directly affect the accuracy and efficiency of attitude adjustment.
[0029] Image acquisition refers to the process of obtaining images of the surface of a neodymium iron boron (NdFeB) magnetic ring using vision devices such as industrial cameras. This application emphasizes two image acquisitions and switching lighting conditions, meaning that the same magnetic ring is photographed under different lighting conditions to obtain more comprehensive surface information. The multi-dimensional image data includes specular reflection image data and diffuse reflection image data, which respectively reflect the reflection characteristics of the magnetic ring surface under different lighting conditions and are of great significance for distinguishing surface defects and highlights.
[0030] Suspected defect areas refer to regions in image data that are initially identified as potentially defective and require further analysis and judgment. Actual defects, on the other hand, are those confirmed after precise analysis, such as cracks, dents, or coating peeling.
[0031] The rejection instruction is an operational command issued by the system to the rejection device after confirming a genuine defect, used to remove the non-conforming NdFeB magnetic rings from the production line. The target information records key information about the non-conforming magnetic rings, including their serial number and the type of defect. This information is of great value for subsequent quality traceability and process improvement.
[0032] The core of the automated control method for flaw detection of neodymium iron boron magnetic rings proposed in this application lies in its ability to effectively improve the accuracy and automation level of flaw detection through a series of refined control and detection steps.
[0033] First, the NdFeB magnetic ring needs to be adjusted in orientation before entering the flaw detection area. This step aims to ensure the ring is in a preset, stable orientation conducive to detection during image acquisition. For example, electromagnets around the conveyor belt can be used to apply magnetic force to the NdFeB ring, causing it to automatically align during transport. Specifically, electromagnets can be placed on both sides or at the bottom of the conveyor belt. By controlling the current and magnetic field direction of the electromagnets, the magnetic poles of the NdFeB ring can be guided to align with the conveyor belt's transport direction, or its surface can be kept parallel to the focal plane of the image acquisition device. This adjustment can be based on preset fixed parameters; for example, a constant current value can be set empirically to generate a stable magnetic field in the electromagnets, thereby continuously correcting the ring's orientation.
[0034] Secondly, after the NdFeB magnetic ring enters the flaw detection area, it needs to undergo two image acquisitions to obtain multi-dimensional image data. This step aims to more comprehensively reflect the characteristics of the magnetic ring surface through image information under different lighting conditions. For example, two independent light sources can be used. The first light source illuminates the NdFeB magnetic ring at a large incident angle (e.g., 90°). In this case, the image acquisition device mainly captures the specular reflection light from the magnetic ring surface, forming specular reflection image data. Specular reflection images are more sensitive to identifying features such as surface flatness and highlight areas.
[0035] The second set of light sources illuminates the neodymium iron boron magnetic ring at a smaller incident angle (e.g., 45°). In this case, the image acquisition device primarily captures the diffuse reflection light from the ring's surface, forming diffuse reflection image data. Diffuse reflection images are more effective for identifying detailed features such as surface textures, pits, and cracks. By switching between these two sets of light sources, specular reflection image data and diffuse reflection image data can be acquired sequentially. Another approach is to use a light source polarizer with switchable polarization angles. For example, when the polarization angle is set to 0°, diffuse reflection image data is acquired; when the polarization angle is set to 90°, specular reflection image data is acquired.
[0036] Next, suspected defect areas are identified based on the acquired multi-dimensional image data. This step aims to initially screen areas in the image that may contain defects. For example, pixel-level comparisons can be performed between specular reflection and diffuse reflection image data, calculating the brightness difference value of each pixel in the two images. Since the reflective characteristics of real defects differ from normal surfaces under different lighting conditions, their brightness difference values are usually greater than those of normal areas. By setting a brightness difference threshold, areas containing pixels with brightness difference values greater than this threshold are marked as suspected defect areas. This brightness difference threshold can be determined based on empirical values or through statistical analysis of a large number of samples.
[0037] Subsequently, the brightness values of suspected defect areas in the multi-dimensional image data are used to determine whether the suspected defect area is a real defect. If the suspected defect area is a real defect, the defect type is determined based on the brightness values of the suspected defect area. This step is crucial for defect identification. For example, the brightness values and brightness gradient directions of the suspected defect area in specular and diffuse image data can be comprehensively analyzed. If the suspected defect area has a high brightness value in the specular image data but a low brightness value in the diffuse image data, and the brightness gradient directions are inconsistent, it may indicate that the area is a highlight rather than a real defect.
[0038] Conversely, if the brightness value and gradient direction conform to a specific pattern, it can be identified as a genuine defect. For example, when the brightness value of a suspected defect area in the specular reflection image data is less than a certain preset threshold, and its brightness gradient direction is consistent with the brightness gradient direction in the diffuse reflection image data, it can be identified as a crack. When the brightness value of a suspected defect area in both the specular reflection and diffuse reflection image data is greater than a certain preset threshold, and the brightness gradient directions are inconsistent, it can be identified as coating peeling. Through this comprehensive multi-dimensional and multi-feature judgment, highlights and genuine defects can be effectively distinguished, and defect types can be further refined.
[0039] Finally, when a suspected defect area turns out to be a genuine defect, a rejection command is sent to remove the NdFeB magnetic ring from the conveyor belt, and target information is generated and stored. Once the system confirms a genuine defect in a NdFeB magnetic ring, it immediately sends a command to the rejection device downstream of the conveyor belt, for example, controlling a pneumatic pusher to eject the defective ring from the production line. Simultaneously, the system generates and stores target information including the NdFeB magnetic ring number and defect type for subsequent quality traceability, data analysis, and process improvement. For example, this information can be stored in a database for production management personnel to access.
[0040] The automated control method for flaw detection of NdFeB magnetic rings proposed in this application effectively solves the problems of low detection accuracy and high false rejection rate caused by high light misjudgment in the prior art through its unique attitude adjustment, multi-dimensional image acquisition and intelligent defect judgment mechanism.
[0041] This application fundamentally solves the problem of false positives for NdFeB magnetic rings by adjusting the orientation of the rings before flaw detection, combining multi-dimensional image acquisition technology, and employing intelligent algorithms to accurately judge and classify suspected defect areas. Compared with existing technologies, the advantages of this application are: First, the orientation adjustment effectively avoids the generation of highlights, improving the quality of image acquisition; second, multi-dimensional image data provides more comprehensive information, making defect identification more accurate; third, the intelligent judgment algorithm can accurately distinguish between highlights and real defects and identify defect types, significantly reducing the false rejection rate; finally, the automated rejection and information recording mechanism improves production efficiency and quality management. Therefore, this application not only improves the accuracy and automation of NdFeB magnetic ring flaw detection but also provides a more reliable and efficient solution for product quality control in the field of intelligent manufacturing.
[0042] like Figure 2 As shown, this application further proposes an automated control method for flaw detection of NdFeB magnetic rings. The method includes electromagnets around the conveyor belt, located on both sides of the conveyor belt, and a magnetic pole direction indicator on the NdFeB magnetic ring. The electromagnets around the conveyor belt are used to adjust the attitude of the NdFeB magnetic ring to a preset attitude. The method includes: S201. Obtain the directional deviation angle between the magnetic pole direction indicator mark of the neodymium iron boron magnetic ring and the preset direction; the preset direction is the direction of the line connecting the electromagnets on both sides of the conveyor belt.
[0043] S202. Determine the target current based on the directional deviation angle.
[0044] S203. The electromagnets around the conveyor belt are controlled according to the target current to adjust the attitude of the neodymium iron boron magnetic ring so as to adjust the neodymium iron boron magnetic ring to the preset attitude.
[0045] Specifically, the electromagnets surrounding the conveyor belt are configured to include electromagnets located on both sides of the conveyor belt. These electromagnets interact with the magnetism of the NdFeB magnetic ring by generating a magnetic field, thereby achieving non-contact adjustment of the magnetic ring's orientation. To accurately identify the current orientation of the NdFeB magnetic ring, a magnetic pole orientation indicator is provided on the NdFeB magnetic ring. This indicator can be a physical mark, a magnetic code, or an inherent magnetic pole orientation identified through magnetic field detection technology. A preset direction is defined as the direction of the line connecting the electromagnets on both sides of the conveyor belt, providing a clear reference for the final alignment of the magnetic ring.
[0046] During attitude adjustment, the first step is to obtain the directional deviation angle between the magnetic pole direction indicator of the NdFeB magnetic ring and a preset direction. This angle reflects the degree of deviation between the current attitude and the target attitude of the magnetic ring. For example, the magnetic pole direction indicator can be detected using a visual recognition system or a magnetic field sensor, and its angle with the preset direction can be calculated. Subsequently, a target current is determined based on the obtained directional deviation angle. This target current is used to drive the electromagnets around the conveyor belt to generate an appropriate magnetic torque, thereby correcting the attitude of the magnetic ring. Finally, the electromagnets around the conveyor belt are controlled according to the determined target current to generate a corresponding magnetic field, which in turn applies a force to the NdFeB magnetic ring, causing it to rotate and ultimately adjust to the preset attitude.
[0047] This application's solution achieves precise sensing and active control of the magnetic ring's attitude by setting magnetic pole direction indicators on the neodymium iron boron (NdFeB) magnetic ring and utilizing electromagnets located on both sides of the conveyor belt. Before the NdFeB magnetic ring enters the flaw detection area, its magnetic pole direction indicator is detected, and the directional deviation angle between it and the preset direction is calculated. Based on this deviation angle, the system can intelligently determine the required target current, which is applied to the electromagnets on both sides, thereby generating a magnetic torque that interacts with the magnetic field of the magnetic ring. It is precisely because of this precisely calculated and applied magnetic torque that the NdFeB magnetic ring can be guided and rotated until its magnetic pole direction is parallel to the preset direction, thus ensuring that the magnetic ring enters the flaw detection area with a consistent and accurate attitude. This mechanism effectively solves the problems of high randomness and low adjustment accuracy of magnetic ring attitude in traditional methods.
[0048] Through the above technical solution, this application enables automated and high-precision adjustment of the attitude of NdFeB magnetic rings. Compared to simply controlling the electromagnet for adjustment in a general way, this solution introduces magnetic pole direction indicators and calculates the directional deviation angle, giving the attitude adjustment process a clear quantitative basis. Therefore, the control of the electromagnet is no longer blind, but precise control based on real-time feedback, significantly improving the accuracy and efficiency of magnetic ring attitude adjustment. This not only ensures the image acquisition quality and defect identification accuracy of subsequent flaw detection, but also reduces the need for manual intervention, improving the automation level and production efficiency of the entire inspection process.
[0049] This application further proposes a more refined method for determining the target current by introducing a first correspondence and the friction coefficient of the conveyor belt to achieve more accurate attitude adjustment that is more adapted to actual working conditions.
[0050] The steps for determining the target current based on the directional deviation angle mentioned above include: Obtain the first correspondence and the friction coefficient of the conveyor belt; the first correspondence includes a one-to-one correspondence between multiple directional deviation angle ranges and multiple original currents; take the original current corresponding to the directional deviation angle range in the first correspondence as the intermediate current; take the product of the intermediate current and the first value as the target current; the first value is the product of the friction coefficient of the conveyor belt and the preset friction adjustment coefficient.
[0051] Specifically, the first correspondence can be understood as a pre-established lookup table or function relationship used to guide current setting. This correspondence associates different directional deviation angle ranges with corresponding original current values. For example, when the directional deviation angle is between 0 and 10 degrees, the corresponding original current is X amperes; when the directional deviation angle is between 10 and 20 degrees, the corresponding original current is Y amperes, and so on. This correspondence can be obtained through experimental testing, experience accumulation, or simulation, and its purpose is to provide a basic current adjustment amount for different degrees of attitude deviation.
[0052] The friction coefficient of the conveyor belt is a quantitative indicator of the frictional force between the neodymium iron boron magnetic ring and the conveyor belt surface. This friction coefficient can be measured in real time by sensors, or estimated or periodically calibrated based on factors such as the conveyor belt material, surface condition, and working environment (e.g., humidity, temperature). The purpose of obtaining this friction coefficient is to dynamically compensate for or utilize the influence of frictional force on attitude adjustment when calculating the target current.
[0053] Furthermore, the intermediate current refers to the original current value corresponding to the range of the angle obtained from the first correspondence, based on the directional deviation angle of the neodymium iron boron magnetic ring. This intermediate current is the basic current for the electromagnet to adjust its attitude.
[0054] Furthermore, the first value is a coefficient used to correct the intermediate current, calculated as the product of the conveyor belt's friction coefficient and a preset friction adjustment coefficient. The preset friction adjustment coefficient is a pre-defined parameter used to balance the influence of the friction coefficient on the current, and can be set according to the actual application scenario and adjustment requirements. By multiplying the intermediate current by the first value, the final target current can be obtained. This product relationship allows the target current to adaptively adjust according to actual friction conditions, thereby ensuring precise attitude adjustment under different friction environments.
[0055] This application optimizes the determination process of the target current by introducing a first correspondence and the friction coefficient of the conveyor belt. Specifically, firstly, by obtaining the directional deviation angle between the magnetic pole direction indicator of the NdFeB magnetic ring and a preset direction, and combining it with the preset first correspondence, an initial current, i.e., an intermediate current, can be preliminarily determined that matches this angle range. This intermediate current reflects the magnitude of the electromagnetic force required to correct a specific angular deviation under ideal friction conditions. However, considering that the actual friction coefficient of the conveyor belt will affect the rotational resistance of the magnetic ring, this application further obtains the friction coefficient of the conveyor belt and multiplies it by a preset friction adjustment coefficient to obtain a correction factor, i.e., a first value. Finally, the intermediate current is multiplied by this first value to obtain the target current that can effectively overcome or utilize the current friction force and accurately adjust the magnetic ring's attitude. It is precisely because of this dynamic consideration of the friction coefficient that the electromagnet can apply just the right amount of magnetic force, avoiding the phenomenon of insufficient adjustment due to excessive friction or over-adjustment due to insufficient friction.
[0056] Through the above technical solution, this application achieves higher precision and stronger environmental adaptability in the attitude adjustment of NdFeB magnetic rings. Compared with the scheme that determines the target current solely based on the directional deviation angle, this application introduces the friction coefficient of the conveyor belt as one of the bases for adjusting the target current, enabling the magnetic force applied by the electromagnet to better match the actual frictional resistance. This not only improves the accuracy of attitude adjustment and reduces adjustment errors caused by frictional changes, but also helps optimize the energy consumption of the electromagnet and avoids unnecessary excessive current output. Therefore, this solution ensures that the NdFeB magnetic ring is always inspected in a stable preset attitude before entering the flaw detection area, thereby improving the overall reliability and efficiency of flaw detection.
[0057] This application further proposes an automated control method for flaw detection of NdFeB magnetic rings, wherein the electromagnets around the conveyor belt also include an electromagnet located at the bottom of the conveyor belt. The method involves adjusting the attitude of the NdFeB magnetic ring to a preset attitude using the electromagnets around the conveyor belt according to a target current, specifically including the following steps: A target current is passed through the electromagnets on both sides of the conveyor belt to make the magnetic pole direction of the NdFeB magnetic ring parallel to the preset direction; the weight of the NdFeB magnetic ring is obtained; an adsorption current is passed through the electromagnet at the bottom of the conveyor belt to increase the pressure between the NdFeB magnetic ring and the conveyor belt, so as to adjust the NdFeB magnetic ring to the preset posture; the adsorption current is the product between the weight of the NdFeB magnetic ring and the preset weight adjustment coefficient.
[0058] Specifically, the electromagnet located at the bottom of the conveyor belt can be understood as being positioned below the conveyor belt, applying a vertically downward magnetic force to the NdFeB magnetic ring. Its purpose is to increase the normal force between the NdFeB magnetic ring and the conveyor belt contact surface. The weight of the NdFeB magnetic ring can be obtained through various methods, such as pre-weighing, real-time sensor measurement, or querying a database based on the product model. This provides the basic data for subsequent calculation of the adsorption current. The calculation method aims to determine the required adsorption force based on the actual weight of the NdFeB magnetic ring by multiplying it by a preset weight adjustment coefficient. This ensures sufficient downward pressure is provided without affecting the rotation adjustment of the magnetic ring, preventing it from jumping or slipping during adjustment. The preset weight adjustment coefficient can be set based on experimental data or empirical values to accommodate NdFeB magnetic rings of different materials or sizes.
[0059] This application's solution effectively solves the instability problem that may occur when relying solely on electromagnets on both sides for attitude adjustment by adding an electromagnet at the bottom of the conveyor belt and calculating and applying an adsorption current based on the weight of the NdFeB magnetic ring. Specifically, when the electromagnets on both sides apply torque to the NdFeB magnetic ring for rotational adjustment, the electromagnet at the bottom generates a downward adsorption force, increasing the friction between the NdFeB magnetic ring and the conveyor belt, thereby firmly fixing the magnetic ring to the conveyor belt. This additional downward pressure effectively suppresses slight jumping, tilting, or displacement that may occur during the rotation of the magnetic ring, ensuring that the magnetic ring can stably maintain its position after being adjusted to the preset posture. It is precisely because of this dual control mechanism—rotational adjustment by lateral electromagnetic force and vertical fixation by bottom electromagnetic force—that the attitude adjustment process of the NdFeB magnetic ring is more stable and precise.
[0060] The above technical solution significantly improves the stability of the adjustment process and the accuracy of the final posture when adjusting the NdFeB magnetic ring. The additional attraction force provided by the electromagnet at the bottom effectively prevents posture instability or positional deviation caused by inertia, vibration, or changes in the coefficient of friction during the rotational adjustment process, thus ensuring that the NdFeB magnetic ring can be adjusted to the preset posture with higher precision. This improvement not only enhances the reliability of automated control but also provides more standardized and consistent testing conditions for subsequent flaw detection, thereby improving the overall accuracy and efficiency of the inspection.
[0061] In some of the embodiments described above in this application, it is proposed to perform two image acquisitions on the neodymium iron boron magnetic ring by switching the lighting conditions to obtain multi-dimensional image data.
[0062] Specifically, the above lighting conditions can be set as follows: the illumination angle of the light source is 45° and the illumination angle of the light source is 90°, or the polarization angle of the light source polarizer is 0° and the polarization angle of the light source polarizer is 90°.
[0063] In this case, by switching the lighting conditions, two image acquisitions were performed on the neodymium iron boron magnetic ring to obtain multi-dimensional image data, including: The system controls the first set of light sources to illuminate the NdFeB magnetic ring, and controls the image acquisition device to acquire specular reflection image data of the NdFeB magnetic ring; the illumination angle of the first set of light sources is 90°. Alternatively, the system controls the second set of light sources to illuminate the NdFeB magnetic ring, and controls the image acquisition device to acquire diffuse reflection image data of the NdFeB magnetic ring; the illumination angle of the second set of light sources is 45°. Or, the system controls the polarization angle of the light source polarizer to be 0°, and controls the image acquisition device to acquire diffuse reflection image data of the NdFeB magnetic ring; or the system controls the polarization angle of the light source polarizer to be 90°, and controls the image acquisition device to acquire specular reflection image data of the NdFeB magnetic ring.
[0064] Specifically, the aforementioned lighting conditions refer to the characteristics of the light source used to irradiate the NdFeB magnetic ring. These characteristics can be switched according to testing requirements to obtain image data with different reflectivity. The illumination angle of the light source refers to the angle between the light emitted by the light source and the normal to the surface of the NdFeB magnetic ring. When the illumination angle is 90°, the light is incident perpendicularly to the surface of the NdFeB magnetic ring, which is beneficial for acquiring specular reflection image data; when the illumination angle is 45°, the light is incident obliquely, which is beneficial for acquiring diffuse reflection image data. The light source polarizer is a device used to control the polarization direction of the light, and its polarization angle can be adjusted. By setting the polarization angle of the light source polarizer to 0° or 90°, light with a specific polarization direction can be enhanced or suppressed, thereby distinguishing and acquiring diffuse reflection image data and specular reflection image data.
[0065] In one embodiment, a first set of light sources illuminates a neodymium iron boron (NdFeB) magnetic ring at a 90° illumination angle, and an image acquisition device captures specular reflection image data of the NdFeB magnetic ring. The first set of light sources can be understood as illumination units specifically designed for acquiring specular reflection images, with their illumination angle precisely controlled at 90°, meaning the light is incident perpendicularly onto the surface of the NdFeB magnetic ring. Under these conditions, the smooth areas of the NdFeB magnetic ring surface produce strong specular reflection, while any surface defects, such as scratches, pits, or foreign objects, will disrupt the uniformity of this specular reflection, thus manifesting as abnormal brightness or texture in the image.
[0066] Next, the second set of light sources is controlled to illuminate the NdFeB magnetic ring at a 45° illumination angle, and the diffuse reflection image data of the NdFeB magnetic ring is acquired by an image acquisition device. The second set of light sources is the illumination unit used to acquire the diffuse reflection image, and its illumination angle is set to 45°, that is, the light is obliquely incident on the surface of the NdFeB magnetic ring. Under this condition, the light is scattered on the surface of the NdFeB magnetic ring, mainly reflecting the surface roughness, texture, and minor defects.
[0067] In another implementation, the polarization angle of the light source polarizer is controlled to be 0°, and the image acquisition device is controlled to acquire diffuse reflection image data of the NdFeB magnetic ring. Subsequently, the polarization angle of the light source polarizer is controlled to be 90°, and the image acquisition device is controlled to acquire specular reflection image data of the NdFeB magnetic ring. The light source polarizer can be understood as an optical filter that selectively allows light with a specific polarization direction to pass through. When the polarization angle is 0°, the acquisition of diffuse reflection light is effectively enhanced because diffuse reflection light is usually depolarized or has a random polarization direction. When the polarization angle is 90°, the acquisition of specular reflection light is effectively enhanced because specular reflection light usually retains the polarization characteristics of the incident light. By switching the polarization angle, the diffuse reflection image data and specular reflection image data of the NdFeB magnetic ring can be effectively separated and acquired.
[0068] The solution in this application, by switching different lighting conditions, including adjusting the illumination angle of the light source or the polarization angle of the light source polarizer, enables the image acquisition device to capture specular reflection image data and diffuse reflection image data of the NdFeB magnetic ring separately. Specular reflection image data primarily reflects the flatness, smoothness, and macroscopic defects of the NdFeB magnetic ring surface, such as large scratches or plating peeling. Diffuse reflection image data primarily reflects the microstructure, roughness, and minute defects of the NdFeB magnetic ring surface, such as microcracks or surface foreign matter. By acquiring these two different dimensions of image data, more comprehensive and richer information can be provided for subsequent defect detection, thereby improving the accuracy and reliability of defect identification.
[0069] The above technical solution allows for the acquisition of multi-dimensional image data with different optical properties, namely specular reflection image data and diffuse reflection image data. These two types of image data reflect the surface condition of the NdFeB magnetic ring from different angles, significantly improving the ability to identify various defects. For example, some defects may be inconspicuous in specular reflection images but clearly visible in diffuse reflection images, and vice versa. Therefore, combining these two types of image data for analysis can effectively compensate for the inadequacy of image information under single illumination conditions, thereby improving the sensitivity and accuracy of defect detection, reducing the false negative and false positive rates, and ensuring the quality of the NdFeB magnetic ring.
[0070] This application proposes a more refined and adaptive method for identifying suspected defective regions by introducing brightness difference values, quality requirement indices, and dynamic thresholds to improve the accuracy and adaptability of defect identification.
[0071] In some embodiments of this application, determining suspected defect areas in the multi-dimensional image data based on the aforementioned multi-dimensional image data specifically includes: For each pixel in two images of multi-dimensional image data, determine the brightness difference value of the pixel in the two images; obtain the quality requirement index and the second correspondence of the NdFeB magnetic ring; the second correspondence includes a one-to-one correspondence between multiple quality requirement index ranges and multiple brightness difference thresholds; take the brightness difference threshold corresponding to the quality requirement index range of the NdFeB magnetic ring in the second correspondence as the target brightness difference threshold; and take the area where the brightness difference value is greater than the target brightness difference threshold as the suspected defect area.
[0072] Specifically, after acquiring the specular and diffuse reflection image data of the NdFeB magnetic ring, the brightness values of each corresponding pixel in these two images can be compared to calculate the brightness difference value for each pixel. The brightness difference value can be understood as the difference in brightness intensity of the same pixel under different lighting conditions (e.g., specular and diffuse reflection). Its purpose is to more effectively highlight the visual differences between defective and normal areas by comparing image information under different reflection characteristics. For example, a defective area may appear as a dark area in a specular reflection image and a bright area in a diffuse reflection image, or vice versa; this difference helps to distinguish defects.
[0073] The quality requirement index for NdFeB magnetic rings can be understood as a quantitative indicator of product defect tolerance, aiming to allow the flaw detection process to be adjusted according to actual production needs. For example, for high-precision NdFeB magnetic rings, the quality requirement index may be higher, meaning a higher sensitivity to minute defects is required; while for general-purpose NdFeB magnetic rings, the quality requirement index may be lower. The second correspondence is a pre-established mapping table or function, designed to dynamically determine an appropriate brightness difference threshold based on different quality requirement indices. This correspondence can be constructed based on extensive experimental data, rules of thumb, or machine learning models to ensure that the threshold setting adapts to the specific requirements of different production batches or product models.
[0074] In practical applications, by substituting the quality requirement index of the NdFeB magnetic ring into the second correspondence, the target brightness difference threshold matching the current quality requirement can be determined. This target brightness difference threshold is a key parameter used to distinguish between normal areas and suspected defective areas. Subsequently, the brightness difference value calculated for each pixel is compared with this target brightness difference threshold. If the brightness difference value of a pixel is greater than the target brightness difference threshold, the pixel is considered to potentially belong to a defective area, and its area is marked as a suspected defective area. In this way, areas with abnormal optical properties can be effectively screened out, providing a preliminary basis for subsequent defect judgment.
[0075] The solution presented in this application is able to more accurately identify suspected defect areas because it fully utilizes the differences in optical response between defective and normal areas under different lighting conditions in multi-dimensional image data. Normal surfaces typically have relatively consistent reflective properties, resulting in relatively small brightness differences between specular and diffuse reflection images. However, when defects such as cracks, scratches, and pits are present, these defects alter the microstructure of the local surface, causing significant changes in its reflection and scattering characteristics, thus producing large brightness differences under different lighting conditions. By calculating the brightness difference value of each pixel, these local optical anomalies caused by defects can be effectively amplified.
[0076] The introduction of the quality requirement index and the second correspondence of the NdFeB magnetic ring enables this solution to adaptively adjust the detection sensitivity according to actual production needs. Different products have different tolerances for defects; for example, some applications have zero tolerance for microcracks, while others allow for a certain degree of surface imperfections. By linking the quality requirement index with a dynamic target brightness difference threshold, it is possible to ensure that unnecessary false positives or false negatives are avoided while meeting different quality standards. When the quality requirement is high, the target brightness difference threshold is set lower, thereby increasing the sensitivity to minute brightness differences, allowing even minute defects to be identified as suspected defect areas; conversely, when the quality requirement is low, the target brightness difference threshold is increased accordingly to filter out unimportant surface imperfections. This adaptive threshold setting mechanism makes the flaw detection process more flexible and efficient.
[0077] Through the above technical solution, this application can more accurately and intelligently identify suspected defect areas based on multi-dimensional image data. Compared with the traditional method using a fixed threshold, this solution significantly improves the sensitivity and accuracy of defect identification by calculating the brightness difference value of pixels and dynamically adjusting the target brightness difference threshold in conjunction with the quality requirement index of the neodymium iron boron magnetic ring. This not only effectively reduces the occurrence of false positives and false negatives, avoiding misidentification of normal areas as defects or omission of real defects, but also enables the flaw detection system to better adapt to the quality requirements of different product batches and different customers, thereby improving the flexibility and reliability of automated inspection, reducing the need for manual intervention, and improving production efficiency and product quality.
[0078] This application further proposes a method for determining whether a suspected defect area is a real defect, and when the suspected defect area is a real defect, for determining the defect type of the real defect based on the brightness value of the suspected defect area, specifically including: Determine whether the brightness value of the pixel in the suspected defect area in the specular reflection image data is greater than a first preset brightness threshold; determine whether the brightness value of the pixel in the suspected defect area in the diffuse reflection image data is greater than a second preset brightness threshold; the second preset brightness threshold is less than the first preset brightness threshold; determine whether the brightness gradient direction of the pixel in the suspected defect area in the specular reflection image data is consistent with the brightness gradient direction of the pixel in the suspected defect area in the diffuse reflection image data; if both are true, determine that the suspected defect area is not a real defect; otherwise, determine that the suspected defect area is a real defect, and determine the defect type of the real defect based on the brightness value of the suspected defect area.
[0079] Specifically, the first preset brightness threshold and the second preset brightness threshold are key parameters used to distinguish between defective and non-defective areas. The first preset brightness threshold is typically set to a higher value to identify areas exhibiting high brightness in specular reflection images; these areas may correspond to regions with good surface smoothness or strong reflection points. The second preset brightness threshold is set to a value lower than the first preset brightness threshold to identify relatively low brightness areas in diffuse reflection images, which helps to capture defects that are not obvious in diffuse reflection. The brightness gradient direction refers to the trend and direction of brightness changes around a pixel; its consistency assessment aims to evaluate the optical response characteristics of suspected defective areas under different lighting conditions.
[0080] When the brightness value of a pixel in a suspected defect area is greater than a first preset brightness threshold in the specular reflection image data, and the brightness value of the same pixel in the diffuse reflection image data is greater than a second preset brightness threshold, and the brightness gradient directions in the two images are determined to be consistent, it usually indicates that the area has relatively uniform surface characteristics and is not a real defect. Conversely, if none of the above conditions are met, the area is determined to be a real defect, and the defect type is further determined based on its brightness value.
[0081] This application's solution, by introducing brightness threshold judgments and brightness gradient direction consistency judgments based on multi-dimensional image data (spectral reflection and diffuse reflection), can more comprehensively and accurately analyze the optical characteristics of suspected defect areas. Specular reflection image data primarily reflects the smoothness and gloss of an object's surface, while diffuse reflection image data reveals more about the object's surface texture, roughness, and internal structure. By combining these two types of image data and setting different brightness thresholds, it is possible to effectively distinguish between normal surface reflection, dust, and other non-defect features and actual defects.
[0082] For example, a smooth surface may be very bright under specular reflection but less so under diffuse reflection; conversely, a cracked or spalled area may exhibit abnormal brightness distribution and gradient changes under both lighting conditions. The consistency assessment of brightness gradient direction further leverages the characteristic that genuine defects typically cause drastic local changes in light scattering or absorption patterns, resulting in inconsistent brightness gradient directions under different lighting conditions. Normal surfaces or non-defect features, on the other hand, tend to maintain relatively consistent optical responses. Therefore, this scheme can significantly improve the accuracy of defect identification, reduce misjudgments, and provide a more reliable basis for subsequent defect type classification.
[0083] Through the above technical solution, this application effectively solves the problem of misjudgment that easily occurs when relying solely on a single brightness value to determine defects in traditional methods. By comprehensively analyzing the brightness values and brightness gradient directions in specular reflection and diffuse reflection image data, true defects can be identified more accurately and distinguished from non-defect features (such as surface reflection, dust, etc.). In particular, the introduction of consistent judgment of brightness gradient direction enables the system to capture the unique optical response of the defect area under different illuminations, thereby significantly improving the robustness and accuracy of defect detection. This not only improves the efficiency of automated detection but also provides a more reliable data foundation for subsequent defect classification, thereby enhancing the overall quality control level of NdFeB magnetic rings.
[0084] This application further proposes a specific method for determining the type of a real defect based on the brightness value of a suspected defect area. By comprehensively analyzing the brightness value and brightness gradient direction in multi-dimensional image data, it achieves accurate identification of common defect types.
[0085] Based on the above method, the defect type of the actual defect is determined according to the brightness value of the suspected defect area, including: The system determines whether the brightness value of a pixel in the suspected defect area in the specular reflection image data is less than a second preset brightness threshold; whether the brightness gradient direction of a pixel in the suspected defect area in the specular reflection image data is consistent with the brightness gradient direction of a pixel in the suspected defect area in the diffuse reflection image data; if both are true, the defect type of the actual defect is determined to be a crack; whether the brightness value of a pixel in the suspected defect area in the specular reflection image data is greater than a first preset brightness threshold; whether the brightness value of a pixel in the suspected defect area in the diffuse reflection image data is greater than a first preset brightness threshold; whether the brightness gradient direction of a pixel in the suspected defect area in the specular reflection image data is inconsistent with the brightness gradient direction of a pixel in the suspected defect area in the diffuse reflection image data; if both are true, the defect type of the actual defect is determined to be coating peeling; if the defect type of the actual defect is not coating peeling and the defect type of the actual defect is not a crack, the defect type of the actual defect is determined to be an unknown defect.
[0086] Specifically, in determining the type of a real defect, the pixels in the suspected defect area are first analyzed. If the brightness value of a pixel in the specular reflection image data is determined to be less than a second preset brightness threshold, and the brightness gradient direction of that pixel in the specular reflection image data is determined to be consistent with the brightness gradient direction in the diffuse reflection image data, then the real defect is identified as a crack. The second preset brightness threshold is a pre-set brightness reference value, designed to distinguish defects with lower brightness; cracks typically appear as thin, elongated areas with lower brightness in the image. The consistency of the brightness gradient direction further confirms the stability of the defect's geometric features under different lighting conditions, which is consistent with the physical characteristics of cracks.
[0087] Furthermore, when the brightness value of a pixel in the specular reflection image data is determined to be greater than a first preset brightness threshold, and the brightness value in the diffuse reflection image data is also determined to be greater than the first preset brightness threshold, and the brightness gradient direction of the pixel in the specular reflection image data is determined to be inconsistent with the brightness gradient direction in the diffuse reflection image data, then the real defect is identified as coating peeling. The first preset brightness threshold is usually used to identify defects with high brightness. Due to changes in surface structure, the peeled area may have enhanced specular and diffuse reflection, resulting in higher brightness. The inconsistency in the brightness gradient direction indicates that the surface morphology of the defect area exhibits significant differences under different lighting conditions, which is consistent with the changes in reflective characteristics caused by substrate exposure or changes in surface roughness after coating peeling.
[0088] Furthermore, if the type of a genuine defect does not meet either the criteria for a crack or the criteria for coating peeling, then the genuine defect is classified as an unknown defect. This classification mechanism ensures that all detected genuine defects receive initial classification processing, and even defects that cannot be clearly identified can be marked for subsequent manual review or further analysis.
[0089] This application's solution addresses the ambiguity inherent in traditional defect type identification methods by comprehensively judging the brightness values and brightness gradient directions of multi-dimensional image data (spectral reflection and diffuse reflection). Cracks, as surface or internal structural defects, typically appear as low-brightness areas in specular reflection images because light is scattered or absorbed at the crack, resulting in reduced reflected light intensity. Furthermore, the brightness gradient direction of a crack's geometry generally remains consistent under different lighting conditions (spectral and diffuse reflection) because its physical structure is fixed. However, coating peeling is different. The surface roughness or material of the peeled area differs significantly from the surrounding normal area, potentially leading to enhanced specular and diffuse reflection, resulting in higher brightness.
[0090] More importantly, due to the irregular surface morphology of the peeled area, the brightness gradient direction in the specular and diffuse reflection images may be inconsistent, reflecting the differences in light reflection on different surface structures. By setting different brightness thresholds (a first preset brightness threshold and a second preset brightness threshold) and combining the consistency or inconsistency of the brightness gradient direction, it is possible to effectively distinguish between cracks and coating peeling, two defects with different optical properties. For defects that do not conform to known defect characteristics, they are uniformly classified as unknown defects, thereby achieving automated and refined identification of defect types.
[0091] The above technical solution enables automated and precise identification of the true defect types on NdFeB magnetic rings, overcoming the limitations of existing technologies where defect type judgment standards are vague and easily confused. Specifically, by comprehensively utilizing the brightness values and brightness gradient directions in specular reflection and diffuse reflection image data, this application can effectively distinguish between cracks and coating peeling, two common defects with different optical properties, significantly improving the accuracy of defect classification. Furthermore, for defects that cannot be clearly classified, this application marks them as unknown defects, avoiding misjudgments and providing a basis for subsequent manual review or deeper analysis, thereby improving the intelligence and reliability of the entire flaw detection process.
[0092] This application further proposes a scheme for differentiated processing based on the number of unknown defects after determining that the actual defect type is an unknown defect, in order to achieve more refined management of unknown defects. Specifically, after determining that the actual defect type is an unknown defect, the method also includes: The system acquires the number of unknown defects on the NdFeB magnetic ring; when the number of unknown defects exceeds a preset threshold, it generates and sends target information to production personnel to indicate that there are too many unknown defects on the NdFeB magnetic ring; when the number of unknown defects is less than or equal to the preset threshold, it generates and stores image information of the unknown defects on the NdFeB magnetic ring.
[0093] Specifically, "obtaining the number of unknown defects on NdFeB magnetic rings" refers to the system counting NdFeB magnetic rings identified as having unknown defects during the inspection process. This counting can be performed on all NdFeB magnetic rings within a single batch, a single production cycle, or a specific time period to obtain the cumulative number of unknown defects. The purpose is to quantify the frequency of unknown defects, providing a data basis for subsequent decision-making.
[0094] The "preset quantity threshold" can be understood as a critical value pre-set in actual production based on factors such as product quality requirements, production process stability, and historical data analysis. When the number of unknown defects exceeds this threshold, it indicates that the frequency of unknown defects has reached a level requiring attention. This threshold can be flexibly configured according to specific application scenarios and quality control standards; for example, it can be set as the maximum allowable number of unknown defects in each batch of products.
[0095] "Target information" refers to the warning message automatically generated and sent to production personnel by the system when the number of unknown defects exceeds a preset threshold. This information aims to promptly remind production personnel to pay attention to the abnormal increase in unknown defects, prompting them to check and adjust production processes, equipment status, or testing parameters. Target information may include key information such as the batch number of the NdFeB magnetic rings, the number of unknown defects, and the time of occurrence, so that production personnel can quickly locate the problem.
[0096] "Image information" refers to the system capturing and storing image data of unknown defects when the number of unknown defects does not exceed a preset threshold. This image information can serve as valuable sample data for subsequent manual re-inspection, defect type analysis, machine learning model training and optimization, thereby gradually reducing the proportion of unknown defects and improving the accuracy of defect classification.
[0097] This application's solution effectively addresses the problem of merely identifying unknown defects without subsequent processing by introducing statistical analysis of the number of unknown defects and a threshold-based differentiated processing mechanism. Specifically, when the system detects an unknown defect in the NdFeB magnetic ring, it counts it. By comparing the number of unknown defects with a preset threshold, the severity of unknown defects in the current production state can be intelligently determined. When the number of unknown defects exceeds the preset threshold, it indicates an abnormal frequency of occurrence of unknown defects, which may be due to deeper reasons such as production process fluctuations, raw material problems, or insufficient detection models.
[0098] At this point, the system immediately generates and sends warning messages to production personnel, prompting them to intervene promptly to inspect and adjust the production line or optimize the detection model, thereby preventing potential quality risks from escalating further. Conversely, when the number of unknown defects does not exceed a preset threshold, it indicates that these unknown defects may be sporadic or edge cases not yet covered by the existing model. In this case, the system generates and stores image information of these unknown defects. This image data serves as valuable learning samples, which can be used for subsequent iterative training and improvement of the defect classification model, gradually enhancing the model's recognition capabilities, ultimately reducing the proportion of unknown defects and improving the intelligence level of automated detection.
[0099] Through the above technical solution, this application enables more targeted management and processing of detected unknown defects. On the one hand, by setting preset quantity thresholds and comparing them, it can promptly detect and warn of abnormal increases in the number of unknown defects, prompting production personnel to respond quickly and effectively avoiding batch quality problems caused by the accumulation of unknown defects, thus ensuring the stability of product quality. On the other hand, for unknown defects that are few in number and do not reach the warning level, storing their image information provides valuable data support for subsequent defect analysis, model optimization, and knowledge accumulation, helping to continuously improve the accuracy of defect identification and the intelligence level of the automated detection system. This differentiated processing mechanism makes the management of unknown defects more refined and intelligent, significantly improving the practicality and effectiveness of the automated control method for NdFeB magnetic ring flaw detection.
[0100] like Figure 3 As shown in the illustration, this application also discloses an automated control system for flaw detection of NdFeB magnetic rings, comprising: an acquisition device and a processing device; the acquisition device is used to control electromagnets around the conveyor belt to adjust the posture of the NdFeB magnetic rings to a preset posture before the NdFeB magnetic rings on the conveyor belt enter the flaw detection area; the processing device is used to perform two image acquisitions on the NdFeB magnetic rings after they enter the flaw detection area by switching the lighting conditions, thereby obtaining multi-dimensional image data; the multi-dimensional image data includes specular reflection image data and diffuse reflection image data; the processing device... The processing device is further configured to determine suspected defect areas in the multi-dimensional image data based on the multi-dimensional image data; the processing device is further configured to determine whether the suspected defect area is a real defect based on the brightness value of the suspected defect area in the multi-dimensional image data, and when the suspected defect area is a real defect, determine the defect type of the real defect based on the brightness value of the suspected defect area; the processing device is further configured to send a rejection instruction to remove the NdFeB magnetic ring from the conveyor belt when the suspected defect area is a real defect, and generate and store target information; the target information includes the number of the NdFeB magnetic ring and the defect type of the real defect of the NdFeB magnetic ring.
[0101] The acquisition device can be a standalone control module, such as a microcontroller or programmable logic controller (PLC), which connects to the electromagnet drive circuit via an electrical interface. The acquisition device can send control commands to the electromagnet based on preset control logic or received sensor signals, thereby generating a magnetic field to adjust the attitude of the neodymium iron boron magnetic ring.
[0102] Furthermore, the processing unit is configured to perform core functions such as subsequent image acquisition, defect identification, and rejection control. The processing unit can be a high-performance industrial computer or an embedded vision processing unit, internally running image processing software and control algorithms.
[0103] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for automatic control of a magnetic ring flaw detection of neodymium iron boron, characterized in that, include: Before the neodymium iron boron magnetic ring on the conveyor belt enters the flaw detection area, the electromagnets around the conveyor belt are controlled to adjust the attitude of the neodymium iron boron magnetic ring to adjust it to the preset attitude. After the neodymium iron boron magnetic ring on the conveyor belt enters the flaw detection area, the lighting conditions are switched to perform two image acquisitions on the neodymium iron boron magnetic ring to obtain multi-dimensional image data; the multi-dimensional image data includes specular reflection image data and diffuse reflection image data; Based on the multi-dimensional image data, identify suspected defect areas in the multi-dimensional image data; The brightness value of the suspected defect area in the multi-dimensional image data is used to determine whether the suspected defect area is a real defect. When the suspected defect area is a real defect, the defect type of the real defect is determined based on the brightness value of the suspected defect area. When a suspected defect area turns out to be a real defect, a rejection command is sent to remove the NdFeB magnetic ring from the conveyor belt, generating and storing target information; the target information includes the NdFeB magnetic ring number and the defect type of the real defect of the NdFeB magnetic ring; The electromagnets surrounding the conveyor belt include electromagnets located on both sides of the conveyor belt. The neodymium iron boron (NdFeB) magnetic rings are equipped with magnetic pole direction indicators. The electromagnets around the conveyor belt are used to adjust the attitude of the NdFeB magnetic rings to a preset attitude, including: Obtain the directional deviation angle between the magnetic pole direction indicator mark of the neodymium iron boron magnetic ring and the preset direction; the preset direction is the direction of the line connecting the electromagnets on both sides of the conveyor belt. Determine the target current based on the directional deviation angle; The electromagnets around the conveyor belt are controlled according to the target current to adjust the attitude of the neodymium iron boron magnetic ring, so as to adjust the neodymium iron boron magnetic ring to the preset attitude. Determining the target current based on the directional deviation angle includes: Obtain the first correspondence and the friction coefficient of the conveyor belt; the first correspondence includes a one-to-one correspondence between multiple directional deviation angle ranges and multiple original currents; The original current corresponding to the range of directional deviation angles in the first correspondence is taken as the intermediate current; The product of the intermediate current and the first value is used as the target current; the first value is the product of the friction coefficient of the conveyor belt and the preset friction adjustment coefficient.
2. The automatic control method for detecting a neodymium iron boron magnetic ring according to claim 1, characterized in that, The electromagnets surrounding the conveyor belt also include an electromagnet located at the bottom of the conveyor belt. The electromagnets around the conveyor belt are controlled according to the target current to adjust the attitude of the NdFeB magnetic ring, thereby adjusting the NdFeB magnetic ring to a preset attitude, including: A target current is passed through the electromagnets on both sides of the conveyor belt so that the magnetic pole direction of the neodymium iron boron magnetic ring is parallel to the preset direction. Obtain the weight of the neodymium iron boron magnetic ring; An adsorption current is passed through the electromagnet at the bottom of the conveyor belt to increase the pressure between the NdFeB magnetic ring and the conveyor belt, thereby adjusting the NdFeB magnetic ring to a preset posture; the adsorption current is the product of the weight of the NdFeB magnetic ring and the preset weight adjustment coefficient.
3. The automatic control method for detecting a neodymium iron boron magnetic ring according to claim 1, characterized in that, The illumination conditions are either a light source with an illumination angle of 45° and 90°, or a light source polarizer with a polarization angle of 0° and 90°. By switching the illumination conditions, two image acquisitions are performed on the neodymium iron boron magnetic ring to obtain multi-dimensional image data, including: The first set of light sources is controlled to illuminate the neodymium iron boron magnetic ring, and the image acquisition device is controlled to acquire the specular reflection image data of the neodymium iron boron magnetic ring; the illumination angle of the first set of light sources is 90°. The second set of light sources is controlled to illuminate the neodymium iron boron magnetic ring, and the image acquisition device is controlled to acquire diffuse reflection image data of the neodymium iron boron magnetic ring; the illumination angle of the second set of light sources is 45°. Alternatively, the polarization angle of the light source polarizer can be controlled to be 0°, and the image acquisition device can be controlled to acquire diffuse reflection image data of the neodymium iron boron magnetic ring. The polarization angle of the light source polarizer is controlled to be 90°, and the image acquisition device is controlled to acquire the specular reflection image data of the neodymium iron boron magnetic ring.
4. The automatic control method for detecting a neodymium iron boron magnetic ring according to claim 1, characterized in that, Determining suspected defect regions in the multi-dimensional image data based on the multi-dimensional image data includes: For each pixel in two images of multi-dimensional image data, determine the brightness difference value of the pixel in the two images; Obtain the quality requirement index and the second correspondence of the neodymium iron boron magnetic ring; the second correspondence includes a one-to-one correspondence between multiple quality requirement index ranges and multiple brightness difference thresholds; The brightness difference threshold corresponding to the range of quality requirement index of the neodymium iron boron magnetic ring in the second correspondence is taken as the target brightness difference threshold. The region containing pixels whose brightness difference value is greater than the target brightness difference threshold is designated as a suspected defect region.
5. The automatic control method for detecting a neodymium iron boron magnetic ring according to claim 1, characterized in that, The brightness value of the suspected defect area is used to determine whether the suspected defect area is a real defect. If the suspected defect area is a real defect, the defect type of the real defect is determined based on the brightness value of the suspected defect area, including: Determine whether the brightness value of a pixel in a suspected defect area in the specular reflection image data is greater than a first preset brightness threshold. Determine whether the brightness value of a pixel in a suspected defect area in the diffuse image data is greater than a second preset brightness threshold; the second preset brightness threshold is less than a first preset brightness threshold. Determine whether the brightness gradient direction of pixels in the suspected defect area in the specular reflection image data is consistent with the brightness gradient direction of pixels in the suspected defect area in the diffuse reflection image data; If both are true, the suspected defect area is determined not to be a real defect; otherwise, the suspected defect area is determined to be a real defect, and the defect type of the real defect is determined based on the brightness value of the suspected defect area.
6. The automatic control method for detecting a neodymium iron boron magnetic ring according to claim 5, characterized in that, The defect type is determined based on the brightness value of the suspected defect area, including: Determine whether the brightness value of the pixel in the suspected defect area in the specular reflection image data is less than the second preset brightness threshold; Determine whether the brightness gradient direction of pixels in the suspected defect area in the specular reflection image data is consistent with the brightness gradient direction of pixels in the suspected defect area in the diffuse reflection image data; If both are true, the defect type is determined to be a crack. Determine whether the brightness value of a pixel in a suspected defect area in the specular reflection image data is greater than a first preset brightness threshold. Determine whether the brightness value of a pixel in a suspected defect area in the diffuse image data is greater than a first preset brightness threshold. Determine whether the brightness gradient direction of pixels in the suspected defect area in the specular reflection image data is inconsistent with the brightness gradient direction of pixels in the suspected defect area in the diffuse reflection image data; If both are true, the actual defect type is determined to be coating peeling. When the actual defect type is not coating peeling and the actual defect type is not crack, the actual defect type is determined to be an unknown defect.
7. The automatic control method for detecting flaws in a Nd-Fe-B magnetic ring according to claim 6, characterized in that, After determining that the actual defect type is an unknown defect, the method also includes: To determine the number of unknown defects on the neodymium iron boron magnetic ring; When the number of unknown defects exceeds a preset threshold, a target message is generated and sent to the production personnel to indicate that there are too many unknown defects on the neodymium iron boron magnetic ring. When the number of unknown defects is less than or equal to a preset threshold, image information of unknown defects on the neodymium iron boron magnetic ring is generated and stored.
8. A Nd-Fe-B magnetic ring flaw detection automation control system, characterized in that, include: Acquisition device and processing device; The acquisition device is used to control the electromagnets around the conveyor belt to adjust the attitude of the neodymium iron boron magnetic ring before the neodymium iron boron magnetic ring on the conveyor belt enters the flaw detection area, so as to adjust the neodymium iron boron magnetic ring to a preset attitude. The processing device is used to perform two image acquisitions on the neodymium iron boron magnetic ring after it enters the flaw detection area on the conveyor belt by switching the lighting conditions, so as to obtain multi-dimensional image data; the multi-dimensional image data includes specular reflection image data and diffuse reflection image data; The processing device is also used to determine suspected defect areas in the multi-dimensional image data based on the multi-dimensional image data; The processing device is also used to determine whether a suspected defect area is a real defect based on the brightness value of the suspected defect area in the multi-dimensional image data, and when the suspected defect area is a real defect, to determine the defect type of the real defect based on the brightness value of the suspected defect area. The processing device is further configured to send a rejection command to remove the NdFeB magnetic ring from the conveyor belt when the suspected defect area is a real defect, and to generate and store target information; the target information includes the number of the NdFeB magnetic ring and the defect type of the real defect of the NdFeB magnetic ring; the electromagnets around the conveyor belt include electromagnets located on both sides of the conveyor belt, and the NdFeB magnetic ring is provided with a magnetic pole direction indicator mark; the acquisition device is configured to control the electromagnets around the conveyor belt to adjust the posture of the NdFeB magnetic ring to adjust the NdFeB magnetic ring to a preset posture, including: Obtain the directional deviation angle between the magnetic pole direction indicator mark of the neodymium iron boron magnetic ring and the preset direction; the preset direction is the direction of the line connecting the electromagnets on both sides of the conveyor belt. Determine the target current based on the directional deviation angle; The electromagnets around the conveyor belt are controlled according to the target current to adjust the attitude of the neodymium iron boron magnetic ring, so as to adjust the neodymium iron boron magnetic ring to the preset attitude. The acquisition device is also used to determine the target current based on the directional deviation angle, including: Obtain the first correspondence and the friction coefficient of the conveyor belt; the first correspondence includes a one-to-one correspondence between multiple directional deviation angle ranges and multiple original currents; The original current corresponding to the range of directional deviation angles in the first correspondence is taken as the intermediate current; The product of the intermediate current and the first value is used as the target current; the first value is the product of the friction coefficient of the conveyor belt and the preset friction adjustment coefficient.