Metal hook surface defect evaluation method based on machine vision

By analyzing the structural information and image shadow information of the metal hook, combined with the light compensation technology of the ring light source, the problems of uneven lighting and shadow effects of complex structure hooks are solved, and the accuracy and robustness of defect detection are improved.

CN119963523AInactive Publication Date: 2025-05-09JIAXING H&Y METALWORKS CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510052725.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-09
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When detecting metal hooks in complex structures, the accuracy of defect detection is affected due to uneven light and shadows, and it is difficult to identify subtle defects in complex structures.

Method used

By obtaining the structural information of the metal hook and the initial surface image, analyzing the image shadow information, identifying the hook shadow structure, using a ring light source for light compensation, optimizing the light balance, and eliminating shadows, thereby improving image clarity and defect detection accuracy.

Benefits of technology

Light equalization optimization and shadow elimination are achieved, the accuracy and robustness of metal hook surface defect detection are improved, and the accurate identification and evaluation of defects on complex structures is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963523A_ABST
    Figure CN119963523A_ABST
Patent Text Reader

Abstract

The invention provides a metal hook surface defect evaluation method based on machine vision, and relates to the technical field of surface defect evaluation, and the method comprises the steps: obtaining hook structure information and initial surface image information; analyzing the initial surface image information to obtain image shadow information; identifying the image shadow information through a region division result obtained by carrying out region division on the hook structure information to obtain hook shadow structure information; performing illumination compensation on the hook shadow structure information to obtain illumination compensation information; collecting surface image information of the target metal hook, and extracting defect features to obtain surface defect information; and performing defect compensation on the target metal hook by taking the surface defect information as defect parameters. According to the method and the device, the technical problem that shadow may be caused when a hook with a complex structure is illuminated in the prior art can be solved, the technical targets of illumination balance optimization and shadow elimination are achieved, and the technical effect of improving defect detection precision and robustness is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of surface defect assessment, and in particular to a method for assessing surface defects of metal hooks based on machine vision. Background Art

[0002] In the production and use of metal hooks, the detection and evaluation of surface defects is an important part of ensuring their quality and safety. With the advancement of automation and intelligent technology, defect detection methods based on machine vision have become a widely used technical means in industry. Machine vision uses high-precision cameras to capture real-time images of the surface of metal hooks. Combined with image processing and analysis technology, it can efficiently identify surface defects such as cracks, scratches, corrosion, and conduct detailed analysis of the type, location, size, etc. of the defects. However, the existing machine vision defect detection technology still has some defects and challenges, especially in the detection of objects with complex structures, where the influence of lighting conditions and structure has a significant impact on the detection results.

[0003] At present, the existing technology is insufficient in surface recognition of hooks with complex structures. On the surface of metal hooks, due to the strong glossiness and reflectivity of metal materials, highlights or reflective areas often appear, which may have a serious impact on the clarity of the image, resulting in blurring or loss of defects. When the lighting is uneven or inappropriate, shadows or highlights may be formed in the image, making it impossible to accurately identify certain defects. Especially in some complex hook structures, it is difficult to fully optimize the setting of the light source and the viewing angle of the camera, which causes shadow problems. Most of the existing technologies rely on traditional lighting compensation algorithms to alleviate this problem by adjusting exposure, light source angle, etc., but these methods still have limitations. Specifically, if the lighting compensation is insufficient, the shadow will block the details of the hook surface, resulting in the inability to accurately capture the defects; if the compensation is excessive, the surface reflection may be too strong, and the subtle defects on the surface cannot be clearly identified.

[0004] In summary, the prior art has a technical problem that shadows may be caused when illuminating a hook with a complex structure, thereby affecting the accurate identification of defects. Summary of the invention

[0005] The purpose of this application is to provide a method for evaluating the surface defects of metal hooks based on machine vision, so as to solve the technical problem in the prior art that shadows may be caused when illuminating hooks with complex structures, thereby affecting the accurate identification of defects.

