Dispensing quality detection method and system of dispensing detection machine

By acquiring and fusing multispectral images, and combining principal component analysis and deep learning, a multidimensional feature representation mechanism is constructed. This solves the problem of low detection accuracy of traditional single-band imaging in complex environments, and realizes high-precision identification and localization of dispensing defects, thereby improving the stability and efficiency of the detection system.

CN121998938BActive Publication Date: 2026-08-04HUIZHOU JINGERMEI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUIZHOU JINGERMEI TECHNOLOGY CO LTD
Filing Date
2026-01-26
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing technologies rely on single-band imaging, which leads to difficulties in feature extraction, low detection accuracy, and difficulty in efficiently identifying and locating dispensing defects in production environments with varying lighting conditions and diverse and complex colloidal materials.

Method used

A multidimensional spectral-spatial joint feature representation mechanism is constructed by combining multispectral image acquisition, fusion processing, principal component analysis, convolutional neural network and support vector machine. Combined with morphological operation and adaptive feedback closed loop, it can achieve high-precision identification of dispensing defects.

Benefits of technology

It significantly improves the imaging signal-to-noise ratio and robustness, reduces the false alarm rate and missed detection rate, realizes high-precision dispensing detection in complex environments, ensures a balance between detection speed and accuracy, and solves the problem of performance degradation after long-term operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121998938B_ABST
    Figure CN121998938B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of industrial machine vision detection, and discloses a dispensing quality detection method and system of a dispensing detection machine. The method comprises the following steps: collecting a multi-spectrum image of a dispensing area, fusing a multi-band image set based on the transmission characteristics of a glue body; performing median filtering and illumination normalization on the multi-band image set to obtain a corrected image set; performing principal component analysis on the corrected image set to extract a band difference vector, combining a texture gradient to input a convolutional neural network to obtain a fused feature map; performing threshold comparison and morphological screening on the fused feature map to obtain preliminary defect labels; intercepting a candidate image block and extracting reflectivity and texture features, determining final defect information by using a support vector machine; and adjusting preprocessing parameters based on detection confidence variance in a closed loop. The application can overcome the interference of complex illumination and variable material environments, and realize high-precision and high-stability detection of tiny dispensing defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation machine vision inspection technology, and in particular to a dispensing quality inspection method and system for a dispensing inspection machine. Background Technology

[0002] Currently, the dispensing process is a crucial step in ensuring the sealing, conductivity, and structural stability of products in electronic assembly, automotive parts, and precision equipment manufacturing. Its quality directly determines the reliability of the final product. With the increasing automation of industrial production, the need for real-time, high-precision monitoring of the dispensing process is becoming increasingly urgent. Therefore, image processing-based visual inspection technology has become a core means of ensuring product quality in this field.

[0003] In one existing technology, a detection scheme based on single-band visible light imaging or traditional machine vision technology is mainly adopted. This scheme typically acquires two-dimensional images of the colloidal region under standard lighting conditions, and relies on the brightness or color difference between the colloidal material and the substrate in the visible light band to identify obvious defects such as glue breakage, glue overflow, or positional displacement by setting a contrast threshold.

[0004] This method, which relies on single-band imaging and basic feature analysis, has inherent limitations. Because it lacks the ability to capture the multi-dimensional optical properties of colloidal materials, image contrast significantly decreases when there are fluctuations in lighting conditions in the actual production environment, or when the thickness, transparency, and color of the colloid itself change, leading to difficulties in feature extraction. Especially when the optical reflectance properties of the colloid and the substrate are similar, a single-band image cannot easily distinguish between normal coverage and local defects through simple grayscale differences. Furthermore, this method ignores the implicit correlation structure and spatial distribution information between different spectral bands, resulting in poor detection stability under complex working conditions and a high likelihood of misjudgment or missed detection.

[0005] Therefore, the core technical problem faced by existing technologies lies in how to overcome the shortcomings of insufficient information in traditional single-band imaging by deeply mining the inter-band differences and spatial context of multispectral data in complex production environments with varying lighting conditions and diverse colloidal materials, thereby achieving high-precision identification and localization of dispensing defects and solving the problem of low detection accuracy of traditional methods under complex interference. Summary of the Invention

[0006] This invention provides a dispensing quality inspection method and system for dispensing inspection machines, which solves the technical problem of low detection accuracy caused by the reliance on single-band imaging in complex production environments with varying light conditions and diverse colloidal materials.

[0007] Firstly, in order to solve the above-mentioned technical problems, the present invention provides a method for dispensing quality inspection using a dispensing inspection machine, comprising: Multispectral images of the dispensing area are acquired to obtain raw photoelectric data. The raw photoelectric data is then fused based on the transmission characteristics of the pre-acquired colloidal material to obtain a multi-band image set containing reflection and absorption characteristics. The multi-band image set is subjected to median filtering and illumination normalization to obtain a corrected image set; A multidimensional spectral vector is constructed by traversing the set of corrected images. Principal component analysis is performed on the multidimensional spectral vector to reduce its dimensionality. The projection amplitude of the principal component features after dimensionality reduction is calculated and combined to obtain a band difference vector matrix that reflects the material properties. A texture gradient matrix is ​​constructed based on the band difference vector matrix. The texture gradient matrix and the band difference vector matrix are concatenated and input into a preset convolutional neural network model. Features are extracted through convolutional layers to obtain a fused feature map. The pixel values ​​of the fused feature map are compared with a preset colloidal distribution anomaly threshold to generate an anomaly distribution matrix. Morphological operations and connected component filtering are then performed on the anomaly distribution matrix to obtain preliminary defect markers. Candidate defect image blocks are extracted based on the preliminary defect markings. The reflectance curves and texture feature vectors of the candidate defect image blocks are extracted and input into a preset support vector machine classifier to determine the final defect information.

[0008] Secondly, the present invention provides a dispensing quality testing device for a dispensing inspection machine, comprising: The image acquisition module is used to acquire multispectral images of the dispensing area to obtain raw photoelectric data. Based on the transmission characteristics of the pre-acquired colloidal material, the raw photoelectric data is fused to obtain a multi-band image set containing reflection and absorption characteristics. The image preprocessing module is used to perform median filtering and illumination normalization on the multi-band image set to obtain a corrected image set; The feature extraction module is used to traverse the corrected image set to construct a multidimensional spectral vector, perform principal component analysis to reduce the dimensionality of the multidimensional spectral vector, calculate the projection amplitude of the principal component features after dimensionality reduction, and combine them to obtain a band difference vector matrix that reflects the material properties. The feature fusion module is used to construct a texture gradient matrix based on the band difference vector matrix, concatenate the texture gradient matrix and the band difference vector matrix and input them into a preset convolutional neural network model, and extract features through the convolutional layer to obtain a fused feature map. The preliminary defect labeling module is used to compare the pixel values ​​of the fused feature map with a preset colloidal distribution anomaly threshold, generate an anomaly distribution matrix, and perform morphological operations and connected component filtering on the anomaly distribution matrix to obtain preliminary defect labels. The defect classification and confirmation module is used to extract candidate defect image blocks based on the preliminary defect markings, extract the reflectance curves and texture feature vectors of the candidate defect image blocks, and input them into a preset support vector machine classifier to determine the final defect information.

