Engine oil carbon deposit sampling detection method and system based on multispectral imaging

Through multispectral imaging technology and image processing algorithms, the problem of inaccurate detection results in oil carbon deposit detection is solved, efficient and accurate carbon deposit area identification is achieved, and detection efficiency and accuracy are improved.

CN120702990AActive Publication Date: 2025-09-26TONGYI PETROLEUM CHEM CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

Multispectral imaging technology is used to collect images through a multispectral light source, dark current correction is performed, and the spectral reflectance is calculated using the band ratio method. A three-dimensional feature tensor is constructed, and mutual information analysis and an adaptive threshold algorithm are combined to perform carbon deposit area segmentation and probability value calculation. The spectral angular distance and binning algorithm are used to improve recognition accuracy.

Benefits of technology

It effectively eliminates sensor noise errors, enhances image signal strength and optical information, improves the recognition accuracy and efficiency of carbon deposit areas, reduces errors, and ensures efficient and accurate carbon deposit detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702990A_ABST
    Figure CN120702990A_ABST
Patent Text Reader

Abstract

The invention discloses an engine oil carbon deposition sampling detection method and system based on multispectral imaging, and the method comprises the steps: carrying out the collection of a to-be-processed multispectral image of an engine oil sample under a multispectral light source, and carrying out the preprocessing of the image to obtain a to-be-processed image; performing dark current correction on the to-be-processed image according to a band ratio method, and 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 according to the three-dimensional feature tensor, and screening a carbon deposition region; calculating a carbon deposition probability value of each pixel point in the carbon deposition area according to the spectral reflectivity; and setting a carbon deposition threshold value according to the carbon deposition probability value for judgment so as to judge whether carbon deposition exists in the engine oil sample or not. The similarity between the sample engine oil spectral reflectivity and the reference engine oil is reflected, and a possible carbon deposition area is found, so that the carbon deposition defect is accurately judged and identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to carbon deposit detection, and in particular to a method and system for sampling and detecting carbon deposits in engine oil based on multispectral imaging. Background Art

[0002] With the development of modern industrial technology, engine oil, a key lubricant and protective material, has become increasingly important, particularly in automobiles, machinery, and other power systems. Its quality directly impacts engine performance and service life. Carbon deposits, a common byproduct of oil and engine operation, can seriously impact engine efficiency and even cause malfunctions over time. Therefore, effectively detecting and monitoring carbon deposits in engine oil has become a crucial issue in the automotive and machinery maintenance fields.

[0003] Currently, oil carbon deposit detection methods primarily rely on traditional chemical analysis, physical inspection, and manual sampling. While these methods offer some promise, they often rely on experience and manual labor, making it difficult to achieve sufficiently accurate and consistent results. Manual testing is not only time-consuming but also prone to errors, making it inefficient, especially when testing large batches of samples.

[0004] To overcome the above problems, multispectral imaging technology can not only extract spatial information but also obtain the reflectivity and absorption characteristics of carbon deposits in different spectral bands by simultaneously collecting image data in multiple bands. This technology can reflect the spectral differences of samples 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 characteristics of carbon deposit areas can be further extracted, providing technical support for online and real-time detection. However, how to extract stable and representative spectral features from multispectral image data and distinguish between real carbon deposit areas and background noise is still a technical problem that needs to be solved urgently in this field. Summary of the Invention

[0005] The purpose of the present invention is to provide a method and system for sampling and detecting carbon deposits in engine oil based on multispectral imaging, which solves the above-mentioned technical problems pointed out in the prior art.

[0006] The present invention provides a method for sampling and detecting carbon deposits in engine oil based on multispectral imaging, comprising the following steps:

[0007] Collecting a multispectral image to be processed from the engine oil sample under a multispectral light source, and preprocessing the multispectral image to be processed to obtain an image to be processed;

[0008] Performing 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; calculating the spectral reflectance of the image to be processed according to the signal strength of the image to be processed; extracting a three-dimensional feature tensor from the image to be processed according to the spectral reflectance; segmenting the image to be processed based on the three-dimensional feature tensor to screen the carbon deposit area; and calculating the carbon deposit probability value by combining the spectral reflectance of each pixel in the carbon deposit area;

[0009] A carbon deposit threshold is set according to the carbon deposit probability value to determine whether carbon deposits exist in the engine oil sample.

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

[0011] From the analysis of the above-mentioned oil carbon deposit sampling detection method and system based on multispectral imaging provided by the present invention, it can be seen that in specific applications, firstly, the dark current correction step effectively eliminates the error caused by noise during sensor acquisition, especially in an environment with poor lighting conditions. The correction can ensure the accuracy of image data, and provide more realistic optical information for subsequent spectral reflectance calculation, feature extraction and image segmentation, while also enhancing the image of the oil sample; secondly, the signal intensity and spectral reflectance are calculated by the band ratio method, which can accurately obtain the optical property difference between the oil sample and the reference sample, especially the optical property difference between carbon deposits and other substances at different wavelengths. The difference in reflectance characteristics under different bands enhances the recognition ability of carbon deposit areas; the calculation of reflectance difference not only considers the spectral data of individual bands, but also comprehensively describes the spatial distribution and spectral information of the image by constructing a three-dimensional feature tensor that combines spatial information and spectral characteristics, further improving the recognition accuracy of carbon deposit areas; after the three-dimensional feature tensor is constructed, the correlation between bands is calculated through mutual information coefficient analysis, which can optimize the selection of bands, eliminate redundant information, and improve recognition efficiency. By understanding the correlation between bands, it is ensured that only bands that significantly contribute to carbon deposit identification are used, thereby improving recognition accuracy and reducing processing time;

