A method and system for sampling and detecting oil carbon deposition based on multispectral imaging

By employing multispectral imaging technology and image processing algorithms, the problems of inaccuracy and inefficiency in engine oil carbon deposit detection have been solved, enabling accurate identification of carbon deposit areas in multispectral image data and improving detection accuracy and efficiency.

CN120702990BActive Publication Date: 2025-12-12TONGYI PETROLEUM CHEM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510911507.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-12-12
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

Existing methods for detecting carbon deposits in engine oil rely on experience and manual operation, resulting in inaccurate and inefficient test results. It is also difficult to extract stable and representative spectral features from multispectral image data to distinguish between real carbon deposit areas and background noise.

Method used

Multispectral imaging technology is used to acquire image data through multispectral light sources. Dark current correction and band ratio method are used to calculate spectral reflectance. A three-dimensional feature tensor is constructed. Combined with mutual information analysis and adaptive threshold algorithm, carbon deposit regions are segmented and probability values ​​are calculated. Spectral angular distance and binning algorithm are used to improve recognition accuracy.

Benefits of technology

It effectively eliminates sensor noise interference, enhances the accuracy of image data, improves the recognition accuracy and efficiency of carbon deposit areas, reduces errors, and ensures efficient detection under different lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702990B_ABST
    Figure CN120702990B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on multispectral imaging's oil carbon deposit sampling detection method and system, the method includes: under the acquisition multispectral image of oil sample to be processed multispectral light source, it is preprocessed to obtain image to be processed;According to wave band ratio method, dark current correction is carried out to image to be processed, and the signal intensity of image to be processed is enhanced;According to the signal intensity of image to be processed, the spectral reflectance of image to be processed is calculated;According to spectral reflectance, three-dimensional feature tensor in image to be processed is extracted;Image to be processed is segmented to three-dimensional feature tensor, and carbon deposit area is screened;Carbon deposit area is combined with spectral reflectance of each pixel point, and carbon deposit probability value is calculated;Carbon deposit threshold value is set for carbon deposit probability value and judged, to judge whether oil sample exists carbon deposit or not. Similarity between sample oil spectral reflectance and reference oil is reflected, and possible carbon deposit area is found to accurately judge and identify carbon deposit defect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to carbon deposition detection, in particular to a method and system for sampling and detecting oil carbon deposition based on multi-spectral imaging. BACKGROUND

[0002] With the development of modern industrial technology, especially in the automobile, mechanical equipment and other power systems, oil as a key lubricating and protective material, its quality directly affects the performance and service life of the engine. Carbon deposition as a common byproduct of oil and engine operation, long-term accumulation can seriously affect the working efficiency of the engine, and even cause failure. Therefore, how to effectively detect and monitor the carbon deposition in the oil has become an important issue in the field of automobile and mechanical maintenance.

[0003] At present, the detection method for oil carbon deposition mainly depends on traditional chemical analysis, physical inspection and manual sampling detection. These methods can provide certain reference for carbon deposition detection, but the traditional detection methods usually rely on experience and manual operation, and it is difficult to obtain accurate and consistent results. Manual detection not only consumes time, but also may cause errors, especially when detecting a large number of samples, the efficiency is low.

[0004] In order to overcome the above problems, multi-spectral imaging technology can extract spatial information and obtain the reflectivity and absorption characteristics of carbon deposition under different spectral bands by collecting image data at multiple wave bands. This technology can reflect the spectral differences of the sample in different wavelength ranges, effectively improving the quality of detection data. With the help of high-precision image processing algorithms such as mutual information analysis, the features of carbon deposition area can be further extracted, providing technical support for online and real-time detection. However, how to extract stable and representative spectral features from multi-spectral image data and distinguish real carbon deposition area from background noise is still a technical problem to be solved in this field. SUMMARY

[0005] The present application aims to provide a method and system for sampling and detecting oil carbon deposition based on multi-spectral imaging, which solves the above technical problems pointed out in the prior art.

[0006] The present application provides a method for sampling and detecting oil carbon deposition based on multi-spectral imaging, comprising the following operation steps:

[0007] Collecting a multi-spectral image of the oil sample under a multi-spectral light source, pre-processing the multi-spectral image to obtain a processed image;

[0008] According to the wave band ratio method, dark current correction is performed on the to-be-processed image, and the signal intensity of the to-be-processed image is enhanced; the spectral reflectivity of the to-be-processed image is calculated according to the signal intensity of the to-be-processed image; the three-dimensional feature tensor in the to-be-processed image is extracted according to the spectral reflectivity; the to-be-processed image is segmented according to the three-dimensional feature tensor, and the carbon deposition area is screened; the carbon deposition probability value is calculated by combining the spectral reflectivity of each pixel point in the carbon deposition area.

[0009] The carbon deposition threshold is set for the carbon deposition probability value to make a judgment, so that whether the engine oil sample has carbon deposition is judged.

[0010] Compared with the prior art, the embodiments of the present application have at least the following technical advantages:

[0011] It can be known from the above-mentioned one kind of oil carbon deposition sampling detection method and system based on multispectral imaging provided by the application that, in specific application, first, the dark current correction step effectively eliminates the error caused by noise during sensor acquisition, especially in poor light conditions, the correction can ensure the accuracy of image data, and provides more real optical information for subsequent spectral reflectivity calculation, feature extraction and image segmentation, and also enhances the image of the engine oil sample; secondly, the calculation of signal intensity and spectral reflectivity by the wave band ratio method can accurately obtain the optical characteristic difference between the engine oil sample and the reference sample, especially the reflection characteristic difference of carbon deposition and other substances under different wave bands, and enhances the recognition ability of the carbon deposition area; the calculation of reflectivity difference not only considers the spectral data of individual wave bands, but also combines spatial information and spectral characteristics by constructing a three-dimensional feature tensor, comprehensively describes the spatial distribution and spectral information of the image, and further improves the recognition accuracy of the carbon deposition area; after the construction of the three-dimensional feature tensor, the correlation between the wave bands is calculated by mutual information coefficient analysis, which can optimize the selection of wave bands, eliminate redundant information, and improve the recognition efficiency; by understanding the correlation between the wave bands, it is ensured that only the wave bands that have a significant contribution to the recognition of carbon deposition are used, so as to improve the recognition accuracy and reduce the processing time.

