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

By constructing a light adjustment model in the aluminum ingot surface defect detection system and introducing a bionic visual attention mechanism, the problem of insufficient detection stability and accuracy in complex industrial environments is solved, high-quality image acquisition and subtle defect recognition are achieved, and the accuracy and efficiency of detection are improved.

CN119880916AActive Publication Date: 2025-04-25GUANGDONG HONGMINGCHANG TECHNOLOGY CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to maintain the stability and accuracy of surface defect detection of aluminum ingots in complex industrial environments.

Method used

The preliminary image of the aluminum ingot surface and the environmental sensor collects physical condition information through industrial cameras, and after pre-processing, the light adjustment model is constructed, the best light parameters are generated, high-quality images are collected, and global evaluation and local focus are carried out, and a bionic visual attention mechanism is introduced for defect determination and comprehensive evaluation.

Benefits of technology

It realizes high-quality image acquisition and subtle defect recognition under different environmental conditions, improves the accuracy and efficiency of surface defect detection of aluminum ingots, and provides more reliable quality assurance means for industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119880916A_ABST
    Figure CN119880916A_ABST
Patent Text Reader

Abstract

The invention discloses an aluminum ingot surface defect detection method and system based on visual acquisition, and relates to the technical field of aluminum product detection, and the method comprises the steps: constructing an illumination adjustment model, and generating an optimal illumination parameter according to a preprocessed aluminum ingot preliminary image and physical condition information; a high-quality image with the optimal illumination parameter is collected, global evaluation and local focusing are carried out on the collected high-quality image, and detailed information of a high-attention area is generated; performing defect judgment on the high-attention region based on the detailed information of the high-attention region; performing comprehensive evaluation based on a defect judgment result; according to the invention, the dynamic generation of the optimal illumination parameter is realized, and the image acquisition quality is optimized; meanwhile, a bionic visual attention mechanism is introduced, a high-attention area is accurately positioned, and the recognition capability of fine defects is enhanced. The problem that in the prior art, image quality and tiny defect detection are insufficient is solved, and the accuracy and efficiency of aluminum ingot surface defect detection are remarkably improved.
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 the modern industrial manufacturing process, aluminum ingots are an important basic material, and their surface quality has a crucial impact on the performance and reliability of the final product. Traditional methods for detecting surface defects of aluminum ingots mainly rely 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 mass 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. Such systems use high-resolution industrial cameras to obtain detailed image information on the surface of aluminum ingots, 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. The enhancement of environmental perception capabilities makes it possible to monitor physical conditions such as temperature and humidity in real time, while the development of light regulation technology allows the light source configuration to be dynamically adjusted according to different detection needs, thereby optimizing the quality of image acquisition. 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 the above-mentioned technological advances have significantly improved the effect of aluminum ingot surface defect detection, there are still some limitations in practical applications, especially in the challenges 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 prior art 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, comprising: 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 lighting adjustment model to generate 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] The industrial cameras and environmental sensors are inspected, instruments calibrated and parameters set. The industrial cameras are used to collect preliminary images of the aluminum ingot surface, while the environmental sensors are used 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 and physical condition information of the aluminum ingot surface are preprocessed, and 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 preliminary image comprehensive feature vector.