[0006] In view of the above problems, the present application provides a method for evaluating the surface defects of a metal hook based on machine vision, including: obtaining hook structure information and initial surface image information of a target metal hook; analyzing the initial surface image information by using a preset image shadow threshold to obtain image shadow information; identifying the image shadow information by performing regional division on the hook structure information to obtain hook shadow structure information; performing illumination compensation on the hook shadow structure information using a ring light source to obtain illumination compensation information; collecting the surface image information of the target metal hook based on the illumination compensation information, and obtaining surface defect information by performing defect feature extraction on the surface image information; using the surface defect information as a defect parameter to generate a defect solution strategy, and performing defect compensation on the target metal hook through the defect solution strategy.

[0007] The technical solution provided in the present application has at least the following technical effects or advantages: by acquiring the hook structure information and initial surface image information of the target metal hook; analyzing the initial surface image information by presetting the image shadow threshold to acquire the image shadow information; identifying the image shadow information by the regional division result obtained by regionalizing the hook structure information to acquire the hook shadow structure information; performing illumination compensation on the hook shadow structure information by using a ring light source to acquire illumination compensation information; collecting the surface image information of the target metal hook based on the illumination compensation information, and acquiring the surface defect information by extracting the defect features of the surface image information; generating a defect solution strategy using the surface defect information as a defect parameter, and performing defect compensation on the target metal hook through the defect solution strategy, that is, by achieving the technical goals of illumination balance optimization and shadow elimination, the technical effect of improving the defect detection accuracy and robustness is achieved.

[0008] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented according to the contents of the specification, and in order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are specifically cited below. It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0010] Figure 1 This is a flow chart of the method for evaluating the surface defects of metal hooks based on machine vision in this application;

[0011] Figure 2 This is a schematic diagram of the process of obtaining illumination compensation information in the metal hook surface defect evaluation method based on machine vision in this application. DETAILED DESCRIPTION

[0012] This application provides a method for evaluating the surface defects of metal hooks based on machine vision, which solves the technical problem in the prior art that shadows may be caused when lighting a hook with a complex structure, thus affecting the accurate identification of defects. The technical goals of optimizing lighting balance and eliminating shadows are achieved, and the technical effect of improving the accuracy and robustness of defect detection is achieved.

[0013] Below, the technical solutions in the present application will be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments of the present application. It should be understood that the present application is not limited to the example embodiments described herein. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all of them.

[0014] Please see attached Figure 1 , this application provides a method for evaluating the surface defects of metal hooks based on machine vision, which specifically includes the following steps:

[0015] Step 1: Obtain hook structure information and initial surface image information of the target metal hook.

[0016] Specifically, the target metal hook refers to the hook to be evaluated for surface defects. The geometric characteristics of the benchmark metal hook are comprehensively measured and analyzed. The hook structure information includes key structural parameters such as the size, shape, degree of bending, and connection points of the metal hook, which are essential for evaluating the function and load-bearing capacity of the hook. For example, if the metal hook has a bending point and multiple connection points, the structural information of the hook will describe these positions and dimensions in detail so that their impact on load distribution can be considered in subsequent analysis. Next, obtaining the initial surface image information refers to taking surface images of the metal hook through a camera or other imaging device. These images reflect the state of the hook surface, including possible defects such as blemishes, corrosion, and scratches. These surface images provide the necessary data support for subsequent defect detection and quality assessment, and can evaluate the impact of the defect on the load-bearing capacity of the hook. Through the combination of structural information and surface images, the quality and applicability of the metal hook can be judged more accurately.

[0017] Step 2: Analyze the initial surface image information through a preset image shadow threshold to obtain image shadow information.

[0018] Specifically, when analyzing the initial surface image of the metal hook, a threshold is set to distinguish the shadow part from the normal area in the image. The image shadow threshold refers to the limit of the brightness or grayscale value of the shadow in the image. The shadow area will appear darker than other areas. The threshold can effectively distinguish the shadow part from other surface features, and the shadow information in the image can be obtained for subsequent image processing to prevent the shadow from interfering with the detection or analysis of defects.

[0019] Step three: Identify the image shadow information based on the regional division result obtained by regional division of the hook structure information to obtain the hook shadow structure information.