[0009] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention constructs a multi-band image set by integrating the transmission and reflection characteristics of colloidal materials and uses the low-frequency component of the background illumination field for normalization correction. Addressing the technical pain points of existing single-band visible light imaging techniques when detecting transparent or translucent colloids, where the high transmittance of the colloid leads to a lack of contrast with the substrate and it is highly susceptible to interference from ambient light fluctuations, this invention effectively enhances the saliency of colloidal substances in multiple spectral dimensions by decoupling the physical characteristics of photoelectric data and dynamically removing the illumination background. This solves the problem of difficulty in extracting features of transparent colloids under complex optical environments and significantly improves the signal-to-noise ratio and robustness of the imaging.

[0010] (2) This invention extracts band difference vectors through principal component analysis and deeply integrates them with spatial texture features extracted by convolutional neural networks to construct a spectral-spatial joint feature expression mechanism. Given that traditional methods often sever the connection between material properties and spatial morphology, leading to their failure when faced with variations in glue type or uneven thickness due to insufficient information in a single dimension, this invention employs this multi-dimensional complementary fusion strategy. This successfully overcomes the shortcomings of traditional algorithms in representing blurred edges or gradual thickness variations in colloids, thereby achieving high-precision identification of complex morphological defects and effectively reducing the false negative rate.

[0011] (3) This invention adopts a cascaded detection strategy of "coarse screening + fine judgment", that is, firstly, preliminary defect markers are obtained through morphological screening, and then candidate defect image blocks are extracted and input into a support vector machine for secondary confirmation of reflectivity and texture. Since relying solely on a full-image deep learning segmentation network often involves huge computational overhead, and traditional visual operators, although fast in processing speed, have a high false alarm rate, this invention creatively combines the efficient screening capability of morphological processing with the local fine discrimination capability of SVM classifier, effectively eliminating false interference in non-defect areas, thereby solving the contradiction between detection speed and accuracy while ensuring the high-speed detection requirements of the production line, and significantly reducing the over-detection rate.

[0012] (4) This invention constructs an adaptive feedback closed loop based on the variance of detection confidence, which can automatically adjust the preprocessing parameters according to the grayscale histogram and local contrast when the system stability decreases. Considering that the aging of light sources, lens dirt, or ambient light drift in industrial sites will cause the imaging quality to deteriorate over time, static models using fixed parameters are prone to gradually failing. This invention quantifies discrete detection fluctuations into measurable stability indicators and establishes a dynamic parameter optimization mechanism, thereby solving the problem of frequent manual shutdowns for calibration after long-term operation of traditional detection equipment, and realizing adaptive maintenance and long-term stable operation of the detection system. Attached Figure Description

[0013] Figure 1 This is a schematic diagram of a dispensing quality testing method using a dispensing testing machine according to the first embodiment of the present invention; Figure 2 This is a schematic diagram of the dispensing quality detection system of a dispensing inspection machine provided in the second embodiment of the present invention. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] Reference Figure 1 The first embodiment of the present invention provides a method for dispensing quality detection using a dispensing inspection machine, comprising the following steps: S11, acquire multispectral images of the dispensing area to obtain raw photoelectric data, and perform fusion processing on the raw photoelectric data according to the transmission characteristics of the pre-acquired colloidal material to obtain a multi-band image set containing reflection and absorption characteristics; S12, perform median filtering and illumination normalization on the multi-band image set to obtain the corrected image set; S13, traverse the set of corrected images to construct a multidimensional spectral vector, perform principal component analysis to reduce the dimensionality of the multidimensional spectral vector, calculate the projection amplitude of the principal component features after dimensionality reduction and combine them to obtain a band difference vector matrix that reflects the material properties. S14, construct a texture gradient matrix based on the band difference vector matrix, concatenate the texture gradient matrix and the band difference vector matrix and input them into a preset convolutional neural network model, and extract features through the convolutional layer to obtain a fused feature map; S15, compare the pixel values ​​of the fused feature map with a preset colloidal distribution anomaly threshold to generate an anomaly distribution matrix, and perform morphological operations and connected component filtering on the anomaly distribution matrix to obtain preliminary defect markers; S16. Based on the preliminary defect markings, candidate defect image blocks are extracted, and the reflectance curves and texture feature vectors of the candidate defect image blocks are extracted and input into a preset support vector machine classifier to determine the final defect information.

[0016] In step S11, multispectral images of the dispensing area need to be acquired to obtain raw photoelectric data. Based on the pre-acquired transmission characteristics of the colloidal material, the raw photoelectric data is fused to obtain a multi-band image set containing reflection and absorption characteristics, including: The raw photoelectric data is obtained by scanning the dispensing area with a multispectral camera at a preset exposure time. Based on the sensor wavelength response curve of the multispectral camera, the raw photoelectric data is converted into a single-band two-dimensional matrix sequence; For the single-band two-dimensional matrix sequence, the reflection intensity and absorption coefficient of each pixel position are calculated by combining the preset surface curvature model; Based on the transmission characteristics of colloidal materials, feature data blocks with different reflection intensities and absorption coefficients in the single-band two-dimensional matrix sequence are fused to obtain a multi-band image set containing reflection and absorption characteristics.

[0017] First, a multispectral camera scans the colloidal region in the colloidal material detection scenario at a preset exposure time to acquire raw photoelectric response data streams. When scanning the colloidal region on the production line using a multispectral camera, the preset exposure time is set to 50 milliseconds to accommodate the reflective properties of the colloidal surface and prevent overexposure or underexposure. This preset exposure time is determined based on the pre-calibration of the reflective properties of the colloidal material. By analyzing the photoelectric response histograms of the colloidal sample at different exposure times, the optimal exposure parameter is selected where the pixel grayscale value of the highly reflective area in the center of the colloidal material is lower than the sensor saturation threshold (e.g., 255), and the pixel grayscale value of the low-reflective area at the edge of the colloidal material is higher than the sensor's dark current noise threshold. Within this exposure time, the camera captures photoelectric signals from the colloidal surface at different wavelengths, forming a raw data stream containing information from multiple wavelengths. These data streams record the initial response characteristics of the colloidal material under different spectral environments, ensuring that all valid signals are within the linear response range of the sensor.

[0018] Secondly, the raw photoelectric response data stream is mapped into a single-band two-dimensional matrix sequence based on the sensor wavelength response curve. The sensor wavelength response curve is typically obtained from the device technical specifications provided by the multispectral camera manufacturer, or through spectral sensitivity calibration experiments using a standard monochromator during the device integration phase. This curve quantitatively describes the quantum efficiency or response gain of the sensor under different wavelengths of incident light and serves as the physical benchmark for achieving photoelectric signal decoupling. Specifically, this process can be understood as dimensionality reduction and decoupling of multidimensional photoelectric data. For example, a multispectral camera covers a wide wavelength range from 400 nm to 1000 nm. Based on the camera sensor's response curves at different wavelengths, the data for each independent band is extracted separately and organized into independent two-dimensional matrices. In this matrix, each element represents the light intensity response value at a specific spatial location in the image under the corresponding band.