[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, and 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, and w i is the importance weight of the i-th preliminary image feature vector element 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 illumination 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.

[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 the best lighting parameters is acquired, the acquired 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] According to the optimal lighting parameters, adjust the light source, collect high-quality images with the optimal lighting parameters through industrial cameras, extract edge features and texture features from the high-quality images, generate high-quality image feature vectors, collect physical condition information through environmental sensors, extract environmental features of high-quality images from the physical condition information, generate environmental feature vectors of high-quality images, use fast evaluation algorithms for global evaluation, and generate high-attention areas;

[0018] The bionic visual attention mechanism is introduced to calculate the attention weight of the high attention area, and the expression is:

[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, and 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 Applying 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] According to 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 described in the present invention, wherein: based on the detailed information of the high-concern area, the defect judgment is performed on the high-concern 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 image feature vectors of the high-attention area and environmental feature vectors of the high-attention area image. The image feature vectors and environmental feature vectors of the high-attention area image are fused by reducing the dimension through principal component analysis to generate a comprehensive feature vector.

[0024] The defect probability is calculated based on the nonlinear model of 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 described in the present invention, wherein: the comprehensive evaluation is performed based on the defect determination result, and 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, T is the temperature, H is the humidity, and L is the 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, including 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 collects the preliminary image of the aluminum ingot surface through the industrial camera and collects the physical condition information through the environmental sensor; the data preprocessing module preprocesses the collected preliminary image of the aluminum ingot surface and the physical condition information; the lighting adjustment module builds a lighting adjustment model and generates the optimal lighting parameters according to the preprocessed preliminary image 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 beneficial effects of the present invention are as follows: by constructing a light adjustment model, the present invention realizes the dynamic generation of optimal light parameters, optimizes the image acquisition quality, and ensures the acquisition of high-quality images under different environmental conditions; at the same time, the bionic visual attention mechanism is introduced to accurately locate high-attention areas and enhance the ability to identify subtle defects. These two innovative steps work together to not only solve the problems of insufficient image quality and subtle defect detection in the prior art, 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 accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying 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 This is a 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 implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0044] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and 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" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0046] Example 1, reference 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, the instrument is calibrated and the parameters are set. The preliminary image of the aluminum ingot surface is collected by the industrial camera, and the physical condition information is collected by the environmental sensor.

[0049] It should be noted that the physical condition information collected by environmental sensors includes temperature, humidity and light intensity. 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 average value 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 preprocessed preliminary image of the aluminum ingot and the physical condition information;

[0054] Furthermore, through the combined optimization framework of deep learning and nonlinear mapping function, 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, and w i is the importance weight of the i-th preliminary image feature vector element 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 illumination 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 environment 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, and 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 lighting 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, according to the optimal lighting parameters, the light source is adjusted, and the high-quality image of the optimal lighting parameters is collected by the industrial camera. The edge features and texture features are extracted from the high-quality image to generate a high-quality image feature vector. The physical condition information is collected by the environmental sensor, and the environmental features of the high-quality image are extracted from the physical condition information to generate an environmental feature vector of the high-quality image. A fast evaluation algorithm is used to perform a global evaluation to generate a high-attention area.

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

[0061] The bionic visual attention mechanism is introduced to calculate the attention weight of the high attention area, and the expression is:

[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, and 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 Applying 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] According to 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, defect determination is performed on 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 a feature vector of the image of the high-attention area and an environmental feature vector of the image of the high-attention area, and the image feature vector and the environmental feature vector of the image of the high-attention area are fused by reducing the dimension through principal component analysis to generate a comprehensive feature vector;

[0067] The defect probability is calculated based on the nonlinear model of 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 defect;

