Automatic detection method for material foreign matter fusing infrared hyperspectral imaging
Patent Information
- Application Number
- CN202611272022.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-21
- Publication Date
- 2026-09-22
AI Technical Summary
当异物与物料背景的外观特征接近、光照条件不理想或异物被物料部分遮挡时,可见光成像无法提供足够区分度的信息,容易出现漏检
[0013] Two-dimensional empirical mode decomposition (EMD) is used to process mixed image data, separating the intrinsic mode function (EMF) components of the material surface layer by layer. This decomposition process relies solely on the local extremum distribution of the image signal itself, without requiring preset basis functions or filter templates. It can adaptively aggregate subtle spatial variations such as high-frequency edges and textures into low-order EMF components based on the inherent scale characteristics of the image. At the interface between foreign objects and materials, spatial radiation intensity often exhibits abrupt gradient changes, and such non-stationary changes are directly reflected in the local energy concentration areas of high-frequency components. Utilizing this characteristic for preliminary foreign object identification can effectively capture boundary disturbances of varying scales and shapes, while the slow grayscale gradients occurring on the material surface along the conveyor direction are mainly retained in the low-frequency components, reducing the interference of background fluctuations on foreign object localization. Low-rank decomposition is performed on the foreign object spectral response matrix formed after sorting along the longitudinal direction of the conveyor belt to separate low-rank background components and sparse anomaly components. Material signals mostly exhibit a continuous, gradual macroscopic trend in the longitudinal direction of the conveyor belt, and this information has a significant low-rank attribute in the matrix. Local spectral anomalies caused by foreign objects only involve a small number of rows and columns in the matrix, appearing as sparse components deviating from the low-rank structure. Through iterative optimization, the spectral response matrix is compressed into the sum of the low-rank and sparse components. The low-rank component captures the overall spectral drift of the material and the conveyor belt background in the conveying direction, while the sparse component retains rare spectral deviations that cannot be explained by the global background. Foreign object discrimination is based on the sparse anomaly components. Even if the foreign object's spectrum is similar to the surrounding material in some bands, as long as its spectral response in the conveying direction does not follow the overall gradual change pattern of the background, it will be classified into the sparse component. This improves the reliability of foreign object detection in complex material movement backgrounds and suppresses false alarms caused by illumination haloing or gradual changes in material thickness.
Smart Images