[0012] Further, first, the adaptive threshold algorithm is used to dynamically set the threshold according to the local mean and variance of each image band, rather than using a fixed global threshold, which enables the algorithm to adaptively adjust when facing images of different light, contrast and quality, effectively dealing with the changes of complex images, improving the accuracy of binarization and reducing errors; In the segmentation stage, a multi-scale morphological segmentation algorithm is used, and the segmentation results are optimized through operations such as dilation, erosion, hole filling, etc.; Dilation optimization helps to connect scattered carbon deposition areas, eliminate local breaks in the image, and avoid the loss of carbon deposition areas; The erosion operation removes noise and smooths the edges; Hole filling ensures the integrity of the region and prevents segmentation errors; By weighted average fusion of segmentation results of different scales, the segmentation accuracy is further improved, ensuring that both large-scale and small-scale carbon deposition areas can be accurately identified; In the connected region analysis stage, area threshold screening is used to ensure that only the true carbon deposition area is retained, which not only improves the processing efficiency, but also ensures the accuracy of carbon deposition area identification; Finally, the spectral analysis technique calculates the spectral angle distance of each pixel point, simplifies the data processing by using the binning algorithm, constructs the spectral histogram, and combines the oil attenuation compensation factor to improve the accuracy of carbon deposition identification; Through the analysis of spectral angle distance, the spectral difference between carbon deposition area and other areas can be revealed in depth, so as to realize more accurate carbon deposition probability value calculation. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 Flow chart of a multi-spectral imaging-based oil carbon deposition sampling detection method of embodiment one;

[0014] Figure 2 Flow chart of a multi-spectral imaging-based oil carbon deposition sampling detection method of embodiment one using spectral reflectance to finally obtain carbon deposition probability value;

[0015] Figure 3 Flow chart of a multi-spectral imaging-based oil carbon deposition sampling detection method of embodiment one using mask segmentation to obtain carbon deposition probability value;

[0016] Figure 4 Flow chart of a multi-spectral imaging-based oil carbon deposition sampling detection method of embodiment one using spectral angle distance to obtain carbon deposition probability value;

[0017] Figure 5 Schematic diagram of a multi-spectral imaging-based oil carbon deposition sampling detection method of embodiment one using spectral angle distance to obtain carbon deposition probability value;

[0018] Figure 6 Flow chart of a multi-spectral imaging-based oil carbon deposition sampling detection system of embodiment two;

[0019] Labels: Acquisition Module 10; Analysis Module 20; Results Module 30. Detailed Implementation

[0020] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0021] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0022] Example 1

[0023] like Figure 1 As shown, this embodiment of the invention provides a method for sampling and detecting carbon deposits in engine oil based on multispectral imaging, including the following steps:

[0024] S1: Acquire a multispectral image of the engine oil sample under a multispectral light source, and preprocess the multispectral image to obtain the image to be processed;

[0025] It should be noted that the multispectral images to be processed are acquired under a multispectral light source. These images include spectral information from at least five different bands, including the ultraviolet, blue, green, red, and near-infrared bands. Using images from at least five bands allows for the acquisition of spectral information from different spectral ranges of the oil sample, ensuring that subtle differences between carbon deposit areas and the background can be captured. The reflectance of different bands can effectively distinguish carbon deposits from other substances because the spectral characteristics of carbon deposits are usually significantly different from the background in different bands.

[0026] S2: Perform dark current correction on the image to be processed according to the band ratio method to enhance the signal strength of the image to be processed; calculate the spectral reflectance of the image to be processed based on the signal strength of the image to be processed; extract the three-dimensional feature tensor in the image to be processed based on the spectral reflectance; segment the image to be processed based on the three-dimensional feature tensor to screen carbon deposition areas; calculate the carbon deposition probability value of each pixel in the carbon deposition area by combining the spectral reflectance.

[0027] It should be noted that the band ratio method is used to perform dark current correction on the image to be processed. By calculating the ratio between each band, dark current interference during the acquisition process of the image to be processed is eliminated, and the signal strength of the image to be processed is enhanced. The band ratio method is used to further calculate the spectral reflectance of the image to be processed, and the reflectance value of each pixel is obtained. Spectral reflectance is a key characteristic of a material and can reflect the physical and chemical properties of the oil sample.

[0028] Based on the calculated spectral reflectance, a three-dimensional feature tensor of the image to be processed is extracted. This tensor is a high-dimensional feature representation of the image to be processed, containing multi-dimensional information of the pixels in the image to be processed in various bands, and is used to characterize the overall spectral characteristics of the sample. By analyzing the three-dimensional feature tensor, the image to be processed is segmented, and areas that may have carbon deposits are screened out. Carbon deposits are detected by looking for areas with abnormal spectral features in the image to be processed.

[0029] The band ratio method enhances signal strength and improves the quality of the image by eliminating the influence of dark current, ensuring that details in the carbonized area can be clearly captured. Spectral reflectance calculation allows for more accurate acquisition of the true spectral characteristics of each pixel. Carbonized areas typically differ from other areas in spectral reflectance, and this difference can effectively identify them. The three-dimensional feature tensor provides multi-dimensional information for each pixel, derived from multi-band data, offering more details for accurate identification of carbonized areas. Image segmentation distinguishes carbonized areas from the background, further improving recognition accuracy, facilitating rapid location of carbonized areas, and reducing computational load.

[0030] S3: Set a carbon deposit threshold based on the carbon deposit probability value to determine whether the oil sample has carbon deposits.

[0031] It should be noted that for each pixel in the carbon deposit region, the probability value of that pixel belonging to the carbon deposit region is calculated by combining its spectral reflectance. This value reflects the degree of matching between each pixel and the spectral characteristics of carbon deposit. The higher the probability value, the more likely it is to be a carbon deposit region. Based on the carbon deposit probability value, a threshold is set, and the presence of carbon deposit in the image is ultimately determined by judging which pixels have a probability value greater than this threshold.

[0032] By calculating the carbon deposition probability value, each pixel in the image can be evaluated one by one, accurately reflecting the possibility of carbon deposition areas. The threshold judgment mechanism ensures that the judgment of carbon deposition areas has a certain degree of fault tolerance. By setting an appropriate threshold, false recognition can be reduced, ensuring efficient and accurate carbon deposition detection.

[0033] Specifically, such as Figure 2 As shown, in step S2, dark current correction is performed on the image to be processed according to the band ratio method to enhance the signal strength of the image to be processed; the spectral reflectance of the image to be processed is calculated based on the signal strength of the image to be processed; a three-dimensional feature tensor is extracted from the image to be processed based on the spectral reflectance; the image to be processed is segmented based on the three-dimensional feature tensor to screen carbon deposition areas; and the carbon deposition probability value is calculated for each pixel of the carbon deposition area by combining the spectral reflectance. The specific operation steps are as follows:

[0034] S21: Collecting original image data of inorganic carbon sample under multi-spectral light source;

[0035] Collecting original dark current image data of the inorganic carbon sample under shielding without light;

[0036] Using the original dark current image data to correct the original image in each waveband of multi-spectrum to obtain the signal intensity of the original image;

[0037] It should be noted that the original image data is obtained under the multi-spectral light source, and the reflection characteristics of the inorganic carbon sample under different wavebands are recorded. The data of each waveband reflects the reflection ability of the sample under the waveband;

[0038] And the original image data collected under the condition of no light, that is, the dark current image only reflects the noise of the sensor itself, that is, the "dark current". The dark current image does not contain the optical information of the actual sample, and only reflects the inherent noise of the sensor under the condition of no light;

[0039] By obtaining the dark current image, the subsequent image can be corrected. After dark current correction, the data can reduce the noise interference caused by environmental temperature, sensor aging and other factors, thereby improving the accuracy of subsequent spectral reflectance calculation, feature extraction and image segmentation, and ensuring that the data used in the analysis is closer to the actual optical characteristics. Especially in the case of poor lighting conditions, the noise of the sensor will interfere with the real image data and affect the subsequent analysis. Dark current correction is to eliminate the influence of such noise, so as to obtain more accurate original image;

[0040] The identification of carbon deposit needs to rely on the analysis of the spectral characteristics of inorganic carbon sample, because carbon deposit has unique spectral reflectance mode in many cases. Through the calculation of reflectance, detailed optical characteristics of inorganic carbon can be obtained, and then carbon deposit area can be identified by comparing the reflectance difference of different samples;

[0041] S22: Collecting the to-be-processed dark current image data of the oil sample (the oil sample to be detected) under shielding without light;

[0042] Using the to-be-processed dark current image data to correct the to-be-processed image in each waveband of multi-spectrum to obtain the signal intensity of the to-be-processed image;

[0043] It should be noted that the main purpose of dark current correction is to correct the inherent noise generated by the sensor under no light conditions; collect the image under completely no light conditions (or shielding state) to obtain the original noise image data called "dark frame"; subtract the level of dark current in the corresponding waveband in the actually collected multi-spectral image data to correct the signal deviation of each waveband due to sensor noise, so as to obtain the signal intensity of the image;

[0044] S23: Calculate the spectral reflectivity of each pixel point in the original image and the to-be-processed image respectively by using the waveband ratio method on the signal intensity of the original image and the signal intensity of the to-be-processed image;

[0045] Calculate the average reflectivity difference by using the spectral reflectivity of each pixel point of the original image and the spectral reflectivity of each pixel point of the to-be-processed image, and the calculation formula is:

[0046] + ;

[0047] The cumulative average reflectivity difference calculated;

[0048] is a constant factor for proportional transformation of the calculation result;

[0049] and respectively represent the number of wavebands in the original image and the to-be-processed image, and is the total number of wavebands (for example, at least 5 wavebands);

[0050] represents the spectral reflectivity of the oil sample after treatment of the i-th pixel point in the to-be-processed image under the i-th waveband ;

[0051] represents the spectral reflectivity of the reference non-carbon deposit sample under the same waveband of the corresponding pixel point (i.e. the a-th pixel point) in the original image; for each pixel point , first calculate the average of the reflectivity difference in group 1 (wavebands to ), then calculate the average of the reflectivity difference in group 2 (wavebands to ), and then multiply the overall average of the two by the constant factor ;

[0052] It should be noted that according to different waveband image data, the spectral reflectivity of each pixel point is calculated, and then the reflectivity difference between the original image and the to-be-processed image is calculated.​

[0053] Spectral reflectance represents the sample's ability to reflect incident light at a specific wavelength band, which can reflect the optical properties of the sample; different substances (such as engine oil and carbon deposit) have obvious differences in reflectivity at different wavelength bands, and carbon deposit usually shows different reflectivity characteristics from other substances at certain wavelength bands; by calculating the spectral reflectance, the spectral characteristics that only exist in the carbon deposit region can be accurately identified (i.e. the carbon deposit region can also be indirectly screened and identified); the spectral reflectance can reveal the difference between the carbon deposit region and the background region, so the reflectivity difference can be used to distinguish between carbon deposit and non-carbon deposit regions;

[0054] Carbon deposit and other substances have significant differences in spectral reflectance, and the region where carbon deposit may exist can be effectively identified by calculating the reflectivity difference.

[0055] After dark current correction and spectral calibration, the calculated spectral reflectance data can objectively describe the optical properties and material differences between the engine oil sample and the reference sample at different wavelengths; the reflectivity difference can be calculated, and the carbon deposit region usually shows different spectral reflectivity characteristics from the background, so this quantitative difference can be used to effectively segment and screen out the carbon deposit region;

[0056] S24: Calculate the average reflectivity difference according to the spectral reflectance of each pixel point, and sort the average reflectivity difference of all pixel points in each wavelength band in the image to be processed;

[0057] Construct a three-dimensional array according to the arrangement of the spatial position (i.e. row, column) of the image to be processed (i.e. the order of sorting) of all sorted pixel points' average reflectivity difference, as a three-dimensional feature tensor (i.e. the three-dimensional array includes image height × image width × wavelength number; the first dimension: image height (i.e. the number of rows of pixels); the second dimension: image width (i.e. the number of columns of pixels); the third dimension: wavelength number (the reflectivity difference vector sorted by wavelength on each pixel); which can be represented as , wherein: is the image height, is the image width, and B is the total wavelength number; at the same time, in the carbon deposit detection or other spectral analysis tasks, not only the reflectivity of a single wavelength is concerned, but also the spectral variation characteristics between different wavelengths are considered; the height and width dimensions save the spatial distribution information of the original image, which is convenient for capturing the continuity and local structure between regions; the wavelength number dimension saves the spectral reflectance difference of each pixel at different wavelengths, which reflects the spectral properties of the material, such as the carbon deposit region usually has significant differences in spectral shape from the background);

[0058] It should be noted that the three-dimensional feature tensor is constructed by calculating the spectral reflectance difference of each pixel point, and the difference results of all pixel points are sorted by waveband (here, "sorting" means arranging the reflectance difference value corresponding to each pixel according to the waveband order, ensuring that the vector of each pixel has the same arrangement order on each waveband data, so that there is no error introduced due to the chaotic order of waveband data in the subsequent comparison or analysis process), so that the spectral data of different pixels on each waveband can be directly compared, and the overall statistical characteristics of the data are strengthened, because the arrangement order of the data is consistent and there is no difference due to the order of pixel sampling, and then a three-dimensional feature tensor is formed; the tensor contains the spatial information of the image and the spectral feature difference between the wavebands; the three-dimensional tensor can reflect the information of the image in the spatial and spectral dimensions at the same time; the three-dimensional feature tensor combines the spatial information and spectral information of the image, so that both the spatial distribution and the spectral characteristics can be used in the identification of the carbon deposition area to provide more comprehensive information.