[0019] It is worth noting that in the calculation of reflection intensity and absorption coefficient, the system employs a physical inversion strategy that combines a preset surface curvature model to decouple morphology from material properties. Specifically, this surface curvature model is not a general planar model, but a three-dimensional geometric normal vector field constructed based on the preset dispensing path trajectory and the rheological cross-sectional properties of the colloid. Essentially, it is a parameter matrix aligned with the image resolution, where each coordinate point stores the theoretical unit normal vector of the colloid surface at that location. This digitally reconstructs the undulating morphology of the colloid surface under ideal conditions. The specific construction method is as follows: based on the motion path planning file (G-code) of the dispensing machine and the extrusion parameters of the dispensing valve (such as pressure and speed), combined with the rheological properties of the colloid (such as viscosity and surface tension), the theoretical three-dimensional contour of the colloid on the substrate is simulated and calculated; this three-dimensional contour is discretized into a mesh model, and the normal vector at each mesh vertex is calculated. Finally, a surface curvature model aligned with the image pixels is generated through coordinate mapping. In the specific calculation process, the system traverses and analyzes the coordinates of each pixel in the single-band two-dimensional matrix, maps the current pixel coordinates to the surface curvature model to obtain the corresponding surface unit normal vector, and combines it with the known incident direction vector of the multispectral camera light source to calculate the theoretical geometric brightness factor at that location through vector dot product operation. This factor quantifies the proportion of light intensity attenuation caused solely by surface tilt. Subsequently, the system divides the original observed gray value at that location in the single-band two-dimensional matrix by the theoretical geometric brightness factor. Through this reverse decoupling operation, the geometric light and shadow interference caused by the curvature of the colloidal surface is directly eliminated. The corrected value obtained after the calculation is then calibrated as the true reflection intensity and absorption coefficient at that location, thereby accurately distinguishing the light intensity attenuation caused by geometric factors from the absorption difference caused by material factors.

[0020] Finally, the feature data blocks are fused according to the material's transmission characteristics to obtain a multi-band image set that includes reflection and absorption properties. Different colloidal materials have different light response mechanisms; a certain colloidal material may have high transmittance for certain wavelengths of light while exhibiting high absorption for others. Based on these pre-known characteristics, the system performs weighted fusion of feature data blocks from different wavelengths.

[0021] Specifically, the system employs a weighted fusion strategy based on normalization and contrast response to generate a multi-band image set containing reflection and absorption characteristics. Since reflection intensity and absorption coefficient are different physical quantities with significantly different numerical magnitudes, the system first uses a minimax method to normalize these two types of data matrices, mapping all pixel values ​​to a dimensionless range of 0 to 1 to ensure numerical comparability and additivity. Based on this, the system quantifies and allocates weights according to the specific rule of "feature contrast ratio." In practice, the system selects a preset typical defect sample area and calculates the Weber contrast ratio of that area in both the reflection intensity map and the absorption coefficient map. The weight coefficient of a certain feature channel is set as the ratio of the contrast ratio of that channel to the sum of the contrast ratios of the two channels. After establishing the weights, the system performs a pixel-by-pixel linear weighted summation of the normalized reflection and absorption data.

[0022] For example, when detecting bubble defects inside a colloid, the system calculates that the bubble exhibits a contrast value of 0.8 (significant feature) in the absorption coefficient map of the transmission band, while its contrast value in the reflection intensity map is only 0.2 (weak feature). The system sets the fusion weight of the absorption coefficient to 0.8 divided by 1.0, i.e., 0.8, and the weight of the reflection intensity to 0.2 divided by 1.0, i.e., 0.2. This generates a comprehensive image set, whose pixel values ​​automatically prioritize channels with clearer feature representation, thus significantly enhancing the signal intensity of latent defects in the final image. After determining the weight coefficients, the system performs a specific pixel-level linear weighted fusion operation. The system iterates through each pixel in the image, reads the normalized absorption coefficient value and reflection intensity value at that location, multiplies them by the corresponding weight coefficient, and then adds the two products to obtain the final fused grayscale value of that pixel.

[0023] Following the previous embodiment, assuming a pixel's normalized absorption coefficient is 0.9, representing a strong internal defect signal, and a reflection intensity of 0.3, representing a weak surface signal; the absorption weight determined according to the aforementioned rules is 0.8, and the reflection weight is 0.2. The system first calculates the product of 0.9 and 0.8 to obtain 0.72, then calculates the product of 0.3 and 0.2 to obtain 0.06, and finally adds 0.72 and 0.06 to obtain the value 0.78. This calculated result of 0.78 is used as the new grayscale value of this pixel in the final multi-band image set. Through this pixel-by-pixel weighted calculation, the generated image set not only numerically retains the key feature information with high weights but also suppresses the background noise with low weights, thereby achieving effective enhancement of multi-dimensional features.

[0024] In step S12, the multi-band image set needs to undergo median filtering and illumination normalization to obtain a corrected image set, including: For each band image in the multi-band image set, a sliding neighborhood window is constructed and the median of the gray values ​​within the window is taken to generate a smooth gray-level matrix; Low-frequency components are extracted from the smoothed grayscale matrix to obtain background illumination field data; The smoothed grayscale matrix is ​​divided element-wise with the background illumination field data to obtain the reflection component data. The reflection component data is subjected to grayscale stretching to obtain a corrected image set.

[0025] First, a smooth grayscale matrix is ​​obtained by constructing a sliding neighborhood window and selecting the median value. For example, in the scenario of colloidal material detection, after acquiring a multi-band image set containing reflection and absorption characteristics, it needs to be denoised. For each band image in the multi-band image set, the system constructs a two-dimensional sliding neighborhood window. In one embodiment, the sliding window size is set to 7×7 pixels, and it slides pixel by pixel for each band image. At each window position, the system acquires the grayscale values ​​of all pixels within the window and sorts them, taking the median value after sorting as the new grayscale value for that position. This large-size window selection strategy can not only significantly suppress isolated noise points, but also smooth the gradient areas of the colloidal surface, while effectively preserving the key details of the colloidal region edges, providing a clean data source for subsequent processing.

[0026] Secondly, low-frequency components are extracted from the smoothed grayscale matrix to obtain background illumination field data reflecting changes in light intensity. Specifically, this step aims to separate the non-uniform illumination distribution in the production line environment caused by the position of lighting fixtures or the curved surface of the colloidal material, such as the characteristic of bright centers and dark edges. Large-kernel Gaussian filtering or morphological opening operations are typically used to extract low-frequency information. In one possible implementation, a Gaussian kernel with a radius of 25 pixels is used to convolve the smoothed grayscale matrix. Due to the large kernel size, this operation filters out subtle textures or defects on the colloidal surface, and the resulting low-frequency background primarily captures the overall illumination gradient. The background illumination field data obtained in this way can accurately describe the illumination distribution characteristics of the production line lighting environment on the image, providing a benchmark for subsequent illumination correction.

[0027] Subsequently, the smoothed grayscale matrix is ​​divided element-wise by the background illumination field data to reconstruct the reflectance component data containing only the object's surface reflectivity information. It should be noted that this division operation is equivalent to normalization, aiming to eliminate the influence of differences in illumination intensity, allowing the colloidal reflectance characteristics at different locations to be compared at the same level. In one embodiment, colloidal regions that are originally brighter due to their proximity to the light source and regions that are darker due to their distance from the light source have their illumination factors canceled out after the division operation, making their reflectance components more consistent. In this way, the differences in absorption and reflection inherent in the material itself, rather than external illumination factors, are highlighted, thus ensuring that the detection results are not affected by fluctuations in lighting conditions.