[0020] Specifically, the surface of the hook is divided into multiple regions according to the structural information of the hook. Region division is to classify different parts of the hook surface according to their shape, position or functional requirements, such as dividing the load-bearing part, curved part and connecting part of the hook into different regions. Next, according to the region division results, the shadow information in the image is analyzed to identify which shadows belong to the structural part of the hook. The hook shadow structural information refers to the shadow part related to the structural morphology of the hook, which is manifested in the specific position or shape feature of the hook. For example, the curved part of the hook may produce a darker shadow due to light reflection, while the straight part may have a lighter shadow. By matching these shadows with the structural area, it is possible to accurately distinguish which shadows are formed due to the shape and lighting relationship of the hook, rather than other interference factors in the image, which helps to extract information about the structure of the hook itself from the shadow, improve the accuracy and reliability of subsequent analysis, and avoid shadow interference with defect detection.

[0021] Step 4: Use a ring light source to perform illumination compensation on the hook shadow structure information to obtain illumination compensation information.

[0022] Specifically, a ring light source is a light source that can evenly illuminate an object from multiple directions. It surrounds the object to ensure that the light can smoothly illuminate all corners of the object, reducing shadows caused by uneven lighting. The lighting method of the ring light source is adjusted to compensate for the shadow effect caused by the surface structure of the hook. The surface of the hook may have complex geometric shapes, such as bends, protrusions, etc., which may cause the light to not be evenly illuminated in certain areas, thus forming shadows. In order to eliminate the influence of these shadows, a ring light source is used for lighting compensation, that is, the position and brightness of the light source are adjusted so that the surface of the hook is evenly illuminated, so that the brightness of the shadow area is compensated. The compensated lighting information is the lighting compensation information, which can effectively reduce the interference of shadows on image quality and provide clearer image data for subsequent image analysis.

[0023] Step 5: Collecting surface image information of the target metal hook based on the illumination compensation information, and obtaining surface defect information by extracting defect features from the surface image information.

[0024] Specifically, the shadow or highlight problem caused by uneven lighting on the surface of the metal hook during shooting is adjusted by light compensation, so that the lighting in the image is more uniform and clear. The role of the light compensation information is to optimize the light source illumination to make the details in the image more prominent and avoid the loss of details due to shadows or overexposure. Subsequently, the surface image data of the hook is collected using these image information after light compensation, which can accurately reflect the actual situation of the hook surface. Next, the defect feature extraction is performed on the collected image, that is, various defect features in the image are analyzed through a series of algorithms, such as cracks, scratches, corrosion, etc. These features are usually manifested in the image as abnormal changes in shape, color, texture or depth, etc., which can obtain clear and accurate surface defect information, which is helpful for subsequent defect assessment and repair decisions. For example, after light compensation, the originally difficult to identify tiny cracks become clear in the image, and the system can successfully extract these crack features and judge their severity, and finally help determine whether the hook meets the use standards.

[0025] Step six: using the surface defect information as defect parameters, generating a defect solution strategy, and using the defect solution strategy to compensate for the defects of the target metal hook.

[0026] Specifically, based on the surface defect information obtained through image processing and analysis (such as the specific location, morphology, depth, etc. of cracks, scratches or corrosion), this information is used as input parameters to develop targeted solutions. Among them, the type and location of the defect are identified through defect information, and the defect parameters include the size, shape and possible impact range of the defect. The target metal hook is compensated for defects through defect resolution strategies, and corresponding compensation measures are taken to repair or mitigate the impact of defects. Compensation methods may include repairing cracks, filling missing parts, improving surface quality or changing the structure of the hook to enhance its bearing capacity. Taking cracks as an example, if the cracks are deep and located in a load-bearing position, the solution strategy may be to perform welding repairs or fill them with special materials to restore the structural strength of the part. Through compensation measures, the functionality of the hook is restored, thereby ensuring its safety and reliability during use. Ultimately, this solution strategy based on defect parameters can effectively restore the hook to the qualified standard and ensure that it can continue to perform its original task.

[0027] The machine vision-based metal hook surface defect assessment method can achieve the technical goals of illumination balance optimization and shadow elimination, and achieve the technical effect of improving defect detection accuracy and robustness.

[0028] Furthermore, the present application also includes: obtaining the structural bending points and structural flat surfaces of the target metal hook; extracting the bending collection points and flat collection points of the target metal hook based on the structural bending points and structural flat surfaces; obtaining the camera layout viewing angle according to the bending collection points and flat collection points; performing camera layout at the camera layout viewing angle, and obtaining the initial surface image information of the target metal hook through camera acquisition.