[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 is the severity score of the rth high concern area, T is the temperature, H is the humidity, and L is the 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 concatenation;

[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 according to the comprehensive evaluation score, and the defect threshold is set according to 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] The present 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 the physical condition information; a lighting adjustment module, which constructs a lighting adjustment model, and generates optimal lighting parameters according to the preprocessed preliminary image of the aluminum ingot and the physical condition information; an image evaluation module, which acquires a high-quality image of the optimal lighting parameters, performs global evaluation and local focusing on the acquired high-quality image, and generates detailed information of a high-attention area; a defect judgment module, which performs defect judgment on the high-attention area based on the detailed information of the high-attention area; and a comprehensive evaluation module, which performs comprehensive evaluation based on the defect judgment result.

[0084] This embodiment also provides a computer device, which is suitable for the case of an 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 as proposed in the above embodiment.

[0085] The computer device may be a terminal, and the computer device includes 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 includes 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 can 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 screen 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 key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0086] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for detecting surface defects of aluminum ingots based on visual acquisition as proposed in the above embodiment is implemented; 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 (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read Only Memory, referred to as EPROM), programmable read-only memory (Programmable Red-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic storage, flash memory, disk or optical disk.

[0087] In summary, the present invention achieves the dynamic generation of optimal lighting parameters, optimizes the image acquisition quality, and ensures the acquisition of high-quality images under different environmental conditions by: constructing a lighting adjustment model; at the same time, introducing a bionic visual attention mechanism, accurately locating high-attention areas, and enhancing the ability to identify subtle defects. These two innovative steps work together to not only solve the problems of insufficient image quality and subtle defect detection in the prior art, 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 rather than to limit it. 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 in that: 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 images and physical condition information of the aluminum ingot surface; Construct a lighting adjustment model to generate optimal lighting parameters based on the pre-processed preliminary image of the aluminum ingot and the physical condition information; 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; Defect determination is performed on high-concern areas based on detailed information of high-concern areas; Based on the defect determination results, a comprehensive assessment is conducted.

2. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 1, characterized in that: 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: The industrial cameras and environmental sensors are inspected, instruments calibrated and parameters set. The industrial cameras are used to collect preliminary images of the aluminum ingot surface, while the environmental sensors are used to collect physical condition information.

3. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 2, characterized in that: The collected preliminary image and physical condition information of the aluminum ingot surface are preprocessed, and the specific steps are as follows: 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 preliminary image comprehensive feature vector.

4. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 3, characterized in that: The lighting adjustment model is constructed to generate optimal lighting parameters according to the pre-processed preliminary image of the aluminum ingot and the physical condition information. The specific steps of generating the optimal lighting parameters 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: 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, and w i is the importance weight of the i-th preliminary image feature vector element 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 illumination 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.

5. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 4, characterized in that: 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: According to the optimal lighting parameters, adjust the light source, collect high-quality images with the optimal lighting parameters through industrial cameras, extract edge features and texture features from the high-quality images, generate high-quality image feature vectors, collect physical condition information through environmental sensors, extract environmental features of high-quality images from the physical condition information, generate environmental feature vectors of high-quality images, use fast evaluation algorithms for global evaluation, and generate high-attention areas; The bionic visual attention mechanism is introduced to calculate the attention weight of the high attention area, and the expression is: 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, and 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 Applying 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; According to 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.

6. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 5, characterized in that: Based on the detailed information of the high-concern area, the defect determination is performed on 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 image feature vectors of the high-attention area and environmental feature vectors of the high-attention area image. The image feature vectors and environmental feature vectors of the high-attention area image are fused by reducing the dimension through principal component analysis to generate a comprehensive feature vector. The defect probability is calculated based on the nonlinear model of Gaussian kernel function, and the expression is: 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; 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.

7. The method for detecting surface defects of aluminum ingots based on visual acquisition according to claim 6, characterized in that: Based on the defect determination results, a comprehensive assessment is conducted. 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: X r =[E,R r ,T,H,L]; 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, T is the temperature, H is the humidity, and L 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: 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.

8. 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 7, characterized in that: Including data acquisition module, data preprocessing module, lighting adjustment module, image evaluation module, defect determination module and comprehensive evaluation module; The data acquisition module collects preliminary images of the aluminum ingot surface through industrial cameras and physical condition information through environmental sensors; The data preprocessing module 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 the physical condition information; Image evaluation module, which 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; A 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.

9. 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 as described in any one of claims 1 to 7 are implemented.

10. 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 as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • A defect target detection method based on an attention mechanism

    CN109829893A

  • Processing curved surface defect detection method and device based on multivariate image information fusion

    CN118014936A

  • Camera parameter adjustment method and device, equipment and storage medium

    CN118945460A

  • Visual inspection system for appearance defects of pressure sensor

    CN119198754A

  • Product detection method and system based on machine vision

    CN119323659A

Cited By

  • Self-adaptive illumination adjustment steel belt detection system based on industrial vision

    CN120522087A

  • Casting surface treatment effect quality inspection method and device based on machine vision

    CN120656009A

  • Method and device for inspecting surface treatment effect of casting based on machine vision

    CN120656009B

  • Aluminum ingot appearance defect detection device based on three-dimensional scanning

    CN122377759A