[0028] Finally, a cumulative distribution function is constructed based on the reflection component data and mapped to the dynamic grayscale range to obtain the corrected multi-band image set. Specifically, the system first traverses the reflection component data matrix to count the pixel occurrence frequency at each grayscale level, generates a grayscale histogram, and performs step-by-step accumulation and normalization calculations on the histogram to construct a cumulative distribution function describing the probability distribution of pixel brightness. Based on this, the system establishes a mapping function according to the statistical characteristics of the cumulative distribution function: if a nonlinear mapping is used, the normalized cumulative distribution function value is directly multiplied by the upper limit of the dynamic range of the target grayscale space as the conversion gain to achieve histogram equalization; if a linear mapping is used, the grayscale cutoff threshold corresponding to a preset percentage point (such as at the cumulative probability of 1% and 99%) is locked according to the cumulative distribution function, and a piecewise linear stretching equation is constructed. During the conversion process, the system uses the grayscale value of each pixel in the original matrix as an input variable, substitutes it into the mapping function, calculates the new grayscale value after mapping, and replaces the original value. This stretches the effective grayscale range of the original set to the standard display range (e.g., 0 to 255), significantly enhancing the overall contrast and detail of the image. In one embodiment, under a certain band, the processed reflectance component data values ​​are mainly concentrated in a narrow range of 80-180, resulting in low overall image contrast. After mapping using the cumulative distribution function, the data in this range can be linearly stretched to the full grayscale range of 0-255. This processing makes previously weak absorption differences or subtle defect features clearly visible. The resulting corrected multi-band image set not only eliminates the influence of uneven illumination but also significantly enhances the contrast of colloidal components or defects, providing high-quality input data for subsequent feature extraction.

[0029] In step S13, it is necessary to traverse the corrected image set to construct a multidimensional spectral vector, perform principal component analysis to reduce the dimensionality of the multidimensional spectral vector, calculate the projection amplitude of the principal component features after dimensionality reduction, and combine them to obtain a band difference vector matrix reflecting the material properties, including: Extract the gray values ​​of all bands at the same spatial coordinate position in the corrected image set to construct a multidimensional spectral vector; Calculate the covariance matrix of the multidimensional spectral vector at all locations, and perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and eigenvectors; The portion of the feature vector corresponding to the feature value whose cumulative contribution rate exceeds a preset contribution rate threshold is selected to form a projection matrix; The projection matrix is ​​used to project all multidimensional spectral vectors to obtain low-dimensional principal component feature data. Calculate the projected amplitude of each principal component feature data and combine them according to preset weights to generate a band difference vector matrix.

[0030] First, the image set is traversed to extract grayscale values ​​from different bands at the same location, constructing a multidimensional spectral vector. This process can be understood as combining the grayscale values ​​of each pixel across multiple bands into a high-dimensional vector to characterize the reflection and absorption properties of that location. In one embodiment, the image set contains 5 bands, with grayscale values ​​of 120, 135, 110, 145, and 130 for each pixel. Therefore, the multidimensional spectral vector for that point is a 5-dimensional array. This vectorized representation fully records the response differences of the spatial point under different spectra, laying a data foundation for subsequent analysis of the intrinsic relationships between bands.

[0031] Secondly, for the calculation and eigenvalue decomposition of the covariance matrix between bands, eigenvectors whose cumulative contribution rate meets a preset threshold are selected. In one possible implementation, the system first calculates the covariance matrix of the multidimensional spectral vector data, which quantitatively describes the degree of linear correlation between different spectral bands; then, eigenvalue decomposition is performed on the covariance matrix to solve for the corresponding eigenvalues ​​and eigenvectors. It is worth noting that the eigenvectors represent the orthogonal projection direction in the data feature space, while the magnitude of the eigenvalues ​​directly characterizes the dispersion and information loading of the data in that projection direction. Therefore, the system sorts the eigenvectors in descending order according to the magnitude of the eigenvalues, prioritizing the retention of eigenvectors with larger eigenvalues ​​as principal components, thereby capturing the direction of maximum data variation. Setting the cumulative contribution rate threshold to 90%, the system may select the first two eigenvectors, as they already cover most of the data variation information. This approach helps to significantly reduce data redundancy while retaining key information, thus focusing on the core differences in material properties.

[0032] Subsequently, a projection matrix is ​​constructed using the eigenvectors to map the multidimensional spectral vectors to a low-dimensional subspace, yielding principal component feature data. It should be noted that the purpose of this step is to simplify data complexity through dimensionality reduction. For example, the original 5-dimensional spectral vectors described above, after being mapped using the projection matrix, become 2-dimensional principal component feature data, where these two values ​​represent the projected values ​​of the data along the main directions of variation. This dimensionality reduction effectively highlights the significant differences in reflection and absorption of colloidal materials, removes secondary noise interference, and facilitates efficient subsequent analysis.

[0033] Finally, the projection amplitude is calculated based on the principal component feature data, and the projection amplitudes are combined to determine a band difference vector matrix reflecting the changes in reflection and absorption caused by material diversity. Specifically, the projection amplitude reflects the signal intensity of each pixel in the principal component direction, while the difference vector integrates this information, reflecting the material's characteristic changes across different bands. In one embodiment, the projection amplitude of a colloidal region is 50 and 30 in the two principal component directions, respectively. The system combines these two values ​​to form a difference vector that can intuitively reflect the difference in reflection and absorption between this region and other regions. The final generated band difference vector matrix intuitively demonstrates the material consistency of the colloidal distribution, which is helpful for subsequent classification or anomaly identification of colloidal materials.

[0034] In step S14, a texture gradient matrix needs to be constructed based on the band difference vector matrix. The texture gradient matrix and the band difference vector matrix are concatenated and input into a preset convolutional neural network model. Features are extracted through convolutional layers to obtain a fused feature map, including: A local sliding window is constructed with the pixels in the band difference vector matrix as the center, and the gray-level difference statistics of the pixels within the local sliding window are calculated to generate a texture gradient matrix. The texture gradient matrix and the band difference vector matrix are concatenated along the channel dimension to construct a composite feature tensor. The composite feature tensor is input into a convolutional neural network model, and the joint features of spatial and spectral data are extracted using multi-layer convolutional kernels. Dimensionality reduction mapping is then performed to obtain a fused feature map.

[0035] First, a local sliding window is constructed centered on the pixels in the band difference vector matrix. The gray-level difference statistics of the pixels within the local sliding window are calculated to generate a texture gradient matrix. Specifically, the system traverses the band difference vector matrix, sets a sliding window of a fixed size (e.g., 5×5) centered on the current pixel, and calculates the gray-level difference statistics between the center pixel and its neighboring pixels within the window. These statistics specifically select contrast and entropy. Contrast is obtained by calculating the weighted sum of the squared gray-level differences between pixel pairs within the window, and is used to characterize the depth of the texture and the sharpness of the edges. Entropy is obtained by statistically analyzing the probability distribution of gray-level differences and calculating its randomness, and is used to measure the complexity or disorder of the texture distribution. The system assigns the calculated contrast and entropy values ​​as new feature channels to the center pixel position, thereby generating a texture gradient matrix with the same spatial size as the original matrix but containing texture feature channels. Subsequently, in order to construct the input of the neural network model, the system performs a feature splicing operation in the channel dimension, stacking the band difference vector matrix representing spectral properties and the texture gradient matrix representing spatial structure in the depth direction to form a high-dimensional composite feature tensor containing both spectral and spatial information. This tensor can simultaneously provide the network with microscopic differences in material composition and macroscopic texture clues of surface morphology, thereby making up for the inadequacy of single features in representing complex defects.