[0029] Specifically, obtaining the structural bending points and structural flat surfaces of the target metal hook refers to performing a detailed geometric analysis of the metal hook to identify the key locations of its curved and straight parts. Structural bending points usually refer to places where there are bends, folds, or angle changes on the metal hook, which may have an important impact on the strength and function of the hook. Structural flat surfaces refer to areas on the surface of the metal hook that are straight or flat, and these areas usually carry relatively uniform stress. Through analysis, the geometric characteristics of the metal hook can be better understood, thus providing a basis for subsequent image acquisition and analysis.

[0030] Next, based on the structural bending points and structural straight surfaces, the bending collection points and straight collection points of the target metal hook are extracted. This means that from the overall structure of the metal hook, the collection positions corresponding to the bending part and the straight part are selected. These collection points are the areas that need to be focused on during the image acquisition process. The bending points and straight surface points each carry different stresses. Therefore, extracting these points helps to accurately capture the characteristics and states of the hook surface in different areas. The bending collection points are usually located in the curved part of the hook, while the straight collection points are located in the straight part of the hook. These points will help the accuracy of subsequent image analysis.

[0031] Furthermore, according to the bend collection points and the straight collection points, it means that by analyzing the positions of these key points, the best shooting angle of the camera is determined to ensure that the camera can capture the surface information of the target metal hook from different perspectives, especially the bend and straight parts. The bend points and the straight points may affect different visual effects, so the camera's perspective must be reasonably arranged according to the positions of these points to ensure that the collected images can fully reflect the state of the hook and avoid image distortion or information loss caused by improper angles.

[0032] Then, the camera is deployed in the camera deployment angle, and the initial surface image information of the target metal hook is acquired through camera acquisition. The camera is actually set up and photographed to acquire preliminary image data of the metal hook, which reflects the initial state of the metal hook surface. The acquired image can provide rich visual information for subsequent defect detection, surface evaluation, etc.

[0033] Furthermore, the present application also includes: randomly extracting first initial information and second initial information according to the initial surface image information; randomly extracting first feature points and second feature points according to the first initial information and the second initial information respectively; performing similarity calculation on the first feature points and the second feature points to obtain a feature similarity coefficient; if the feature similarity coefficient does not meet the feature similarity threshold, re-extracting the feature points until it meets the threshold; if the feature similarity coefficient meets the feature similarity threshold, traversing the second initial information to perform similarity calculation with the first feature points, if there are feature points in the second initial information that are smaller than the feature similarity coefficient, use them as second feature points; aligning the first initial information with the second initial information according to the first feature points and the second feature points, and adding the obtained first alignment information to the initial surface image information.

[0034] Specifically, the image information under any camera layout angle of view is randomly extracted from the initial surface image information of the target metal hook as the first initial information and the second initial information, including texture, color or geometric shape, etc. Through random extraction, information can be obtained from different image areas, providing more possibilities for subsequent feature extraction and analysis, avoiding being limited to a specific area, thereby improving the accuracy of the overall analysis.

[0035] Next, the first feature point and the second feature point are randomly extracted according to the first initial information and the second initial information, respectively. These feature points are random areas in the image, which may include corners, edges, areas with large texture changes, etc. The feature point extraction is to compare the similarity between the two areas in the subsequent steps and find matching features for image registration and subsequent defect analysis.

[0036] Then, the similarity between the first feature point and the second feature point is calculated by, for example, Euclidean distance, cosine similarity, etc., to obtain a feature similarity coefficient, which calculates the degree of similarity between the two feature points, indicating whether the two feature points are similar enough so that they can be considered the same or corresponding features. If this similarity coefficient is high, it means that the two feature points are relatively similar and can be used in the subsequent registration process.

[0037] If the calculated feature similarity coefficient does not meet the requirements, such as being lower than the preset threshold, then it is necessary to randomly select feature points for extraction again. It is necessary to traverse all feature points in the second initial information and calculate their similarity with the first feature point until a pair of feature points that meet the requirements is found. The feature similarity threshold is a standard for determining feature point matching, ensuring that the similarity between the selected feature points is high enough to be reliably used for image registration and subsequent analysis. If the similarity does not meet the standard, continue to iterate through new feature point extraction until it meets the standard. When a pair of feature points that meet the conditions is found, it means that they may also be suitable feature points, and they are used as the second feature points for subsequent matching and registration.

