Aluminum ingot surface defect detection method and system based on visual acquisition

By constructing a light regulation model and introducing a bionic visual attention mechanism, the stability and accuracy issues of aluminum ingot surface defect detection in complex environments were solved, high-quality image acquisition and precise identification of subtle defects were achieved, and the accuracy and efficiency of detection were improved.

CN119880916BActive Publication Date: 2025-09-23GUANGDONG HONGMINGCHANG TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510185557.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-09-23
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

Existing aluminum ingot surface defect detection technology lacks stability and accuracy in complex industrial environments, making it difficult to adapt to the needs of large-scale production.

Method used

Industrial cameras and environmental sensors are used to collect images and physical condition information, build a lighting adjustment model, generate optimal lighting parameters, and combine with the bionic visual attention mechanism to accurately locate high-attention areas for defect judgment and comprehensive evaluation.

Benefits of technology

It achieves high-quality image acquisition under different environmental conditions, improves the ability to identify subtle defects, enhances the accuracy and efficiency of detection, and provides reliable quality assurance for industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880916B_ABST
    Figure CN119880916B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting surface defects of aluminum ingots based on visual acquisition, which relates to the technical field of aluminum product inspection. The method comprises constructing a lighting adjustment model, generating optimal lighting parameters based on a preprocessed preliminary image of the aluminum ingot and physical condition information, acquiring a high-quality image of the optimal lighting parameters, performing a global evaluation and local focusing on the acquired high-quality image, and generating detailed information on high-interest areas. Based on the detailed information on the high-interest areas, the method determines defects in the high-interest areas, and performs a comprehensive evaluation based on the defect determination results. The present invention achieves dynamic generation of optimal lighting parameters and optimizes image acquisition quality. At the same time, the method introduces a bionic visual attention mechanism to accurately locate high-interest areas and enhance the ability to identify subtle defects. This method not only solves the problems of insufficient image quality and subtle defect detection in the prior art, but also significantly improves the accuracy and efficiency of aluminum ingot surface defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of aluminum product detection, and in particular to a method and system for detecting surface defects of aluminum ingots based on visual acquisition. Background Art

[0002] In modern industrial manufacturing, aluminum ingots are an important building block, and their surface quality has a crucial impact on the performance and reliability of the final product. Traditional methods for detecting surface defects in aluminum ingots rely primarily on manual visual inspection or contact measurement tools, but these methods are inefficient, have limited accuracy, and are difficult to adapt to the pace of large-scale production. With the rapid development of computer vision technology and machine learning algorithms, non-contact automated surface defect detection systems have gradually become a research hotspot. These systems utilize high-resolution industrial cameras to capture detailed images of the aluminum ingot surface and identify tiny surface defects through complex image processing and analysis algorithms.

[0003] In recent years, the application of smart sensor technology and the Internet of Things has further promoted the advancement of surface defect detection technology. Enhanced environmental perception capabilities have made it possible to monitor physical conditions such as temperature and humidity in real time, while the development of light regulation technology allows for dynamic adjustment of light source configuration according to different detection requirements, thereby optimizing image acquisition quality. The introduction of multispectral imaging technology and deep learning models not only improves the accuracy of defect identification but also enhances the flexibility and adaptability of the system. However, although these technological advances have significantly improved the effectiveness of aluminum ingot surface defect detection, some limitations still exist in practical applications, especially the challenge of maintaining stability and accuracy in complex and changing industrial environments. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides an aluminum ingot surface defect detection method based on visual acquisition to solve the problem of insufficient stability and accuracy of the existing technology in complex industrial environments.