[0059] Through the construction of the three-dimensional tensor, the correlation between the space and the waveband can be used to improve the recognition accuracy and avoid misidentification based on only one dimension of information; the distribution of carbon deposition is related to the spatial position and closely related to the spectral characteristics of each waveband; combining the two helps to comprehensively describe the characteristics of the carbon deposition area; through the three-dimensional tensor, the characteristics of the image can be comprehensively described, and the reliability and accuracy of the carbon deposition area identification are improved.

[0060] S25: Analyzing the correlation between the wavebands by the mutual information coefficient of the constructed three-dimensional feature tensor to generate a correlation coefficient matrix reflecting the mutual relationship between the wavebands.

[0061] It should be noted that the three-dimensional feature tensor is analyzed to calculate the correlation matrix between the wavebands; the mutual information coefficient can quantify the similarity and information sharing degree between different wavebands; through the correlation matrix obtained by calculation, it can be understood which wavebands have the closest relationship and which wavebands provide more information.

[0062] By analyzing the correlation between the wavebands, those wavebands most related to carbon deposition identification can be selected to improve the identification efficiency; understanding the correlation between the wavebands can reduce information redundancy and focus only on the wavebands most useful for carbon deposition identification to improve processing efficiency; through the mutual information coefficient analysis, wavebands that contribute less to carbon deposition identification can be excluded, and only wavebands that have an impact on the result are retained, thereby improving the efficiency and accuracy of the system; the above technical solution "correlation matrix obtained by calculation" analyzes the correlation between the wavebands to optimize the subsequent identification process, making the system more efficient and improving the accuracy.

[0063] S26: generating a multi-scale segmentation mask based on the correlation coefficient matrix to screen the carbon deposition area; performing binning operation on the carbon deposition area to calculate a carbon deposition probability value;

[0064] It should be noted that the correlation coefficient matrix can capture the spectral reflectance characteristics of similar pixels in the image, thereby helping to effectively distinguish the carbon deposition area from the background area under multiple scales; the spectral characteristics of the carbon deposition area are usually different from those of other substances, so the carbon deposition area can be accurately located by correlation analysis (i.e., correlation analysis mainly refers to using the correlation coefficient matrix to measure the similarity between the spectral reflectance characteristics of the pixels in the image, thereby helping to accurately locate the carbon deposition area; specifically, correlation analysis captures similar spectral characteristics of pixels by calculating the correlation between the spectral characteristics of each pixel in the image to be processed and the spectral characteristics of other pixels, thereby identifying areas that may contain carbon deposition); since the carbon deposition area can have different sizes and morphologies, using a multi-scale mask can effectively handle details under different scales to ensure that carbon deposition areas of various sizes are detected;

[0065] Binning operation is to divide the pixel value of the carbon deposition area (such as the spectral angle distance value calculated by the spectral vector formed by setting a spectral reflectance as a reference vector (i.e., the reference spectral vector in the subsequent steps) and the spectral reflectance of the image to be processed, which reflects the angular difference between two spectral vectors; it is used to measure the similarity between the spectral characteristics of a pixel in the image and the standard spectral characteristics) into multiple intervals (bins), each interval represents a probability range; according to the category of the bin where each pixel point is located, the probability value of the pixel point belonging to the carbon deposition area can be calculated; the spectral information of each pixel point is converted into a probability value, making the detection of the entire carbon deposition area more quantitative and accurate; through the calculation of the probability value, the algorithm can evaluate each pixel in the image, reducing false positives or missed detections;

[0066] Specifically, as shown in Figure 3 In step S26, a multi-scale segmentation mask is generated based on the correlation coefficient matrix to screen the carbon deposition area; binning operation is performed on the carbon deposition area to calculate a carbon deposition probability value, and the specific steps are as follows:

[0067] S261: According to the correlation coefficient matrix, an adaptive threshold algorithm is used to calculate the local mean and local variance of each waveband pixel point in the image to be processed, and an adaptive threshold is set according to the local mean and local variance;

[0068] The adaptive threshold is used to binarize each waveband of the image to be processed to obtain a binary segmentation mask;

[0069] It should be noted that the local mean and the local variance of each band of the image to be processed are calculated through the correlation coefficient matrix; the brightness and the change characteristics of each local region are calculated respectively, which helps to identify different regions in the image to be processed, especially the characteristics of the target region such as carbon deposition; according to the calculated local mean and variance, an adaptive threshold is set, and the threshold of each pixel point is dynamically adjusted according to the characteristics of the region where the pixel point is located, instead of using a unified global threshold, which has an advantage in dealing with images to be processed with different light, contrast and other changes;

[0070] The adaptive threshold is used for image binarization, that is, the pixel points in the image to be processed are divided into two categories: target region (such as carbon deposition) and non-target region; the result of binarization is a binary segmentation mask, which indicates which regions may be carbon deposition; the adaptive threshold algorithm can cope with local differences of different images and reduce errors caused by changes in light or poor quality of the image to be processed; through the calculation of the local mean and the variance, the limitations of the global threshold method in complex images can be effectively avoided, more accurate segmentation can be realized, which helps to separate the possible carbon deposition region from the image and provides clearer regional division for subsequent analysis;

[0071] S262: Select a multi-scale structural element to perform dilation optimization on the binary segmentation mask, so that each band is connected to obtain a carbon deposition connection region;

[0072] The carbon deposition connection region is eroded and optimized to obtain a carbon deposition smooth region;

[0073] Each scale hole filling is performed on the carbon deposition smooth region to obtain a multi-scale segmentation mask region;

[0074] The pixel points in each scale segmentation mask region are fused by weighted average to obtain a comprehensive mask region;

[0075] It should be noted that the multi-scale structural element is used for dilation optimization on the segmentation mask obtained by binarization, and the connection in the neighborhood of the pixel points is increased, which can connect smaller carbon deposition regions in the image to be processed into a larger connected region;

[0076] Dilation helps to eliminate local broken parts and avoid loss of carbon deposition regions; the eroded region is subjected to a corrosion operation to remove unnecessary noise regions, so that the carbon deposition region is smoother and the small discontinuous parts at the edge are removed; for the small holes or discontinuous parts after erosion, hole filling is performed to ensure the integrity of the carbon deposition region, and the hole filling can prevent the region from being incorrectly segmented;