[0038] After ensuring that the similarity of the feature points meets the requirements, these matched feature points are used to complete the registration of the two parts of the initial information. The first initial information is spatially aligned with the second initial information so that they are accurately matched in the same coordinate system, eliminating image deviations caused by different viewing angles or other factors, ensuring that subsequent analysis can be performed in a unified coordinate system, and the obtained registration information will be added back to the original initial surface image information as part of the final image data, which is further used for defect detection or other analysis tasks.

[0039] Further, if Figure 2As shown, the present application also includes: training based on shadow edge samples and shadow source samples to construct a shadow source discrimination model; obtaining shadow edge information based on the hook shadow structure information, inputting the shadow edge information into the shadow source discrimination model to obtain shadow source information; calculating the light source direction based on the shadow source information to obtain the direction of the light source to be supplemented; using a ring light source to perform lighting compensation in the direction of the light source to be supplemented, and obtaining the lighting compensation information.

[0040] Specifically, the machine learning model is trained based on historical shadow edge samples and shadow source samples to build a shadow source discrimination model. Shadow edge samples refer to the obvious shadow boundaries in the image, while shadow source samples refer to the specific source areas where shadows are formed. By inputting these samples into the training algorithm, the model can learn the characteristics of shadows and the laws of their formation, thereby building a shadow source discrimination model that can determine which factors cause shadows based on new image data.

[0041] Next, the shadow structure information of the metal hook is analyzed to extract the edge information of the shadow. The edge information can help determine the specific shape of the shadow. After the edge information is input into the shadow source discrimination model, the model will determine whether the source of the shadow is due to the shape of the hook, surface features, or changes in lighting conditions based on the previously learned knowledge. For example, if the edge of the shadow matches the curved part of the hook, the model may determine that the shadow originates from the curved part of the hook.

[0042] Then, the direction of the shadow is associated with the relative position of the light source. By calculating the shadow source information based on the possible position and direction of the light source, the relative direction of the light source can be calculated, and the direction of the light source to be supplemented can be obtained for subsequent lighting compensation.

[0043] Finally, the ring light source is a light source that can illuminate evenly from multiple angles, which can effectively reduce uneven illumination in shadow areas. By adjusting the position and illumination angle of the ring light source, compensation is made for the direction of the light source to be supplemented, eliminating the impact of shadows and ensuring more uniform illumination in the image. By compensating in the direction of the light source to be supplemented, new illumination compensation information can be obtained, which is helpful for subsequent defect detection and image analysis.

[0044] Furthermore, the present application also includes: performing geometric shape analysis based on the shadow edge samples to obtain shadow shape information; matching the shadow shape information with the hook geometry model to obtain a hook geometry matching result; matching the shadow shape information with the camera geometry model to obtain a camera geometry matching result; and constructing a hook discrimination model and a camera discrimination model respectively based on the hook geometry matching result and the camera geometry matching result, and combining them to obtain the shadow source discrimination model.

[0045] Specifically, geometric shape analysis is performed based on the shadow edge samples of historical time, and the shape information of the shadow is extracted by analyzing the geometric features of the edge. Shadow edge samples are areas in the image where the light and dark changes are more obvious, and the size, shape and distribution of the shadow are obtained. The purpose of geometric shape analysis is to identify the specific features of the shadow, such as whether the shadow is a straight line or a curved shape, and obtain geometric features.

[0046] Next, the shadow shape information is matched with the hook geometry model and compared with the metal hook geometry model to find out the relationship between the shadow and the hook structure and obtain the hook geometry matching result. The hook geometry model includes the size, shape and surface structure features of the hook. By matching the shadow geometry with the features of the hook model, it can be determined whether the shadow originates from a specific part of the hook. For example, if the shadow matches the curved part of the hook, it means that the shadow may be caused by the interaction between the lighting angle and the hook geometry.

[0047] Then, the shadow shape information is matched with the camera geometry model, the shadow geometry is compared with the camera geometry model, and the shadow is analyzed to see whether it is related to the camera's specific position, viewing angle, focal length, and other factors, to obtain the camera geometry matching result. The camera geometry model includes information such as the structure of the camera. By matching the shadow shape with the camera geometry model, it can be determined whether the shadow is caused by the camera position or shooting angle. For example, if the shadow shape matches the relationship between the camera shooting angle, then we can infer that the shadow is caused by inappropriate lighting conditions or camera viewing angle.