[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides a method for detecting surface defects of aluminum ingots based on visual acquisition, which includes acquiring a preliminary image of the aluminum ingot surface through an industrial camera, and acquiring physical condition information through an environmental sensor; preprocessing the acquired preliminary image of the aluminum ingot surface and the physical condition information; constructing a light adjustment model, and generating optimal lighting parameters based on the preprocessed preliminary image of the aluminum ingot and the physical condition information acquired by the environmental sensor; acquiring a high-quality image of the optimal lighting parameters, performing global evaluation and local focusing on the acquired high-quality image, and generating detailed information on high-attention areas; performing defect judgment on the high-attention areas based on the detailed information on the high-attention areas; and performing a comprehensive evaluation based on the defect judgment results.

[0008] As a preferred solution of the aluminum ingot surface defect detection method based on visual acquisition described in the present invention, wherein: the preliminary image of the aluminum ingot surface is collected by an industrial camera, and the physical condition information is collected by an environmental sensor. The specific steps are as follows:

[0009] Perform equipment inspection, instrument calibration, and parameter setting for industrial cameras and environmental sensors. Use industrial cameras to capture preliminary images of the aluminum ingot surface, while using environmental sensors to collect physical condition information.

[0010] As a preferred solution of the aluminum ingot surface defect detection method based on visual acquisition described in the present invention, wherein: the collected preliminary image of the aluminum ingot surface and physical condition information are preprocessed, the specific steps are as follows:

[0011] The preliminary image of the aluminum ingot surface is converted into a grayscale image, and a Gaussian filter is applied to reduce noise. The mean and standard deviation of temperature, humidity, and light intensity are calculated. Edge features and texture features are extracted from the preliminary image of the aluminum ingot surface to generate a preliminary image feature vector. The environmental features of the preliminary image are extracted from the physical condition information to generate an environmental feature vector of the preliminary image. The preliminary image feature vector is combined with the environmental feature vector of the preliminary image to generate a comprehensive feature vector of the preliminary image.

[0012] As a preferred solution of the aluminum ingot surface defect detection method based on visual acquisition described in the present invention, wherein: the construction of the illumination adjustment model generates optimal illumination parameters based on the physical condition information collected by the environmental sensor and the preliminary image of the aluminum ingot surface. The specific steps are as follows:

[0013] Through the combined optimization framework of deep learning and nonlinear mapping functions, a lighting adjustment model is constructed based on the comprehensive feature vector of the preliminary image to generate the optimal lighting parameters, which are expressed as:

[0014]

[0015] Among them, O is the optimal lighting parameter, x iis the i-th preliminary image feature vector element of the preliminary image, y j is the jth element of the environmental feature vector of the preliminary image, z is the comprehensive feature vector of the preliminary image, w i is the importance weight of the element of the i-th preliminary image feature vector of the preliminary image, v j is the importance weight of the jth element of the environment feature vector of the preliminary image, α is the balance parameter of the optimal lighting parameter, n represents the number of elements in the feature vector of the preliminary image, m represents the number of elements in the environment feature vector of the preliminary image, and f i (x i ) is the i-th element x in the preliminary image feature vector i Apply nonlinear mapping function, g j (y j ) is a nonlinear mapping function applied to the j-th element in the environmental feature vector of the preliminary image, and h(z) is a nonlinear mapping function applied to the comprehensive feature vector of the preliminary image.

[0016] As a preferred solution of the aluminum ingot surface defect detection method based on visual acquisition described in the present invention, wherein: the high-quality image with optimal lighting parameters is collected, the collected high-quality image is globally evaluated and locally focused, and detailed information of the high-interest area is generated. The specific steps are as follows:

[0017] Adjust the light source based on the optimal lighting parameters, use an industrial camera to capture high-quality images with the optimal lighting parameters, extract edge features and texture features from the high-quality images, and generate high-quality image feature vectors. Use environmental sensors to capture physical condition information, extract environmental features from the physical condition information, and generate high-quality image environmental feature vectors. Use a fast evaluation algorithm to perform a global evaluation and generate high-interest areas.

[0018] The bionic visual attention mechanism is introduced to calculate the attention weight of the high attention area, which is expressed as:

[0019]

[0020] Among them, C is the attention weight, Q is the dimension of the high-quality image feature vector, P is the dimension of the environment feature vector of the high-quality image, X k is the kth element of the high-quality image feature vector, Y l is the lth element of the environmental feature vector of the high-quality image, F k (X k ) is the high-quality image feature value after nonlinear enhancement in the attention weight, G l (Y l ) is the adjusted environmental feature value in the attention weight, D krepresents the distance metric between high-quality image features and known defect features, ρ is the balance parameter of attention weight, and a k is the importance weight of the kth element of the high-quality image feature vector, b l is the importance weight of the lth element of the high-quality image feature vector, k is the index of the high-quality image feature vector, l is the index of the environment feature vector of the high-quality image, and F k (X k ) is for each element X in the high-quality image feature vector k Apply nonlinear mapping function, G l (Y l ) is for each element Y in the environmental feature vector of the high-quality image l Apply nonlinear mapping functions;

[0021] Based on historical data, an attention weight threshold is set. The attention weight threshold is used to distinguish between ordinary areas and high-attention areas. Areas with attention weights greater than the attention weight threshold are marked as high-attention areas. For each high-attention area, its precise position and size are recorded to generate detailed information about the high-attention area.

[0022] As a preferred solution of the aluminum ingot surface defect detection method based on visual acquisition according to the present invention, wherein: the defect determination of the high-interest area is performed based on the detailed information of the high-interest area, and the specific steps are as follows:

[0023] Based on the detailed information of the high-attention area, edge detection, texture features and environmental features are extracted from the high-attention area to generate the image feature vector of the high-attention area and the environmental feature vector of the high-attention area image. The image feature vector and the environmental feature vector of the high-attention area image are then fused by principal component analysis to generate a comprehensive feature vector.

[0024] The defect probability is calculated based on the nonlinear model of the Gaussian kernel function, and the expression is:

[0025]

[0026] Where E is the defect probability, is the activation function, ν p represents the pth element of the comprehensive feature vector after dimensionality reduction, ν q represents the qth element of the comprehensive feature vector after dimensionality reduction, θ represents the bandwidth parameter of the Gaussian kernel function, and λ pq represents the comprehensive feature vector ν p and ν q The interaction coefficient between them, s represents the dimension of the comprehensive feature vector after dimensionality reduction;

[0027] According to historical data, a defect probability threshold is set. When the defect probability is greater than the defect probability threshold, it is determined that a defect exists.

[0028] As a preferred solution of the aluminum ingot surface defect detection method based on visual acquisition according to the present invention, the comprehensive evaluation is performed based on the defect determination results. The specific steps are as follows:

[0029] Based on the defect determination results, the comprehensive feature vector of the high-concern area is generated according to the defect probability, severity score and physical condition information of the defect. The expression is:

[0030] X r =[E,R r ,T,H,L];

[0031] Among them, X r is the comprehensive feature vector of the rth high attention area, R r is the severity score of the rth high-concern area, where T is temperature, H is humidity, and L is light intensity;

[0032] The comprehensive feature vector is processed by a nonlinear mapping function to calculate the final comprehensive evaluation score, which is expressed as:

[0033]

[0034] Among them, A r is the comprehensive evaluation score of the rth high attention area, γ is the scaling factor of the comprehensive evaluation score, and μ is the balance parameter of the comprehensive evaluation score.

[0035] In a second aspect, the present invention provides an aluminum ingot surface defect detection system based on visual acquisition, comprising a data acquisition module, a data preprocessing module, a light adjustment module, an image evaluation module, a defect determination module and a comprehensive evaluation module.

[0036] The data acquisition module uses an industrial camera to collect preliminary images of the aluminum ingot surface and uses environmental sensors to collect physical condition information. The data preprocessing module preprocesses the collected preliminary images of the aluminum ingot surface and physical condition information. The lighting adjustment module constructs a lighting adjustment model and generates optimal lighting parameters based on the preprocessed preliminary images of the aluminum ingot and the physical condition information collected by the environmental sensor. The image evaluation module collects high-quality images with optimal lighting parameters, performs global evaluation and local focusing on the collected high-quality images, and generates detailed information on high-attention areas. The defect judgment module performs defect judgment on high-attention areas based on the detailed information of high-attention areas. The comprehensive evaluation module performs comprehensive evaluation based on the defect judgment results.

[0037] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the aluminum ingot surface defect detection method based on visual acquisition as described in the first aspect of the present invention is implemented.

[0038] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, any step of the aluminum ingot surface defect detection method based on visual acquisition as described in the first aspect of the present invention is implemented.

[0039] The present invention has the following beneficial effects: by constructing a lighting adjustment model, it dynamically generates optimal lighting parameters, optimizes image acquisition quality, and ensures high-quality images under varying environmental conditions. Furthermore, it introduces a biomimetic visual attention mechanism to precisely locate areas of high interest and enhance the ability to identify subtle defects. These two innovative steps, working together, not only address the image quality and subtle defect detection deficiencies of existing technologies, but also significantly improve the accuracy and efficiency of aluminum ingot surface defect detection, providing a more reliable quality assurance method for industrial production. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 This is a flow chart of the aluminum ingot surface defect detection method based on visual acquisition in Example 1.

[0042] Figure 2 Schematic diagram of the aluminum ingot surface defect detection system based on visual acquisition in Example 1. DETAILED DESCRIPTION

[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0045] Secondly, the term "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in various places throughout this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive of other embodiments.

[0046] Example 1, with reference to Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a method for detecting surface defects of aluminum ingots based on visual acquisition, comprising the following steps:

[0047] S1: Collect preliminary images of the aluminum ingot surface through industrial cameras and collect physical condition information through environmental sensors;

[0048] Furthermore, the industrial camera and environmental sensor are inspected, calibrated, and parameters are set. The industrial camera is used to capture preliminary images of the aluminum ingot surface, while the environmental sensor is used to collect physical condition information.

[0049] It should be noted that physical condition information including temperature, humidity and light intensity is collected through environmental sensors. Equipment inspection is to ensure that the industrial camera and environmental sensor are working properly and all connections are stable and reliable. The calibration instrument is to perform optical calibration on the industrial camera to ensure image quality; the environmental sensor is calibrated to ensure measurement accuracy; the parameter setting is to adjust the shooting frequency and resolution of the industrial camera according to the size and shape of the aluminum ingot and the speed of the production line; and the sampling interval of the environmental sensor is set.

[0050] S2: Preprocessing the collected preliminary image and physical condition information of the aluminum ingot surface;

[0051] Furthermore, the preliminary image of the aluminum ingot surface is converted into a grayscale image, and a Gaussian filter is applied to reduce noise, the mean and standard deviation of temperature, humidity, and light intensity are calculated, edge features and texture features are extracted from the preliminary image of the aluminum ingot surface to generate a preliminary image feature vector, environmental features of the preliminary image are extracted from the physical condition information to generate an environmental feature vector of the preliminary image, and the preliminary image feature vector is combined with the environmental feature vector of the preliminary image to generate a preliminary image comprehensive feature vector;

[0052] It should be noted that edge features are extracted from the preliminary image by an edge detection algorithm, texture features are extracted from the preliminary image by a gray-level co-occurrence matrix, and the edge features and texture features are combined with environmental features by splicing.

[0053] S3: Construct a lighting adjustment model to generate optimal lighting parameters based on the pre-processed preliminary image of the aluminum ingot and physical condition information;

[0054] Furthermore, through the combined optimization framework of deep learning and nonlinear mapping functions, a lighting adjustment model is constructed based on the comprehensive feature vector of the preliminary image to generate the optimal lighting parameters, which are expressed as:

[0055]

[0056] Among them, O is the optimal lighting parameter, x i is the i-th preliminary image feature vector element of the preliminary image, y j is the jth element of the environmental feature vector of the preliminary image, z is the comprehensive feature vector of the preliminary image, w i is the importance weight of the element of the i-th preliminary image feature vector of the preliminary image, v j is the importance weight of the jth element of the environment feature vector of the preliminary image, α is the balance parameter of the optimal lighting parameter, n represents the number of elements in the feature vector of the preliminary image, m represents the number of elements in the environment feature vector of the preliminary image, and f i (x i ) is the i-th element x in the preliminary image feature vector i Apply nonlinear mapping function, g j (y j ) is the nonlinear mapping function applied to the jth element in the environmental feature vector of the preliminary image, and h(z) is the nonlinear mapping function applied to the comprehensive feature vector of the preliminary image;

[0057] It should be noted that f i (x i )=tanh(β·x i ) is a nonlinear function used to enhance image features, β is a scaling factor used to adjust the importance of features, g j (y j )=sin(γ·y j ) is a nonlinear mapping function, and γ is a frequency coefficient used to convert environmental characteristics into parameters suitable for light adjustment.

[0058] S4: Collect high-quality images with optimal lighting parameters, perform global evaluation and local focusing on the collected high-quality images, and generate detailed information on high-interest areas;

[0059] Furthermore, the light source is adjusted based on the optimal lighting parameters. High-quality images with the optimal lighting parameters are collected through industrial cameras. Edge features and texture features are extracted from the high-quality images to generate high-quality image feature vectors. Physical condition information is collected through environmental sensors. Environmental features of the high-quality images are extracted from the physical condition information to generate environmental feature vectors of the high-quality images. A fast evaluation algorithm is used to perform a global evaluation to generate high-interest areas.

[0060] It should be noted that the intensity, azimuth, and elevation of the light source are adjusted according to the calculated optimal lighting parameters, and the color temperature is adjusted as needed to ensure that surface defects in the image are more obvious. Subsequently, high-quality images are collected, and the clarity and contrast of the images are tested using a rapid evaluation algorithm to ensure that the lighting conditions meet the requirements for defect detection. Edge features are extracted from the high-quality images using an edge detection algorithm, and texture features are extracted from the high-quality images using a gray-level co-occurrence matrix.

[0061] The bionic visual attention mechanism is introduced to calculate the attention weight of the high attention area, which is expressed as:

[0062]

[0063] Among them, C is the attention weight, Q is the dimension of the high-quality image feature vector, P is the dimension of the environment feature vector of the high-quality image, X k is the kth element of the high-quality image feature vector, Y l is the lth element of the environmental feature vector of the high-quality image, F k (X k ) is the high-quality image feature value after nonlinear enhancement in the attention weight, G l (Y l ) is the adjusted environmental feature value in the attention weight, D k represents the distance metric between high-quality image features and known defect features, ρ is the balance parameter of attention weight, and a k is the importance weight of the kth element of the high-quality image feature vector, b l is the importance weight of the lth element of the high-quality image feature vector, k is the index of the high-quality image feature vector, l is the index of the environment feature vector of the high-quality image, and F k (X k ) is for each element X in the high-quality image feature vector k Apply nonlinear mapping function, G l (Y l ) is for each element Y in the environmental feature vector of the high-quality image l Apply nonlinear mapping functions;

[0064] Based on historical data, an attention weight threshold is set. The attention weight threshold is used to distinguish between ordinary areas and high-attention areas. Areas with attention weights greater than the attention weight threshold are marked as high-attention areas. For each high-attention area, its precise position and size are recorded to generate detailed information about the high-attention area.

[0065] S5: Based on the detailed information of the high-concern area, determine the defects of the high-concern area;

[0066] Furthermore, based on the detailed information of the high-attention area, edge detection and texture features as well as environmental features are extracted from the high-attention area to generate the image feature vector of the high-attention area and the environmental feature vector of the high-attention area image. The image feature vector and the environmental feature vector of the high-attention area image are then fused by principal component analysis to generate a comprehensive feature vector.

[0067] The defect probability is calculated based on the nonlinear model of the Gaussian kernel function, and the expression is:

[0068]

[0069] Where E is the defect probability, is the activation function, ν p represents the pth element of the comprehensive feature vector after dimensionality reduction, ν q represents the qth element of the comprehensive feature vector after dimensionality reduction, θ represents the bandwidth parameter of the Gaussian kernel function, and λ pq represents the comprehensive feature vector ν p and ν q The interaction coefficient between them, s represents the dimension of the comprehensive feature vector after dimensionality reduction;

[0070] According to historical data, a defect probability threshold is set. When the defect probability is greater than the defect probability threshold, it is determined that a defect exists.

[0071] For example, the common defect probability threshold interval can be set as follows:

[0072] Defect probability interval: When E>0.7, it is determined that there is a high probability of defects;

[0073] Defect-free probability interval: When E≤0.7, it is determined that there is no defect.

[0074] S6: Conduct comprehensive evaluation based on defect determination results;

[0075] Furthermore, based on the defect determination results, the comprehensive feature vector of the high-concern area is generated according to the defect probability, severity score and physical condition information of the defect, and the expression is:

[0076] X r =[E,R r ,T,H,L];

[0077] Among them, X r is the comprehensive feature vector of the rth high attention area, R r Score the severity of the rth high-concern area, where T is temperature, H is humidity, and L is light intensity;

[0078] It should be noted that the severity score is calculated based on multi-scale feature analysis and deep learning models by extracting features of defect probability, location coordinates, size information, and physical condition information, and obtaining a preliminary feature vector through feature splicing;

[0079] The comprehensive feature vector is processed by a nonlinear mapping function to calculate the final comprehensive evaluation score, which is expressed as:

[0080]

[0081] Among them, A r is the comprehensive evaluation score of the rth high attention area, γ is the scaling factor of the comprehensive evaluation score, and μ is the balance parameter of the comprehensive evaluation score.

[0082] It should be noted that the type and severity of defects are further classified based on the comprehensive evaluation score, and the defect threshold is set based on historical data. For example, when the comprehensive evaluation score falls in the mild defect range, it indicates that the defect is small and will not affect the overall quality of the product, but it still needs to be recorded and subsequently monitored. When the comprehensive evaluation score falls in the moderate defect range, it indicates that the defect is more obvious and intervention measures need to be taken, such as local repair or adjustment of production conditions. When the comprehensive evaluation score falls in the severe defect range, it means that the defects in this area may have a greater impact on product quality or performance and need to be dealt with immediately.

[0083] This embodiment also provides an aluminum ingot surface defect detection system based on visual acquisition, including: a data acquisition module, which acquires a preliminary image of the aluminum ingot surface through an industrial camera, and acquires physical condition information through an environmental sensor; a data preprocessing module, which preprocesses the acquired preliminary image of the aluminum ingot surface and physical condition information; a lighting adjustment module, which constructs a lighting adjustment model, and generates optimal lighting parameters based on the preprocessed preliminary image of the aluminum ingot and physical condition information; an image evaluation module, which acquires high-quality images with optimal lighting parameters, performs global evaluation and local focusing on the acquired high-quality images, and generates detailed information on high-attention areas; a defect judgment module, which performs defect judgment on high-attention areas based on the detailed information of the high-attention areas; and a comprehensive evaluation module, which performs comprehensive evaluation based on the defect judgment results.

[0084] This embodiment also provides a computer device, which is suitable for the aluminum ingot surface defect detection method based on visual acquisition, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the aluminum ingot surface defect detection method based on visual acquisition proposed in the above embodiment.

[0085] The computer device may be a terminal, comprising a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse.

[0086] This embodiment also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the aluminum ingot surface defect detection method based on visual acquisition proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk or optical disk.

[0087] In summary, this invention achieves this by: constructing a lighting adjustment model, dynamically generating optimal lighting parameters, optimizing image acquisition quality, and ensuring high-quality images under varying environmental conditions; and simultaneously introducing a biomimetic visual attention mechanism to precisely locate high-attention areas and enhance the ability to identify subtle defects. These two innovative steps, working together, not only address the image quality and subtle defect detection deficiencies of existing technologies, but also significantly improve the accuracy and efficiency of aluminum ingot surface defect detection, providing a more reliable quality assurance method for industrial production.

[0088] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for detecting surface defects of aluminum ingots based on visual acquisition, characterized by: include, The initial image of the aluminum ingot surface is collected through industrial cameras, and the physical condition information is collected through environmental sensors; Preprocessing the collected preliminary surface images and physical condition information of the aluminum ingot; Construct a lighting adjustment model and generate the optimal lighting parameters based on the pre-processed preliminary image of the aluminum ingot and the physical condition information. The specific steps are as follows: Through the combined optimization framework of deep learning and nonlinear mapping functions, a lighting adjustment model is constructed based on the comprehensive feature vector of the preliminary image to generate the optimal lighting parameters, which are expressed as: ; in, is the optimal lighting parameter, The first image preliminary image feature vector elements, is the first environmental feature vector of the preliminary image elements, is the comprehensive feature vector of the preliminary image, The first image The importance weights of the elements of the preliminary image feature vector, is the first environmental feature vector of the preliminary image The importance weight of each element, is the balance parameter of the optimal lighting parameters, represents the number of elements in the preliminary image feature vector, The number of elements in the environment feature vector representing the preliminary image, is the first Elements Applying a nonlinear mapping function, is the first environmental feature vector in the preliminary image. Apply nonlinear mapping function to each element, is a nonlinear mapping function applied to the comprehensive feature vector of the preliminary image; Collect high-quality images with optimal lighting parameters, perform global evaluation and local focusing on the collected high-quality images, and generate detailed information on areas of high interest; Determine defects in high-concern areas based on detailed information about them. Conduct a comprehensive assessment based on the defect determination results.

2. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 1, wherein: The industrial camera is used to collect the preliminary image of the aluminum ingot surface, and the environmental sensor is used to collect the physical condition information. The specific steps are as follows: Perform equipment inspection, instrument calibration, and parameter setting for industrial cameras and environmental sensors. Use industrial cameras to capture preliminary images of the aluminum ingot surface, while using environmental sensors to collect physical condition information.

3. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 2, wherein: The collected preliminary image and physical condition information of the aluminum ingot surface are preprocessed in the following specific steps: The preliminary image of the aluminum ingot surface is converted into a grayscale image, and a Gaussian filter is applied to reduce noise. The mean and standard deviation of temperature, humidity, and light intensity are calculated. Edge features and texture features are extracted from the preliminary image of the aluminum ingot surface to generate a preliminary image feature vector. The environmental features of the preliminary image are extracted from the physical condition information to generate an environmental feature vector of the preliminary image. The preliminary image feature vector is combined with the environmental feature vector of the preliminary image to generate a comprehensive feature vector of the preliminary image.

4. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 3, wherein: The steps of collecting high-quality images with optimal lighting parameters, performing global evaluation and local focusing on the collected high-quality images, and generating detailed information on high-interest areas are as follows: Adjust the light source based on the optimal lighting parameters, use an industrial camera to capture high-quality images with the optimal lighting parameters, extract edge features and texture features from the high-quality images, and generate high-quality image feature vectors. Use environmental sensors to capture physical condition information, extract environmental features from the physical condition information, and generate high-quality image environmental feature vectors. Use a fast evaluation algorithm to perform a global evaluation and generate high-interest areas. The bionic visual attention mechanism is introduced to calculate the attention weight of the high attention area, which is expressed as: ; in, is the attention weight, is the dimension of the high-quality image feature vector, is the dimension of the environmental feature vector of the high-quality image, is the first high-quality image feature vector elements, is the first environmental feature vector of the high-quality image elements, is the high-quality image feature value after nonlinear enhancement in the attention weight, is the adjusted environmental feature value in the attention weight, Represents the distance metric between high-quality image features and known defect features, is the balancing parameter of the attention weight, is the first high-quality image feature vector The importance weight of each element, is the first high-quality image feature vector The importance weight of each element, is the index of the high-quality image feature vector, is the index of the environmental feature vector of the high-quality image, For each element in the high-quality image feature vector Applying a nonlinear mapping function, Each element in the environmental feature vector of the high-quality image Apply nonlinear mapping functions; Based on historical data, an attention weight threshold is set. The attention weight threshold is used to distinguish between ordinary areas and high-attention areas. Areas with attention weights greater than the attention weight threshold are marked as high-attention areas. For each high-attention area, its position and size are recorded to generate detailed information about the high-attention area.

5. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 4, characterized in that: The detailed information of the high-concern area is used to determine the defects of the high-concern area. The specific steps are as follows: Based on the detailed information of the high-attention area, edge detection, texture features and environmental features are extracted from the high-attention area to generate the image feature vector of the high-attention area and the environmental feature vector of the high-attention area image. The image feature vector and the environmental feature vector of the high-attention area image are then fused by principal component analysis to generate a comprehensive feature vector. The defect probability is calculated based on the nonlinear model of the Gaussian kernel function, and the expression is: ; in, is the defect probability, is the activation function, Represents the comprehensive feature vector after dimensionality reduction elements, Represents the comprehensive feature vector after dimensionality reduction elements, represents the bandwidth parameter of the Gaussian kernel function, Represents the comprehensive feature vector and The interaction coefficient between Represents the dimension of the comprehensive feature vector after dimensionality reduction; According to historical data, a defect probability threshold is set. When the defect probability is greater than the defect probability threshold, it is determined that a defect exists.

6. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 5, characterized in that: The above-mentioned comprehensive evaluation is carried out based on the defect determination results. The specific steps are as follows: Based on the defect determination results, the comprehensive feature vector of the high-concern area is generated according to the defect probability, severity score and physical condition information of the defect. The expression is: ; in, For the The comprehensive feature vector of high-attention regions, For the Severity scores for high-concern areas, is the temperature, For humidity, is the light intensity; The comprehensive feature vector is processed by a nonlinear mapping function to calculate the final comprehensive evaluation score, which is expressed as: ; in, For the Comprehensive evaluation scores of high-attention areas, is the scaling factor of the comprehensive evaluation score, is a balance parameter for the comprehensive evaluation score.

7. A system for detecting surface defects of aluminum ingots based on visual acquisition, based on the method for detecting surface defects of aluminum ingots based on visual acquisition according to any one of claims 1 to 6, characterized in that: Including data acquisition module, data preprocessing module, lighting adjustment module, image evaluation module, defect judgment module and comprehensive evaluation module; The data acquisition module uses an industrial camera to collect preliminary images of the aluminum ingot surface and environmental sensors to collect physical condition information; Data preprocessing module, which preprocesses the collected preliminary images and physical condition information of the aluminum ingot surface; Lighting adjustment module, which builds a lighting adjustment model and generates optimal lighting parameters based on the pre-processed preliminary image of the aluminum ingot and physical condition information; The image evaluation module collects high-quality images with optimal lighting parameters, performs global evaluation and local focusing on the collected high-quality images, and generates detailed information on high-interest areas; The defect determination module determines defects in high-concern areas based on detailed information of the high-concern areas; The comprehensive evaluation module performs comprehensive evaluation based on the defect determination results.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the aluminum ingot surface defect detection method based on visual acquisition according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the aluminum ingot surface defect detection method based on visual acquisition according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • A defect target detection method based on an attention mechanism

    CN109829893A

  • Product detection method and system based on machine vision

    CN119323659A