[0012] Furthermore, firstly, an 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. This enables the algorithm to adaptively adjust when facing images with different illumination, contrast and quality, thereby effectively responding to changes in complex images, improving the accuracy of binarization and reducing errors. In the segmentation stage, a multi-scale morphological segmentation algorithm is used to optimize the segmentation results through operations such as expansion, corrosion, and hole filling. Expansion optimization helps to connect scattered carbon deposit areas, eliminate local breaks in the image, and avoid the loss of carbon deposit areas. Corrosion operations remove noise and smooth edges. Hole filling ensures the integrity of the area and prevents segmentation errors. ; By weighted averaging and fusing the segmentation results of different scales, the segmentation accuracy is further improved, ensuring that both large-scale and small-scale carbon deposit areas can be accurately identified; in the connected area analysis stage, area threshold screening is used to ensure that only real carbon deposit areas are retained, which not only improves processing efficiency but also ensures the accuracy of carbon deposit area identification; finally, spectral analysis technology calculates the spectral angular distance of each pixel point, uses a binning algorithm to simplify data processing, constructs a spectral histogram, and combines the oil attenuation compensation factor to improve the accuracy of carbon deposit identification; through the analysis of spectral angular distance, it can deeply reveal the spectral differences between the carbon deposit area and other areas, thereby achieving more accurate calculation of the carbon deposit probability value. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 This is a flow chart of a method for sampling and detecting oil carbon deposits based on multispectral imaging according to Example 1;

[0014] Figure 2 This is a flow chart of a method for sampling and detecting carbon deposits in engine oil based on multispectral imaging in accordance with the first embodiment, which utilizes spectral reflectance to finally obtain a carbon deposit probability value;

[0015] Figure 3 This is a flow chart of a method for detecting carbon deposits in oil based on multispectral imaging in accordance with the first embodiment, which uses a mask to segment the carbon deposit area and obtain a carbon deposit probability value;

[0016] Figure 4 This is a flow chart of a method for detecting carbon deposits in oil based on multispectral imaging and calculating the probability of carbon deposits using spectral angular distance according to the first embodiment;

[0017] Figure 5 Schematic diagram of a method for detecting carbon deposits in oil based on multispectral imaging in Example 1, which uses spectral angular distance to calculate the probability value of carbon deposits;

[0018] Figure 6 This is a flow chart of a system for sampling and detecting engine oil carbon deposits based on multispectral imaging according to Example 2;

[0019] Label: acquisition module 10; analysis module 20; result module 30. DETAILED DESCRIPTION

[0020] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0021] The present invention will be further described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0022] Example 1

[0023] like Figure 1 As shown, an embodiment of the present invention provides an oil carbon deposit sampling detection method based on multispectral imaging, including the following steps:

[0024] S1: collecting a multispectral image to be processed from the engine oil sample under a multispectral light source, and preprocessing the multispectral image to be processed to obtain an image to be processed;

[0025] It should be noted that the multispectral image to be processed is collected under a multispectral light source and includes spectral information of at least five different bands, including ultraviolet band, blue band, green band, red band, and near-infrared band. Using images of at least five bands, spectral information of the oil sample can be obtained from different spectral ranges to ensure that subtle differences between the carbon deposit area and the background can be captured. The reflectivity of different bands can effectively distinguish carbon deposits from other substances because the spectral characteristics of carbon deposits in different bands are usually significantly different from those of the background.

[0026] S2: performing 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; calculating the spectral reflectance of the image to be processed according to the signal strength of the image to be processed; extracting a three-dimensional feature tensor from the image to be processed according to the spectral reflectance; segmenting the image to be processed based on the three-dimensional feature tensor to screen the carbon deposit area; calculating the carbon deposit probability value by combining the spectral reflectance of each pixel in the carbon deposit area;