[0077] The segmentation mask regions of each scale are weighted and averaged to fuse, the segmentation results of different scales are integrated to optimize the segmentation effect, and the precision of the carbon deposition region segmentation is improved through multi-scale fusion, so that the carbon deposition region can be better identified on different scales;

[0078] The multi-scale method can process carbon deposition regions of different scales to ensure that the carbon deposition regions of large or small areas in the image to be processed can be accurately identified; the morphological processing operations such as dilation, erosion, and hole filling can remove noise, optimize the segmentation result, and avoid misidentification; the hole filling and weighted average fusion help to reduce the missed detection phenomenon caused by small-area noise or discontinuity;

[0079] S263: Perform connected region analysis on the integrated mask region, connect all pixel points in the image to be processed into a plurality of connected regions, and calculate the area of each connected region;

[0080] A preset area threshold r is used to determine whether the area of each connected region is greater than the area threshold r;

[0081] If yes, the connected region is determined to be a carbon deposition region;

[0082] It should be noted that the connected region analysis on the integrated mask region divides all pixel points in the image to be processed into a plurality of connected regions according to the connection relationship, which helps to extract different regions from the image to be processed and identify different objects;

[0083] Calculate the area of each connected region to exclude some small-area noise regions and retain larger regions that may be real carbon deposition regions; set an area threshold r, if the area of a connected region is greater than the threshold, the region is considered to be a carbon deposition region; if it is less than the threshold, it may be noise or an irrelevant region and is excluded;

[0084] Excluding connected regions with small areas through the area threshold can effectively remove noise regions and only retain meaningful carbon deposition regions; the setting of the area threshold can ensure that most of the regions identified are real carbon deposition regions, thereby improving the accuracy of identification; through the screening of the area threshold, the number of regions for subsequent processing is reduced, and the overall processing efficiency is improved;

[0085] S264 forms a spectrum vector of the spectral reflectance of each pixel point in the carbon deposition region, and pre-sets a reference spectrum vector and the spectrum vector to calculate a spectrum angle distance value; a boundary value of a number of bins of the spectrum angle distance value of each pixel point is calculated through a binning algorithm operation, a boundary array is constructed; a spectrum histogram is constructed by performing binning operation on the boundary value of the number of bins of the spectrum angle distance value of each pixel point; a spectrum attenuation compensation factor of the oil sample is introduced for calculation through the spectrum histogram, and a carbon deposition probability value is obtained;

[0086] It should be noted that the spectral reflectance of each pixel point is converted into a spectrum vector, which represents the reflection intensity of the pixel point at different wavelengths; the spectral reflectance is the reflection ability of an object to light, which is closely related to factors such as the composition and structure of the material; at the same time, the similarity between them is evaluated by calculating the spectrum angle distance value of the reference spectrum vector and the spectrum vector of each pixel point; the spectrum angle distance reflects the angle difference between two spectrum vectors, and the smaller the angle, the higher the similarity of the two spectra;

[0087] The binning algorithm can convert continuous spectrum angle distance values into discrete categories, so that different spectrum distance values can be classified into different ranges, which helps to simplify data processing and reduce computational complexity;

[0088] All pixel points are traversed, and binning is performed according to their spectrum angle distance values, and finally a spectrum histogram is constructed; the spectrum histogram can reflect the distribution of different spectrum similarity regions by counting the number of pixel points in different bins, and can reveal the spectrum feature difference between the carbon deposition region and other regions; the introduction of the spectrum attenuation compensation factor makes the carbon deposition recognition process more accurate, avoiding errors caused by oil attenuation due to its own physical parameters (i.e. temperature, viscosity), thereby ensuring the accuracy of the carbon deposition probability value;

[0089] It is found through research that the spectrum features of the carbon deposition region often differ significantly from the background region or other substances; by extending the spectrum angle distance value, different spectrum intervals can be more clearly distinguished, thereby enhancing the discrimination between spectrum intervals and helping to better distinguish the carbon deposition region and other regions;

[0090] At the same time, the spectrum angle distance value and binning help to obtain more accurate results when calculating the spectrum attenuation compensation factor; the temperature, viscosity and other physical parameters of the oil sample may affect the spectrum response, and the extended binning can better consider these influencing factors to ensure accurate calculation of the compensation factor, thereby further improving the calculation accuracy of the carbon deposition region probability value, and the specific operation is as follows:

[0091] Specifically, as shown in Figure 4 as shown in Figure 5As shown, in step S264, the spectral reflectance of each pixel point in the carbon deposition area is formed into a spectral vector, and a reference spectral vector is preset to calculate a spectral angle distance value; a binning algorithm operation is performed on the spectral angle distance values of each pixel point to calculate the boundary values of the number of bins, and a boundary array is constructed; the spectral angle distance values of each pixel point are traversed to determine the binning boundary values for binning operation, and a spectral histogram is constructed; a spectral attenuation compensation factor of the oil sample is introduced through the spectral histogram for calculation to obtain a carbon deposition probability value, and the specific operation steps are as follows:

[0092] S2641: The spectral reflectance of each pixel point in the carbon deposition area is sorted according to the spectral reflectance to form a spectral vector of each waveband;

[0093] A reference spectral vector is preset using a spectral angle distance algorithm;

[0094] The spectral vector of each pixel point in the carbon deposition area and the reference spectral vector are calculated to obtain a spectral angle distance value;

[0095] It should be noted that the multi-waveband corrected spectral reflectance of each pixel point in the carbon deposition area is extracted to form a spectral vector of each pixel point (i.e., the reflectance value of each pixel point at each waveband); these reflectance data provide a unique spectral feature for each pixel point, representing the spectral shape of the pixel point;

[0096] Using a spectral angle distance algorithm (SAD), the angle (cosine similarity) between the spectral vector of each pixel point and the preset reference spectral vector is calculated to measure the similarity of the spectral shape; a smaller spectral angle distance means that the shapes of the two spectral vectors are more similar, and a larger spectral angle distance indicates that their shapes have greater differences; thereby setting the reference spectral vector to find a spectral reflectance similar to the spectral vector; SAD can remove the influence of absolute values of illumination or reflectance on the result, and only focuses on the difference in spectral shape, so it is particularly suitable for identifying spectral differences between different materials; the carbon deposition area usually has significant spectral shape differences from other backgrounds or substances, and a larger SAD value helps to indicate the carbon deposition area;