[0036] Subsequently, the texture gradient matrix and the band difference vector matrix are concatenated along the channel dimension to construct a composite feature tensor. Specifically, since the texture gradient matrix and the band difference vector matrix maintain a high degree of consistency in spatial resolution, the system performs a stacking operation in the depth direction, organically combining the feature channels representing spatial texture with the difference vector channels representing spectral attributes. This constructs a high-dimensional composite feature tensor containing both spectral attributes and spatial texture information. This tensor breaks down the information silos of a single feature source, providing multi-dimensional joint input data for subsequent deep learning models.

[0037] Finally, the composite feature tensor is input into a convolutional neural network model. Multiple convolutional kernels are used to extract joint spatial and spectral features, which are then reduced in dimension to obtain a fused feature map. It is worth noting that this convolutional neural network model employs a fully convolutional network architecture to achieve pixel-level feature fusion. Its structure includes three consecutively stacked convolutional blocks. Each convolutional block consists of a 3×3 convolutional layer, a batch normalization layer, and a ReLU activation function layer. This aims to extract nonlinear high-order semantic features layer by layer while maintaining spatial dimension invariance. At the end, a 1×1 convolutional layer compresses and maps multi-channel features into a single-channel output. During the training and optimization phase of the model, the dataset was derived from labeled multispectral image data accumulated from historical production lines, which included various colloidal defect samples confirmed by manual quality inspection. The model used the Adam optimizer for parameter iteration, with an initial learning rate set to 0.001 and a batch size set to 32. A weighted cross-entropy loss function was introduced to balance the class differences between defect pixels and background pixels. Through this deep learning training driven by real industrial data, the fused feature map output by the model can accurately highlight potential defect areas with high response values.

[0038] In step S15, the pixel values ​​of the fused feature map are compared with a preset colloidal distribution anomaly threshold to generate an anomaly distribution matrix. Morphological operations and connected component filtering are then performed on the anomaly distribution matrix to obtain preliminary defect markers, including: The pixel value of each pixel in the fused feature map is compared with a preset colloidal distribution anomaly threshold. Pixels with pixel values ​​greater than the colloidal distribution anomaly threshold are assigned a first label value, and the remaining pixels are assigned a second label value to generate an initial anomaly distribution matrix. Morphological erosion and dilation operations are sequentially performed on the initial anomaly distribution matrix to eliminate noise points and obtain a purified anomaly distribution matrix. Connectivity analysis was performed on the purification anomaly distribution matrix to identify independent abnormal patches; Abnormal patches with pixel areas exceeding the preset minimum defect area are selected, their contour coordinates are extracted and mapped to the original image coordinate system to obtain preliminary defect markings.

[0039] First, the pixel values ​​of the fused feature map are obtained, and these pixel values ​​are compared with a preset colloidal distribution anomaly threshold to generate an initial binary anomaly distribution matrix. For example, in the business scenario of colloidal material detection, obtaining pixel values ​​and comparing them with a preset threshold is a crucial step in processing and analyzing the fused feature map. This process aims to initially screen out areas that may contain anomalies, providing a basis for subsequent defect localization. In colloidal film detection, the pixel values ​​of the fused feature map range from 0 to 255. Specifically, the preset colloidal distribution anomaly threshold is not a fixed empirical value, but is obtained based on the histogram statistical characteristics analysis of the fused feature map. Since the preceding convolutional neural network has been trained on targeted defect samples, its output fused feature map exhibits a significant bimodal characteristic in pixel grayscale distribution: that is, the response values ​​of the background and normal colloidal regions are concentrated in the low grayscale range, while the response values ​​of the defective regions are concentrated in the high grayscale range due to the feature clustering effect. The system calculates the optimal segmentation threshold as 180 by analyzing the intersection of the probability density functions of these two types of regions on the validation set, or by using the maximum inter-class variance method. Therefore, when the response value of a pixel in the fused feature map exceeds 180, from a statistical point of view, it means that the posterior probability of the point belonging to the defect category is significantly higher than the probability of it belonging to the background category, indicating that there is a highly suspicious abnormality in the distribution of colloids (such as broken glue or bubbles) at this location. Based on this, the system marks it as an abnormal point and assigns it a value of 1, thereby forming an initial binary abnormal distribution matrix that can intuitively reflect the distribution of potential problem areas.

[0040] Secondly, a morphological opening operation is performed on the initial binarized anomaly distribution matrix to obtain a cleaned matrix after noise removal. The morphological opening operation, through erosion followed by dilation, smooths the boundaries of anomaly regions and eliminates fine noise. For example, when detecting a colloidal film, the initial matrix contains some scattered anomalies with an area of ​​only 2 to 3 pixels. After the opening operation, these small points are effectively filtered out, leaving only larger anomaly regions. This processing method helps improve the accuracy of subsequent analysis and reduces the possibility of false alarms.

[0041] Subsequently, connected component labeling is performed on the cleanup matrix, aggregating connected anomalous pixels into independent anomalous patches. Specifically, the aim is to identify spatially adjacent anomalous pixels in the matrix as a single object for further analysis. It's worth noting that the "spatial adjacency" criterion here uses the 8-neighborhood connectivity rule. For any anomalous pixel in the matrix, the system checks its eight neighboring pixels in the horizontal, vertical, and diagonal directions. If any of these neighbors is marked as anomalous, the two are considered to belong to the same connected component. For example, in the colloidal film detection described above, after opening operations, three independent anomalous regions appeared in the matrix, consisting of 50, 120, and 10 pixels respectively. Through connected component labeling, the system assigns a unique identifier to each patch, facilitating subsequent area statistics and filtering. This method can clearly distinguish the location and size of different anomalous regions, providing data support for defect area identification.

[0042] Finally, abnormal patches with pixel areas exceeding the preset minimum defect area are filtered out, their contour coordinates are extracted and mapped to the original image coordinate system, resulting in preliminary defect markings. It's worth noting that this preset minimum defect area is determined jointly based on the specific product's industry quality inspection standards and the spatial resolution calibration parameters of the vision system. Specifically, the system first determines the minimum allowable physical defect size of the colloid (e.g., a physical area of ​​0.25 square millimeters) according to production process requirements. Then, combining this with the single-pixel physical equivalent (i.e., the actual physical length and width represented by one pixel, e.g., 0.05 mm × 0.05 mm) obtained during camera calibration, the aforementioned physical size tolerance is converted into a pixel count threshold in the image coordinate system. For example, when judging whether an independent abnormal patch meets the minimum defect size standard, an area threshold can be set, such as at least 100 pixels. Using the above example, patches with areas of 50 and 10 pixels will be discarded, while patches with an area of ​​120 pixels are retained as potential defect areas. This filtering mechanism ensures that only meaningful abnormal areas are considered, avoiding resource waste due to subtle noise. If the patch area exceeds the standard, its edge contour coordinates are extracted and mapped back to the original image coordinate system. For example, the specific location of the region is marked in the upper left corner of the original image. This marking method transforms abstract feature map information into coordinate data that can be used in practice, providing an intuitive basis for subsequent defect confirmation and repair.