[0048] Two models are established based on the hook geometry matching results and the camera geometry matching results to determine the source of the shadow. The hook discrimination model determines whether the shadow originates from a certain part of the hook based on the matching degree between the shadow and the hook, while the camera discrimination model determines whether the shadow is caused by the camera's lighting or viewing angle based on the matching relationship between the shadow and the camera. By combining these two models to construct a shadow source discrimination model, the influence of the hook structure and the camera position on the shadow formation can be comprehensively considered, thereby accurately determining the true source of the shadow.

[0049] Furthermore, the present application also includes: obtaining the shadow change rate of the shadow shape information under the viewing angle of multiple cameras, identifying the shadow change rate through a shadow change threshold, if the shadow change rate satisfies the shadow change threshold, obtaining a camera result; if the shadow change rate does not satisfy the shadow change threshold, obtaining a non-camera result; combining the camera result with the non-camera result to obtain the camera geometric matching result.

[0050] Specifically, when multiple cameras shoot the same target from different perspectives, the changes in the shadow shape under these perspectives are analyzed and calculated. The shadow change rate reflects the degree to which the shadow shape changes with the camera perspective, that is, the magnitude of the shadow change under different shooting angles. By setting the shadow change threshold, the standard used to determine whether the shadow change is within the normal range is determined. If the shadow change rate exceeds the set threshold, it means that the shadow changes greatly under different camera perspectives, and the shadow is related to the hook structure. It may be a shadow caused by the camera or a shadow caused by the occlusion of the hook's own structure. In this case, light supplementation is used to prevent the hook from causing a shadow again.

[0051] When the shadow change rate is lower than the set threshold, it means that the shadow shape taken at different viewing angles changes little. It can be inferred that the shadow is caused by camera occlusion. In this case, light supplementation is performed between the camera and the hook to prevent the camera from causing a shadow again.

[0052] The camera-related analysis results and non-camera-related analysis results are combined to make a comprehensive judgment to determine the ultimate source of the shadow and obtain more accurate geometric matching results, which is helpful for subsequent image processing and defect detection.

[0053] Furthermore, the present application also includes: extracting shape features, texture features and depth information of the surface image information to obtain defect feature information; extracting defect area, defect depth and defect morphology based on the defect feature information; performing defect severity assessment based on the defect area, defect depth and defect morphology, and adding the obtained defect severity coefficient to the surface defect information.

[0054] Specifically, the image of the metal hook surface is analyzed to extract features that reflect the surface morphology and defects. Shape features refer to the geometric shape of the surface contour of an object, such as depressions, protrusions, or cracks, which can help identify surface irregularities. Texture features describe the repeatability and details of surface patterns, which may include small scratches, wear marks, or surface corrosion. Depth features refer to the degree of undulation of the surface in space. Areas with greater depth may indicate obvious depressions or cracks. By extracting multiple features, detailed features about the defects can be obtained, providing a basis for subsequent defect analysis.

[0055] The specific parameters of the defect are obtained by quantitatively analyzing the extracted defect features. The defect area refers to the area occupied by the defect region in the surface image. Defects with larger areas usually mean more serious problems. The defect depth refers to the depth of the surface unevenness, that is, the longitudinal extent of the defect. The greater the depth, the higher the severity of the defect. The defect morphology refers to the appearance characteristics of the defect, such as the length and width of the crack or the distribution shape of the corrosion area. Through these quantitative characteristics, the type and scope of the defect can be evaluated more accurately.

[0056] The severity of the defect is assessed using the extracted defect area, depth and morphology information combined with the set evaluation criteria. Defect severity assessment usually assigns a weight coefficient to indicate the harmfulness of the defect based on different defect types and parameters. For example, for crack defects, cracks with larger depth and area may be assigned a higher severity coefficient, indicating that it has a greater impact on the functionality of the metal hook. Through the evaluation, the defect severity coefficient is finally obtained as the basis for whether the product is qualified.