[0097] Due to the significant difference in spectral shape between carbon deposition and background or other materials, the pixel points with a larger SAD value (i.e., spectral angle distance value) may represent the carbon deposition area; by using SAD, the influence of different environmental lighting conditions or reflectance size on recognition is eliminated, ensuring accurate recognition only through spectral shape; based on the similarity of spectral shape, carbon deposition and other objects can be effectively distinguished, thereby helping to detect the carbon deposition area;

[0098] S2642: sorting the spectral angle distance values of all the pixels to form a spectral angle distance list; screening the minimum spectral angle distance value and the maximum spectral angle distance value according to the spectral angle distance list;

[0099] The number of spectral angle distance values in the spectral angle distance list is used to calculate the number of bins according to the binning algorithm;

[0100] The minimum spectral angle distance value and the maximum spectral angle distance value and the number of bins are used to calculate the width of each bin;

[0101] According to the sorting of the spectral angle distance values in the spectral angle distance list, the minimum spectral angle distance value is taken as the boundary value of the first bin in the number of bins;

[0102] The boundary value of the second bin in the number of bins is the minimum spectral angle distance value + the width of the second bin;

[0103] The boundary value of the third bin in the number of bins is the minimum spectral angle distance value + 2x the width of the third bin;

[0104] Until the boundary value of the last bin in the number of bins is obtained, the maximum spectral angle distance value is taken as the boundary value of the last bin in the number of bins;

[0105] The boundary values of all the bins are generated into a boundary array;

[0106] It should be noted that the spectral angle distance values of all the pixels are sorted to form a spectral angle distance list, so as to understand the similarity degree of each pixel point and the reference spectrum vector; according to the minimum spectral angle distance value and the maximum spectral angle distance value, and the number of all spectral angle distance values, different spectral angle distance ranges are divided by the binning algorithm, that is, the number of bins is calculated, and the number of bins is calculated by the formula of the binning algorithm: Wherein The number; each bin represents a certain interval of spectral angle distance, which helps to analyze the number of pixels with different similarity degrees; according to the number of bins and the range of spectral angle distance, a boundary array is generated, which is used to divide the interval of spectral angle distance value; the number of spectral angle distance values in each bin is counted to form a count array; that is, the minimum spectral angle distance value and the maximum spectral angle distance value represent the spectral interval, which reflects the similarity between the spectra;

[0107] Through binning, the spectral distribution of the pixels in the carbon deposition area can be more intuitively understood, and it can be identified which pixels are more similar to the reference spectrum vector; through this sorting and binning method, it can be accurately identified which pixels belong to the carbon deposition area, and the accuracy of carbon deposition identification is further improved;

[0108] S2643: traversing the spectral angle distance values in the spectral angle distance list, judging whether each spectral angle distance value is greater than or equal to the boundary value of the i th bin in the boundary array and less than the boundary value of the i+1 th bin in the boundary array;

[0109] If yes, the spectral angle distance value is classified into the i th bin in the boundary array, and counted as 1; the number of spectral angle distance values in each bin is counted to form a count array;

[0110] The boundary value of each bin in the count array is used as the x-axis, and the number of spectral angle distance values in each bin is used as the y-axis to construct a spectral histogram;

[0111] It should be noted that according to the data after binning, the spectral histogram is constructed, the x-axis is the spectral angle distance interval (the boundary value of binning), and the y-axis is the number of spectral angle distance values in each bin; by counting the number of spectral angle distance values in each bin, the distribution of different spectral patterns is reflected;

[0112] The histogram provides a visual tool for analyzing the distribution of different spectral angle distances, helping to better understand the spectral differences between the carbon deposition area and the background area; by counting and histogram, the spectral angle distance distribution difference between the carbon deposition area and other areas can be more accurately identified, which helps to better define the boundary of the carbon deposition area;

[0113] S2644: calculating the mean and standard deviation of the spectral angle distance values using the pixel points of the spectral histogram; calculating the spectral angle distance skewness by the mean and standard deviation of the spectral angle distance values of the spectral histogram;

[0114] It should be noted that the mean and standard deviation of the spectral angle distance values are calculated by the spectral histogram, and these statistics can reflect the concentration trend and fluctuation degree of the spectral angle distance; skewness refers to the asymmetry of the distribution, and calculating the skewness of the spectral angle distance can reveal the characteristics of the spectral pattern of the carbon deposition area, and judge whether it conforms to the normal distribution mode;

[0115] The calculation of the mean, standard deviation and skewness can help further analyze the spectral characteristics of the carbon deposition area and identify whether there is abnormal spectral distribution; the calculation of the skewness can be used as a feature to distinguish the carbon deposition area and the background area;

[0116] S2645: calculating the pixel probability density of the spectral angle distance values for each bin of pixel points;

[0117] It should be noted that the pixel probability density of the spectral angular distance value is calculated for each pixel in each bin. This is to obtain the probability that each pixel belongs to a specific spectral angular distance range. By calculating the probability density of the pixels, a more detailed estimate of the affiliation of different pixels can be made, further improving the accuracy of carbon deposit identification. This step helps to understand the distribution of different pixels in the spectral angular distance space and provides support for the calculation of the carbon deposit probability value.

[0118] S2646: Collect the first physical parameter of the engine oil sample;

[0119] A spectral attenuation compensation factor is introduced based on the first physical parameter;

[0120] The carbon deposition probability value of the carbon deposition region is calculated using the spectral attenuation compensation factor, the mean and standard deviation of the spectral angular distance value, the spectral angular distance skewness, and the pixel probability density. The calculation formula is as follows:

[0121] ;

[0122] in, This represents the total number of pixels within the carbon deposit area.

[0123] The first in the carbon deposit region The probability density of the spectral angular distance values ​​of each pixel;

[0124] The first in the carbon deposit region The spectral angular distance value of each pixel;

[0125] This is the average spectral angular distance value of all pixels within the carbon deposition region;

[0126] The scaling parameter for the spectral angular distance values ​​(usually the standard deviation of the spectral angular distance values) is used to characterize the degree of data fluctuation.

[0127] This is a constant factor used to normalize or adjust the probability of each pixel.

[0128] It is a spectral attenuation compensation factor, reflecting the temperature of the engine oil sample. With viscosity The influence of the first physical parameter on the spectral response;

[0129] It should be noted that a spectral attenuation compensation factor is introduced based on the primary physical parameters of the engine oil sample (such as temperature and viscosity); these physical factors may affect the spectral response, and therefore compensation is required.