[0043] In step S16, candidate defect image patches are extracted based on the preliminary defect markings. The reflectance curves and texture feature vectors of the candidate defect image patches are extracted and input into a preset support vector machine classifier to determine the final defect information, including: The preliminary defect markers are mapped back to the multi-band image set, and the corresponding candidate defect image blocks are extracted. The reflectance curve is obtained by calculating the average gray value of the candidate defect image block under different bands, and the texture feature vector is obtained by calculating the gray-level co-occurrence matrix feature of the candidate defect image block. The reflectance curve is concatenated with the texture feature vector to generate a combined feature vector; The combined feature vectors are input into a preset support vector machine classifier to determine the final defect type and location information of the candidate defect image patch.

[0044] First, candidate defect image patches are mapped and extracted from the multispectral image data based on the preliminary defect region markers to obtain the spectral response matrix of the candidate regions. Based on the preliminary markers obtained through morphological processing, the system needs to perform reverse localization and extract the corresponding candidate defect image patches from the original high-dimensional multispectral image. In a specific detection example, in the multispectral image data of a colloidal film, the preliminary markers indicate an anomaly located in the lower right corner of the image. At this point, the system performs a precise coordinate mapping operation: first, it parses the geometric attributes of the preliminary markers (i.e., the anomalous patches output by connected component analysis) and calculates their geometric centroid coordinates in the anomaly distribution matrix coordinate system; since the preceding image preprocessing and feature extraction network are designed to maintain the consistency of spatial resolution between the feature map and the original input image (i.e., a one-to-one correspondence in spatial position), the system directly locates the centroid coordinates to the corresponding spatial position in the original multispectral image data, and constructs a region of interest (ROI) of a preset size (e.g., 50×50 pixels) centered on these coordinates. Subsequently, the system locks the ROI region and extracts the original photoelectric data of all bands along the spectral channel dimension, thereby extracting the corresponding image patches. This image patch fully preserves the original data of multiple spectral channels. This cropping method can focus on potential abnormal areas, effectively remove background interference, thereby significantly reducing the amount of computation of irrelevant data and improving processing speed.

[0045] First, candidate defect image patches are mapped and cropped from the multispectral image data based on preliminary defect region markers to obtain the spectral response matrix of the candidate regions. Based on the preliminary markers obtained through morphological processing, the system needs to perform reverse localization and crop the corresponding candidate defect image patches from the original high-dimensional multispectral image. In a specific detection example, in the multispectral image data of a colloidal film, the preliminary markers indicate an anomaly located in the lower right corner of the image. Specifically, the system calculates the geometric centroid coordinates of this anomaly in the preliminary marker matrix and, using the spatial correspondence between the feature map and the original image, directly uses these coordinates as an index to locate the same spatial position in the original multispectral image data. Through this precise coordinate mapping, the system locks down and crops the image patch corresponding to this region, with a size set to 50×50 pixels. This image patch completely preserves the original data of multiple spectral channels. This cropping method can focus on potential anomaly regions, effectively remove background interference, thereby significantly reducing the computational load of irrelevant data and improving processing speed.

[0046] Secondly, based on the spectral response matrix of the candidate region, the spectral reflectance curve and texture feature vector are calculated, and then concatenated to generate a multi-dimensional feature input vector. It is worth noting that the spectral reflectance curve profoundly reflects the intrinsic chemical composition and reflectance characteristics of the material at different wavelengths, while the texture feature vector focuses on describing the spatial distribution pattern of pixels within the region. The combination of the two constitutes a complete description of the defect. In actual data analysis, the spectral data processed by the system covers a wide wavelength range from 400 to 1000 nanometers. The extracted reflectance curve shows a significant peak anomaly at 700 nanometers, strongly suggesting a sudden change in material composition or thickness; simultaneously, texture feature vector analysis indicates that the pixel distribution in this region exhibits irregular clustering characteristics. The system concatenates these two complementary features at the numerical level into a multi-dimensional feature input vector, comprehensively characterizing the abnormal attributes of the region and providing a rich and high-dimensional information foundation for subsequent classification decisions.

[0047] Subsequently, the multidimensional feature input vector is fed into a support vector machine (SVM) classifier to calculate the distance between feature points and the hyperplane decision boundary. It should be noted that this process essentially utilizes mathematical geometric methods to determine whether the region conforms to the feature distribution of a specific defect type. In colloidal film detection, the pre-set SVM classifier has been trained offline using samples containing typical defect types such as "local missing parts" and "bubbles." Specifically, the training process first constructs a training dataset containing a large number of manually labeled samples. The sample set covers various morphologies such as "local defects," "bubbles," and "normal backgrounds" under different lighting conditions and colloid thicknesses, and the number of samples in each category is balanced. Second, considering that the input multidimensional feature vectors often exhibit nonlinear distributions in low-dimensional space, the model selects radial basis functions as kernel functions to map the feature data to high-dimensional space to find the optimal separating hyperplane. Subsequently, in order to improve the model's generalization ability and prevent overfitting, a grid search combined with five-fold cross-validation is used to jointly optimize the penalty coefficient C and kernel parameters to determine the optimal model parameters. Finally, for the multi-category defect recognition requirements, the classifier uses a "one-to-many" strategy to construct multiple binary classification decision surfaces to ensure that it can accurately output the probability or distance value of feature points belonging to each specific defect type.

[0048] Finally, if the distance value meets the classification criteria for local missing defects, the preliminary defect area marker is retained and the geometric centroid is calculated to determine the final defect type and location. Based on the above classification results, after confirming that the area belongs to the "local missing" defect, the system further performs geometric analysis on the area, calculates its centroid coordinates, and thus determines its precise location in the image coordinate system, i.e., the horizontal coordinate is 320 and the vertical coordinate is 450. This precise location information intuitively reflects the specific distribution of defects on the colloidal film, providing an important basis for subsequent product quality assessment, defective product rejection, or problem tracing in the upstream dispensing process. Through this cascaded verification process, the system can quickly and accurately locate the real problem area, significantly improving the efficiency and reliability of the overall inspection process.

[0049] To facilitate understanding of the present invention, some preferred embodiments of the present invention will be described in further detail below.

[0050] In one embodiment, after cropping candidate defect image patches based on the preliminary defect markers, extracting the reflectance curves and texture feature vectors of the candidate defect image patches and inputting them into a preset support vector machine classifier to determine the final defect information, the method further includes: The classification confidence scores corresponding to the final defect information obtained from the detection of multiple consecutive frames of images are statistically analyzed, and the variance of the confidence scores is calculated to obtain a confidence variance sequence. Determine whether the confidence variance sequence exceeds a preset stability interval; If the value exceeds the limit, then calculate the grayscale histogram and local contrast matrix of the image corresponding to the original photoelectric data. Based on the distribution characteristics of the grayscale histogram and the statistical values ​​of the local contrast matrix, the filter kernel size adjustment gradient and gain coefficient correction values ​​are calculated. Median filtering was performed using the adjusted kernel size, and illumination normalization was performed using the corrected gain coefficient to optimize the subsequent acquisition of multispectral images. If the limit is not exceeded, no adjustment is required.

[0051] First, the recognition confidence scores from multiple consecutive frames are extracted to calculate the confidence variance sequence, which is used to quantitatively characterize the stability of the detection system. Specifically, the confidence variance sequence can sensitively reflect the fluctuations in the detection process, especially in multispectral imaging, where the surface properties of colloidal films are easily changed by ambient light drift or slight differences between batches of materials, leading to inconsistent recognition results from the classifier.