Figure CN122793751A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of foreign object detection technology, specifically to an automatic foreign object detection method that integrates infrared hyperspectral imaging. Background Technology
[0002] In the production, processing, and transportation of materials, the contamination of foreign objects directly affects material quality. Automated detection of foreign objects helps ensure material purity. Existing foreign object detection methods mostly rely on machine vision to image the material surface in the visible light band, identifying foreign objects through grayscale or color differences. When the appearance of the foreign object is similar to the material background, lighting conditions are unfavorable, or the foreign object is partially obscured by the material, visible light imaging cannot provide sufficient discriminative information, easily leading to missed detections. Some methods utilize radiation differences in a single infrared band for detection, but because they only utilize intensity information from one band, the material properties they can reflect are limited, making it difficult to effectively distinguish foreign objects with similar infrared radiation characteristics. Other methods directly perform pixel-by-pixel spectral matching or classification of hyperspectral image data. However, this approach is prone to misclassifying normal material variations as foreign objects when faced with global lighting changes, material thickness differences, and conveyor belt background fluctuations during material transport, leading to a higher false alarm rate. The technical problem that needs to be solved is how to adaptively capture the high-frequency edge and texture disturbances caused by foreign objects at different spatial scales when extracting information about foreign objects on the material surface, and how to clearly separate the local abnormal spectral response that belongs only to foreign objects when the material spectral background changes slowly along the transport direction. Summary of the Invention
[0003] The technical problem this invention aims to solve is how to accurately extract specific information caused by foreign objects from hyperspectral data that simultaneously contains material background undulations and weak anomalies of foreign objects in infrared hyperspectral imaging detection. Specifically, it addresses how to use adaptive decomposition techniques to mine local anomalous response features related to foreign objects from multi-scale spatial frequency components, avoiding misjudging material textures or lighting gradients as foreign objects; simultaneously, it addresses how to construct a decomposable overall structure from multi-regional spectral features distributed along the transport direction, and how to separate sparse anomalous contributions unrelated to global background changes from this structure, ensuring that foreign object signals are not obscured in complex material movement contexts.
[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides an automatic detection method for foreign objects in materials based on infrared hyperspectral imaging, comprising: acquiring mixed spatial and spectral image data of the material surface using an infrared hyperspectral imager; performing two-dimensional empirical mode decomposition on the mixed image data to extract multi-level intrinsic mode function components, using the high-frequency intrinsic mode function components as preliminary identification information for the presence of foreign objects, thereby highlighting the spectral texture differences between foreign objects and materials; locating candidate foreign object regions in the spatial dimension based on the preliminary identification information, and extracting the corresponding spectral feature sequences of the candidate foreign object regions in the spectral dimension, thereby achieving the fusion of spatial heterogeneity and spectral features; and then... The spectral feature sequence of the foreign object region is sorted according to the material conveying direction to construct a foreign object spectral response matrix distributed longitudinally along the conveyor belt, so that the foreign object information is continuously represented in the conveying direction. The foreign object spectral response matrix is subjected to matrix low-rank decomposition to separate the low-rank background component representing the material background and the sparse anomaly component representing the foreign object response. The sparse anomaly component is used as the foreign object discrimination criterion to enhance the robustness of detection of small foreign objects and foreign objects with strange spectral features. The foreign object position coordinates are determined in the spatial dimension according to the foreign object discrimination criterion, and the position coordinates are mapped to the real-time spatial distribution map of the material conveyor belt to output the foreign object distribution result, realizing automated foreign object positioning and visualization.
[0005] Preferably, the two-dimensional empirical mode decomposition step includes: performing extreme point detection on each frame of spatial image, identifying local maxima and local minima by comparing the gray values of a pixel with its eight neighboring gray values; constructing an upper envelope surface and a lower envelope surface and calculating a mean surface, obtaining intrinsic mode function components that satisfy the stopping criterion through iterative screening; and separating the intrinsic mode function component sequence arranged from high to low frequency from the original signal layer by layer, so that the high-frequency components concentrate on reflecting the local gray-level abrupt changes caused by foreign objects, providing a reliable basis for the subsequent localization of candidate foreign object regions.
[0006] As a technical solution of the present invention, when locating candidate foreign object regions, high-frequency components in the intrinsic mode function component sequence are selected for pixel-level energy calculation. For example, the local energy value is obtained by calculating the sum of the squares of the gray values of each pixel. A spatial neighborhood window is set and the mean local energy value within the window is calculated. Pixels with local energy values exceeding the mean are marked as high-energy response points. Adjacent high-energy response points form a connected region, which serves as the candidate foreign object region. During the spectral dimension extraction process, for each candidate foreign object region, a set of spectral pixels with consistent spatial positions is located in the original mixed image data. The intensity values of each pixel in each band are read along the spectral dimension and arranged and combined to form the spectral feature sequence of the candidate foreign object region, thereby completely characterizing the spectral response characteristics of the foreign object.
[0007] Preferably, when constructing the foreign object spectral response matrix, the real-time movement direction of the material conveyor belt is obtained as the longitudinal direction; the geometric center coordinates of each candidate foreign object region are calculated and arranged in ascending order of their longitudinal coordinate values. The sorted spectral feature sequences are stacked from top to bottom as row vectors to generate a two-dimensional foreign object spectral response matrix in which the row index corresponds to the longitudinal position of the conveyor belt and the column index corresponds to the spectral band number. This organically integrates spatial location information and spectral dimension information, which facilitates subsequent matrix decomposition.
[0008] Furthermore, the low-rank matrix decomposition employs an iterative soft-threshold shrinkage algorithm: taking the foreign object spectral response matrix as input, setting an upper limit for the rank of the low-rank matrix and an upper limit for the non-zero elements of the sparse matrix; alternating between singular value threshold shrinkage updating the low-rank matrix under a fixed sparse matrix and soft-threshold shrinkage updating the sparse matrix under a fixed low-rank matrix during iteration, until the sum of the matrix updates is less than a preset convergence threshold; the final low-rank matrix is the background spectral component matrix, and the sparse matrix is the sparse anomaly component matrix, with the row and column indices of the non-zero elements extracted to form a set of sparse anomaly response locations. This method can adaptively separate the material spectral background from the foreign object anomaly response, significantly suppressing background interference.
[0009] During the foreign object location determination stage, based on the sparse anomaly response location set, each pair of row and column indices is mapped to pixel coordinates in a spatial coordinate system to form a foreign object spatial coordinate set; these coordinates are marked on the corresponding positions of the real-time spatial distribution map of the material conveyor belt to generate marked foreign object distribution results, enabling operators to intuitively grasp the distribution and location of foreign objects.
[0010] As a further implementation, an infrared hyperspectral imager is fixedly installed laterally along the material conveyor belt, with its field of view covering the entire lateral width of the conveyor belt. During the operation of the conveyor belt, the imager continuously acquires spatial dimension image frames at fixed time intervals and simultaneously records the radiation intensity values of each spatial pixel in multiple infrared bands. The spatial dimension image frames and corresponding spectral dimension radiation intensity values at the same acquisition time are aligned according to the spatial pixel positions to generate a three-dimensional hybrid image data block containing the three dimensions of the conveyor belt: lateral, longitudinal, and infrared bands. This ensures full coverage and spatiotemporal consistency of the data, providing high-quality input for subsequent processing.
[0011] The above method extracts high-frequency spatial features caused by foreign objects through two-dimensional empirical mode decomposition, constructs a longitudinal response matrix using spectral feature sequences, and achieves adaptive separation of background and anomalies by low-rank decomposition. Finally, it outputs the location of foreign objects on the spatial distribution map. This not only improves the detection sensitivity of foreign objects with irregular shapes and complex spectral features, but also reduces false detections caused by material texture and lighting changes, realizing online, rapid and automatic detection of foreign objects.
[0012] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0013] Two-dimensional empirical mode decomposition (EMD) is used to process mixed image data, separating the intrinsic mode function (EMF) components of the material surface layer by layer. This decomposition process relies solely on the local extremum distribution of the image signal itself, without requiring preset basis functions or filter templates. It can adaptively aggregate subtle spatial variations such as high-frequency edges and textures into low-order EMF components based on the inherent scale characteristics of the image. At the interface between foreign objects and materials, spatial radiation intensity often exhibits abrupt gradient changes, and such non-stationary changes are directly reflected in the local energy concentration areas of high-frequency components. Utilizing this characteristic for preliminary foreign object identification can effectively capture boundary disturbances of varying scales and shapes, while the slow grayscale gradients occurring on the material surface along the conveyor direction are mainly retained in the low-frequency components, reducing the interference of background fluctuations on foreign object localization. Low-rank decomposition is performed on the foreign object spectral response matrix formed after sorting along the longitudinal direction of the conveyor belt to separate low-rank background components and sparse anomaly components. Material signals mostly exhibit a continuous, gradual macroscopic trend in the longitudinal direction of the conveyor belt, and this information has a significant low-rank attribute in the matrix. Local spectral anomalies caused by foreign objects only involve a small number of rows and columns in the matrix, appearing as sparse components deviating from the low-rank structure. Through iterative optimization, the spectral response matrix is compressed into the sum of the low-rank and sparse components. The low-rank component captures the overall spectral drift of the material and the conveyor belt background in the conveying direction, while the sparse component retains rare spectral deviations that cannot be explained by the global background. Foreign object discrimination is based on the sparse anomaly components. Even if the foreign object's spectrum is similar to the surrounding material in some bands, as long as its spectral response in the conveying direction does not follow the overall gradual change pattern of the background, it will be classified into the sparse component. This improves the reliability of foreign object detection in complex material movement backgrounds and suppresses false alarms caused by illumination haloing or gradual changes in material thickness. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0015] Figure 1 This is a flowchart of an automatic foreign object detection method that integrates infrared hyperspectral imaging;
[0016] Figure 2 This is a flowchart of a method for extracting intrinsic mode function components using two-dimensional empirical mode decomposition.
[0017] Figure 3 This is a schematic diagram of the envelope surface of the two-dimensional signal to be decomposed and its intrinsic mode function components;
[0018] Figure 4 This is a schematic diagram of the local energy values and high-energy response points of the high-frequency intrinsic mode function components;
[0019] Figure 5 These are the curves showing the changes in singular values before and after soft threshold shrinkage treatment;
[0020] Figure 6 It is a spatial distribution map of sparse anomaly response points. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0022] See Figure 1 This invention provides an automatic foreign object detection method for materials based on infrared hyperspectral imaging. The method includes: acquiring mixed spatial and spectral image data of the material surface using an infrared hyperspectral imager; performing two-dimensional empirical mode decomposition on the mixed image data to extract the intrinsic mode function components of the material surface as preliminary identification information of the foreign object; locating candidate foreign object regions in the spatial dimension based on the preliminary identification information, and extracting the spectral feature sequences corresponding to the candidate foreign object regions in the spectral dimension; sorting the spectral feature sequences according to the material conveying direction to construct a foreign object spectral response matrix distributed longitudinally along the conveyor belt; performing low-rank matrix decomposition on the foreign object spectral response matrix to separate low-rank background components and sparse anomaly components, using the sparse anomaly components as the basis for foreign object identification; determining the foreign object location coordinates in the spatial dimension based on the foreign object identification criteria, mapping the location coordinates to a real-time spatial distribution map of the material conveyor belt, and outputting the foreign object distribution result.
[0023] Example 1:
[0024] In specific implementation, please refer to Figure 2 The process of performing two-dimensional empirical mode decomposition on mixed image data to extract the intrinsic mode function components of the material surface as preliminary identification information of the presence of foreign objects is as follows.
[0025] Each frame of the spatial image in the mixed image data is treated as a two-dimensional signal to be decomposed. Extremum detection is performed on the two-dimensional signal to be decomposed to identify local maxima and local minima in the spatial image. At each pixel in the two-dimensional signal to be decomposed, the gray value of the pixel is compared with the gray values of its eight neighboring pixels. If the gray value of the pixel is greater than the gray values of all eight neighboring pixels, the pixel is identified as a local maximum. If the gray value of the pixel is less than the gray values of all eight neighboring pixels, the pixel is identified as a local minimum. This comparison method is used to traverse all pixels in the two-dimensional signal to be decomposed, resulting in the sets of local maxima and local minima.
[0026] In practical implementation, upper and lower envelope surfaces are constructed based on the sets of local maxima and minima, respectively. When constructing the upper envelope surface, the set of local maxima is used as known scattered data, and surface interpolation is employed to generate an upper envelope surface covering the entire two-dimensional signal region to be decomposed. Similarly, when constructing the lower envelope surface, the set of local minima is used as known scattered data, and surface interpolation is employed to generate a lower envelope surface covering the entire two-dimensional signal region to be decomposed. The surface interpolation method can employ cubic spline interpolation based on Delaunay triangulation to achieve smooth surface reconstruction of the scattered data. The mean surfaces of the upper and lower envelope surfaces are calculated, where the value of each pixel in the mean surface is the arithmetic mean of the corresponding pixel values on the upper and lower envelope surfaces.
[0027] In practice, the mean surface is subtracted from the two-dimensional signal to be decomposed to obtain intermediate decomposition results. The processes of extreme point detection, envelope surface construction, and mean surface calculation are repeatedly performed on these intermediate decomposition results, forming an iterative screening process. After each iterative screening, it is determined whether the intermediate decomposition results satisfy the stopping criterion of the intrinsic mode functions. The stopping criterion adopts the standard deviation criterion based on two consecutive screening results, and its calculation expression is:
[0028]
[0029] in, The coefficient of variation represents the standard deviation. This represents the total number of pixels in the row direction of the two-dimensional signal to be decomposed. This represents the total number of pixels in the column direction of the two-dimensional signal to be decomposed. Indicates the row index of the pixel. Represents the column index of the pixel. Indicates the first The intermediate decomposition results obtained from the second screening are The value at the location, Indicates the first The intermediate decomposition results obtained from the second screening are The value at the location. The range of values for is a real number not less than 0. When the value is less than a preset stopping threshold, the intermediate decomposition results satisfy the stopping criterion of the intrinsic mode function. The stopping threshold is set to 0.2, based on the following: When the value is below 0.2, the morphological difference between two consecutive screening results is small enough to ensure the local symmetry of the intrinsic mode function components and avoid over-screening. The intermediate decomposition results that satisfy the stopping criterion are taken as the first-level intrinsic mode function components.
[0030] In practice, after separating the first layer of intrinsic mode function (IMF) components from the two-dimensional signal to be decomposed, the remaining signal is obtained. This remaining signal is then used as a new two-dimensional signal to be decomposed, and the processes of extreme point detection, envelope surface construction, mean surface calculation, and iterative filtering are repeated to sequentially extract the second, third, and subsequent layers of IMF components. The decomposition process terminates when the number of extreme points in the remaining signal is less than two, making it impossible to continue constructing the envelope surface; in this case, the remaining signal is treated as a trend term. The extracted IMF components are then arranged in descending order of frequency, forming an IMF component sequence. The arrangement is based on the fact that the first layer of IMF components contains the highest frequency component, with the frequency components in subsequent layers decreasing progressively.
[0031] See Figure 3 In the figure, the horizontal axis represents the pixel index of the two-dimensional signal to be decomposed, and the vertical axis represents the grayscale value of the corresponding pixel. The black solid line in the figure is the original signal curve, reflecting the grayscale distribution of the material surface in space. The red dashed line and the blue dotted line represent the upper envelope surface profile and the lower envelope surface profile constructed based on the set of local maxima and local minima, respectively. The green dotted line represents the mean surface profile of the upper and lower envelope surfaces, and its value is the arithmetic mean of the grayscale values at corresponding positions on the upper and lower envelope surfaces.
[0032] As can be seen from the figure, the original signal curve exhibits significant fluctuations. The upper envelope surface closely follows the local peaks of the original signal, showing distinct peak characteristics at pixel numbers approximately 150, 250, 350, and 450. The lower envelope surface fluctuates around the local valleys of the original signal. Together, they enclose the original signal curve to form the signal's envelope range. The mean surface, serving as the average of the upper and lower envelope surfaces, smoothly reflects the overall trend of the original signal, with relatively stable numerical changes and no extreme peaks or troughs, situated between the upper and lower envelope surfaces.
[0033] The purple curve in the figure represents the first layer of intrinsic mode function (IMF1) components. Its amplitude is significantly reduced compared to the original signal, and it exhibits multiple high-frequency oscillations. The local peaks and valleys change subtly and frequently, especially showing obvious oscillations in the pixel number range of 300 to 450, indicating that this IMF1 component captures high-frequency components and detailed information from the original signal. The IMF1 curve fluctuates around zero globally, reflecting its local symmetry and zero-mean characteristics.
[0034] Example 2:
[0035] The specific implementation method for locating candidate foreign object regions in the spatial dimension and extracting the corresponding spectral feature sequences of candidate foreign object regions in the spectral dimension based on preliminary identification information is as follows.
[0036] In specific implementation, at least one layer of intrinsic mode function (IMF) components corresponding to the high-frequency band is selected from the IMF component sequence. The IMF component sequence is arranged from high to low frequency, and the at least one layer of IMF components corresponding to the high-frequency band is the first two layers of IMF components in the sequence. Pixel-level energy calculation is performed on each selected layer of IMF components. For each pixel in each layer of IMF components, the gray value of that pixel is obtained, and the square of the gray value is calculated to obtain the squared energy value of that layer of IMF components at that pixel. The squared energy values of the selected at least one layer of IMF components at the same pixel are summed to obtain the total energy value of that pixel. The calculation method of the local energy value of a pixel is expressed as follows:
[0037]
[0038] in, Indicates the row index of the pixel. Column index The local energy value at that location This indicates the total number of layers of the selected high-frequency intrinsic mode function components. The value of is 2. This indicates the layer index number of the selected high-frequency intrinsic mode function components. Indicates the first Layer intrinsic mode function components at pixel point The grayscale value at that location is used as the local energy value of the corresponding pixel. This process is repeated for all pixels to obtain the local energy value distribution of all pixels.
[0039] In the specific implementation, a spatial neighborhood window is set, with a size of 5 pixels × 5 pixels. The 5-pixel × 5-pixel size is chosen to ensure that the window contains a sufficient number of pixels to reflect the local background energy level, while avoiding a smoothing effect on the edges of foreign objects due to an excessively large window. For each pixel, the local energy values of all pixels within the coverage area of the spatial neighborhood window are extracted, centered on that pixel. The arithmetic mean of the local energy values of all pixels within the spatial neighborhood window is calculated and used as the local energy mean of the central pixel. The local energy value of each pixel is compared with its corresponding local energy mean. If the local energy value of a pixel is greater than its corresponding local energy mean, the pixel is marked as a high-energy response point. Four-connected region labeling analysis is performed on all high-energy response points, merging spatially adjacent high-energy response points into the same connected region, and each connected region is positioned as a candidate foreign object region.
[0040] In practical implementation, the set of spectral pixels corresponding to the spatial location of each candidate foreign object region is determined from the original mixed image data acquired by the infrared hyperspectral imager. The original mixed image data is a three-dimensional mixed image data block, containing the horizontal spatial dimension of the conveyor belt, the vertical spatial dimension of the conveyor belt, and the infrared band dimension. Based on the row and column coordinates of each pixel in the candidate foreign object region in the spatial dimension, the spectral intensity values of all infrared bands at the same row and column coordinates are extracted from the original mixed image data. The spectral intensity values of each pixel in the set of spectral pixels are read along the infrared band dimension at each infrared band. The spectral intensity values of all pixels belonging to the same candidate foreign object region are arranged and combined according to the infrared band sequence number to form a spectral feature sequence corresponding to the candidate foreign object region. The arrangement of the spectral feature sequence is as follows: for each infrared band sequence number, the spectral intensity values of all pixels in the candidate foreign object region at that infrared band sequence number are arranged sequentially, and the spectral intensity value groups corresponding to different infrared band sequence numbers are connected end to end in ascending order of infrared band sequence number.
[0041] See Figure 4 In the figure, the horizontal axis represents the pixel column index, ranging from 0 to 510, used to indicate the column position of the pixel in the spatial dimension image; the vertical axis represents the local energy value, a dimensionless squared gray value, with a value range of approximately 0.2 to 2.0. The black solid curve in the figure represents the local energy value distribution curve calculated at each pixel based on the first two high-frequency intrinsic mode function components selected in Example 2; the orange dashed curve represents the local energy mean calculated with a 5-pixel × 5-pixel window, used to reflect the smooth trend of the local background energy level; multiple red triangular markers indicate the high-energy response points where the local energy value is significantly higher than the corresponding local energy mean.
[0042] The curve trend shows that the local energy value curve exhibits periodic fluctuations, with peaks appearing at some pixel column indices. These peaks significantly exceed the average background energy, with the highest peak approaching 2.0, noticeably higher than the average local energy of most areas (approximately 0.5 to 1.0). The red triangle markings corresponding to these peaks indicate high-energy response points, suggesting the potential presence of foreign matter on the material surface at these locations. The local energy value fluctuates stably within the trough range between the peaks and is relatively close to the average local energy curve, indicating that the background energy changes smoothly and the local energy calculation accurately reflects the energy difference between the foreign matter and the background.
[0043] Example 3:
[0044] In practice, the process of sorting the spectral feature sequences according to the material conveying direction and constructing the foreign object spectral response matrix distributed along the longitudinal direction of the conveyor belt is as follows.
[0045] The real-time movement direction of the material conveyor belt within the field of view of an infrared hyperspectral imager is acquired. A rotary encoder is installed on the shaft of the material conveyor belt drive motor, and the rotary encoder outputs orthogonal pulse signals proportional to the conveyor belt displacement. The phase relationship of the orthogonal pulse signals is read by the signal acquisition module to determine the movement direction of the conveyor belt. The direction from the far end to the near end of the infrared hyperspectral imager's field of view is determined as the longitudinal direction of the conveyor belt. The spatial coordinate axis corresponding to the longitudinal direction of the conveyor belt is denoted as the longitudinal coordinate axis.
[0046] In practical implementation, the geometric center coordinates of each candidate foreign object region in the spatial dimension are calculated. For each candidate foreign object region, the set of row coordinate values and the set of column coordinate values of all pixels contained within the candidate foreign object region are obtained. The total number of pixels in the candidate foreign object region is counted, and the arithmetic mean of the row coordinate values of all pixels is calculated to obtain the average row coordinate. The arithmetic mean of the column coordinate values of all pixels is calculated to obtain the average column coordinate. The average row coordinate and the average column coordinate are combined to obtain the geometric center coordinates of the candidate foreign object region. The calculation method of the average row coordinate and the average column coordinate is expressed as follows:
[0047]
[0048] in, Indicates the first Geometric center coordinates of the candidate foreign object regions The index is the sequence number of the candidate foreign object region. Indicates the first The total number of pixels contained within each candidate foreign object region. Indicates the first The index of the number of pixels within the candidate foreign object region. Indicates the first Within the candidate foreign object region, the first The row coordinates of each pixel. Indicates the first Within the candidate foreign object region, the first The column coordinates of each pixel.
[0049] In practice, the longitudinal coordinate value of the geometric center coordinates of each candidate foreign object region is extracted. When the longitudinal direction of the conveyor belt is consistent with the direction of the spatial row coordinate axis, the average value of the row coordinates in the geometric center coordinates is used as the longitudinal coordinate value. All candidate foreign object regions are sorted in ascending order of longitudinal coordinate value. Candidate foreign object regions with smaller longitudinal coordinate values are located upstream of the conveyor belt, and candidate foreign object regions with larger longitudinal coordinate values are located downstream of the conveyor belt.
[0050] In practice, based on the ranking of candidate foreign object regions, the spectral feature sequences corresponding to each region are arranged sequentially. The spectral feature sequence at the top corresponds to the furthest point upstream of the conveyor belt, and the spectral feature sequence at the bottom corresponds to the closest point downstream of the conveyor belt. Each arranged spectral feature sequence is treated as a row vector, and each element in the row vector represents the spectral intensity value arranged by infrared band number within that sequence.
[0051] In practice, all row vectors are stacked sequentially from top to bottom along the longitudinal direction of the conveyor belt to generate a two-dimensional foreign object spectral response matrix. The row indices of the two-dimensional foreign object spectral response matrix correspond to the longitudinal position of the conveyor belt; a row with an index of 1 corresponds to the uppermost position in the longitudinal direction of the conveyor belt, and the maximum row index corresponds to the lowermost position in the longitudinal direction of the conveyor belt. The column indices of the two-dimensional foreign object spectral response matrix correspond to the infrared band numbers; a column with an index of 1 corresponds to the first infrared band, and the maximum column index corresponds to the last infrared band. The position of the foreign object in the two-dimensional foreign object spectral response matrix is... Line 1 The element value of the column is the first The spectral feature sequence of the candidate foreign object region is the first The spectral intensity values of each infrared band.
[0052] Example 4:
[0053] The following is a specific implementation method for performing low-rank matrix decomposition on the spectral response matrix of foreign matter to separate the low-rank background component and the sparse anomalous component, and using the sparse anomalous component as the basis for foreign matter identification.
[0054] In practical implementation, the foreign matter spectral response matrix is used as the input matrix, and the foreign matter spectral response matrix is denoted as... , The number of rows is denoted as , It equals the total number of candidate foreign object areas in the longitudinal direction of the conveyor belt. The number of columns is denoted as , It equals the total number of infrared bands.
[0055] In practice, an upper rank limit is set for the low-rank matrix. This upper rank limit is determined based on the size of the foreign object's spectral response matrix. The calculation method is as follows ,in, It is the rank proportionality coefficient. The range of values for is a real number greater than 0 and not greater than 1. Set to 0.05. Indicates taking and The smaller value in This indicates a floor operation. The rank ratio coefficient is set to 0.05 because the background spectrum of the material surface has a strong correlation in the spectral and spatial dimensions. The number of singular values corresponding to the background information is significantly less than the minimum number of rows and columns of the input matrix. Taking 0.05 times the minimum value can eliminate the interference of noise fluctuations on low-rank components while retaining the main background information.
[0056] In practice, an upper limit is set for the number of non-zero elements in the sparse matrix. The calculation method is as follows ,in, This is the sparsity ratio coefficient. The range of values for is a real number greater than 0 and not greater than 1. Set to 0.1. This represents the total number of elements in the input matrix. The sparsity ratio coefficient is set to 0.1 because foreign objects are a low-probability event in the longitudinal distribution of the conveyor belt, and the spectral response of foreign objects accounts for no more than 10% of the overall matrix. Setting this upper limit can prevent the sparse matrix from capturing too many background spectral fluctuation components.
[0057] In practice, the input matrix is decomposed into low-rank and sparse components using an iterative soft-thresholding shrinkage algorithm. The low-rank matrix is initialized to zero, and the sparse matrix is also initialized to zero. The soft-thresholding shrinkage coefficient is then set. , The value is ,in, Indicates taking and The larger value in the equation is set so that the sparsity penalty strength is inversely proportional to the square root of the dimension of the input matrix, thereby balancing the separation strength between low-rank components and sparse components.
[0058] In practice, an iterative decomposition process is executed. A single iteration consists of two steps: fixing the current sparse matrix and updating the low-rank matrix, and fixing the current low-rank matrix and updating the sparse matrix. In the... In the next iteration, first fix the first... The sparse matrix obtained in the second iteration Calculate the first residual matrix For the first residual matrix Perform singular value decomposition to obtain ,in, It is a left singular vector matrix. It is a right singular vector matrix. The diagonal elements are singular values diagonal matrix, This represents the total number of singular values. For a singular value diagonal matrix... Perform singular value thresholding shrinkage and construct the shrunken diagonal matrix. , diagonal elements Depend on Give, This is the singular value index. Preserve the shrunken diagonal matrix. The largest From the non-zero singular values and their corresponding left and right singular vectors, a low-rank matrix is reconstructed. ,in, To contain the largest A diagonal matrix with singular values and For the corresponding truncated left singular vector matrix and truncated right singular vector matrix. If the number of non-zero singular values is insufficient after contraction. If there are 1, then all non-zero singular values and their corresponding singular vectors are retained for reconstruction.
[0059] In practice, after updating the low-rank matrix, the current low-rank matrix is fixed. Calculate the second residual matrix For the second residual matrix Applying a soft threshold shrinkage operation yields a sparse matrix. The soft-threshold shrinkage operation is applied element-wise to the second residual matrix. Its mathematical expression is:
[0060]
[0061] in, Indicates the first The sparse matrix obtained in the second iteration The Middle Line 1 The element values of the column, This is the row index, and its value range is... arrive , For column indexes, the value range is... arrive ; Represents the second residual matrix The Middle Line 1 The element values of the column; This represents a sign function that outputs a positive value when the input is positive. Output when input is zero When the input is negative, the output is... ; This indicates that the larger of the two input values is selected. This represents the soft threshold shrinkage coefficient. For sparse matrices... After all elements have been calculated, the sparse matrix is statistically analyzed. The number of non-zero elements in the text is limited if it exceeds the upper limit for the number of non-zero elements. Then, set the smallest absolute value among the non-zero elements to zero, making the number of non-zero elements equal to the number of non-zero elements. The zeroing operation involves selecting corresponding elements from the sparse matrix in ascending order of absolute value and setting their values to zero.
[0062] In practice, the sum of the update amounts of the low-rank matrix and the sparse matrix is calculated. The calculation method is as follows ,in, Let represent the Frobenius norm of the matrix. When Less than the preset convergence threshold Stop iteration when the convergence threshold is reached. Set as The design is based on the principle of avoiding insufficient separation between low-rank and sparse components due to premature stopping of iteration, and also preventing excessive computational resource consumption caused by too many iterations. The low-rank matrix at the point of stopping iteration is... As the background spectral component matrix, the sparse matrix at the stopping iteration As a sparse outlier component matrix.
[0063] In practice, in the sparse anomaly component matrix, all elements are traversed element by element, and the row and column indices of all non-zero elements are marked. Each row and column index of a non-zero element is paired, and all pairs constitute the set of sparse anomaly response locations.
[0064] See Figure 5The graph shows the singular value sequence on the horizontal axis and the singular value magnitude on the vertical axis, displayed on a logarithmic scale. The solid black line represents the original singular value sequence of the input foreign object spectral response matrix, the dashed red line represents the singular value sequence after soft-thresholding, and the horizontal blue dashed line represents the set soft-thresholding coefficient λ. The original singular value sequence shows a gradual decreasing trend, with a more significant decrease in the first 25 singular values. As the sequence number increases, the singular values gradually approach zero, indicating that the background spectral information in the longitudinal space and infrared band dimensions of the conveyor belt is mainly concentrated in the fewer singular values at the front end. The soft-thresholding coefficient λ is approximately 0.14 on the vertical axis. After shrinkage, the first few singular values in the sequence remain at relatively high values; only the first 10 singular values are not completely shrunk to zero. Subsequent singular values rapidly decay to zero, demonstrating that soft-thresholding shrinkage preserves low-rank background components and suppresses noise and anomalous components.
[0065] Example 5:
[0066] In practical implementation, the process of acquiring mixed spatial and spectral image data of the material surface using an infrared hyperspectral imager is as follows: The infrared hyperspectral imager is fixedly installed along the transverse direction of the material conveyor belt. The installation height and pitch angle of the infrared hyperspectral imager are adjusted so that the field of view of the infrared hyperspectral imager covers the entire transverse width of the conveyor belt. The field of view extends beyond the edge of the conveyor belt by a preset margin at both ends in the transverse direction to ensure that the material remains within the field of view when it swings laterally. The optical axis of the infrared hyperspectral imager is parallel to the normal direction of the material conveyor belt's bearing surface to reduce geometric distortion during the spectral radiation measurement process.
[0067] In practical implementation, during the operation of the material conveyor belt, an infrared hyperspectral imager is triggered to continuously acquire spatial 3D image frames of the material surface at fixed time intervals. The trigger signal is generated by the encoder signal of the material conveyor belt. The encoder of the material conveyor belt outputs a pulse for each fixed displacement increment. Upon receiving the pulse, the control unit of the infrared hyperspectral imager triggers an acquisition, thereby ensuring that the continuously acquired spatial 3D image frames have a uniform spatial sampling interval in the longitudinal direction of the conveyor belt. During each acquisition, the grating spectrometer and area array detector inside the infrared hyperspectral imager work together to simultaneously record the radiation intensity values of each spatial pixel in multiple infrared bands. The range of infrared bands covers the mid-wave infrared range of 3 to 5 micrometers or the long-wave infrared range of 8 to 14 micrometers. The total number of infrared bands is determined by the spectral resolution of the infrared hyperspectral imager, typically ranging from tens to hundreds of bands.
[0068] In practice, spatial image frames acquired at the same time are aligned with their corresponding spectral radiant intensity values according to their spatial pixel positions to generate a three-dimensional hybrid image data block. Each pixel position of the spatial image frame corresponds to a set of spectral radiant intensity values. The spectral radiant intensity values at the same pixel position are arranged along the newly added third dimension to obtain the three-dimensional hybrid image data block. The two spatial dimensions of the three-dimensional hybrid image data block correspond to the horizontal and vertical directions of the conveyor belt, and the third dimension corresponds to the infrared band. Each voxel in the three-dimensional hybrid image data block can be used... It means that, among them, For the pixel index in the lateral direction of the conveyor belt, The value range is from 1 to , This represents the total number of pixels in the horizontal direction of the conveyor belt. For the vertical pixel index of the conveyor belt, The value range is from 1 to , This represents the total number of pixels along the longitudinal direction of the conveyor belt. For infrared band indexing, The value range is from 1 to , Total number of infrared bands. 3D hybrid image data block. The value represents the lateral position of the conveyor belt. Longitudinal position of conveyor belt At, in the The radiation intensity values of each infrared band.
[0069] In practice, following the sparse anomaly response location set obtained in the previous steps, each row index and column index in the sparse anomaly response location set is paired to obtain anomaly response point coordinate pairs. In the sparse anomaly response location set, a row index and its associated column index together constitute an anomaly response point coordinate pair. Each anomaly response point coordinate pair corresponds to a combination of an infrared band position and a longitudinal position of the conveyor belt. The value of the row index corresponds to the longitudinal sequence number of the candidate foreign object region in the two-dimensional foreign object spectral response matrix, and the value of the column index corresponds to the infrared band sequence number.
[0070] In practice, the coordinate pairs of abnormal response points are mapped back to the spatial coordinate system of the original mixed image data. For each abnormal response point coordinate pair, the corresponding candidate foreign object region is determined based on the row index of the abnormal response point coordinate pair. By querying the correspondence table between candidate foreign object regions and row indices, the set of spatial pixels of the candidate foreign object region in the original mixed image data is retrieved. Each pixel in the set of spatial pixels is identified by its row coordinate value and column coordinate value. The row coordinate value corresponds to the spatial position in the longitudinal direction of the conveyor belt, and the column coordinate value corresponds to the spatial position in the transverse direction of the conveyor belt. The spatial coordinates of all pixels in the retrieved set of spatial pixels are used as the spatial coordinates of the pixel corresponding to the abnormal response point coordinate pair. All abnormal response point coordinate pairs in the set of abnormal response points are traversed, and the union of the pixel spatial coordinates obtained from each pair is taken to form the foreign object spatial coordinate set. The formation process of the foreign object spatial coordinate set is described by the following expression:
[0071]
[0072] in, Let P represent the set of spatial coordinates of the foreign object, and let P represent the set of sparse anomaly response locations. P consists of multiple sets of coordinates of the form ... Composed of ordered pairs, This represents a row index in P. Indicates the row index in P A corresponding column index, This represents a pair of coordinates for an abnormal response point. Representation and row index The corresponding set of pixel coordinates of the candidate foreign object region in the spatial coordinate system of the original mixed image data. This indicates the set union operation. The acquisition method is as follows: During the candidate foreign object region localization stage, the mapping relationship between each candidate foreign object region and the list of spatial coordinates of the pixels it contains has been stored, and the coordinates are obtained according to the row index. Read the corresponding list of pixel coordinates directly.
[0073] In practice, each coordinate in the foreign object spatial coordinate set is marked at its corresponding position on the real-time spatial distribution map of the material conveyor belt. The real-time spatial distribution map of the material conveyor belt is a two-dimensional image with a one-to-one correspondence between the spatial coordinates of the original mixed image data. Each pixel position in the real-time spatial distribution map represents a physical area of a fixed size on the material conveyor belt. For each spatial coordinate in the foreign object spatial coordinate set, the pixel value at the corresponding position in the real-time spatial distribution map is set to a preset foreign object identification value. The foreign object identification value uses a grayscale value that differs from the background display, for example, a maximum grayscale value of 255. After all foreign object spatial coordinates are marked, the real-time spatial distribution map with foreign object identification is output as the foreign object distribution result. The output methods include sending the foreign object distribution result to a host computer display interface for visualization, or transmitting it to the subsequent sorting control system via a digital signal interface.
[0074] See Figure 6 The figure illustrates the distribution of sparse anomaly response points obtained according to the method described in Example 5 within the two-dimensional foreign object spectral response matrix. The horizontal axis represents the infrared band index, ranging from approximately 0 to 200, reflecting the sequence of up to 200 infrared bands acquired by the infrared hyperspectral imager; the vertical axis represents the conveyor belt longitudinal index, ranging from approximately 0 to 50, representing the position index of the candidate foreign object region in the longitudinal direction of the conveyor belt. The sparse anomaly response points marked with red scatter dots in the figure reflect the anomalous spectral response positions corresponding to the sparse anomaly components extracted from the foreign object spectral response matrix using the low-rank matrix decomposition method.
[0075] The sparse anomaly response points are distributed across the entire infrared band sequence and the longitudinal index of the conveyor belt, exhibiting a scattered distribution without significant clustering, consistent with the sparsity and low-probability event settings of the sparse anomaly components in this embodiment. The uniform distribution of response points along the longitudinal direction of the conveyor belt indicates that the spatial location of the foreign object on the conveyor belt is dispersed, with no large-area continuous anomaly, reflecting the spatial resolution capability of foreign object detection. The distribution along the infrared band sequence reveals the anomalous response characteristics of the foreign object in the multi-band spectrum, supporting subsequent foreign object discrimination based on the spectral dimension.
[0076] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. An automatic detection method for foreign objects in materials integrating infrared hyperspectral imaging, characterized in that, include: Based on the acquisition of mixed spatial and spectral image data of the material surface using an infrared hyperspectral imager; By performing two-dimensional empirical mode decomposition on the hybrid image data, the intrinsic mode function components of the material surface are extracted as preliminary identification information of the presence of foreign objects; Based on the preliminary identification information, the candidate foreign object region is located in the spatial dimension, and the spectral feature sequence corresponding to the candidate foreign object region is extracted in the spectral dimension. The spectral feature sequences are sorted according to the material conveying direction to construct a foreign matter spectral response matrix distributed along the longitudinal direction of the conveyor belt; Perform low-rank matrix decomposition on the foreign object spectral response matrix to separate the low-rank background component and the sparse anomaly component, and use the sparse anomaly component as the basis for foreign object identification. Based on the foreign object identification criteria, the coordinates of the foreign object's location are determined in the spatial dimension, and the coordinates are mapped to the real-time spatial distribution map of the material conveyor belt, outputting the foreign object distribution result.
2. The automatic foreign object detection method for materials based on fusion infrared hyperspectral imaging according to claim 1, characterized in that, The specific steps for extracting the intrinsic mode function components of the material surface as preliminary identification information of foreign matter by performing two-dimensional empirical mode decomposition on the hybrid image data are as follows: Each frame of spatial image in the mixed image data is taken as a two-dimensional signal to be decomposed. Extreme point detection is performed on the two-dimensional signal to be decomposed to identify local maxima and local minima in the spatial image. Based on the local maxima and local minima, an upper envelope surface and a lower envelope surface are constructed respectively, and the mean surfaces of the upper envelope surface and the lower envelope surface are calculated. Subtract the mean surface from the two-dimensional signal to be decomposed to obtain intermediate decomposition results. Repeat the process of extreme point detection, envelope surface construction and mean surface calculation until the intermediate decomposition results meet the stopping criteria of the intrinsic mode functions. The intermediate decomposition results that meet the stopping criteria are taken as the first layer of intrinsic mode function components. After separating the first layer of intrinsic mode function components from the two-dimensional signal to be decomposed, the above decomposition steps are repeated for the remaining signal to extract multiple layers of intrinsic mode function components in sequence. The extracted intrinsic mode function components are arranged in descending order of frequency to form an intrinsic mode function component sequence.
3. The automatic foreign object detection method for materials based on fused infrared hyperspectral imaging according to claim 2, characterized in that, The specific steps for locating candidate foreign object regions in the spatial dimension and extracting the corresponding spectral feature sequences of the candidate foreign object regions in the spectral dimension based on the preliminary identification information are as follows: In the intrinsic mode function component sequence, at least one layer of intrinsic mode function components corresponding to the high-frequency band is selected, and pixel-level energy calculation is performed on the at least one layer of intrinsic mode function components to obtain the local energy value of each pixel. A spatial neighborhood window is set, the local energy mean within the spatial neighborhood window is calculated, and pixels whose local energy values exceed the local energy mean are marked as high-energy response points. Adjacent high-energy response points form a connected region, and the connected region is located as a candidate foreign object region. In the raw mixed image data acquired by the infrared hyperspectral imager, a set of spectral pixels that corresponds to the spatial location of the candidate foreign object region is located. The spectral intensity value of each pixel in the set of spectral pixels is read along the spectral dimension at each band. The spectral intensity values of all pixels in the same candidate foreign object region are arranged and combined in band order to form a spectral feature sequence corresponding to the candidate foreign object region.
4. The automatic foreign object detection method for materials based on fused infrared hyperspectral imaging according to claim 3, characterized in that, The specific steps for sorting the spectral feature sequences according to the material conveying direction and constructing the foreign matter spectral response matrix distributed along the longitudinal direction of the conveyor belt are as follows: The real-time motion direction of the material conveyor belt within the field of view of the infrared hyperspectral imager is obtained, and the real-time motion direction is determined as the longitudinal direction of the conveyor belt. According to the geometric center coordinates of each candidate foreign object region in the spatial dimension, the spectral feature sequences of all candidate foreign object regions are arranged sequentially along the longitudinal direction of the conveyor belt, and each arranged spectral feature sequence is taken as a row vector. All row vectors are stacked sequentially from top to bottom along the longitudinal direction of the conveyor belt to generate a two-dimensional foreign object spectral response matrix, wherein the row index of the two-dimensional foreign object spectral response matrix corresponds to the longitudinal position of the conveyor belt, and the column index corresponds to the spectral band number.
5. The automatic foreign object detection method for materials based on fused infrared hyperspectral imaging according to claim 4, characterized in that, The specific steps for performing low-rank matrix decomposition on the foreign object's spectral response matrix to separate the low-rank background component and the sparse anomaly component, and using the sparse anomaly component as the basis for foreign object identification, are as follows: Using the foreign matter spectral response matrix as the input matrix, set the upper limit of the rank of the low-rank matrix and the upper limit of the number of non-zero elements in the sparse matrix; The input matrix is decomposed into low-rank and sparse components by an iterative soft threshold shrinkage algorithm. In each iteration, the current sparse matrix is fixed and the low-rank matrix is updated by singular value threshold shrinkage. Then, the current low-rank matrix is fixed and the sparse matrix is updated by soft threshold shrinkage. Repeat the operation of fixing the current sparse matrix to perform singular value threshold shrinkage update on the low-rank matrix, and fixing the current low-rank matrix to perform soft threshold shrinkage update on the sparse matrix, until the sum of the update amounts of the low-rank matrix and the sparse matrix is less than the preset convergence threshold, then end the iteration, and use the low-rank matrix obtained in the final iteration as the background spectral component matrix, and use the sparse matrix obtained in the final iteration as the sparse anomaly component matrix. In the sparse anomaly component matrix, the row index and column index corresponding to the non-zero elements are extracted, and the row index and column index are combined to form a set of sparse anomaly response locations.
6. The automatic foreign object detection method for materials based on fused infrared hyperspectral imaging according to claim 5, characterized in that, The specific steps for determining the location coordinates of the foreign object in the spatial dimension based on the foreign object identification criteria, mapping the location coordinates to the real-time spatial distribution map of the material conveyor belt, and outputting the foreign object distribution result are as follows: Pair each row index and column index in the sparse anomaly response location set to obtain anomaly response point coordinate pairs. Each anomaly response point coordinate pair corresponds to a combination of a spectral band position and a longitudinal position of a conveyor belt. The abnormal response point coordinates are mapped back to the spatial coordinate system of the original mixed image data. The spatial coordinates of the pixels corresponding to the abnormal response point coordinates are determined in the spatial coordinate system. The spatial coordinates of all the pixels constitute the foreign object spatial coordinate set. Each coordinate in the set of foreign object spatial coordinates is marked at the corresponding position on the real-time spatial distribution map of the material conveyor belt, and the marked real-time spatial distribution map is output as the foreign object distribution result.
7. The automatic foreign object detection method for materials based on fused infrared hyperspectral imaging according to claim 1, characterized in that, The specific steps for acquiring mixed spatial and spectral image data of the material surface using an infrared hyperspectral imager are as follows: The infrared hyperspectral imager is fixedly installed along the transverse direction of the material conveyor belt, and the field of view of the infrared hyperspectral imager covers the entire transverse width of the conveyor belt. During the operation of the material conveyor belt, the infrared hyperspectral imager is triggered to continuously acquire spatial 3D image frames of the material surface at fixed time intervals. During each acquisition, the infrared hyperspectral imager simultaneously records the radiation intensity values of each spatial pixel in multiple infrared bands. By aligning the spatial dimension image frames and corresponding spectral dimension radiation intensity values at the same acquisition time according to their spatial pixel positions, a three-dimensional hybrid image data block is generated. The two spatial dimensions of the three-dimensional hybrid image data block correspond to the horizontal and vertical directions of the conveyor belt, and the third dimension corresponds to the infrared band.
8. The automatic foreign object detection method for materials based on fusion infrared hyperspectral imaging according to claim 2, characterized in that, The specific steps for extreme point detection are as follows: At each pixel of the two-dimensional signal to be decomposed, the gray value of the pixel is compared with the gray values of its eight neighboring pixels. If the gray value of a pixel is greater than the gray values of all eight neighboring pixels, then the pixel is determined to be a local maximum. If the gray value of a pixel is less than the gray values of all eight neighboring pixels, then the pixel is determined to be a local minimum. By traversing all pixels of the two-dimensional signal to be decomposed, we obtain the set of local maxima and the set of local minima.
9. The automatic detection method for foreign objects in materials based on fusion infrared hyperspectral imaging according to claim 3, characterized in that, The specific steps for performing pixel-level energy calculations on the at least one layer of intrinsic mode function components to obtain the local energy value of each pixel are as follows: Each component in the at least one layer of intrinsic mode function components is selected, and the square of the gray value of each pixel in each layer component is taken to obtain the square energy value of each pixel in that layer component. The total energy value of the pixel is obtained by summing the squared energy values of the at least one layer of intrinsic mode function components at the same pixel. The total energy value is used as the local energy value of the pixel. By traversing all pixels, the local energy value distribution of all pixels is obtained.
10. The automatic detection method for foreign objects in materials based on fusion infrared hyperspectral imaging according to claim 4, characterized in that, The specific steps for sequentially arranging the spectral feature sequences of all candidate foreign object regions along the longitudinal direction of the conveyor belt according to the geometric center coordinates of each candidate foreign object region in the spatial dimension are as follows: Calculate the average row coordinates and average column coordinates of all pixels in the spatial dimension for each candidate foreign object region, and combine the average row coordinates and average column coordinates to obtain the geometric center coordinates of the candidate foreign object region; Extract the vertical coordinate value from the geometric center coordinates of each candidate foreign object region, and sort all candidate foreign object regions in ascending order of the vertical coordinate value; The spectral feature sequences corresponding to the sorted candidate foreign object regions are arranged sequentially, with the first sorted spectral feature sequence corresponding to the upstream position of the conveyor belt and the last sorted spectral feature sequence corresponding to the downstream position of the conveyor belt.