[0057] Furthermore, the present application also includes: extracting the defect position based on the defect feature information; determining whether the defect position belongs to a key hooking position, and obtaining a defect position confirmation result; performing an impact assessment on the hooking function according to the defect position confirmation result, and obtaining a defect position impact coefficient; performing an impact assessment on the hooking function according to the defect area, defect depth and defect morphology, and obtaining a defect type impact coefficient; performing a weighted calculation based on the defect position impact coefficient and the defect type impact coefficient, and obtaining the defect severity coefficient.

[0058] Specifically, the specific location of the defect on the hook surface is determined by analyzing the extracted defect features (such as shape, texture, depth, etc.). The defect location is the coordinates of the area where the defect appears in the image, and is accurately located based on the image feature comparison and matching. For example, if there is a crack on the hook surface, after extracting the feature information, the pixel coordinates can be used to determine that the crack is located at a specific position on the hook, such as the hook end or bend of the hook.

[0059] According to the pre-set standards, the structural analysis of the hook design is conducted to determine whether the location of the defect is important to the overall function and safety of the hook. The critical position of the hook usually refers to the part that bears a large load or a concentrated force, such as the hook end, the connection point or the bend. If the defect occurs in a critical position, it is considered that it may affect the load-bearing capacity and stability of the hook, thereby affecting the use of the product. For example, if the crack appears at the load-bearing point of the hook, it is judged as a critical position; if the crack appears in the decorative part of the hook, it may not be considered a critical position.

[0060] After confirming whether the defect is located in a critical position, further evaluate the impact of the defect on the hook function. If the defect is located in a critical position, it will have a greater impact on the overall function of the hook, while defects in non-critical positions will have a smaller impact on the function. Through the functional impact assessment, an impact coefficient is assigned to each defect to quantify the potential threat of the defect to the performance of the hook.

[0061] The impact of defect type on hook function is evaluated by analyzing the specific parameters of the defect. The defect area, depth and shape can help determine the severity of the defect and thus determine its specific impact on the function. The larger the area, the deeper the depth and the more complex the shape of the defect, the greater the damage to the hook structure, and therefore the higher the functional impact coefficient.

[0062] The impact of the defect at the critical position and the impact of the defect itself are taken into consideration, and the final defect severity coefficient is obtained through weighted calculation. The weighted calculation can assign different weights according to the actual situation to reflect the relative importance of the defect location and type in the overall severity assessment. For example, if the defect is located at a critical position and its type has a greater impact (such as greater depth), the defect severity coefficient will be higher, otherwise it will be lower. The final defect severity coefficient can be used as a basis for whether the hook meets the quality standards.

[0063] In summary, the machine vision-based metal hook surface defect assessment method provided in the present application has the following technical effects: by acquiring the hook structure information and initial surface image information of the target metal hook; analyzing the initial surface image information by presetting the image shadow threshold to acquire the image shadow information; identifying the image shadow information by the regional division result obtained by regionalizing the hook structure information to acquire the hook shadow structure information; performing illumination compensation on the hook shadow structure information by using a ring light source to acquire illumination compensation information; collecting the surface image information of the target metal hook based on the illumination compensation information, and acquiring the surface defect information by extracting the defect features of the surface image information; generating a defect solution strategy using the surface defect information as a defect parameter, and performing defect compensation on the target metal hook through the defect solution strategy, that is, by achieving the technical goals of illumination balance optimization and shadow elimination, the technical effect of improving the defect detection accuracy and robustness is achieved.

[0064] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0065] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application belong to the scope of the present application and its equivalent technology, the present application is also intended to include these modifications and variations.

Claims

1. A method for evaluating metal hook surface defects based on machine vision, characterized in that: include: Acquire hook structure information and initial surface image information of the target metal hook; Analyze the initial surface image information by using a preset image shadow threshold to obtain image shadow information; The shadow information of the image is identified by performing regional division on the hook structure information to obtain the hook shadow structure information; Performing illumination compensation on the hook shadow structure information using a ring light source to obtain illumination compensation information; Based on the illumination compensation information, surface image information of the target metal hook is collected, and surface defect information is obtained by extracting defect features from the surface image information; The surface defect information is used as a defect parameter to generate a defect solution strategy, and the defect compensation is performed on the target metal hook through the defect solution strategy.