[0052] In one application scenario, the system tracks and analyzes 10 consecutively acquired images, extracting the classification confidence score of the target defect in each frame. These scores are 0.85, 0.82, 0.88, 0.79, and 0.90, respectively. The system calculates the variance of these scores using a statistical algorithm. If the calculated variance exceeds a preset stable range (e.g., 0.05), it indicates significant fluctuations in the current detection results, and the system is in an unstable operating state, necessitating the initiation of a parameter adaptive optimization process.

[0053] Secondly, for cases where the confidence variance sequence exceeds the standard, the image gray-level histogram and local contrast matrix of the original multispectral image data are calculated to perform "causal diagnosis" of image quality issues. It is worth noting that the image gray-level histogram can intuitively reflect the overall distribution of pixel gray values ​​in the image, while the local contrast matrix focuses on describing the brightness and darkness changes in local areas of the image. Combining the two can accurately locate the physical root cause of instability.

[0054] Furthermore, in practical applications of colloidal film detection, if the grayscale histogram of the current frame's multispectral image shows that most pixels are concentrated in the mid-to-high grayscale value region, but a small number of extremely low grayscale values ​​also exist, this usually suggests that there may be shadow interference or insufficient local illumination on the colloidal surface. Simultaneously, by analyzing the local contrast matrix, if the contrast of a specific area of ​​the image (such as the upper right corner) is found to be significantly higher than other areas, it is inferred that this may be due to abnormal light reflection caused by unevenness on the colloidal surface at that location. These statistical characteristics provide an objective and quantitative basis for subsequent parameter adjustments.

[0055] Subsequently, based on the diagnostic results of the grayscale histogram and the local contrast matrix, the filter kernel size adjustment gradient and gain coefficient correction value are calculated. It should be noted that the filter kernel size gradient value is mainly used to adjust the spatial range of image smoothing to balance noise reduction and detail preservation; while the gain coefficient correction value is used to correct the overall brightness or contrast deviation of the image.

[0056] In a specific parameter adjustment strategy, based on the aforementioned diagnosis of abnormally high local contrast, the system calculates the filter kernel size adjustment gradient, instructing the preprocessing module to adjust the median filter kernel size from the current 3×3 to 5×5, thereby enhancing the smoothing ability against high-frequency noise. Simultaneously, addressing the low-grayscale shadow problem revealed by the grayscale histogram, the system calculates a gain coefficient correction value of 1.2, aiming to enhance the detail representation in the dark areas of the image.

[0057] Finally, the adjusted parameters are used to optimize the subsequently acquired multispectral images, achieving closed-loop control. In practice, the system immediately feeds back the calculated 5×5 filter kernel and 1.2x gain coefficient to step S12 for reconstructing and processing the subsequently acquired raw multispectral image data. After parameter adjustment, the image information entropy increase ratio is calculated; if it is less than 5%, it reverts to the default parameters, prioritizing model stability and avoiding individual cases affecting the overall judgment standard.

[0058] Through this closed-loop optimization, the reconstructed image data can more clearly and stably present potential defect areas. For example, an abnormal spectral response in a region that was originally blurred due to insufficient lighting becomes more significant after parameter optimization, enabling the subsequent classifier to successfully identify the region as a surface scratch or other specific defect. This data-feedback-based adaptive adjustment mechanism significantly improves the robustness of the detection system in complex and changing environments, effectively reduces false positives and false negatives, and ensures high-precision recognition results over long-term operation.

[0059] In summary, this invention discloses a dispensing quality inspection method for a dispensing inspection machine, including multispectral image acquisition and fusion, image correction based on a physical model, joint extraction of spectral and spatial features, cascaded classification and identification of defects, and adaptive closed-loop adjustment of detection parameters. This invention deeply explores the differences in reflection and absorption of colloidal materials at different wavelengths, combines the advantages of convolutional neural networks and support vector machines for multi-level feature verification, and utilizes detection confidence to dynamically optimize the preprocessing logic. This achieves high-precision and high-stability detection of minute dispensing defects in complex industrial environments, greatly improving the automated quality inspection efficiency and product yield of production lines.

[0060] Reference Figure 2 The second embodiment of the present invention provides a dispensing quality inspection system for a dispensing inspection machine, comprising: The image acquisition module is used to acquire multispectral images of the dispensing area to obtain raw photoelectric data. Based on the transmission characteristics of the pre-acquired colloidal material, the raw photoelectric data is fused to obtain a multi-band image set containing reflection and absorption characteristics. The image preprocessing module is used to perform median filtering and illumination normalization on the multi-band image set to obtain a corrected image set; The feature extraction module is used to traverse the corrected image set to construct a multidimensional spectral vector, perform principal component analysis to reduce the dimensionality of the multidimensional spectral vector, calculate the projection amplitude of the principal component features after dimensionality reduction, and combine them to obtain a band difference vector matrix that reflects the material properties. The feature fusion module is used to construct a texture gradient matrix based on the band difference vector matrix, concatenate the texture gradient matrix and the band difference vector matrix and input them into a preset convolutional neural network model, and extract features through the convolutional layer to obtain a fused feature map. The preliminary defect labeling module is used to compare the pixel values ​​of the fused feature map with a preset colloidal distribution anomaly threshold, generate an anomaly distribution matrix, and perform morphological operations and connected component filtering on the anomaly distribution matrix to obtain preliminary defect labels. The defect classification and confirmation module is used to extract candidate defect image blocks based on the preliminary defect markings, extract the reflectance curves and texture feature vectors of the candidate defect image blocks, and input them into a preset support vector machine classifier to determine the final defect information.

[0061] It should be noted that the dispensing quality detection system of the dispensing inspection machine provided in this embodiment of the invention is used to execute all the process steps of the dispensing quality detection method of the dispensing inspection machine in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.

[0062] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0063] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. A dispensing quality detection method of a dispensing detection machine, characterized in that, include: Multispectral images of the dispensing area are acquired to obtain raw photoelectric data. The raw photoelectric data is then fused based on the transmission characteristics of the pre-acquired colloidal material to obtain a multi-band image set containing reflection and absorption characteristics. The multi-band image set is subjected to median filtering and illumination normalization to obtain a corrected image set; A multidimensional spectral vector is constructed by traversing the set of corrected images. Principal component analysis is performed on the multidimensional spectral vector to reduce its dimensionality. The projection amplitude of the principal component features after dimensionality reduction is calculated and combined to obtain a band difference vector matrix that reflects the material properties. A texture gradient matrix is ​​constructed based on the band difference vector matrix. The texture gradient matrix and the band difference vector matrix are concatenated and input into a preset convolutional neural network model. Features are extracted through convolutional layers to obtain a fused feature map. The pixel values ​​of the fused feature map are compared with a preset colloidal distribution anomaly threshold to generate an anomaly distribution matrix. Morphological operations and connected component filtering are then performed on the anomaly distribution matrix to obtain preliminary defect markers. Candidate defect image blocks are extracted based on the preliminary defect markings. The reflectance curves and texture feature vectors of the candidate defect image blocks are extracted and input into a preset support vector machine classifier to determine the final defect information.