[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 image acquisition process is eliminated and the signal strength of the image to be processed is enhanced. The band ratio method is further used to calculate the spectral reflectance of the image to be processed to obtain the reflectance value of each pixel. Spectral reflectance is a key characteristic of a substance and can reflect the physical and chemical properties of the oil sample.

[0028] Based on the calculated spectral reflectance, a three-dimensional feature tensor is extracted from the image to be processed. This tensor is a high-dimensional feature representation of the image to be processed, containing multidimensional information about 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 to screen out areas where carbon deposits may exist. Carbon deposits are detected by finding areas with abnormal spectral characteristics in the image to be processed.

[0029] The band ratio method eliminates the influence of dark current, enhances signal strength, improves the quality of the processed image, and ensures that the details of the carbon deposit area can be clearly captured; through spectral reflectance calculation, the true spectral characteristics of each pixel can be more accurately obtained; carbon deposit areas usually differ from other areas in spectral reflectance, and the difference in spectral reflectance can effectively identify carbon deposit areas; the three-dimensional feature tensor can provide multi-dimensional information for each pixel. This information is derived from multi-band data and can provide more details for the accurate identification of carbon deposit areas; by segmenting the processed image, the carbon deposit area can be distinguished from the background area, further improving the recognition accuracy, helping to quickly locate the carbon deposit area, and reducing the amount of calculation;

[0030] S3: Setting a carbon deposit threshold value according to the carbon deposit probability value to determine whether the engine oil sample has carbon deposits.

[0031] It should be noted that for each pixel in the carbon deposit area, the probability value of the pixel belonging to the carbon deposit area is calculated in combination with its spectral reflectance. This value reflects the degree of match between each pixel and the carbon deposit spectral characteristics. The higher the probability value, the more likely it is a carbon deposit area. Based on the carbon deposit probability value, a threshold is set. By judging which pixels have a probability value greater than the threshold, the final decision on whether there is carbon deposit in the image is made.

[0032] By calculating the carbon deposit probability value, each pixel in the image can be evaluated one by one to accurately reflect the possibility of carbon deposit areas. The threshold judgment mechanism ensures that the determination of carbon deposit areas has a certain degree of fault tolerance. By setting the appropriate threshold, it can reduce false recognition and ensure efficient and accurate carbon deposit detection.

[0033] Specifically, if 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 according to the signal strength of the image to be processed; a three-dimensional feature tensor is extracted from the image to be processed according to the spectral reflectance; the image to be processed is segmented according to the three-dimensional feature tensor to screen the carbon deposition area; and the carbon deposition probability value is calculated by combining the spectral reflectance of each pixel in the carbon deposition area. The specific operation steps are as follows:

[0034] S21: Collect the original image of the inorganic carbon sample under a multi-spectral light source;

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

[0036] Performing dark current correction of each band of a multi-spectral image on the original image using the original dark current image data to obtain a signal intensity of the original image;

[0037] It should be noted that the original image data was obtained under a multispectral light source to record the reflectance characteristics of the inorganic carbon sample in different bands. The data of each band reflects the reflectance ability of the sample in that band;

[0038] The raw image data collected under no-light conditions, that is, the dark current image, only reflects the noise of the sensor itself, namely the "dark current". The dark current image does not contain the optical information of the actual sample, but only reflects the inherent noise of the sensor in the absence of light.

[0039] By acquiring a dark current image, subsequent images can be corrected. The data after dark current correction can reduce noise interference caused by factors such as ambient temperature and sensor aging, thereby improving the accuracy of subsequent spectral reflectance calculations, feature extraction, and image segmentation, ensuring that the data used in the analysis is closer to the actual optical properties. Especially in poor lighting conditions, sensor noise will interfere with the actual image data and affect subsequent analysis. Dark current correction is to eliminate the influence of this noise, thereby obtaining a more accurate original image.

[0040] The identification of carbon deposits relies on the analysis of the spectral characteristics of inorganic carbon samples, because carbon deposits often have unique spectral reflectance patterns. By calculating the reflectance, detailed optical characteristics of inorganic carbon can be obtained, and then the carbon deposit area can be identified by comparing the reflectance differences of different samples.

[0041] S22: collecting dark current image data to be processed from the engine oil sample (engine oil sample to be tested) under shielding without light;

[0042] performing dark current correction of each band of a multi-spectral image on the image to be processed using the dark current image data to obtain a signal intensity of the image to be processed;

[0043] It should be noted that the main purpose of dark current correction is to correct for the inherent noise generated by the sensor under no-light conditions. Images are acquired under completely no-light conditions (or in a shielded state) to obtain raw noisy image data called "dark frames." The dark current level in the corresponding band of the actual multispectral image data is deducted to correct the signal deviation caused by sensor noise in each band, thereby obtaining the image signal strength.

[0044] S23: Calculating the spectral reflectance of each pixel in the original image and the image to be processed respectively based on the signal intensity of the original image and the signal intensity of the image to be processed using a band ratio method;

[0045] The average reflectance difference is calculated using the spectral reflectance of each pixel of the original image and the spectral reflectance of each pixel of the image to be processed. The calculation formula is:

[0046] + ;

[0047] is the calculated cumulative average reflectivity difference;

[0048] is the constant factor used to scale the calculation results;

[0049] and are the number of bands in the original image and the image to be processed, respectively, and is the total number of bands (e.g. at least 5 bands);

[0050] Indicates the image to be processed pixels in the i-th band Spectral reflectance of the oil sample after processing;

[0051] Indicates the spectral reflectance of the corresponding pixel point (i.e., the a-th pixel point) in the original image in the same band as the reference non-carbon deposited sample; for each pixel point , first in group 1 (band to ) calculate the average of the reflectance difference, and then in group 2 (band to ) Calculate the average of the reflectivity difference, and then multiply the overall average by a constant factor ;

[0052] It should be noted that the spectral reflectance of each pixel is calculated based on the image data of different bands, and then the reflectance difference between the original image and the image to be processed is calculated;

[0053] Spectral reflectance indicates a sample's ability to reflect incident light at specific wavelengths, reflecting its optical properties. Different substances (such as engine oil and carbon deposits) exhibit distinct reflectance differences at different wavelengths, with carbon deposits typically exhibiting reflectance characteristics different from those of other substances at certain wavelengths. Calculating spectral reflectance accurately identifies spectral signatures specific to carbon deposits (indirectly screening and identifying carbon deposits). Spectral reflectance reveals the difference between carbon deposits and background areas, allowing for the distinction between carbon deposits and non-carbon deposit areas.

[0054] There is a significant difference in spectral reflectivity between carbon deposits and other substances. By calculating the reflectivity difference, areas where carbon deposits may exist can be effectively identified.

[0055] After dark current correction and spectral calibration, the calculated spectral reflectance data can objectively describe the optical properties and material differences between the oil sample and the reference sample at different wavelengths. The reflectance difference can be calculated. Carbon deposit areas typically exhibit spectral reflectance characteristics different from the background, and this quantitative difference can be used to effectively segment and screen out carbon deposit areas.

[0056] S24: calculating an average reflectance difference according to the spectral reflectance of each pixel point, and sorting the average reflectance difference values ​​of all pixels in the image to be processed in each band;

[0057] The average reflectance difference of all sorted pixels is constructed into a three-dimensional array according to the arrangement of the spatial position (i.e., row and column) of the image to be processed (i.e., the order of sorting), as a three-dimensional feature tensor (i.e., the three-dimensional array includes image height × image width × number of bands; 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: the number of bands (the reflectance difference vector of each pixel sorted by band); which can be expressed as ,in: is the image height, is the image width, and B is the total number of bands. In carbon deposit detection or other spectral analysis tasks, we not only focus on the reflectance of a single band, but also need to comprehensively consider the spectral variation characteristics of each band. The height and width dimensions preserve the spatial distribution information of the original image, making it easier to capture the continuity and local structure between regions. The number of bands dimension preserves the difference in spectral reflectance of each pixel in different bands, reflecting the spectral characteristics of the material. For example, the spectral shape of the carbon deposit area is usually significantly different from that of the background.

[0058] It should be noted that a three-dimensional feature tensor is constructed: by calculating the spectral reflectance difference of each pixel point, and sorting the difference results of all pixel points by band (that is, "sorting" here refers to arranging the reflectance difference corresponding to each pixel according to the band order, ensuring that the vector of each pixel has the same arrangement order in each band data, so as to ensure that in the subsequent comparison or analysis process, there will be no errors introduced due to the disorder of the band data order), so that the spectral data of different pixels in each band can be directly compared, and the overall statistical characteristics of the data are enhanced, because the arrangement order of the data is consistent and there will be no differences due to the pixel sampling order, and then a three-dimensional feature tensor is formed; the tensor contains the spatial information of the image and the spectral feature differences between the bands; the three-dimensional tensor can simultaneously reflect the information of the image in the spatial and spectral dimensions; the three-dimensional feature tensor combines the spatial information and spectral information of the image, so that in the identification of carbon deposit areas, both spatial distribution and spectral features can be used to provide more comprehensive information;

[0059] By constructing a three-dimensional tensor, we can leverage the correlation between space and wavelength to improve recognition accuracy and avoid misidentification based on information from only one dimension. The distribution of carbon deposits is closely related to both spatial location and the spectral characteristics of each wavelength. Combining these two factors helps to fully describe the characteristics of the carbon deposit area. The three-dimensional tensor can fully describe the characteristics of the image, improving the reliability and accuracy of carbon deposit area identification.

[0060] S25: Analyze the mutual information coefficient of the constructed three-dimensional feature tensor to find the correlation between the bands, and generate a correlation coefficient matrix reflecting the relationship between the bands;

[0061] It should be noted that the constructed three-dimensional feature tensor is analyzed to calculate the correlation matrix between each band. The mutual information coefficient can quantify the similarity and information sharing between different bands. The calculated correlation matrix can be used to understand which bands have the closest relationship and which bands provide more information.

[0062] By analyzing the correlation between bands, those bands that are most relevant to carbon deposit identification can be selected, thereby improving identification efficiency; understanding the correlation between bands can reduce information redundancy, focus only on the bands that are most useful for carbon deposit identification, and improve processing efficiency; through mutual information coefficient analysis, those bands that contribute less to carbon deposit identification can be excluded, and only bands that affect the results can be retained, thereby improving the efficiency and accuracy of the system; the above-mentioned technical solution "calculated correlation matrix" can optimize the subsequent identification process by analyzing the correlation between bands, making the system more efficient and improving accuracy.

[0063] S26: generating a multi-scale segmentation mask based on the correlation coefficient matrix to screen the carbon deposit area; performing a binning operation on the carbon deposit area to calculate the carbon deposit 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 carbon deposit areas from background areas at multiple scales; the spectral characteristics of carbon deposit areas are usually different from those of other substances, so correlation analysis (that is, correlation analysis mainly refers to using the correlation coefficient matrix to measure the similarity between the spectral reflectance characteristics of pixels in the image, thereby helping to accurately locate carbon deposit areas; specifically, correlation analysis calculates the correlation between the spectral characteristics of each pixel in the image to be processed and the spectral characteristics of other pixels, captures pixels with similar spectral characteristics, and thus identifies areas that may contain carbon deposits) can accurately locate carbon deposit areas; since carbon deposit areas may have different sizes and shapes, the use of multi-scale masks can effectively process details at different scales, ensuring that carbon deposit areas of various sizes are detected;

[0065] The binning operation is to divide the pixel values ​​of the carbon deposit area (such as the spectral angular distance value calculated 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 the 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 (boxes), each of which represents a probability range; based on the category of the bin in which each pixel point is located, the probability value of the pixel point belonging to the carbon deposit area can be calculated; the spectral information of each pixel point is converted into a probability value, making the detection of the entire carbon deposit area more quantitative and accurate; through the calculation of the probability value, the algorithm can evaluate each pixel in the image to reduce false detection or missed detection;

[0066] Specifically, if Figure 3 As shown, in step S26, a multi-scale segmentation mask is generated based on the correlation coefficient matrix to screen the carbon deposit area; the carbon deposit area is binned to calculate the carbon deposit probability value. The specific steps are as follows:

[0067] S261: Calculating a local mean and a local variance for each pixel point in each band of the image to be processed using an adaptive threshold algorithm according to the correlation coefficient matrix, and setting an adaptive threshold according to the local mean and the local variance;

[0068] Binarizing each band of the image to be processed using the adaptive threshold to obtain a binary segmentation mask;

[0069] It should be noted that the local mean and local variance of each band of the image to be processed are calculated through the correlation coefficient matrix; the brightness and change characteristics of each local area are calculated separately, which helps to identify different areas in the image to be processed, especially the characteristics of target areas such as carbon deposits; based on the calculated local mean and variance, an adaptive threshold is set. The threshold of each pixel will be dynamically adjusted according to the characteristics of the area where the pixel is located, rather than using a unified global threshold. This has advantages for processing images with different lighting, contrast, etc.

[0070] Adaptive thresholding is used to binarize images, dividing pixels in the image to be processed into two categories: target areas (such as carbon deposits) and non-target areas. The result of binarization is a binary segmentation mask that indicates which areas may contain carbon deposits. The adaptive thresholding algorithm can cope with local differences between different images and reduce errors caused by lighting changes or poor image quality. By calculating the local mean and variance, it can effectively avoid the limitations of the global thresholding method in complex images, achieving more accurate segmentation, helping to separate possible carbon deposit areas from the image and providing clearer regional divisions for subsequent analysis.

[0071] S262: using a multi-scale morphological segmentation algorithm to select multi-scale structural elements to perform expansion optimization on the binary segmentation mask, so that each band is connected to each other to obtain a carbon deposition connection area;

[0072] performing corrosion optimization on the carbon deposit connection area to obtain a carbon deposit smooth area;

[0073] Filling holes of each scale in the carbon deposit smooth area to obtain a multi-scale segmentation mask area;

[0074] The pixels in each scale segmentation mask area are fused by weighted average to obtain the comprehensive mask area;

[0075] It should be noted that, on the segmentation mask obtained by binarization, a multi-scale structural element is used for dilation optimization. By increasing the connections within the pixel neighborhood, the smaller carbon deposition areas in the image to be processed can be connected into a larger connected area.

[0076] Expansion helps eliminate local breaks and avoid loss of carbon deposit areas. Erosion is performed on the expanded area to remove unnecessary noise areas, making the carbon deposit area smoother and removing small discontinuous parts at the edges. Holes or discontinuous parts that may exist after corrosion are filled to ensure the integrity of the carbon deposit area. Filling holes can prevent the area from being incorrectly segmented.

[0077] The weighted average fusion of the segmentation mask area at each scale is performed to integrate the segmentation results at different scales and optimize the segmentation effect. The accuracy of carbon deposit area segmentation is improved through multi-scale fusion, making it possible to better identify carbon deposit areas at different scales.

[0078] The multi-scale method can process carbon deposits at different scales, ensuring that both large and small carbon deposits in the processed image can be accurately identified. Morphological processing operations such as dilation, erosion, and hole filling can remove noise, optimize segmentation results, and avoid misidentification. Hole filling and weighted average fusion can help reduce missed detections caused by small-area noise or discontinuities.

[0079] S263: Performing connected region analysis on the comprehensive mask area, connecting all pixels in the image to be processed into several connected regions, and calculating the area of ​​each connected region;

[0080] Preset an area threshold r, and determine whether the area of ​​each connected region is greater than the area threshold r;

[0081] If so, the connected area is determined to be a carbon deposition area;

[0082] It should be noted that the connected region analysis is performed on the comprehensive mask area, and all the pixels in the image to be processed are divided into several 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. The purpose is to exclude some small noise areas and retain larger areas that may be real carbon deposits. Set an area threshold r. If the area of ​​a connected region is greater than this threshold, it is considered to be a carbon deposit area. If it is less than the threshold, it may be noise or irrelevant area and is excluded.

[0084] By using the area threshold to exclude connected areas with too small an area, we can effectively remove those areas that may be noise and retain only the meaningful carbon deposit areas. The setting of the area threshold can ensure that the majority of the areas finally identified are real carbon deposit areas, thereby improving the accuracy of recognition. By screening with the area threshold, the number of areas to be processed later is reduced, and the overall processing efficiency is improved.

[0085] S264 forms a spectral vector based on the spectral reflectance of each pixel point in the carbon deposit area, and calculates a spectral angular distance value based on a preset reference spectral vector and the spectral vector; performs a binning algorithm operation based on the spectral angular distance values ​​of each pixel point to calculate the boundary values ​​of the bins for the number of spectral angular distance values, and constructs a boundary array; traverses the spectral angular distance values ​​of each pixel point to determine the boundary values ​​of the bins, performs a binning operation, and constructs a spectral histogram; introduces a spectral attenuation compensation factor of the engine oil sample into the spectral histogram to perform calculations to obtain a carbon deposit probability value;

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

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

[0088] All pixels are traversed, binned according to their spectral angular distance values, and ultimately a spectral histogram is constructed. By counting the number of pixels in different bins, the spectral histogram can reflect the distribution of regions with different spectral similarities and reveal the spectral characteristic differences between carbon deposit areas and other areas. The introduction of a spectral attenuation compensation factor makes the carbon deposit identification process more accurate, avoiding errors caused by oil attenuation due to its own physical parameters (i.e., temperature and viscosity), thereby ensuring the accuracy of the carbon deposit probability value.

[0089] Research has found that the spectral characteristics of carbon deposits often differ significantly from those of background areas or other substances. By expanding the spectral angular distance values, different spectral intervals can be more clearly distinguished, thereby enhancing the distinction between spectral intervals and helping to better distinguish carbon deposits from other areas.

[0090] At the same time, the spectral angular distance value and binning help obtain more accurate results when calculating the spectral attenuation compensation factor. Physical parameters of the oil sample, such as temperature and viscosity, may affect the spectral response. The expanded binning can better account for these influencing factors, ensuring the accurate calculation of the compensation factor, thereby further improving the accuracy of the calculation of the carbon deposit area probability value. The specific operation is as follows:

[0091] Specifically, if Figure 4 As shown, Figure 5As shown, in step S264, the spectral reflectance of each pixel point in the carbon deposit area is formed into a spectral vector, and a reference spectral vector and the spectral vector are preset to calculate the spectral angular distance value; a binning algorithm is performed based on the spectral angular distance value of each pixel point to calculate the boundary value of the bin of the number of spectral angular distance values, and a boundary array is constructed; the spectral angular distance value of each pixel point is traversed to determine the boundary value of the bin and perform a binning operation to construct a spectral histogram; the spectral attenuation compensation factor of the engine oil sample is introduced into the spectral histogram to calculate and obtain the carbon deposit probability value. The specific operation steps are as follows:

[0092] S2641: sorting each pixel point in the carbon deposit area according to the spectral reflectance of each band to form a spectral vector of each band;

[0093] The reference spectrum vector is preset using the spectral angle distance algorithm;

[0094] Calculating a spectral angle distance value between a spectral vector of each pixel point in the carbon deposit area and the reference spectral vector;

[0095] It should be noted that by extracting the multi-band corrected spectral reflectance of each pixel in the carbon deposit area, a spectral vector of each pixel is formed (i.e., the reflectance value of each pixel in each band); these reflectance data provide each pixel with its unique spectral characteristics, representing the spectral shape of the pixel;

[0096] The spectral angular distance (SAD) algorithm measures the similarity of spectral shapes by calculating the angle (cosine similarity) between the spectral vector of each pixel and a preset reference spectral vector. A smaller spectral angular distance means that the shapes of the two spectral vectors are more similar, while a larger spectral angular distance indicates that their shapes are significantly different. The reference spectral vector is then set to find a spectral reflectance that is more similar to the spectral vector. SAD can remove the influence of the absolute value of illumination or reflectance on the results and focus only on the difference in spectral shape. Therefore, it is particularly suitable for identifying spectral differences between different materials. Carbon deposits often have significant spectral shape differences from other backgrounds or materials, and larger SAD values ​​help indicate carbon deposits.

[0097] Because carbon deposits differ significantly from the background or other materials in their spectral morphology, pixels with larger SAD values ​​(i.e., spectral angular distance values) may represent areas of carbon deposits. Using SAD eliminates the effects of varying ambient lighting conditions or reflectivity, ensuring accurate identification based solely on spectral shape. Based on the similarity of spectral shapes, it effectively distinguishes carbon deposits from other objects, helping to detect areas of carbon deposits.

[0098] S2642: Sort the spectral angular distance values ​​of all the pixel points to form a spectral angular distance list; and filter the minimum spectral angular distance value and the maximum spectral angular distance value according to the spectral angular distance list.

[0099] Calculating the number of bins using a binning algorithm using the number of spectral angular distance values ​​in the spectral angular distance list;

[0100] Calculating the width of each bin according to the minimum spectral angular distance value, the maximum spectral angular distance value and the number of bins;

[0101] According to the order of the spectral angular distance values ​​in the spectral angular distance list, the minimum spectral angular distance value is used 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 + 2×the width of the third bin;

[0104] until a boundary value of the last bin in the number of bins is obtained, and the maximum spectral angle distance value is used as the boundary value of the last bin in the number of bins;

[0105] Generate boundary arrays for all bin boundary values;

[0106] It should be noted that the spectral angular distance values ​​of all pixels are sorted to form a spectral angular distance list, so as to understand the similarity between each pixel and the reference spectral vector; according to the minimum spectral angular distance value and the maximum spectral angular distance value, as well as the number of all spectral angular distance values, different spectral angular 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: in Each bin represents a certain interval of spectral angular distance, which helps analyze the number of pixels with different similarities. Based on the number of bins and the range of spectral angular distance, a boundary array is generated. These boundaries are used to divide the interval of spectral angular distance values. The number of spectral angular distance values ​​in each bin is counted to form a count array. That is, the range between the minimum spectral angular distance value and the maximum spectral angular distance value represents the spectral interval, reflecting the similarity between the spectra.

[0107] Binning allows for a more intuitive understanding of the spectral distribution of pixels within the carbon deposit area and identifies which pixels are more similar to the reference spectral vector. This sorting and binning approach allows for accurate identification of which pixels belong to the carbon deposit area, further improving the accuracy of carbon deposit identification.

[0108] S2643: Traverse the spectral angular distance values ​​in the spectral angular distance list to determine whether each spectral angular 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 angular distance value is classified into the i-th bin in the boundary array and counted as 1; the number of spectral angular distance values ​​in each bin is counted to form a count array;

[0110] Constructing a spectral histogram using the boundary value of each bin in the count array as the x-axis and the number of spectral angular distance values ​​of each bin as the y-axis;

[0111] It should be noted that a spectral histogram is constructed based on the binned data, with the x-axis representing the spectral angular distance interval (bin boundary value) and the y-axis representing the number of spectral angular distance values ​​in each bin. By counting the number of spectral angular distance values ​​in each bin, the distribution of different spectral morphologies is reflected.

[0112] Histograms provide a visual tool for analyzing the distribution of different spectral angular distances, helping to better understand the spectral differences between carbon deposit areas and background areas. Through statistics and histograms, the differences in the spectral angular distance distribution between carbon deposit areas and other areas can be more accurately identified, helping to better define the boundaries of carbon deposit areas.

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

[0114] It should be noted that the mean and standard deviation of the spectral angular distance values ​​are calculated through the spectral histogram. These statistics can reflect the central tendency and fluctuation degree of the spectral angular distance. Skewness refers to the asymmetry of the distribution. Calculating the skewness of the spectral angular distance can reveal the characteristics of the spectral morphology of the carbon deposit area and determine whether it conforms to the normal distribution pattern.

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

[0116] S2645: Calculating the pixel probability density of the spectral angular distance value for the pixel points in each bin;

[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 attribution of different pixels can be made, further improving the accuracy of carbon deposit identification. This step helps understand the distribution of different pixels in the spectral angular distance space and provides support for the calculation of carbon deposit probability values.

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

[0119] introducing a spectral attenuation compensation factor based on the first physical parameter;

[0120] The carbon deposition probability value of the carbon deposition area 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:

[0121] ;

[0122] in, is the total number of pixels in the carbon deposition area;

[0123] The first The probability density of the spectral angular distance value of each pixel;

[0124] The first Spectral angular distance value of each pixel;

[0125] is the mean of the spectral angular distance values ​​of all pixels in the carbon deposition area;

[0126] is the scale parameter of the spectral angular distance value (usually the standard deviation of the spectral angular distance value), which is used to characterize the degree of data fluctuation;

[0127] is a constant factor, which normalizes or adjusts the weight of each pixel probability;

[0128] is the spectral attenuation compensation factor, reflecting the temperature of the oil sample and viscosity The influence of first physical parameters on spectral response;

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

[0130] The carbon deposition probability value of the carbon deposition area is calculated using the spectral angle distance value, standard deviation, skewness, pixel probability density and 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 for spectral changes caused by physical factors such as temperature and viscosity, thereby more realistically reflecting the spectral characteristics of the carbon deposit area. By comprehensively considering multiple factors (such as spectral angular distance, standard deviation, skewness, etc.), the probability of carbon deposit areas can be more accurately assessed, thereby improving detection accuracy.

[0132] Example 2

[0133] like Figure 6 As shown, the present invention also provides an oil carbon deposit sampling detection system based on multispectral imaging, comprising: an acquisition module 10; an analysis module 20; a result module 30;

[0134] The acquisition module 10 is used to acquire a multispectral image to be processed from the engine oil sample under a multispectral light source, and pre-process the multispectral image to be processed to obtain an image to be processed;

[0135] The analysis module 20 is configured to perform dark current correction on the image to be processed according to a band ratio method to enhance the signal strength of the image to be processed; calculate the spectral reflectance of the image to be processed according to the signal strength of the image to be processed; extract a three-dimensional feature tensor from the image to be processed according to the spectral reflectance; segment the image to be processed based on the three-dimensional feature tensor to screen the carbon deposit area; and calculate the carbon deposit probability value of each pixel in the carbon deposit area by combining the spectral reflectance.

[0136] The result module 30 is used to set a carbon deposit threshold value according to the carbon deposit probability value to determine whether the engine oil sample has carbon deposits.

[0137] In summary, the oil carbon deposit sampling detection method and system based on multispectral imaging proposed in the example of the present invention can be seen to effectively eliminate the error caused by the noise during sensor acquisition through the dark current correction step, especially in an environment with poor lighting conditions. The correction can ensure the accuracy of the image data and provide more realistic optical information for subsequent spectral reflectance calculation, feature extraction and image segmentation, while also enhancing the image of the oil sample; secondly, the signal intensity and spectral reflectance calculated by the band ratio method can accurately obtain the difference in optical properties between the oil sample and the reference sample, especially the difference in optical properties between carbon deposits and other substances in different bands. The difference in reflectivity characteristics enhances the recognition ability of carbon deposit areas; the calculation of reflectivity differences not only considers the spectral data of individual bands, but also comprehensively describes the spatial distribution and spectral information of the image by constructing a three-dimensional feature tensor that combines spatial information and spectral characteristics, further improving the recognition accuracy of carbon deposit areas; after the three-dimensional feature tensor is constructed, the correlation between bands is calculated through mutual information coefficient analysis, which can optimize the selection of bands, eliminate redundant information, and improve recognition efficiency. By understanding the correlation between bands, it is ensured that only bands that significantly contribute to carbon deposit recognition are used, thereby improving recognition accuracy and reducing processing time;

[0138] Furthermore, firstly, an 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. This enables the algorithm to adaptively adjust when facing images with different illumination, contrast and quality, thereby effectively responding to changes in complex images, improving the accuracy of binarization and reducing errors. In the segmentation stage, a multi-scale morphological segmentation algorithm is used to optimize the segmentation results through operations such as expansion, corrosion, and hole filling. Expansion optimization helps to connect scattered carbon deposit areas, eliminate local breaks in the image, and avoid the loss of carbon deposit areas. Corrosion operations remove noise and smooth edges. Hole filling ensures the integrity of the area and prevents segmentation errors. ; By weighted averaging and fusing the segmentation results of different scales, the segmentation accuracy is further improved, ensuring that both large-scale and small-scale carbon deposit areas can be accurately identified; in the connected area analysis stage, area threshold screening is used to ensure that only real carbon deposit areas are retained, which not only improves processing efficiency but also ensures the accuracy of carbon deposit area identification; finally, spectral analysis technology calculates the spectral angular distance of each pixel point, uses a binning algorithm to simplify data processing, constructs a spectral histogram, and combines the oil attenuation compensation factor to improve the accuracy of carbon deposit identification; through the analysis of spectral angular distance, it can deeply reveal the spectral differences between the carbon deposit area and other areas, thereby achieving more accurate calculation of the carbon deposit probability value.

[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. A person skilled in the art may modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for sampling and detecting carbon deposits in engine oil based on multispectral imaging, characterized in that: The steps are as follows: Collecting a multispectral image to be processed from the engine oil sample under a multispectral light source, and preprocessing the multispectral image to be processed to obtain an image to be processed; Performing dark current correction on the image to be processed according to a band ratio method to enhance the signal intensity of the image to be processed; calculating the spectral reflectance of the image to be processed according to the signal intensity of the image to be processed; and extracting a three-dimensional feature tensor from the image to be processed according to the spectral reflectance; Segment the image to be processed based on the three-dimensional feature tensor to screen the carbon deposit area; calculate the carbon deposit probability value by combining the spectral reflectance of each pixel point in the carbon deposit area; A carbon deposit threshold is set according to the carbon deposit probability value to determine whether carbon deposits exist in the engine oil sample.

2. The method for detecting oil carbon deposits based on multispectral imaging according to claim 1, characterized in that: Dark current correction is performed on the image to be processed according to the band ratio method to enhance the signal intensity of the image to be processed. The specific operation steps are as follows: Collect original images of inorganic carbon samples under multi-spectral light sources; Collecting original dark current image data of the inorganic carbon sample under shielding without light; performing dark current correction of each band of the original image in a multi-spectral manner using the original dark current image data to obtain a signal intensity of the original image; collecting dark current image data to be processed from the engine oil sample under shielding without light; The dark current image data to be processed is used to perform dark current correction on each band of the multi-spectral image to obtain the signal intensity of the image to be processed.

3. The method for detecting oil carbon deposits based on multispectral imaging according to claim 2, characterized in that: Calculating the spectral reflectance of the image to be processed according to the signal intensity of the image to be processed; extracting the three-dimensional feature tensor in the image to be processed according to the spectral reflectance, the specific operation steps are as follows: Calculating the spectral reflectance of each pixel in the original image and the image to be processed respectively based on the signal intensity of the original image and the signal intensity of the image to be processed using a band ratio method; Calculating an average reflectance difference using the spectral reflectance of each pixel point of the original image and the spectral reflectance of each pixel point of the image to be processed; The average reflectance difference is calculated based on the spectral reflectance of each pixel point, and the average reflectance difference of all pixels in the image to be processed in each band is sorted; the average reflectance difference of all sorted pixels is constructed into a three-dimensional array according to the arrangement of the spatial positions of the image to be processed, as a three-dimensional feature tensor.

4. The method for detecting oil carbon deposits based on multispectral imaging according to claim 3, characterized in that: The image to be processed is segmented based on the three-dimensional feature tensor to screen the carbon deposit area; the carbon deposit probability value is calculated by combining the spectral reflectance of each pixel point in the carbon deposit area. The specific operation steps are as follows: The constructed three-dimensional feature tensor is subjected to mutual information coefficient analysis to determine the correlation between the bands and generate a correlation coefficient matrix reflecting the relationship between the bands. A multi-scale segmentation mask is generated based on the correlation coefficient matrix to screen the carbon deposition area; and a binning operation is performed on the carbon deposition area to calculate the carbon deposition probability value.

5. The method for sampling and detecting oil carbon deposits based on multispectral imaging according to claim 4, characterized in that: Generate a multi-scale segmentation mask based on the correlation coefficient matrix to screen the carbon deposit area. The specific steps are as follows: Calculating the local mean and local variance of the pixels of each band in the image to be processed using an adaptive threshold algorithm according to the correlation coefficient matrix, and setting an adaptive threshold according to the local mean and local variance; Binarizing each band of the image to be processed using the adaptive threshold to obtain a binary segmentation mask; dilating and optimizing the binary segmentation mask by selecting multi-scale structural elements of a multi-scale morphological segmentation algorithm to connect each band to each other to obtain a carbon deposition connection area; and corroding and optimizing the carbon deposition connection area to obtain a carbon deposition smooth area. Filling holes of each scale in the carbon deposit smooth area to obtain a multi-scale segmentation mask area; The pixels in each scale segmentation mask area are fused by weighted average to obtain the comprehensive mask area; Performing a connected region analysis on the comprehensive mask area, connecting all pixels in the image to be processed into a number of connected regions, and calculating the area of ​​each connected region; An area threshold r is preset to determine whether the area of ​​each connected region is greater than the area threshold r; if so, the connected region is determined to be a carbon deposition region.

6. The method for sampling and detecting oil carbon deposits based on multispectral imaging according to claim 5, characterized in that: The carbon deposition area is binned and the carbon deposition probability value is calculated as follows: The spectral reflectance of each pixel point in the carbon deposit area is formed into a spectral vector, and a reference spectral vector and the spectral vector are preset to calculate the spectral angular distance value; a binning algorithm is performed on the spectral angular distance values ​​of each pixel point to calculate the boundary values ​​of the bins of the number of spectral angular distance values, and a boundary array is constructed; the spectral angular distance values ​​of each pixel point are traversed to determine the boundary values ​​of the bins, perform a binning operation, and construct a spectral histogram; The spectral attenuation compensation factor of the engine oil sample is introduced into the spectral histogram for calculation to obtain a carbon deposit probability value.

7. The method for sampling and detecting oil carbon deposits based on multispectral imaging according to claim 6, characterized in that: The spectral reflectance of each pixel point in the carbon deposit area is formed into a spectral vector. The specific operation steps are as follows: Sorting each pixel point in the carbon deposit area according to the spectral reflectance of each band to form a spectral vector of each band; The reference spectrum vector is preset using the spectral angle distance algorithm; A spectral angle distance value is calculated between the spectral vector of each pixel point in the carbon deposit area and the reference spectral vector.

8. The method for sampling and detecting oil carbon deposits based on multispectral imaging according to claim 7, characterized in that: The binning algorithm is used to calculate the boundary values ​​of the bins of the spectral angular distance values ​​of each pixel point, and the boundary array is constructed. The specific steps are as follows: Sorting the spectral angular distance values ​​of all the pixel points to form a spectral angular distance list; screening the minimum spectral angular distance value and the maximum spectral angular distance value according to the spectral angular distance list; Calculating the number of bins according to a binning algorithm using the number of spectral angular distance values ​​in the spectral angular distance list; calculating the width of each bin according to the minimum spectral angular distance value, the maximum spectral angular distance value, and the number of bins; According to the order of the spectral angular distance values ​​in the spectral angular distance list, the minimum spectral angular distance value is used as the boundary value of the first bin in the number of bins; the boundary value of the second bin in the number of bins is the minimum spectral angular distance value + the width of the second bin; and the boundary value of the third bin in the number of bins is the minimum spectral angular distance value + 2×the width of the third bin; until a boundary value of the last bin in the number of bins is obtained, and the maximum spectral angle distance value is used as the boundary value of the last bin in the number of bins; Generate a bounds array of all bin boundaries.

9. The method for sampling and detecting oil carbon deposits based on multispectral imaging according to claim 8, characterized in that: The spectral angle distance value of each pixel point is traversed to determine the boundary value of the bin and perform binning operation to construct a spectral histogram. The spectral attenuation compensation factor of the oil sample is introduced into the spectral histogram to calculate and obtain the carbon deposit probability value. The specific operation steps are as follows: Traversing the spectral angular distance values ​​in the spectral angular distance list, determining whether each spectral angular 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 angular distance value is classified into the i-th bin in the boundary array and counted as 1; the number of spectral angular distance values ​​in each bin is counted to form a count array; Constructing a spectral histogram using the boundary value of each bin in the count array as the x-axis and the number of spectral angular distance values ​​of each bin as the y-axis; Calculating the mean and standard deviation of the spectral angular distance values ​​using the pixel points of the spectral histogram; calculating the spectral angular distance skewness using the mean and standard deviation of the spectral angular distance values ​​of the spectral histogram; calculating the pixel probability density of the spectral angular distance value for the pixel points in each bin; A first physical parameter is collected from the engine oil sample; a spectral attenuation compensation factor is introduced based on the first physical parameter; and a carbon deposition probability value of the carbon deposition area 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.

Citation Information

Patent Citations

  • Method for discriminating multiple waste plastic kinds by adopting near infrared spectrum characteristic wavelength

    CN104502309A

  • Hyperspectral classification identification method based on superpixel segmentation

    CN115937685A

  • Hyperspectral image calibration method and system

    CN117474815A

  • Coal rock carbon content detection method and system based on multi-feature image spectrum technology

    CN119151936A

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

    CN119164899A

Cited By

  • Method for quickly identifying coal components and gangue in intelligent coal dressing process

    CN121164218A

  • Feed mycotoxin detection method and system based on spectral analysis

    CN121762490A