[0130] The carbon deposition probability value of the carbon deposition area is calculated by using the spectral angle distance value, the standard deviation, the skewness, the pixel probability density and the spectral attenuation compensation factor; by comprehensively considering these factors, a more accurate carbon deposition area probability can be obtained;

[0131] The spectral attenuation compensation factor can correct the spectral changes caused by physical factors such as temperature and viscosity, so as to more truly reflect the spectral characteristics of the carbon deposition area; by comprehensively considering multiple factors (such as the spectral angle distance, the standard deviation, the skewness, etc.), the probability of the carbon deposition area can be more accurately evaluated, and the detection accuracy is improved;

[0132] Embodiment two

[0133] As shown in Figure 6 The application further provides a multi-spectral imaging-based engine oil carbon deposition sampling detection system, which comprises a collection module 10, an analysis module 20 and a result module 30.

[0134] The collection module 10 is used for collecting a multi-spectral image of an engine oil sample under a multi-spectral light source, and pre-processing the multi-spectral image to obtain a to-be-processed image.

[0135] The analysis module 20 is used for performing dark current correction on the to-be-processed image according to a wave band ratio method, enhancing the signal intensity of the to-be-processed image; calculating the spectral reflectivity of the to-be-processed image according to the signal intensity of the to-be-processed image; extracting a three-dimensional feature tensor in the to-be-processed image according to the spectral reflectivity; segmenting the to-be-processed image for the three-dimensional feature tensor, screening a carbon deposition area; and calculating a carbon deposition probability value of each pixel point in the carbon deposition area according to the combined spectral reflectivity.

[0136] The result module 30 is used for setting a carbon deposition threshold value for judging the carbon deposition probability value, so as to judge whether the engine oil sample has carbon deposition.

[0137] In summary, the oil carbon deposition sampling detection method and system based on multispectral imaging provided by the present application can effectively eliminate errors caused by noise during sensor acquisition through the dark current correction step, especially in poor lighting conditions, the correction can ensure the accuracy of the image data, providing more real optical information for subsequent spectral reflectance calculation, feature extraction and image segmentation, and also enhancing the image of the oil sample; secondly, the signal intensity and spectral reflectance can be accurately obtained by the band ratio method, especially the reflectance characteristic difference of carbon deposition and other substances under different wavebands, which enhances the recognition ability of the carbon deposition area; the calculation of reflectance difference not only considers the spectral data of individual wavebands, but also comprehensively describes the spatial distribution and spectral information of the image by constructing a three-dimensional feature tensor combining spatial information and spectral characteristics, further improving the recognition accuracy of the carbon deposition area; after constructing the three-dimensional feature tensor, the correlation between the wavebands can be analyzed and calculated by the mutual information coefficient, which can optimize the selection of wavebands, eliminate redundant information and improve the recognition efficiency; by understanding the correlation between the wavebands, only the wavebands that significantly contribute to the recognition of carbon deposition are used, thereby improving the recognition accuracy and reducing the processing time;

[0138] Further, first, the adaptive threshold algorithm is used to dynamically set the threshold according to the local mean and variance of each image waveband, rather than using a fixed global threshold, which enables the algorithm to adaptively adjust when facing images of different illumination, contrast and quality, thereby effectively dealing with complex image changes, improving the accuracy of binarization and reducing errors; in the segmentation stage, a multi-scale morphological segmentation algorithm is used, which optimizes the segmentation results through operations such as dilation, erosion, hole filling, etc.; dilation optimization helps to connect dispersed carbon deposition areas, eliminate local breaks in the image and avoid loss of carbon deposition areas; the erosion operation removes noise and smooths edges; hole filling ensures the integrity of the region and prevents segmentation errors; by weighted average fusion of segmentation results of different scales, the segmentation accuracy is further improved, ensuring that both large-scale and small-scale carbon deposition areas can be accurately identified; in the connected region analysis stage, the area threshold is used to filter to ensure that only the true carbon deposition area is retained, which not only improves the processing efficiency, but also ensures the accuracy of carbon deposition area recognition; finally, the spectral analysis technique calculates the spectral angle distance of each pixel point and simplifies the data processing using the binning algorithm to construct a spectral histogram, which improves the accuracy of carbon deposition recognition in combination with the oil attenuation compensation factor; through the analysis of spectral angle distance, the spectral difference between the carbon deposition area and other areas can be revealed in depth, thereby realizing more accurate carbon deposition probability value calculation.

[0139] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; those skilled in the art can modify the technical solutions described in the above embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for sampling and detecting oil carbon deposition based on multi-spectral imaging, characterized in that, The method comprises the following operation steps: The oil sample is collected under a multi-spectral light source to obtain a to-be-processed multi-spectral image, and the to-be-processed multi-spectral image is preprocessed to obtain a to-be-processed image; Dark current correction is performed on the to-be-processed image according to the band ratio method to enhance the signal intensity of the to-be-processed image; the spectral reflectance of the to-be-processed image is calculated according to the signal intensity of the to-be-processed image; and a three-dimensional feature tensor in the to-be-processed image is extracted according to the spectral reflectance. The to-be-processed image is segmented according to the three-dimensional feature tensor to screen a carbon deposition area; and the carbon deposition probability value of each pixel point in the carbon deposition area is calculated by combining the spectral reflectance. The carbon deposition threshold value is set according to the carbon deposition probability value to make a judgment, so as to determine whether the oil sample has carbon deposition.

2. The method according to claim 1, wherein the method is based on multispectral imaging. The dark current correction is performed on the to-be-processed image according to the band ratio method to enhance the signal intensity of the to-be-processed image, and the specific operation steps are as follows: An original image of the inorganic carbon sample under a multi-spectral light source is collected; The original dark current image data of the inorganic carbon sample is collected under shielding without light; and the dark current correction of each wave band of the original image is performed on the original image by using the original dark current image data, so as to obtain the signal intensity of the original image; The to-be-processed dark current image data of the oil sample is collected under shielding without light; The dark current correction of each wave band of the to-be-processed image is performed on the to-be-processed image by using the to-be-processed dark current image data, so as to obtain the signal intensity of the to-be-processed image.

3. The method of claim 2, wherein the method is based on multispectral imaging. The spectral reflectance of the to-be-processed image is calculated according to the signal intensity of the to-be-processed image; and a three-dimensional feature tensor in the to-be-processed image is extracted according to the spectral reflectance, and the specific operation steps are as follows: The spectral reflectance of each pixel point in the original image and the to-be-processed image is calculated by using the band ratio method according to the signal intensity of the original image and the signal intensity of the to-be-processed image; The average reflectance difference value is calculated by using the spectral reflectance of each pixel point in the original image and the spectral reflectance of each pixel point in the to-be-processed image; The average reflectance difference value of each wave band of all pixel points in the to-be-processed image is sorted according to the spectral reflectance of each pixel point; and a three-dimensional array is constructed according to the arrangement of the spatial position of the to-be-processed image, which is used as a three-dimensional feature tensor.

