Snapshot hyperspectral imaging industrial online sorting system
Patent Information
- Application Number
- CN202610947883.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-29
- Publication Date
- 2026-09-22
AI Technical Summary
[0006]本发明的目的在于提供一种基于快照式高光谱成像的工业在线分选系统及方法,以解决现有技术中高光谱成像系统实时性不足、机械扫描依赖性较强以及高速在线检测适配能力有限的问题
本发明中提供了一种快照式高光谱成像工业在线分选系统,通过采用快照式高光谱成像设备与数据处理与控制单元联动,单次曝光同步获取被测物体包含空间信息与光谱信息的编码图像并重建高光谱数据的技术特征,无需机械扫描即可完成全视场高光谱信息采集,避免运动导致的空间错位与帧间模糊,直接实现高光谱数据的高速实时采集,保证成像信息与被测物体实际状态的时序一致性;相较于扫描式高光谱成像系统,大幅降低对复杂运动同步控制的依赖,解决高速输送场景下成像质量与采集速度难以兼顾的核心矛盾,进一步为工业连续生产线在线检测提供稳定数据基础,适配更高通量的生产分选需求。
Smart Images

Figure CN122787203A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of industrial automation online inspection and intelligent sorting, and in particular to a snapshot-type hyperspectral imaging industrial online sorting system. Background Technology
[0002] With the continuous improvement of industrial automation and intelligent manufacturing, the production process places higher demands on the real-time performance and accuracy of product quality inspection. Traditional inspection methods mainly include manual inspection and point-based sensor inspection. Manual inspection relies on the operator's experience and suffers from problems such as strong subjectivity, insufficient repeatability, and low inspection efficiency, which cannot effectively meet the online inspection needs of high-speed production lines. Although point-based sensors have high detection accuracy, their spatial sampling range is limited, and they can only acquire local information, which can easily lead to incomplete information when dealing with heterogeneous or complex materials.
[0003] To enhance the completeness and analytical capabilities of detection information, spectral imaging technology is increasingly being applied in industrial inspection. This technology integrates spatial imaging and spectral analysis capabilities, enabling the construction of hyperspectral data containing both spatial and spectral dimensions. This data allows for multi-dimensional feature analysis of the object being tested, finding wide application in fields such as plastic sorting, agricultural product quality inspection, and mineral identification.
[0004] Existing spectral imaging systems mainly include snapshot multispectral imaging systems and scanning hyperspectral imaging systems. Snapshot multispectral systems have advantages such as fast imaging speed and compact structure, but their spectral resolution is limited. Scanning hyperspectral systems can acquire continuous spectral information and have high spectral resolution, but they usually rely on mechanical scanning to achieve spatial dimension sampling, which requires high synchronization control in high-speed motion scenarios.
[0005] Therefore, in order to address the shortcomings of the above-mentioned problems, a snapshot-type hyperspectral imaging industrial online sorting system is proposed. Summary of the Invention
[0006] The purpose of this invention is to provide an industrial online sorting system and method based on snapshot hyperspectral imaging, so as to solve the problems of insufficient real-time performance, strong dependence on mechanical scanning, and limited adaptability to high-speed online detection in existing hyperspectral imaging systems.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: An industrial online sorting system based on snapshot hyperspectral imaging includes a support structure, an optical imaging unit disposed on the support structure, a conveying mechanism, and a data processing and control unit. The supporting structure includes a base plate, an adjustable bracket, and a fixed bracket. The optical imaging unit includes an illumination assembly, an imaging lens, and a snapshot hyperspectral imaging device. The conveying mechanism includes a transmission platform and a drive unit. The drive unit is used to drive the transmission platform to run continuously so that the object under test passes through the imaging area at a stable speed. The snapshot hyperspectral imaging device is electrically connected to the data processing and control unit, and is used to acquire an encoded image containing spatial and spectral information during a single exposure. The data processing and control unit is used to reconstruct the coded image to obtain hyperspectral data, and to perform feature extraction and classification based on the hyperspectral data to generate a sorting control signal to control the conveying mechanism to perform sorting operations.
[0008] In a preferred embodiment of the present invention, the lighting component includes a broadband light source, which is a halogen lamp or a continuous spectrum light source. The lighting component is symmetrically arranged on both sides of the snapshot hyperspectral imaging device to provide a uniform and stable lighting environment.
[0009] In a preferred embodiment of the present invention, the imaging lens is mounted on the imaging end of a snapshot hyperspectral imaging device and a replaceable connection structure is adopted between the snapshot hyperspectral imaging device to adapt to the band range or imaging resolution requirements under different detection scenarios.
[0010] In a preferred embodiment of the present invention, the snapshot hyperspectral imaging device is a visible light band snapshot hyperspectral imaging device.
[0011] In a preferred embodiment of the present invention, the data processing and control unit includes an image preprocessing module and a spectral feature analysis module, used to preprocess, extract features, and classify the acquired hyperspectral data.
[0012] The present invention also provides an industrial online sorting method based on the above system, comprising the following steps: S1: The object to be measured is transported to the imaging area via a conveying mechanism; S2: Illuminate the object under test using an illumination component; S3: Use a snapshot hyperspectral imaging device to acquire encoded images containing spatial and spectral information; S4: Reconstruct the coded image to obtain hyperspectral data; S5: Preprocessing, spectral feature extraction, and classification of hyperspectral data; S6: Generate a sorting control signal based on the classification and recognition results, and control the conveying mechanism to complete the automatic sorting of the target objects.
[0013] In a preferred embodiment of the present invention, in S3, the snapshot hyperspectral imaging device simultaneously acquires the two-dimensional spatial information and continuous band spectral information of the object under test during a single exposure.
[0014] Furthermore, the system is calibrated using a standard whiteboard before acquiring hyperspectral data to reduce the impact of ambient light and background noise on the imaging results.
[0015] In a preferred embodiment of the present invention, in S5, spectral response data covering the visible to near-infrared band range is constructed based on the acquired spectral information, and a spectral characteristic curve for characterizing the object under test is formed.
[0016] In a preferred embodiment of the present invention, in S6, the conveying direction of the conveying mechanism is controlled according to the sorting control signal to realize the automatic sorting of the target objects.
[0017] This invention addresses the shortcomings of the prior art and has the following beneficial effects: This invention provides a snapshot-type hyperspectral imaging industrial online sorting system. By linking a snapshot-type hyperspectral imaging device with a data processing and control unit, it acquires coded images containing spatial and spectral information of the object under test in a single exposure and reconstructs the hyperspectral data. This technology can complete the acquisition of hyperspectral information across the entire field of view without mechanical scanning, avoiding spatial misalignment and inter-frame blurring caused by motion. It directly achieves high-speed real-time acquisition of hyperspectral data, ensuring the temporal consistency between imaging information and the actual state of the object under test. Compared with scanning hyperspectral imaging systems, it significantly reduces the dependence on complex motion synchronization control, solves the core contradiction of balancing imaging quality and acquisition speed in high-speed transportation scenarios, and further provides a stable data foundation for online inspection of continuous industrial production lines, adapting to higher throughput production sorting needs.
[0018] This invention provides a snapshot-type hyperspectral imaging industrial online sorting system. By employing broadband illumination components symmetrically arranged on both sides of the snapshot-type hyperspectral imaging device, and combining white field and dark field reflectance correction techniques, it uniformly illuminates the imaging area from multiple angles, eliminating shadows caused by surface undulations, edge occlusion, and tilting of the object being measured. It avoids specular reflection overexposure caused by unilateral illumination, while also eliminating interference from ambient light fluctuations and inherent equipment noise. This system directly allows the spectral data to accurately reflect the spectral response characteristics of the object being measured, improving the stability and distinguishability of spectral features. Compared to systems with unilateral illumination or without standardized correction, it significantly reduces the impact of illumination and shape differences on the identification results, further reducing sorting errors and omissions, and ensuring stable output of industrial production product quality.
[0019] This invention provides a snapshot-type hyperspectral imaging industrial online sorting system. By deeply integrating a stable and continuous conveying mechanism, a snapshot-type hyperspectral imaging unit, and a sorting control module based on target motion timing, the conveying mechanism provides stable and controllable material movement conditions, the imaging unit rapidly acquires multi-dimensional information, and the sorting control module accurately calculates the target arrival time, achieving precise matching between the detection results and the spatial position of the sorting action. It directly constructs a closed-loop online sorting system from material conveying and multi-dimensional detection to automatic diversion, ensuring seamless timing connections between each stage. Compared to manual and point-measurement sensor detection, it combines information integrity with automation, further comprehensively improving the efficiency and accuracy of industrial online sorting, and adapting to the high-speed continuous sorting needs of various materials. Attached Figure Description
[0020] The present invention will be further described below with reference to the accompanying drawings and embodiments; Figure 1 This is a schematic flowchart of a preferred embodiment of the snapshot-type hyperspectral imaging industrial online sorting method of the present invention; Figure 2 This is a schematic flowchart illustrating the steps of acquiring and encoding images according to a preferred embodiment of the present invention; Figure 3 This is a schematic flowchart illustrating the steps of illuminating the object under test using the lighting assembly according to a preferred embodiment of the present invention. Detailed Implementation
[0021] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. These drawings are simplified schematic diagrams, which are only used to illustrate the basic structure of the present invention and therefore only show the components relevant to the present invention.
[0022] This invention is applicable to online detection and automatic sorting scenarios in industrial continuous production lines, especially suitable for objects such as plastics, agricultural products, minerals, granular materials, flake materials, or block materials that need to be identified and sorted based on differences in surface spectral density. These objects typically exhibit continuous movement speed, random spatial position, inconsistent surface morphology, and subtle differences in reflectance spectra during transport. Using traditional manual detection or point-based sensors can easily lead to low detection efficiency, incomplete detection areas, and difficulty in adapting to high-speed production lines. If a scanning hyperspectral imaging method is used, it usually requires mechanical scanning or motion synchronization control, which is easily affected by motion blur, inter-frame misalignment, illumination fluctuations and processing delays in high-speed online sorting scenarios.
[0023] The basic inventive concept of this invention is to integrate a snapshot hyperspectral imaging device with a continuous conveying mechanism, a broadband illumination component, and a data processing and control unit into an online sorting system, so that when the object being tested passes through the imaging area, its two-dimensional spatial information and continuous band spectral information can be obtained simultaneously in a single exposure. Subsequently, through coded image reconstruction, hyperspectral data preprocessing, spectral feature extraction, and classification recognition, a sorting control signal is generated to control the conveying mechanism to perform sorting actions. Thus, the present invention can achieve the timing connection between hyperspectral detection and online sorting without relying on mechanical scanning.
[0024] It should be noted that applying snapshot hyperspectral imaging directly to industrial online sorting is not simply a matter of replacing the imaging equipment.
[0025] Snapshot hyperspectral imaging encodes spatial and spectral information into the same image in a single exposure. While this avoids the mechanical scanning process of scanning systems, it faces the following objective constraints in industrial continuous transport scenarios: If the object being measured is in motion, an excessively long exposure time will introduce motion blur, while an excessively short exposure time will lead to a decrease in the spectral signal-to-noise ratio. Differences in the height, shape, and reflectivity of material surfaces can easily lead to localized overexposure, underexposure, or shadows. Encoded images need to be reconstructed and classified. If the processing delay is too large, the sorting control signal cannot be timely matched to the position of the target object. Industrial production lines typically require both high throughput and low error rate. However, hyperspectral data has high dimensionality, and performing full-spectrum pixel-by-pixel analysis directly would significantly increase the computational burden.
[0026] To address this issue, this invention solves the problem of adapting snapshot hyperspectral imaging to industrial online sorting by employing stable delivery, symmetrical broadband illumination, single-exposure encoded acquisition, hyperspectral reconstruction based on the correction matrix, spectral feature extraction oriented towards sorting targets, and sorting control based on target arrival time. like Figure 1 As shown, a snapshot-type hyperspectral imaging industrial online sorting method includes the following steps: S1: The object to be measured is transported to the imaging area via a conveying mechanism; S2: Illuminate the object under test using an illumination component; S3: Use a snapshot hyperspectral imaging device to acquire encoded images containing spatial and spectral information; S4: Reconstruct the coded image to obtain hyperspectral data; S5: Preprocessing, spectral feature extraction, and classification of hyperspectral data; S6: Generate a sorting control signal based on the classification and recognition results, and control the conveying mechanism to complete the automatic sorting of the target objects.
[0027] In this embodiment, steps S1-S6 are not isolated detection steps, but are set around the time constraints of industrial online sorting.
[0028] Specifically, the conveying mechanism allows the object to be measured to enter the imaging area at a stable speed, the illumination component provides continuous and uniform broadband illumination, the snapshot hyperspectral imaging device acquires coded images in a single exposure, and the data processing and control unit completes reconstruction, feature extraction and classification recognition before the target object leaves the imaging area and reaches the sorting position, and outputs sorting control signals according to the target object's movement speed and the distance between the imaging area and the sorting execution position.
[0029] Therefore, this embodiment can achieve spatial position matching between the detection result and the sorting action in a continuous conveying state, avoiding timing misalignment caused by mechanical scanning or point-by-point detection. Example 1
[0030] The technical solution in this embodiment is a further refinement based on Embodiment 1.
[0031] In step S1, the conveying mechanism continuously feeds the object to be tested into the field of view of the snapshot hyperspectral imaging device, so that the object passes through the preset imaging area in sequence.
[0032] In other words, the purpose of step S1 is to provide stable material movement conditions for hyperspectral imaging, so that the object under test has a definite direction of movement and a calculable speed of movement when the image is acquired, thereby facilitating the subsequent determination of the time when the target object arrives at the sorting execution position based on the detection results.
[0033] The imaging area refers to the spatial region that a snapshot hyperspectral imaging device can cover and effectively collect the reflected light from the object being measured through its imaging lens.
[0034] Stable speed does not require the transmission platform to be absolutely uniform, but rather means that within the time range required for a single exposure and for the target to reach the sorting execution position, the speed fluctuation of the transmission platform is within a range that the data processing and control unit can compensate for or tolerate.
[0035] In this embodiment, the conveying mechanism includes a transmission platform and a drive unit. The transmission platform can be a conveyor belt, conveyor rollers, vibrating conveyor platform, or other conveying structure suitable for continuously passing the object under test through the imaging area. The drive unit can be a servo motor, stepper motor, variable frequency motor, or other drive device capable of adjusting the conveying speed. The drive unit is electrically connected to the data processing and control unit so that the data processing and control unit can obtain the conveying speed or send speed adjustment signals and sorting control signals to the drive unit.
[0036] Specifically, step S1 may include the following steps: S11: Place the object to be measured on the upper surface of the transmission platform and move the object to be measured along the preset conveying direction; S12: Drive the transmission platform to run continuously through the drive unit, and control the running speed of the transmission platform within a preset speed range; S13: To bring the object under test into the imaging area defined by the illumination assembly and the snapshot hyperspectral imaging device; S14: After the object under test enters the imaging area, a collection trigger signal is provided to the snapshot hyperspectral imaging device, or the snapshot hyperspectral imaging device continuously collects data according to a preset collection frequency.
[0037] The transmission platform can operate at a speed of 0.05 m / s to 2.00 m / s, preferably 0.10 m / s to 1.00 m / s; the exposure time of the snapshot hyperspectral imaging device can be 0.1 ms to 20 ms, preferably 0.5 ms to 10 ms.
[0038] The aforementioned speed range and exposure time range can be adjusted according to the size of the object being measured, the field of view of the imaging lens, and the illuminance of the illumination components.
[0039] For objects with high speed or small size, the exposure time can be shortened and the illumination intensity increased to reduce motion blur; for objects with low reflectivity, the transport speed can be reduced or the illumination intensity increased to improve the spectral signal-to-noise ratio.
[0040] In this embodiment, step S1 controls the transport speed of the object under test within a range that matches the exposure time and processing delay, enabling the snapshot hyperspectral imaging device to obtain an effective encoded image in a single exposure and providing a basis for time delay calculation in subsequent sorting control. This alleviates the problem of mutual constraints between imaging clarity, spectral signal-to-noise ratio and sorting response time in high-speed online sorting.
[0041] In step S2, the illumination component is used to provide broadband illumination to the imaging area, so that the object under test can reflect light signals with analyzable spectral characteristics when passing through the imaging area.
[0042] The lighting components include a broadband light source, which can be a halogen lamp, a continuous spectrum light source, a broadband LED light source, or other light sources that can cover the target detection band.
[0043] For visible light detection, the effective illumination band of a broadband light source can cover 400nm to 700nm; for detection extending to the visible to near-infrared band, the effective illumination band of a broadband light source can cover 400nm to 1000nm.
[0044] In this embodiment, the illumination components are symmetrically arranged on both sides of the snapshot hyperspectral imaging device to provide supplemental lighting to the imaging area from both sides of the object being measured.
[0045] By symmetrical arrangement, the shadow area caused by surface undulations, edge occlusion or tilt posture of the object under test can be reduced, and the problem of excessive specular reflection caused by strong unilateral illumination can be reduced.
[0046] The illumination angle of the lighting component can be set to 30° to 75° relative to the upper surface of the transmission platform, preferably 45° to 60°; The illuminance difference between the two lighting components can be controlled to be no more than 10%, preferably no more than 5%.
[0047] like Figure 2 As shown, specifically, step S2 may include the following steps: S21: Activate the broadband light sources located on both sides of the snapshot hyperspectral imaging device; S22: Adjust the illumination angle and illumination distance of the illumination component relative to the imaging area so that the illuminance distribution in the imaging area meets the preset uniformity requirements; S23: Before the object being measured passes through the imaging area, a white field image is acquired using a standard white board, and a dark field image is acquired under shading conditions. S24: Send the white field image and dark field image to the data processing and control unit for subsequent reflectance correction of the hyperspectral data.
[0048] The reflectivity correction can be performed according to the following formula: ; In the formula, Let be the relative reflectance of the pixel position (x, y) at wavelength λ. The original spectral intensity of the object being measured at wavelength λ; For dark field images at wavelength Spectral intensity at; This represents the spectral intensity of the standard whiteboard image at wavelength λ.
[0049] Since all terms on the right side of the formula are image intensity values at the same wavelength and pixel location, and have consistent dimensions, errors caused by mixing data from different units can be avoided.
[0050] In this embodiment, step S2 uses symmetrical broadband illumination and white and dark field correction to enable subsequent hyperspectral data to more stably reflect the spectral response differences of the measured object itself, rather than mainly reflecting changes in ambient light or differences in uneven illumination, thereby improving the stability of the classification and identification results in online sorting. Example 2
[0051] The technical solution in this embodiment further refines the snapshot hyperspectral imaging, coded image reconstruction, spectral feature extraction, and classification recognition based on the above embodiments.
[0052] In step S3, the snapshot hyperspectral imaging device simultaneously acquires the two-dimensional spatial information and continuous band spectral information of the object under test during a single exposure.
[0053] Unlike scanning hyperspectral imaging devices that require mechanical scanning to obtain hyperspectral data line by line or point by point, the snapshot hyperspectral imaging device in this embodiment maps the spatial and spectral information in the reflected light of the object under test into the same coded image through optical encoding, thereby completing the sampling of the state of the object under test at the same moment in a single exposure.
[0054] This method can reduce spatial misalignment caused by line-by-line scanning in high-speed transportation scenarios.
[0055] In this embodiment, the imaging lens is mounted on the imaging end of the snapshot hyperspectral imaging device, and a replaceable connection structure is used between the lens and the device. The replaceable connection structure can be a threaded interface, bayonet interface, standard C-mount interface, standard CS-mount interface, or other connection structures suitable for mounting and dismounting the imaging lens. By employing a replaceable connection structure, imaging lenses with different focal lengths or light transmission capabilities can be replaced according to the size of the object being measured, imaging distance, and resolution requirements, enabling the system to adapt to different industrial inspection scenarios.
[0056] like Figure 3 As shown, specifically, step S3 includes the following steps: S31: Adjust the working distance and field of view of the imaging lens according to the size of the object being measured and the width of the transmission platform so that the imaging area covers the effective detection area of the object being measured; S32: Set the exposure time, gain, and acquisition frequency of the snapshot hyperspectral imaging device according to the transport speed and illumination intensity; S33: When the object under test enters the imaging area, a single exposure is performed using a snapshot hyperspectral imaging device to obtain a coded image containing spatial and spectral information; S34: Send the encoded image to the data processing and control unit.
[0057] The acquisition frequency can be determined based on the transport speed v and the imaging field of view length along the transport direction. Determine that the displacement of the measured object between two consecutive data acquisitions is no greater than [a certain value]. of Preferred size is no greater than of That is, the sampling frequency. It can satisfy: ; In the formula, The speed of the transmission platform is expressed in m / s. The effective length of the imaging region along the transport direction, in meters; The overlap coefficient, Able to take to .
[0058] Through the above relationship, the measured object that continuously passes through the imaging area can be completely captured at least once, reducing the probability of missed detection.
[0059] In step S4, the data processing and control unit reconstructs the coded image output by the snapshot hyperspectral imaging device to obtain hyperspectral data containing both spatial and spectral dimensions. The hyperspectral data can be represented as a three-dimensional data cube X, where two dimensions of X correspond to the two-dimensional spatial location of the object being measured, and the other dimension corresponds to different wavelengths or different spectral channels.
[0060] In this embodiment, the relationship between the coded image and the hyperspectral data can be expressed as: ; In the formula, Encoded images acquired by a snapshot hyperspectral imaging device; The system response matrix is determined by the optical coding structure, spectral response characteristics, spatial mapping relationship, and calibration parameters of the snapshot hyperspectral imaging device. The hyperspectral data to be reconstructed; To collect noise.
[0061] The system response matrix H can be obtained through equipment factory calibration, standard wavelength light source calibration, or standard color chart calibration.
[0062] To obtain stable hyperspectral data in the presence of noise, this embodiment employs a constrained regularization reconstruction method, solving for the hyperspectral data according to the following optimization model: ; In the formula, The hyperspectral data obtained from the reconstruction; This is the error term between the encoded image and the reconstructed predicted image; A difference operator set along the spectral dimension to constrain the spectral smoothness between adjacent bands; The regularization coefficient is . Able to take to Preferred selection to X≥0 indicates that the reconstructed spectral intensity or reflectance is not negative.
[0063] Regularization coefficient The value can be determined through standard sample experiments, that is, in different... The mean square error between the reconstructed spectrum and the standard spectrum is calculated under different values, and a range of values that can balance the preservation of spectral details and noise suppression is selected.
[0064] Specifically, step S4 may include the following steps: S41: Read the coded image output by the snapshot hyperspectral imaging device. ; S42: Call the pre-calibrated system response matrix And the spectral channel mapping relationship; S43: Based on the system response matrix Encoded image Decoding and spectral dimension reconstruction are performed to obtain the initial hyperspectral data; S44: Perform non-negative and smoothing constraints on the initial hyperspectral data to obtain the reconstructed hyperspectral data; S45: The reconstructed hyperspectral data is correlated with imaging time, transport speed and spatial location to form data to be identified.
[0065] Through the reconstruction method described above, this embodiment can convert the coded image obtained from a single exposure into hyperspectral data that can be used for material identification. At the same time, it uses non-negative constraints and spectral smoothing constraints to suppress noise amplification, thereby solving the technical difficulty of "fast acquisition speed but reliable decoding of coded information" in snapshot imaging.
[0066] In step S5, the data processing and control unit performs preprocessing, spectral feature extraction, and classification on the hyperspectral data. Preprocessing of the hyperspectral data reduces the impact of illumination fluctuations, background noise, and invalid regions on classification; spectral feature extraction extracts features related to the category of the object being measured from the high-dimensional spectral data; and classification determines whether the object being measured belongs to the target object or identifies its category based on the spectral features.
[0067] Specifically, step S5 may include the following steps: S51: Perform white field and dark field correction on the hyperspectral data to obtain reflectance data; S52: Segment the area of the object under test based on spatial location, reflectivity threshold, or edge information, and remove the background area of the transmission platform; S53: Denoise the spectral data within the area of the object being measured; S54: Extract spectral features from the denoised spectral data to form a feature vector; S55: Input the feature vector into the classification and recognition module, and output the category label or target probability of the tested object; S56: Generate classification and recognition results based on category labels or target probabilities.
[0068] The denoising process can include one or more of the following: median filtering, Savitzky-Golay smoothing filtering, standard normal variable transformation, and baseline correction. Taking Savitzky-Golay smoothing filtering as an example, a sliding window with a width of 5 to 15 bands can be used, preferably a sliding window with a width of 7 to 11 bands, and a second-order or third-order polynomial is used for local fitting.
[0069] The aforementioned window range can reduce random noise while preserving the shape of the main absorption peaks or reflection peaks, avoiding insufficient noise suppression due to an excessively small window, or excessive smoothing of key spectral features due to an excessively large window.
[0070] For each region of the object being measured, the reflectance of the effective pixels within that region can be statistically analyzed to form a spectral characteristic curve representing the object being measured. ; In the formula, For the measured object in the first... Average reflectance at wavelength v; The area of the object being measured; for Number of effective pixels within; pixel position At wavelength The reflectivity at that location.
[0071] By statistically analyzing multiple pixels within the area of the object being tested, the impact of individual pixel noise, local blemishes, or local shadows on the classification results can be reduced.
[0072] This embodiment can further analyze the spectral characteristic curves. Extract one or more of the following features: specific band reflectance, band ratio, normalized difference index, first derivative feature, second derivative feature, absorption peak position, absorption peak depth, and principal component feature.
[0073] The normalized difference index can be expressed as:
[0074] In the formula, and Two wavelengths selected based on the differences in the categories of the objects being measured; To prevent constants with a denominator of zero, Able to take to The reason for choosing the normalized difference index is that it can reduce the impact of changes in overall lighting intensity on feature values, making classification and recognition rely more on the relative differences between different bands rather than on absolute brightness.
[0075] For spectral classification and identification, this embodiment can employ an identification method based on spectral angle matching. A standard spectral library for different categories of samples is pre-established. ,in Indicates the category number.
[0076] Spectral characteristic curves of the object to be identified Compared with standard spectra of various categories Calculate the spectral angle: ; In the formula, For the spectrum to be identified and the first The angle between standard spectra; It is the inner product of two spectral vectors; These are the magnitudes of the two spectral vectors. If the minimum spectral angle... Less than the preset threshold If so, the object being tested will be classified into the corresponding category; Not less than the preset threshold If the test object is classified as an unknown category or a non-target object, then the object being tested will be determined as such.
[0077] It can be determined based on the sample validation set, for example, it can be 0.02 rad to 0.20 rad, preferably 0.05 rad to 0.12 rad.
[0078] The above-mentioned spectral angle matching method mainly uses the shape of the spectral curve for classification, which can reduce the impact of overall changes in light intensity on the recognition results.
[0079] In another alternative implementation, the classification and recognition module can also employ classification models such as support vector machines, partial least squares discriminant analysis, random forests, or one-dimensional convolutional neural networks.
[0080] Taking the support vector machine classification model as an example, its input is the feature vector obtained through preprocessing and feature extraction, and the output is the category label of the object being tested or the probability of belonging to the target category.
[0081] The training dataset was collected from industrial samples of multiple known categories. Each sample corresponds to at least one set of hyperspectral data and its category label determined by manual verification or experimental detection.
[0082] During training, the sample data is divided into training, validation, and test sets in a ratio of 7:2:1 or 8:1:1. The support vector machine kernel function can be the radial basis function, with a penalty coefficient... Kernel parameters can be determined via grid search within the range of 0.1 to 100. able to The range up to 10 is determined by grid search, and the validation set accuracy, recall, or misclassification rate is used as the basis for parameter selection.
[0083] When using a neural network model, the model can include an input layer, a one-dimensional convolutional layer, a normalization layer, an activation layer, a pooling layer, a fully connected layer, and an output layer. The input layer receives the preprocessed spectral vector; the one-dimensional convolutional layer extracts local spectral variation features between adjacent bands; the pooling layer reduces the feature dimensionality; the fully connected layer fuses features from different bands; and the output layer outputs the probabilities of each class. During training, the loss function can be the cross-entropy loss function, the optimizer can be the Adam optimizer, and the learning rate can be set to a specific value. to The batch size can be set from 16 to 128, the number of training rounds can be set from 50 to 300, and an early stopping strategy can be set based on the validation set loss.
[0084] The training parameters mentioned above can be adjusted according to the number of samples and the number of classification categories. The purpose is to avoid model overfitting while ensuring recognition accuracy.
[0085] The input data and training datasets used in this embodiment are all from compliant sources. The data can be obtained from legally authorized public datasets, enterprise-owned test sample data, or business data with user-anonymized authorization, without illegally collecting sensitive personal information or biometric data. For enterprise batch information, production numbers, or other information that does not affect the technical identification results, desensitization processing can be performed before use for model training or validation.
[0086] In this embodiment, step S5 converts the hyperspectral data from high-dimensional raw data into spectral feature data directly related to the sorting target by performing white field and dark field correction, region segmentation, spectral denoising, and feature dimensionality reduction; and by using spectral angle matching or classification model identification, the classification results can be output within a limited processing time, thereby solving the technical contradiction in industrial online scenarios where hyperspectral data has high dimensionality, heavy processing burden, but sorting actions require real-time response.
[0087] In step S6, the data processing and control unit generates a sorting control signal based on the classification and identification results obtained in step S5, and controls the conveying mechanism to complete the automatic sorting of the target objects.
[0088] The sorting control signal may include one or more of the following: target object category, target object spatial location, trigger time, conveying direction control command, drive unit start / stop command, or diversion action command.
[0089] Specifically, step S6 may include the following steps: S61: Obtain the spatial location of the object under test in the coded image and its classification and recognition results; S62: Based on the position of the object under test in the imaging area, the operating speed v of the transmission platform, and the distance between the imaging area and the sorting execution position. Calculate the delay time for the target object to reach the sorting execution position. ; S63: Determine the sorting channel or conveying direction corresponding to the target object based on the classification and identification results; S64: During the delay time Upon arrival, a sorting control signal is output to the drive unit or the diversion component linked to the conveying mechanism; S65: The drive unit changes the conveying direction, conveying path or conveying state of the transmission platform according to the sorting control signal, so that the target object enters the corresponding sorting channel.
[0090] Among them, delay time It can be calculated using the following formula:
[0091] In the formula, The distance from the center of the imaging area to the sorting execution position is in meters (m). The speed of the transmission platform is expressed in m / s. The time required for the target object to move from the imaging area to the sorting execution position, expressed in seconds.
[0092] When the speed of the transmission platform fluctuates slightly, the data processing and control unit can read the speed value fed back by the drive unit in real time and calculate the displacement of the target object by integration. ; when achieve When the time is right, the corresponding sorting control signal is triggered.
[0093] The above methods can improve the matching accuracy between the spatial location of the target object and the sorting execution time.
[0094] In this embodiment, step S6 does not simply execute the sorting action immediately based on the classification result. Instead, it determines the control timing by combining the movement speed of the object being tested and the distance between the imaging area and the sorting execution position, so that the recognition result can accurately correspond to the physical position of the target object. This design can solve the time offset problem caused by "recognition occurring in the imaging area and sorting occurring in the downstream position" in online conveying scenarios, thereby improving sorting accuracy. Example 3
[0095] This embodiment provides a snapshot-type hyperspectral imaging industrial online sorting system for implementing the above method, including: a support structure, an optical imaging unit, a conveying mechanism, and a data processing and control unit; Support structure: includes base plate, adjustable bracket and fixed bracket; The base plate is used to support at least part of the structure in the conveying mechanism, optical imaging unit, and data processing and control unit to improve the overall installation stability of the system.
[0096] An adjustable bracket is mounted on the base plate and is used to adjust the height, angle, or horizontal position of the snapshot hyperspectral imaging device and imaging lens relative to the transmission platform. A fixed bracket is used to mount the illumination assembly or to further stabilize the snapshot hyperspectral imaging device. By combining the adjustable bracket and the fixed bracket, the optical axis of the imaging lens can be aligned with the imaging area, and the illumination range of the illumination component can cover the imaging area.
[0097] The optical imaging unit includes an illumination assembly, an imaging lens, and a snapshot hyperspectral imaging device. The illumination assembly includes a broadband light source, which can be a halogen lamp or a continuous spectrum light source. The illumination assembly is preferably arranged symmetrically along both sides of the snapshot hyperspectral imaging device to provide a uniform and stable illumination environment.
[0098] The imaging lens is mounted on the imaging end of the snapshot hyperspectral imaging device and uses a replaceable connection structure with the snapshot hyperspectral imaging device to adapt to the band range, working distance or imaging resolution requirements of different detection scenarios.
[0099] Snapshot hyperspectral imaging equipment can be a snapshot hyperspectral imaging device for the visible light band, or a snapshot hyperspectral imaging device covering the visible to near-infrared bands, depending on the needs of the object being detected.
[0100] The conveying mechanism includes a transport platform and a drive unit. The transport platform carries and transports the object under test, while the drive unit drives the transport platform to operate continuously, ensuring that the object under test passes through the imaging area at a stable speed. The drive unit can communicate with the data processing and control unit to receive transport direction control commands, speed control commands, or sorting control signals output by the data processing and control unit. The conveying mechanism can achieve automatic sorting by changing the conveying direction, starting and stopping local conveying sections, switching branch conveying paths, or linking with diversion components.
[0101] The data processing and control unit includes an image preprocessing module, a spectral reconstruction module, a spectral feature analysis module, a classification and recognition module, and a sorting control module.
[0102] The image preprocessing module is used to perform dark field correction, white field correction, noise suppression, and background segmentation on coded images or hyperspectral data; The spectral reconstruction module is used to reconstruct hyperspectral data from coded images and system response matrices; The spectral feature analysis module is used to construct spectral response data and generate spectral feature curves to characterize the object under test; The classification and recognition module is used to determine the category of the object being measured based on spectral feature curves or feature vectors; The sorting control module is used to generate sorting control signals based on the classification and identification results, and to control the conveying mechanism to perform sorting operations.
[0103] In this embodiment, the snapshot hyperspectral imaging device is electrically connected to the data processing and control unit. The electrical connection can be wired or wireless; a wired connection may include USB, GigE, CameraLink, CoaXPress, Ethernet, or other industrial camera communication interfaces.
[0104] The data processing and control unit can be an industrial computer, embedded controller, PLC, edge computing device, or a combination thereof. It can also connect to a drive unit to achieve closed-loop control between image acquisition, data processing, and sorting execution.
[0105] In the operation of this embodiment, the object to be measured is first placed on the transmission platform, and the driving unit drives the transmission platform to run continuously, so that the object to be measured enters the imaging area; the illumination component provides broadband illumination to the imaging area. Snapshot hyperspectral imaging equipment acquires coded images by taking a single exposure to the object under test through an imaging lens; The data processing and control unit reconstructs the coded image to obtain hyperspectral data, and performs preprocessing, spectral feature extraction, and classification on the hyperspectral data; Finally, the data processing and control unit outputs a sorting control signal to the drive unit based on the classification and recognition results and the time it takes for the object to reach the sorting execution position, so that the target object enters the corresponding sorting channel.
[0106] Through the above-described system structure and method, this invention enables snapshot-style hyperspectral acquisition, spectral feature identification, and automatic sorting of the object under continuous transport.
[0107] Compared with manual inspection methods, this invention can reduce subjective errors and improve inspection efficiency; Compared with point-based sensors, this invention can acquire spatial and spectral information of the object being measured, reducing information loss caused by local sampling; Compared with scanning hyperspectral imaging systems, this invention can reduce the reliance on mechanical scanning and complex synchronization control, making it more suitable for high-speed industrial online inspection scenarios.
[0108] It should be noted that the specific parameters, band range, speed range, exposure time, filter window, classification threshold and model parameters in the above embodiments are all feasible ranges given for the purpose of explaining the technical solution of the present invention. Those skilled in the art can make adaptive adjustments according to the type of object being measured, the conveying speed, the light source intensity, the imaging distance and the sorting accuracy requirements.
[0109] Any application employing the snapshot-type hyperspectral imaging, coded image reconstruction, spectral feature recognition, and online sorting control based on the recognition results of this invention should fall within the protection scope of this invention.
[0110] Based on the preferred embodiments of the present invention described above, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A snapshot-type hyperspectral imaging industrial online sorting system, comprising: It includes a support structure, an optical imaging unit disposed on the support structure, a transport mechanism, and a data processing and control unit, characterized in that; The support structure includes: a base plate, an adjustable bracket, and a fixed bracket; The optical imaging unit includes: an illumination assembly, an imaging lens, and a snapshot hyperspectral imaging device; The conveying mechanism includes: a transmission platform and a driving unit, wherein the driving unit is used to drive the transmission platform to run continuously so that the object under test passes through the imaging area at a stable speed. The snapshot hyperspectral imaging device is electrically connected to the data processing and control unit, and is used to acquire an encoded image containing spatial and spectral information during a single exposure. The data processing and control unit is used to reconstruct the coded image to obtain hyperspectral data, and to perform feature extraction and classification based on the hyperspectral data to generate a sorting control signal to control the conveying mechanism to perform sorting operations.
2. The snapshot-type hyperspectral imaging industrial online sorting system according to claim 1, characterized in that: The lighting assembly includes a broadband light source, which is a halogen lamp or a continuous spectrum light source.
3. The snapshot-type hyperspectral imaging industrial online sorting system according to claim 1, characterized in that: The imaging lens is mounted on the imaging end of the snapshot hyperspectral imaging device and is connected to the snapshot hyperspectral imaging device by a replaceable connection structure.
4. The snapshot-type hyperspectral imaging industrial online sorting system according to claim 1, characterized in that: The illumination components are arranged symmetrically on both sides of the snapshot hyperspectral imaging device.
5. The snapshot-type hyperspectral imaging industrial online sorting system according to claim 1, characterized in that: The snapshot hyperspectral imaging device is a snapshot hyperspectral imaging device in the visible light band.
6. The snapshot-type hyperspectral imaging industrial online sorting system according to claim 1, characterized in that: The data processing and control unit includes an image preprocessing module and a spectral feature analysis module, used to preprocess, extract features, and classify the acquired hyperspectral data.
7. A snapshot hyperspectral imaging industrial online sorting method, based on the snapshot hyperspectral imaging industrial online sorting system according to any one of claims 1-9, characterized in that, Includes the following steps: S1: The object to be measured is transported to the imaging area via a conveying mechanism; S2: Illuminate the object under test using an illumination component; S3: Use a snapshot hyperspectral imaging device to acquire encoded images containing spatial and spectral information; S4: Reconstruct the coded image to obtain hyperspectral data; S5: Preprocessing, spectral feature extraction, and classification of hyperspectral data; S6: Generate a sorting control signal based on the classification and recognition results, and control the conveying mechanism to complete the automatic sorting of the target objects.
8. The snapshot-type hyperspectral imaging industrial online sorting method according to claim 7, characterized in that: In S3, the snapshot hyperspectral imaging device simultaneously acquires two-dimensional spatial information and continuous band spectral information of the object under test during a single exposure.
9. The snapshot-type hyperspectral imaging industrial online sorting method according to claim 7, characterized in that: In S5, spectral response data covering the visible to near-infrared band range is constructed based on the acquired spectral information, and a spectral characteristic curve is formed to characterize the object under test.
10. The snapshot-type hyperspectral imaging industrial online sorting method according to claim 7, characterized in that: In step S6, the conveying direction of the conveying mechanism is controlled according to the sorting control signal to realize the automatic sorting of target objects.