2. The glue dispensing quality detection method of the glue dispensing detection machine according to claim 1, wherein, The acquisition of multispectral images of the dispensing area yields raw photoelectric data. This raw photoelectric data is then fused based on the pre-acquired transmission characteristics of the colloidal material to obtain a multi-band image set containing reflection and absorption characteristics, including: The raw photoelectric data is obtained by scanning the dispensing area with a multispectral camera at a preset exposure time. Based on the sensor wavelength response curve of the multispectral camera, the raw photoelectric data is converted into a single-band two-dimensional matrix sequence; For the single-band two-dimensional matrix sequence, the reflection intensity and absorption coefficient of each pixel position are calculated by combining the preset surface curvature model; Based on the transmission characteristics of colloidal materials, feature data blocks with different reflection intensities and absorption coefficients in the single-band two-dimensional matrix sequence are fused to obtain a multi-band image set containing reflection and absorption characteristics.

3. The glue quality detection method of the glue detection machine of claim 1, wherein, The process of performing median filtering and illumination normalization on the multi-band image set to obtain a corrected image set includes: For each band image in the multi-band image set, a sliding neighborhood window is constructed and the median of the gray values ​​within the window is taken to generate a smooth gray-level matrix; Low-frequency components are extracted from the smoothed grayscale matrix to obtain background illumination field data; The smoothed grayscale matrix is ​​divided element-wise with the background illumination field data to obtain the reflection component data. The reflection component data is subjected to grayscale stretching to obtain a corrected image set.

4. The glue quality detection method of the glue detection machine of claim 1, wherein, The process involves traversing the corrected image set to construct a multidimensional spectral vector, performing principal component analysis (PCA) to reduce the dimensionality of the multidimensional spectral vector, calculating the projected amplitudes of the principal component features after dimensionality reduction, and combining them to obtain a band difference vector matrix reflecting the material properties, including: Extract the gray values ​​of all bands at the same spatial coordinate position in the corrected image set to construct a multidimensional spectral vector; Calculate the covariance matrix of the multidimensional spectral vector at all locations, and perform eigenvalue decomposition on the covariance matrix to obtain eigenvalues ​​and eigenvectors; The portion of the feature vector corresponding to the feature value whose cumulative contribution rate exceeds a preset contribution rate threshold is selected to form a projection matrix; The projection matrix is ​​used to project all multidimensional spectral vectors to obtain low-dimensional principal component feature data. Calculate the projected amplitude of each principal component feature data and combine them according to preset weights to generate a band difference vector matrix.

5. The glue quality detection method of the glue detection machine of claim 1, wherein, The process of constructing a texture gradient matrix based on the band difference vector matrix, concatenating the texture gradient matrix with the band difference vector matrix, inputting the convolutional neural network model, and extracting features through convolutional layers to obtain a fused feature map includes: A local sliding window is constructed with the pixels in the band difference vector matrix as the center, and the gray-level difference statistics of the pixels within the local sliding window are calculated to generate a texture gradient matrix. The texture gradient matrix and the band difference vector matrix are concatenated along the channel dimension to construct a composite feature tensor; The composite feature tensor is input into a convolutional neural network model, and the joint features of spatial and spectral data are extracted using multi-layer convolutional kernels. Dimensionality reduction mapping is then performed to obtain a fused feature map.

6. The glue quality detection method of glue detection machine of claim 1, wherein, The step of comparing the pixel values ​​of the fused feature map with a preset threshold to generate an anomaly distribution matrix, and performing morphological operations and connected component filtering on the anomaly distribution matrix to obtain preliminary defect markers, includes: The pixel value of each pixel in the fused feature map is compared with a preset colloidal distribution anomaly threshold. Pixels with pixel values ​​greater than the colloidal distribution anomaly threshold are assigned a first label value, and the remaining pixels are assigned a second label value to generate an initial anomaly distribution matrix. Morphological erosion and dilation operations are sequentially performed on the initial anomaly distribution matrix to eliminate noise points and obtain a purified anomaly distribution matrix. Connectivity analysis was performed on the purification anomaly distribution matrix to identify independent abnormal patches; Abnormal patches with pixel areas exceeding the preset minimum defect area are selected, their contour coordinates are extracted and mapped to the original image coordinate system to obtain preliminary defect markings.

7. The glue quality detection method of glue detection machine of claim 1, wherein, The step of cropping candidate defect image patches based on the preliminary defect markings, extracting the reflectance curves and texture feature vectors of the candidate defect image patches, and inputting them into a preset support vector machine classifier to determine the final defect information includes: The preliminary defect markers are mapped back to the multi-band image set, and the corresponding candidate defect image blocks are extracted. The reflectance curve is obtained by calculating the average gray value of the candidate defect image block under different bands, and the texture feature vector is obtained by calculating the gray-level co-occurrence matrix feature of the candidate defect image block. The reflectance curve is concatenated with the texture feature vector to generate a combined feature vector; The combined feature vectors are input into a preset support vector machine classifier to determine the final defect type and location information of the candidate defect image patch.

8. The glue dispensing quality detection method of the glue dispensing detection machine according to claim 7, wherein, After extracting candidate defect image patches based on the preliminary defect markings, extracting the reflectance curves and texture feature vectors of the candidate defect image patches, and inputting them into a preset support vector machine classifier to determine the final defect information, the process further includes: The classification confidence scores corresponding to the final defect information obtained from the detection of multiple consecutive frames of images are statistically analyzed, and the variance of the confidence scores is calculated to obtain a confidence variance sequence. Determine whether the confidence variance sequence exceeds a preset stability interval; If the value exceeds the limit, then calculate the grayscale histogram and local contrast matrix of the image corresponding to the original photoelectric data. Based on the distribution characteristics of the grayscale histogram and the statistical values ​​of the local contrast matrix, the filter kernel size adjustment gradient and gain coefficient correction values ​​are calculated. Median filtering was performed using the adjusted kernel size, and illumination normalization was performed using the corrected gain coefficient to optimize the subsequent acquisition of multispectral images. If the limit is not exceeded, no adjustment is required.

9. A quality detection system of a dispensing detection machine, characterized in that, include: The image acquisition module is used to acquire multispectral images of the dispensing area to obtain raw photoelectric data. Based on the transmission characteristics of the pre-acquired colloidal material, the raw photoelectric data is fused to obtain a multi-band image set containing reflection and absorption characteristics. The image preprocessing module is used to perform median filtering and illumination normalization on the multi-band image set to obtain a corrected image set; The feature extraction module is used to traverse the corrected image set to construct a multidimensional spectral vector, perform principal component analysis to reduce the dimensionality of the multidimensional spectral vector, calculate the projection amplitude of the principal component features after dimensionality reduction, and combine them to obtain a band difference vector matrix that reflects the material properties. The feature fusion module is used to construct a texture gradient matrix based on the band difference vector matrix, concatenate the texture gradient matrix and the band difference vector matrix and input them into a preset convolutional neural network model, and extract features through the convolutional layer to obtain a fused feature map. The preliminary defect labeling module is used to compare the pixel values ​​of the fused feature map with a preset colloidal distribution anomaly threshold, generate an anomaly distribution matrix, and perform morphological operations and connected component filtering on the anomaly distribution matrix to obtain preliminary defect labels. The defect classification and confirmation module is used to extract candidate defect image blocks based on the preliminary defect markings, extract the reflectance curves and texture feature vectors of the candidate defect image blocks, and input them into a preset support vector machine classifier to determine the final defect information.