4. The method according to claim 3, wherein the method is based on multispectral imaging. The to-be-processed image is segmented according to the three-dimensional feature tensor to screen a carbon deposition area; and the carbon deposition probability value of each pixel point in the carbon deposition area is calculated by combining the spectral reflectance, and the specific operation steps are as follows: The correlation between each wave band is analyzed by using the mutual information coefficient of the constructed three-dimensional feature tensor, and a correlation coefficient matrix reflecting the mutual relationship between each wave band is generated; Based on the correlation coefficient matrix, a multi-scale segmentation mask is generated to screen a carbon deposition area; and a carbon deposition probability value is calculated by performing a binning operation on the carbon deposition area.

5. The method of claim 4, wherein the method is based on multispectral imaging. Based on the correlation coefficient matrix, a multi-scale segmentation mask is generated to screen a carbon deposition area, and the specific operation steps are as follows: Adopting an adaptive threshold algorithm according to the correlation coefficient matrix, local mean and local variance of each pixel point in each band of the image to be processed are calculated, and an adaptive threshold is set according to the local mean and the local variance; Each band of the image to be processed is binarized by using the adaptive threshold, and a binary segmentation mask is obtained; a multi-scale structural element of a multi-scale morphological segmentation algorithm is used to perform inflation optimization on the binary segmentation mask, so that each band is connected to each other, and a carbon deposition connection region is obtained; the carbon deposition connection region is subjected to corrosion optimization, and a carbon deposition smooth region is obtained; Each scale hole filling of the carbon deposition smooth region is performed, and a multi-scale segmentation mask region is obtained; Weighted average fusion of pixel points in each scale segmentation mask region is performed, and a comprehensive mask region is obtained; The comprehensive mask region is subjected to connected region analysis, all pixel points in the image to be processed are connected into a plurality of connected regions, and the area of each connected region is calculated; A preset area threshold r is used to determine whether the area of each connected region is greater than the area threshold r; if yes, the connected region is determined as a carbon deposition region.

6. The method of claim 5, wherein the method is based on multispectral imaging. The carbon deposition region is subjected to binning operation to calculate a carbon deposition probability value, specifically as follows: Spectral reflectance of each pixel point in the carbon deposition region is formed into a spectral vector, and a reference spectral vector is preset to calculate a spectral angle distance value; a binning boundary value of the number of spectral angle distance values is calculated through binning algorithm operation of spectral angle distance values of each pixel point, and a boundary array is constructed; the binning boundary value is determined through traversal of spectral angle distance values of each pixel point, binning operation is performed, and a spectral histogram is constructed; The spectral histogram is used to introduce a spectral attenuation compensation factor of an oil sample for calculation, and a carbon deposition probability value is obtained.

7. The method of claim 6, wherein the method is based on multispectral imaging. Spectral reflectance of each pixel point in the carbon deposition region is formed into a spectral vector, and specific operation steps are as follows: Each band of each pixel point in the carbon deposition region is sorted according to spectral reflectance, and a spectral vector of each band is formed; A reference spectral vector is preset by using a spectral angle distance algorithm; The spectral vector of each pixel point in the carbon deposition region and the reference spectral vector are calculated to obtain a spectral angle distance value.

8. The method of claim 7, wherein the method is based on multispectral imaging. A binning boundary value of the number of spectral angle distance values is calculated through binning algorithm operation of spectral angle distance values of each pixel point, and a boundary array is constructed, and specific operation steps are as follows: Spectral angle distance values of all pixel points are sorted to form a spectral angle distance list; the minimum spectral angle distance value and the maximum spectral angle distance value are screened according to the spectral angle distance list; The number of spectral angle distance values in the spectral angle distance list is used to calculate the number of bins according to the binning algorithm; the width of each bin is calculated according to the minimum spectral angle distance value, the maximum spectral angle distance value and the number of bins; The number of spectral angle distance values in the spectral angle distance list is used to calculate the number of bins according to the binning algorithm; the width of each bin is calculated according to the minimum spectral angle distance value, the maximum spectral angle distance value and the number of bins; According to the order of the spectral angle distance values in the spectral angle distance list, the minimum spectral angle distance value is taken as the boundary value of the first bin in the bin number; the boundary value of the second bin in the bin number is the minimum spectral angle distance value + the width of the second bin; the boundary value of the third bin in the bin number is the minimum spectral angle distance value + 2 x the width of the third bin; Until the boundary value of the last bin in the bin number is obtained, the maximum spectral angle distance value is taken as the boundary value of the last bin in the bin number; The boundary values of all bins are generated into a boundary array.

9. The method of claim 8, wherein the method is based on multispectral imaging. The spectral angle distance values of each pixel point are traversed to determine the boundary values of the bins for binning operation, and a spectral histogram is constructed; a spectral attenuation compensation factor of the oil sample is introduced through the spectral histogram for calculation to obtain a carbon deposit probability value, and the specific operation steps are as follows: The spectral angle distance values in the spectral angle distance list are traversed to determine whether each spectral angle distance value is greater than or equal to the boundary value of the i th bin in the boundary array and less than the boundary value of the i+1 th bin in the boundary array; If yes, the spectral angle distance value is classified into the i th bin in the boundary array, and the count is 1; the number of spectral angle distance values in each bin is counted to form a count array; The boundary value of each bin in the count array is taken as the x-axis, and the number of spectral angle distance values of each bin is taken as the y-axis to construct a spectral histogram; The mean and standard deviation of the spectral angle distance values of the pixel points of the spectral histogram are calculated; the spectral angle distance skewness is calculated through the mean and standard deviation of the spectral angle distance values of the spectral histogram; the pixel probability density of the spectral angle distance values is calculated for each bin. A first physical parameter is collected for the oil sample; a spectral attenuation compensation factor is introduced based on the first physical parameter; the carbon deposit probability value of the carbon deposit area is calculated by using the spectral attenuation compensation factor, the mean and standard deviation of the spectral angle distance values, the spectral angle distance skewness, and the pixel probability density.

Citation Information

Patent Citations

  • Hyperspectral classification identification method based on superpixel segmentation

    CN115937685A

  • Coal quality evaluation method and system based on hyperspectral imaging technology

    CN119164899A