2. The method for evaluating metal hook surface defects based on machine vision according to claim 1, characterized in that: Initial surface image information, including: Obtaining the structural bending point and structural flat surface of the target metal hook; Extracting the bending collection points and the straight collection points of the target metal hook based on the structural bending points and the structural straight surfaces; Acquire the camera layout viewing angle according to the bending collection points and the straight collection points; The camera is arranged at the camera arrangement viewing angle, and the initial surface image information of the target metal hook is acquired through camera collection.

3. The method for evaluating metal hook surface defects based on machine vision according to claim 1, characterized in that: Initial surface image information, also includes: randomly extracting first initial information and second initial information according to the initial surface image information; Randomly extracting a first feature point and a second feature point according to the first initial information and the second initial information respectively; Calculating the similarity between the first feature point and the second feature point to obtain a feature similarity coefficient; If the feature similarity coefficient does not meet the feature similarity threshold, re-extract the feature points until it meets the threshold; If the feature similarity coefficient satisfies the feature similarity threshold, traverse the second initial information to calculate the similarity with the first feature point, and if there is a feature point with a smaller feature similarity coefficient in the second initial information, use it as the second feature point; The first initial information is registered with the second initial information according to the first feature point and the second feature point, and the obtained first registration information is added to the initial surface image information.

4. The method for evaluating metal hook surface defects based on machine vision according to claim 1, characterized in that: Performing illumination compensation on the hook shadow structure information by using a ring light source to obtain illumination compensation information includes: Based on the shadow edge samples and shadow source samples, training is performed to build a shadow source discrimination model; Obtaining shadow edge information based on the hook shadow structure information, and inputting the shadow edge information into the shadow source discrimination model to obtain shadow source information; Calculate the light source direction based on the shadow source information to obtain the direction of the light source to be supplemented; An annular light source is used to perform illumination compensation in the direction of the light source to be supplemented, and the illumination compensation information is obtained.

5. The method for evaluating metal hook surface defects based on machine vision according to claim 4, characterized in that: Based on the shadow edge samples and shadow source samples, the shadow source discrimination model is constructed, including: Performing geometric shape analysis according to the shadow edge samples to obtain shadow shape information; Matching the shadow shape information with the hook geometry model to obtain a hook geometry matching result; Matching the shadow shape information with the camera geometry model to obtain a camera geometry matching result; According to the hook geometry matching result and the camera geometry matching result, a hook discrimination model and a camera discrimination model are respectively constructed, and the shadow source discrimination model is obtained by combining them.

6. The method for evaluating metal hook surface defects based on machine vision according to claim 5, characterized in that: Matching the shadow shape information with the camera geometry model to obtain a camera geometry matching result includes: Obtain a shadow change rate of the shadow shape information under the viewing angle of multiple cameras, identify the shadow change rate by a shadow change threshold, and obtain a camera result if the shadow change rate meets the shadow change threshold; If the shadow change rate does not meet the shadow change threshold, obtaining a non-camera result; The camera result and the non-camera result are combined to obtain the camera geometry matching result.

7. The method for evaluating metal hook surface defects based on machine vision according to claim 1, characterized in that: Surface defect information is obtained by extracting defect features from the surface image information, including: Extracting shape features, texture features and depth information from the surface image information to obtain defect feature information; Extracting defect area, defect depth and defect morphology based on the defect feature information; A defect severity assessment is performed based on the defect area, defect depth and defect morphology, and the acquired defect severity coefficient is added to the surface defect information.

8. The method for evaluating metal hook surface defects based on machine vision according to claim 7, characterized in that: Defect severity factor, including: Extracting defect locations based on the defect feature information; Determine whether the defect position belongs to the key hook position, and obtain the defect position confirmation result; According to the defect position confirmation result, the hook function impact assessment is performed to obtain the defect position impact coefficient; Perform hook function impact assessment based on the defect area, defect depth and defect shape to obtain defect type impact coefficient; The defect severity coefficient is obtained by performing weighted calculation based on the defect position influence coefficient and the defect type influence coefficient.

Citation Information

Cited By

  • Titanium rod section-oriented self-adaptive defect detection method, platform and medium

    CN121121180A

  • Steel plate surface defect identification method fused with visual attention mechanism

    CN122265208A