An optical correction method for spectral calibration of hyperspectral imager
By performing multiple measurements and data comparison analysis on the hyperspectral imager, a wavelength offset signal is generated and the reasons are analyzed, the problems of low calibration efficiency of hyperspectral imager and unspecific analysis of distortion reasons in the prior art are solved, and more efficient and accurate spectral calibration is achieved.
Patent Information
- Application Number
- CN202411918112.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Existing hyperspectral imagers are inefficient during calibration, and distortion correction lacks specific analysis of the causes of distortion, resulting in the inability and effectiveness of calibration.
By performing multiple measurements on the standard light source, measuring data is obtained and comparative analysis is performed, a wavelength offset suspected signal and offset signal are generated, and the reasons for wavelength offset are analyzed based on the multiple measurement results, especially the stability of data point transmission.
Improves the efficiency and accuracy of hyperspectral imagers in spectral calibration, reduces calibration time, and ensures the sustainability and effectiveness of calibration.
Smart Images

Figure CN119354334B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of optical calibration, and in particular to an optical correction method for spectral calibration of a hyperspectral imager. Background Art
[0002] Hyperspectral imagers can obtain image information of target objects within a continuous spectral range and have broad application prospects. At the same time, in order to ensure that hyperspectral imagers can be used normally, they need to be calibrated regularly, but how to calibrate faster or improve the efficiency of calibration is a difficult problem.
[0003] A Chinese patent application with publication number CN116228558A discloses a distortion correction method for a push-broom hyperspectral imager, comprising: first, performing push-broom imaging on a specific and identifiable target by a push-broom hyperspectral imager to obtain a push-broom image; obtaining the coordinates of each distortion point on the push-broom image by a corner point recognition algorithm; obtaining distortion correction parameters along the push-broom direction by a method based on straight line features; obtaining distortion correction parameters in the vertical push-broom direction by a cross-ratio invariance method; and correcting the push-broom image according to the obtained distortion correction parameters in combination with image grayscale correction.
[0004] In the above-mentioned prior art, distortion correction parameters are obtained through the designed push-scan method, but there is a lack of specific analysis of the cause of the distortion. Instead, the distortion is directly corrected. In actual situations, before the specific cause of the distortion is unknown, direct distortion correction may solve the current distortion problem, but the continuity and effectiveness of the distortion correction cannot be guaranteed.
[0005] To this end, the present invention provides an optical correction method for spectral calibration of a hyperspectral imager. Summary of the invention
[0006] In order to make up for the deficiencies of the prior art, at least one technical problem raised in the background technology is solved.
[0007] The technical solution adopted by the present invention to solve the technical problem is: an optical correction method for spectral calibration of a hyperspectral imager, comprising:
[0008] Step 1: Use a hyperspectral imager to measure the standard light source multiple times, and obtain the measurement data of each measurement, and obtain the comparison deviation data based on the measurement data, wherein the measurement data includes the measurement value of the wavelength point, and the comparison deviation data includes the comparison deviation degree value ZXj. If the comparison deviation degree value ZXj is greater than or equal to the comparison deviation degree threshold, a measurement abnormality signal is generated, and the abnormal signal occurrence frequency ratio BJ is obtained, and a wavelength offset suspected signal is generated according to the abnormal signal occurrence frequency ratio BJ;
[0009] Step 2: Based on the generated suspected signal of wavelength shift, multiple spectral curves obtained during multiple measurements are obtained, and they are compared and analyzed with the standard spectral curves respectively to obtain shift determination data, wherein the shift determination data includes a shift determination value CV, and the measured spectral curve is marked as an abnormal measured spectral curve according to the shift determination value CV, and the number ratio value JK of the abnormal measured spectral curves is obtained, and whether the wavelength is shifted is determined according to the number ratio value JK of the abnormal measured spectral curves, and a shift signal is generated;
[0010] Step 3: Based on the offset signal, the transmission time data of the data point is obtained, wherein the transmission time data of the data point includes the transmission time point of the data point, and based on the analysis of the transmission data of the data point, the data point transmission fluctuation parameter FG is obtained, and the data point transmission stability in the process of the hyperspectral imager measuring the standard light source is judged according to the data point transmission fluctuation parameter FG;
[0011] Step 4: Obtain the detection time period corresponding to the abnormal measurement spectrum curve, compare and analyze the detection time period corresponding to the abnormal measurement spectrum curve with the target time period, classify the abnormal measurement spectrum curve according to the comparison and analysis results, and obtain the time period overlap degree value AS based on the analysis of the classified abnormal measurement spectrum curve, compare the time period overlap degree value AS with the time period overlap degree threshold, and determine whether the cause of the wavelength deviation is poor data point transmission stability based on the comparison result.
[0012] As a further technical solution of the present invention, the comparison deviation value ZXj is obtained in the following manner:
[0013] Compare the measured value of the wavelength point with the standard value. If the measured value of the wavelength point is not equal to the standard value, the wavelength point is marked as an abnormal wavelength point. If the measured value of the wavelength point is equal to the standard value, the wavelength point is marked as a normal wavelength point.
[0014] Obtaining the proportion data of abnormal wavelength points, wherein the proportion data of abnormal wavelength points includes the proportion of the number of abnormal wavelength points and the proportion of the total value of measurement deviation;
[0015] The ratio of the number of abnormal wavelength points and the ratio of the total measurement deviation are multiplied to obtain the comparison deviation degree value ZXj.
[0016] As a further technical solution of the present invention, the method for obtaining the proportion of the number of abnormal wavelength points and the proportion of the total value of the measurement deviation is as follows:
[0017] Count the number of all wavelength points and the number of abnormal wavelength points among all wavelength points, and perform ratio processing on the number of abnormal wavelength points and the number of all wavelength points to obtain the ratio of the number of abnormal wavelength points;
[0018] The measured value of the abnormal wavelength point is processed with the standard value, and the absolute value of the difference is taken to obtain the measurement deviation value of the abnormal wavelength point. The measurement deviation values of all abnormal wavelength points are summed to obtain the total measurement deviation value of all abnormal wavelength points. The total measurement deviation value of all abnormal wavelength points is ratioed with the standard value to obtain the proportion of the total measurement deviation value of all abnormal wavelength points.
[0019] As a further technical solution of the present invention, the abnormal signal occurrence frequency ratio BJ is obtained by performing ratio processing on the total number of occurrences of abnormal signals in multiple measurements and the total number of measurements of the standard light source by the hyperspectral imager;
[0020] Compare the abnormal signal occurrence ratio BJ with the abnormal signal occurrence ratio threshold:
[0021] If the abnormal signal occurrence frequency ratio BJ ≥ the abnormal signal occurrence frequency ratio threshold, a wavelength offset suspected signal is generated;
[0022] If the abnormal signal occurrence frequency ratio BJ is less than the abnormal signal occurrence frequency ratio threshold, no wavelength offset suspected signal is generated.
[0023] As a further technical solution of the present invention, the offset determination value CV is obtained in the following manner:
[0024] Obtaining the spectral curve area deviation ratio, the spectral curve abnormal peak number ratio and the spectral curve abnormal peak position distance deviation ratio;
[0025] The spectral curve area deviation ratio, the spectral curve abnormal peak number ratio and the spectral curve abnormal peak position distance deviation ratio are processed to obtain an offset judgment value CV, and the obtained offset judgment value CV is compared with the offset judgment threshold value KU. If the offset judgment value CV is greater than or equal to the offset judgment threshold value KU, the measured spectral curve is marked as an abnormal measured spectral curve;
[0026] Counting the number of abnormal measured spectrum curves in the measured spectrum curves, performing ratio processing on the number of abnormal measured spectrum curves and the number of measured spectrum curves, and obtaining a ratio value JK of the number of abnormal measured spectrum curves;
[0027] If the abnormal measurement spectrum curve quantity ratio value JK is greater than or equal to the abnormal measurement spectrum curve quantity ratio threshold, an offset signal is generated; if the abnormal measurement spectrum curve quantity ratio value JK is less than the abnormal measurement spectrum curve quantity ratio threshold, no offset signal is generated.
[0028] As a further technical solution of the present invention, the spectrum curve area deviation ratio Ai, the spectrum curve abnormal peak number ratio Gi and the spectrum curve abnormal peak position distance deviation ratio Hi are obtained as follows:
[0029] Compare the measured spectrum curve with the standard spectrum curve in the XY two-dimensional coordinate system, measure the area enclosed between the spectrum curve and the standard spectrum curve, and the area enclosed between the standard spectrum curve and the X-axis, and perform ratio processing to obtain the spectrum curve area deviation ratio Ai;
[0030] Based on the XY two-dimensional coordinate system, the coordinates of the position points of each peak in the measured spectrum curve are obtained, and the peak points are numbered. Similarly, the coordinates of the position points of each peak in the standard spectrum curve are obtained, and they are also numbered;
[0031] The peaks in the measured spectrum curve are matched with the peaks in the standard spectrum curve corresponding to the numbers. If the coordinates of the peaks in the measured spectrum curve do not match the coordinates of the peaks in the standard spectrum curve corresponding to the numbers, the peaks in the measured spectrum curve are marked as abnormal peaks. The number of abnormal peaks in the peaks corresponding to the measured spectrum curve and the number of peaks in the measured spectrum curve are counted, and the ratios are processed to obtain the ratio of the number of abnormal peaks in the spectrum curve Gi;
[0032] Based on the coordinates of the abnormal peak and the coordinates of the peak in the standard spectral curve corresponding to the number, the deviation distance between the abnormal peak and the peak in the standard spectral curve corresponding to the number is obtained, the deviation distances between all abnormal peaks and the peak in the standard spectral curve corresponding to the number are summed to obtain the total deviation distances between all abnormal peaks and the peak in the standard spectral curve corresponding to the number, the total deviation distances between all abnormal peaks and the peak in the standard spectral curve corresponding to the number are ratio-processed with the total deviation distance threshold between the abnormal peak and the peak in the standard spectral curve corresponding to the number, and the spectral curve abnormal peak position distance deviation ratio Hi is obtained.
[0033] As a further technical solution of the present invention, the data point transmission fluctuation parameter FG is obtained in the following manner:
[0034] Based on the analysis of the transmission data of the data point, the number ratio of the target time period and the time deviation ratio of the target time period are obtained, and the number ratio of the target time period and the time deviation ratio of the target time period are multiplied to obtain the data point transmission fluctuation parameter FG;
[0035] The data point transmission fluctuation parameter FG is compared with the data point transmission fluctuation parameter threshold. The specific comparison process is as follows:
[0036] The preset data point transmission fluctuation parameter threshold is FJ;
[0037] If the data point transmission fluctuation parameter FG ≥ the data point transmission fluctuation parameter threshold FJ, it means that the data point transmission stability of the hyperspectral imager during the measurement of the standard light source is poor;
[0038] If the data point transmission fluctuation parameter FG is less than the data point transmission fluctuation parameter threshold FJ, it means that the data point transmission stability of the hyperspectral imager during the measurement of the standard light source is good.
[0039] As a further technical solution of the present invention, the method for obtaining the quantity ratio of the target time period and the time deviation ratio of the target time period is as follows:
[0040] Arrange the data points in order according to the transmission time points, extract the interval time lengths between the data points, and integrate all the extracted interval time lengths into an interval time length data group. In the interval time length data group, select the interval time length with the largest number of occurrences and mark it as a reference time length. Match all the interval time lengths in the interval time length data group with the reference time length respectively. If they do not match, mark the interval time period corresponding to the interval time length that does not match the reference time length as a target time period.
[0041] Count the number of target time periods and the length of interval time, and perform ratio processing to obtain the ratio of the number of target time periods;
[0042] The interval time lengths corresponding to all target time periods are respectively subjected to difference processing with the reference time length, and the differences are summed after taking the absolute values to obtain the time deviation value of the target time period, and the time deviation value of the target time period is subjected to ratio processing with the reference time length to obtain the time deviation ratio of the target time period.
[0043] As a further technical solution of the present invention, the time period overlap degree value AS is obtained in the following manner:
[0044] The detection period corresponding to the abnormal measurement spectrum curve is compared and analyzed with the target period. According to the comparison and analysis results, the abnormal measurement spectrum curve is divided into highly overlapping curves, moderately overlapping curves and non-overlapping curves. The number of highly overlapping curves and the number of abnormal measurement spectrum curves are counted and the ratio is processed to obtain the proportion of highly overlapping curves.
[0045] The number of moderately overlapping curves is counted, and the ratio of the number of moderately overlapping curves to the number of abnormal measured spectrum curves is processed to obtain the ratio of the number of moderately overlapping curves;
[0046] Obtain the total overlapping time between the detection time period and the target time period corresponding to all moderate overlapping curves, extract the time length of the total overlapping time period and the time length of the target time period, and perform ratio processing on them to obtain the ratio of the overlapping time length;
[0047] The obtained percentage of the number of highly overlapping curves, the percentage of the number of moderately overlapping curves, and the percentage of the length of the overlapping period are multiplied to obtain the period overlap degree value AS.
[0048] As a further technical solution of the present invention, the time period overlap degree value AS is compared with the time period overlap degree threshold, and whether the cause of the wavelength deviation is poor data point transmission stability is determined according to the comparison result, specifically:
[0049] If the time period overlap degree value AS ≥ the time period overlap degree threshold, it means that the data point transmission stability is poor, resulting in wavelength deviation;
[0050] If the time period overlap degree value AS is less than the time period overlap degree threshold, it means that the data point transmission stability is poor and does not cause wavelength deviation.
[0051] The beneficial effects of the present invention are as follows:
[0052] 1. The present invention obtains measurement data, compares and analyzes the measurement data with standard values, marks wavelength points as abnormal according to the analysis results, and analyzes whether the wavelength is suspected to have shifted during the measurement process by the number of abnormal wavelength points and the deviation between the measurement value corresponding to the abnormal wavelength point and the standard value, and analyzes the results of multiple measurements. If the wavelength shows signs of shifting multiple times during multiple measurements, a wavelength shift suspected signal is generated. The advantage is that it does not directly perform a comprehensive analysis on whether the wavelength has shifted, but continues to analyze and make a final judgment on whether the wavelength has shifted after there are signs of wavelength shifting. If there are no signs of wavelength shifting, the next aspect of spectral calibration is calibrated, which reduces the time of spectral calibration of the hyperspectral imager and improves calibration efficiency.
[0053] 2. After generating a suspected signal of wavelength shift, the present invention compares the measured spectral curve with the standard spectral curve, and analyzes the spectral curve area deviation ratio Ai, the spectral curve abnormal peak number ratio Gi and the spectral curve abnormal peak position distance deviation ratio Hi. The spectral curve is marked according to the analysis result, and the spectral curve corresponding to the wavelength shift is marked. The marked spectral curve corresponding to the wavelength shift is analyzed to determine whether the wavelength is actually shifted. The essence of the present invention is to analyze the spectral curves obtained by combining multiple measurements, thereby improving the accuracy of the hyperspectral imager in spectral calibration.
[0054] 3. After the wavelength shift signal is generated, the present invention performs a wavelength cause analysis, and the preferred cause analysis aspect is the stable transmission of optical data in the hyperspectral imager. This is because without confirming that the components of the hyperspectral imager itself are normal or the data transmission is normal, directly performing a deep-level cause analysis may increase the complexity of the analysis, such as parameter settings, etc. If there is a problem with the components of the hyperspectral imager itself or the data transmission is not resolved, even if the deep-level cause is found, it may not be able to be effectively adjusted due to these problems.
[0055] 4. When the data point transmission stability is poor, the present invention analyzes the degree of overlap between the time period with poor data transmission stability and the wavelength shift detection time period in each measurement process, and analyzes the impact of the poor data transmission stability on the wavelength shift and determines the cause of the wavelength shift (whether it is due to poor data transmission stability) through the degree of overlap. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The present invention will be further described below in conjunction with the accompanying drawings.
[0057] Figure 1 is a flow chart of Embodiment 1 of the present invention;
[0058] Figure 2 is a flow chart of a data acquisition method in Embodiment 1 of the present invention;
[0059] Figure 3 This is a flow chart of Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0060] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the present invention is further explained below in conjunction with specific implementation methods. Example 1
[0061] like Figure 1 As shown, an optical correction method for spectral calibration of a hyperspectral imager according to an embodiment of the present invention includes:
[0062] Step 1: Use a hyperspectral imager to measure the standard light source multiple times, and obtain measurement data for each measurement, and obtain comparison deviation data based on the measurement data, wherein the measurement data includes the measurement value of the wavelength point, and the comparison deviation data includes the comparison deviation degree value ZXj, and compare the comparison deviation degree value ZXj with the comparison deviation degree threshold. If the comparison deviation degree value ZXj is greater than or equal to the comparison deviation degree threshold, a measurement abnormality signal is generated, and based on the analysis of the measurement abnormality signal, the abnormal signal occurrence frequency ratio BJ is obtained. If the abnormal signal occurrence frequency ratio BJ is greater than or equal to the abnormal signal occurrence frequency ratio threshold, a wavelength offset suspected signal is generated;
[0063] Specifically, the measured value of the wavelength point is compared with the standard value. If the measured value of the wavelength point is not equal to the standard value, the wavelength point is marked as an abnormal wavelength point. If the measured value of the wavelength point is equal to the standard value, the wavelength point is marked as a normal wavelength point.
[0064] Obtaining the proportion data of abnormal wavelength points, wherein the proportion data of abnormal wavelength points includes the proportion of the number of abnormal wavelength points and the proportion of the total value of measurement deviation;
[0065] The ratio of the number of abnormal wavelength points and the ratio of the total measurement deviation are multiplied to obtain the comparison deviation degree value ZXj.
[0066] Among them, the method of obtaining the proportion of the number of abnormal wavelength points and the proportion of the total measurement deviation is as follows:
[0067] Count the number of all wavelength points and the number of abnormal wavelength points among all wavelength points, and perform ratio processing on the number of abnormal wavelength points and the number of all wavelength points to obtain the ratio of the number of abnormal wavelength points;
[0068] The measured value of the abnormal wavelength point is processed with the standard value, and the absolute value of the difference is taken to obtain the measured deviation value of the abnormal wavelength point, the measured deviation values of all abnormal wavelength points are summed to obtain the total measured deviation value of all abnormal wavelength points, and the total measured deviation value of all abnormal wavelength points is processed with the standard value to obtain the ratio of the total measured deviation value of all abnormal wavelength points;
[0069] It should be noted that the purpose of obtaining the proportion of abnormal wavelength points and the proportion of total measurement deviation is to compare the measured value of the wavelength point with the standard value to determine the number of abnormal wavelength points, because the measured value of the wavelength point is not equal to the standard value, which can preliminarily reflect the signs of wavelength deviation. At the same time, combined with the number of abnormal wavelength points and the deviation value between the measured value corresponding to the abnormal wavelength point and the standard value, it is possible to further accurately determine whether the wavelength is likely to be deviated to a large extent.
[0070] The obtained comparison deviation value ZXj is compared with the comparison deviation threshold. The specific comparison process is as follows:
[0071] The preset comparison deviation threshold is ZXc;
[0072] If the comparison deviation degree value ZXj ≥ the comparison deviation degree threshold ZXc, a measurement abnormality signal is generated;
[0073] If the comparison deviation value ZXj is less than the comparison deviation threshold ZXc, a normal measurement signal is generated;
[0074] The total number of abnormal signal occurrences in multiple measurements and the total number of measurements of the standard light source by the hyperspectral imager are counted, and the ratios are processed to obtain the ratio of abnormal signal occurrences BJ.
[0075] Compare the abnormal signal occurrence ratio BJ with the abnormal signal occurrence ratio threshold:
[0076] If the abnormal signal occurrence frequency ratio BJ ≥ the abnormal signal occurrence frequency ratio threshold, a wavelength offset suspected signal is generated;
[0077] If the abnormal signal occurrence frequency ratio BJ is less than the abnormal signal occurrence frequency ratio threshold, no wavelength offset suspected signal is generated;
[0078] It should be noted that the concept of step one is: by acquiring measurement data, and comparing and analyzing the measurement data with the standard value, marking the wavelength point as abnormal according to the analysis result, and analyzing whether the wavelength is suspected to have shifted during the measurement process by the number of abnormal wavelength points and the deviation value between the measurement value corresponding to the abnormal wavelength point and the standard value, and combining the analysis with multiple measurement results, if there are signs of wavelength shift multiple times during multiple measurements, a wavelength shift suspected signal is generated, which has the advantage of not directly conducting a comprehensive analysis on whether the wavelength has shifted, but continuing to analyze and make a final judgment on whether the wavelength has shifted after there are signs of wavelength shift, and if there are no signs of wavelength shift, calibrating the next aspect of spectral calibration, reducing the time of spectral calibration of the hyperspectral imager and improving the calibration efficiency;
[0079] Step 2: Based on the generated suspected signal of wavelength shift, obtain multiple spectral curves obtained when the hyperspectral imager performs multiple measurements on the standard light source, and mark each spectral curve as a measured spectral curve, compare and analyze the measured spectral curve with the standard spectral curve to obtain shift judgment data, wherein the shift judgment data includes a shift judgment value CV, if the shift judgment value CV is greater than or equal to the shift judgment threshold, then mark the measured spectral curve as an abnormal measured spectral curve, based on the analysis of the abnormal measured spectral curve, obtain the value JK of the proportion of the number of abnormal measured spectral curves, and compare it with the threshold value of the proportion of the number of abnormal measured spectral curves to determine whether the wavelength has shifted, and if so, generate a shift signal;
[0080] The method for obtaining the offset judgment value CV is as follows:
[0081] The spectral curve area deviation ratio, the spectral curve abnormal peak number ratio, and the spectral curve abnormal peak position distance deviation ratio are marked as Ai, Gi, and Hi respectively;
[0082] The spectral curve area deviation ratio Ai, the spectral curve abnormal peak number ratio Gi and the spectral curve abnormal peak position distance deviation ratio Hi are processed by the formula: Obtaining an offset determination value CV, wherein s1, s2 and s3 are all preset proportional coefficients;
[0083] Compare the obtained offset judgment value CV with the offset judgment threshold:
[0084] The preset offset determination threshold is KU;
[0085] If the offset judgment value CV ≥ the offset judgment threshold KU, the measured spectrum curve is marked as an abnormal measured spectrum curve;
[0086] If the offset judgment value CV is less than the offset judgment threshold KU, the measured spectrum curve is marked as a normal measured spectrum curve;
[0087] Counting the number of abnormal measured spectrum curves in the measured spectrum curves, performing ratio processing on the number of abnormal measured spectrum curves and the number of measured spectrum curves, and obtaining a ratio value JK of the number of abnormal measured spectrum curves;
[0088] If the value JK of the proportion of the number of abnormal measured spectral curves is greater than or equal to the threshold value of the proportion of the number of abnormal measured spectral curves, an offset signal is generated; if the value JK of the proportion of the number of abnormal measured spectral curves is less than the threshold value of the proportion of the number of abnormal measured spectral curves, no offset signal is generated;
[0089] like Figure 2 As shown, the spectrum curve area deviation ratio Ai, the spectrum curve abnormal peak number ratio Gi, and the spectrum curve abnormal peak position distance deviation ratio Hi are obtained as follows:
[0090] Compare the measured spectrum curve with the standard spectrum curve in the XY two-dimensional coordinate system, measure the area enclosed between the spectrum curve and the standard spectrum curve, and the area enclosed between the standard spectrum curve and the X-axis, and perform ratio processing to obtain the spectrum curve area deviation ratio Ai;
[0091] Based on the XY two-dimensional coordinate system, the coordinates of the position points of each peak in the measured spectrum curve are obtained, and the peak points are numbered. Similarly, the coordinates of the position points of each peak in the standard spectrum curve are obtained, and they are also numbered;
[0092] It should be noted that the number of each peak in the measured spectrum curve corresponds to the same number of each peak in the standard spectrum curve;
[0093] The peaks in the measured spectrum curve are matched with the peaks in the standard spectrum curve corresponding to the numbers. If the coordinates of the peaks in the measured spectrum curve do not match the coordinates of the peaks in the standard spectrum curve corresponding to the numbers, the peaks in the measured spectrum curve are marked as abnormal peaks. The number of abnormal peaks in the peaks corresponding to the measured spectrum curve and the number of peaks in the measured spectrum curve are counted, and the ratios are processed to obtain the ratio of the number of abnormal peaks in the spectrum curve Gi;
[0094] Based on the coordinates of the abnormal peak and the coordinates of the peak in the standard spectrum curve corresponding to the number, obtain the deviation distance between the abnormal peak and the peak in the standard spectrum curve corresponding to the number, sum the deviation distances between all abnormal peaks and the peak in the standard spectrum curve corresponding to the number, obtain the total deviation distance between all abnormal peaks and the peak in the standard spectrum curve corresponding to the number, perform ratio processing on the total deviation distance between all abnormal peaks and the peak in the standard spectrum curve corresponding to the number and the total deviation distance threshold between the abnormal peak and the peak in the standard spectrum curve corresponding to the number, and obtain the spectrum curve abnormal peak position distance deviation ratio Hi;
[0095] It should be noted that the significance of obtaining the spectral curve area deviation ratio Ai, the spectral curve abnormal peak number ratio Gi and the spectral curve abnormal peak position distance deviation ratio Hi is that the intuitive data for judging the wavelength shift include the spectral curve area deviation, the number of spectral curve abnormal peaks and the spectral curve abnormal peak position distance deviation, but the wavelength shift cannot be accurately determined from the number of abnormal peaks of the spectral curve alone, because when the number of abnormal peaks is large, if the area deviation of the spectral curve is small, that is, the systematic deviation between the spectral curves is small, or the spectral curve abnormal peak position distance deviation is small, it is impossible to accurately judge whether the wavelength is shifted.
[0096] It should be noted that the idea of step two is: after generating a suspected signal of wavelength shift, the measured spectral curve is compared with the standard spectral curve, and analyzed based on the spectral curve area deviation ratio Ai, the spectral curve abnormal peak number ratio Gi and the spectral curve abnormal peak position distance deviation ratio Hi. The spectral curve is marked according to the analysis result, and the spectral curve corresponding to the wavelength shift is marked. Through the memory analysis of the spectral curve corresponding to the marked wavelength shift, it is determined whether the wavelength is actually shifted. The essence of this is to analyze the spectral curves obtained by combining multiple measurements, which improves the accuracy of the hyperspectral imager in spectral calibration. Example 2
[0097] like Figure 3 As shown, based on Example 1, an optical correction method for spectral calibration of a hyperspectral imager described in an embodiment of the present invention includes:
[0098] Step 3: Based on the generated offset signal, the transmission time data of the data point in the process of the hyperspectral imager measuring the standard light source is obtained, wherein the transmission time data of the data point includes the transmission time point of the data point, and based on the analysis of the transmission data of the data point, the data point transmission fluctuation parameter FG is obtained, and the transmission stability of the data point in the process of the hyperspectral imager measuring the standard light source is judged according to the data point transmission fluctuation parameter FG;
[0099] Specifically, based on analyzing the transmission data of the data point, the number proportion of the target time period and the time deviation ratio of the target time period are obtained, and the number proportion of the target time period and the time deviation ratio of the target time period are multiplied to obtain the data point transmission fluctuation parameter FG.
[0100] The data point transmission fluctuation parameter FG is compared with the data point transmission fluctuation parameter threshold. The specific comparison process is as follows:
[0101] The preset data point transmission fluctuation parameter threshold is FJ;
[0102] If the data point transmission fluctuation parameter FG ≥ the data point transmission fluctuation parameter threshold FJ, it means that the data point transmission stability of the hyperspectral imager during the measurement of the standard light source is poor;
[0103] If the data point transmission fluctuation parameter FG is less than the data point transmission fluctuation parameter threshold FJ, it means that the data point transmission stability of the hyperspectral imager during the measurement of the standard light source is good;
[0104] The method for obtaining the quantity ratio of the target time period and the time deviation ratio of the target time period is as follows:
[0105] Arrange the data points in order according to the transmission time points, extract the interval time lengths between the data points, and integrate all the extracted interval time lengths into an interval time length data group. In the interval time length data group, select the interval time length with the largest number of occurrences and mark it as a reference time length. Match all the interval time lengths in the interval time length data group with the reference time length respectively. If they do not match, mark the interval time period corresponding to the interval time length that does not match the reference time length as a target time period.
[0106] Count the number of target time periods and the length of interval time, and perform ratio processing to obtain the ratio of the number of target time periods;
[0107] Perform difference processing on the interval time lengths corresponding to all target time periods and the reference time length, and sum the differences after taking the absolute values to obtain the time deviation value of the target time period, and perform ratio processing on the time deviation value of the target time period and the reference time length to obtain the time deviation ratio of the target time period;
[0108] It should be noted that the idea of step three is: after the wavelength shift signal is generated, the wavelength cause analysis is performed, and the preferred cause analysis aspect is the stable transmission of optical data in the hyperspectral imager. The reason is that without confirming that the components of the hyperspectral imager itself are normal or the data transmission is normal, directly performing in-depth cause analysis may increase the complexity of the analysis, such as parameter setting, etc. If there is a problem with the components of the hyperspectral imager itself or the data transmission is not resolved, even if the deep-seated cause is found, it may not be able to be effectively adjusted due to these problems.
[0109] Step 4: Based on the poor transmission stability of data points in the process of measuring the standard light source with the hyperspectral imager, obtain the detection period corresponding to the abnormal measurement spectrum curve, compare and analyze the detection period and target period corresponding to the abnormal measurement spectrum curve, classify the abnormal measurement spectrum curve according to the comparison and analysis results, analyze the classified abnormal measurement spectrum curve, obtain the time period overlap degree value AS, compare the time period overlap degree value AS with the time period overlap degree threshold, and determine whether the cause of the wavelength deviation is the poor transmission stability of the data point according to the comparison result;
[0110] It should be noted that the detection period corresponding to the abnormal measurement spectrum curve is the period between the start time and the end time of the detection process corresponding to the abnormal measurement spectrum curve;
[0111] The detection period corresponding to the abnormal measurement spectrum curve is compared and analyzed with the target period, and the abnormal measurement spectrum curve is classified according to the comparison and analysis results. The specific process is as follows:
[0112] If the detection start time point and the end time point of the detection period corresponding to the abnormal measurement spectrum curve are both within the target period, the abnormal measurement spectrum curve is marked as a highly coincident curve;
[0113] If the detection start time point and the end time point of the detection period corresponding to the abnormal measurement spectrum curve are not both within the target period, the abnormal measurement spectrum curve is marked as a highly coincident curve;
[0114] If the detection start time point and end time point of the detection period corresponding to the abnormal measurement spectrum curve are not within the target period, a specific analysis is performed:
[0115] If the detection start time point and end time point of the detection period corresponding to the abnormal measurement spectrum curve are both before the start time point or after the end time point of the target period, it will be marked as a non-overlapping curve;
[0116] If the detection start time point of the detection period corresponding to the abnormal measurement spectrum curve is before the start time point of the target period and the end time point of the detection period corresponding to the abnormal measurement spectrum curve is after the end time point of the target period, the abnormal measurement spectrum curve is marked as a moderate coincidence curve;
[0117] Count the number of highly coincident curves and the number of abnormal measured spectral curves, and perform ratio processing to obtain the proportion of highly coincident curves;
[0118] The number of moderately overlapping curves is counted, and the ratio of the number of moderately overlapping curves to the number of abnormal measured spectrum curves is processed to obtain the proportion of the number of moderately overlapping curves;
[0119] Obtain the total overlapping time between the detection time period and the target time period corresponding to all moderate overlapping curves, extract the time length of the total overlapping time period and the time length of the target time period, and perform ratio processing on them to obtain the ratio of the overlapping time length;
[0120] The obtained percentage of highly overlapping curves, the percentage of moderately overlapping curves and the percentage of overlapping time period are multiplied to obtain the period overlap degree value AS;
[0121] Compare the obtained time period overlap degree value AS with the time period overlap degree threshold:
[0122] If the time period overlap degree value AS ≥ the time period overlap degree threshold, it means that the data point transmission stability is poor, resulting in wavelength deviation;
[0123] If the time period overlap degree value AS is less than the time period overlap degree threshold, it means that the data point transmission stability is poor and does not cause wavelength deviation;
[0124] It should be noted that the idea of step four is: when the data point transmission stability is poor, analyze the degree of overlap between the time period with poor data transmission stability and the wavelength shift detection time period during each measurement process, and analyze the impact of poor data transmission stability on wavelength shift and determine the cause of wavelength shift through the degree of overlap.
[0125] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention. The scope of protection of the present invention is defined by the attached claims and their equivalents.
Claims
1. An optical correction method for spectral calibration of a hyperspectral imager, characterized in that: include: Step 1: Use a hyperspectral imager to measure the standard light source multiple times, and obtain the measurement data of each measurement, and obtain the comparison deviation data based on the measurement data, wherein the measurement data includes the measurement value of the wavelength point, and the comparison deviation data includes the comparison deviation degree value ZXj. If the comparison deviation degree value ZXj is greater than or equal to the comparison deviation degree threshold, a measurement abnormality signal is generated, and the abnormal signal occurrence frequency ratio BJ is obtained, and a wavelength offset suspected signal is generated according to the abnormal signal occurrence frequency ratio BJ; Step 2: Based on the generated suspected signal of wavelength shift, multiple spectral curves obtained during multiple measurements are obtained, and they are compared and analyzed with the standard spectral curves respectively to obtain shift judgment data, wherein the shift judgment data includes a shift judgment value CV, and the measured spectral curve is marked as an abnormal measured spectral curve according to the shift judgment value CV, and the number of abnormal measured spectral curves is obtained. The proportion value JK of the number of abnormal measured spectral curves is obtained, and whether the wavelength is shifted is determined according to the number of abnormal measured spectral curves The proportion value JK, and a shift signal is generated; Step 3: Based on the offset signal, the transmission time data of the data point is obtained, wherein the transmission time data of the data point includes the transmission time point of the data point, and based on the analysis of the transmission data of the data point, the quantity proportion of the target time period and the time deviation ratio of the target time period are obtained, and the two are multiplied to obtain the data point transmission fluctuation parameter FG, and the data point transmission stability in the process of the hyperspectral imager measuring the standard light source is judged according to the data point transmission fluctuation parameter FG; Arrange the data points in order according to the transmission time points, extract the interval time lengths between the data points, mark the interval time length with the most occurrences as the reference time length, mark the interval time period corresponding to the interval time length that does not match the reference time length as the target time period, perform difference processing on the interval time lengths corresponding to all target time periods and the reference time length, and sum the differences after taking the absolute values to obtain the time deviation value of the target time period, wherein the time deviation ratio of the target time period is the ratio of the time deviation value of the target time period to the reference time length; Step 4: Obtain the detection time period corresponding to the abnormal measurement spectrum curve, compare and analyze the detection time period corresponding to the abnormal measurement spectrum curve with the target time period, classify the abnormal measurement spectrum curve according to the comparison and analysis results, analyze the classified abnormal measurement spectrum curve, obtain the time period overlap degree value AS, compare the time period overlap degree value AS with the time period overlap degree threshold, and determine whether the cause of the wavelength deviation is poor data point transmission stability based on the comparison result.
2. The optical correction method for spectral calibration of a hyperspectral imager according to claim 1, characterized in that: The comparison deviation value ZXj is obtained as follows: Compare the measured value of the wavelength point with the standard value. If the measured value of the wavelength point is not equal to the standard value, the wavelength point is marked as an abnormal wavelength point. If the measured value of the wavelength point is equal to the standard value, the wavelength point is marked as a normal wavelength point. Obtaining the proportion data of abnormal wavelength points, wherein the proportion data of abnormal wavelength points includes the proportion of the number of abnormal wavelength points and the proportion of the total value of measurement deviation; The ratio of the number of abnormal wavelength points and the ratio of the total value of the measurement deviation are multiplied to obtain the comparison deviation degree value ZXj; The method for obtaining the total measurement deviation ratio is as follows: The measured value of the abnormal wavelength point is processed with the standard value, and the absolute value of the difference is taken to obtain the measurement deviation value of the abnormal wavelength point. The measurement deviation values of all abnormal wavelength points are summed to obtain the total measurement deviation value of all abnormal wavelength points. The total measurement deviation value of all abnormal wavelength points is ratioed with the standard value to obtain the proportion of the total measurement deviation value of all abnormal wavelength points.
3. The optical correction method for spectral calibration of a hyperspectral imager according to claim 2, characterized in that: The method for obtaining the ratio of the number of abnormal wavelength points is as follows: The number of all wavelength points and the number of abnormal wavelength points among all wavelength points are counted, and the number of abnormal wavelength points is ratioed to the number of all wavelength points to obtain the ratio of the number of abnormal wavelength points.
4. The optical correction method for spectral calibration of a hyperspectral imager according to claim 1, characterized in that: The abnormal signal occurrence frequency ratio BJ is obtained by performing ratio processing on the total number of occurrences of abnormal signals in multiple measurements and the total number of measurements of the standard light source by the hyperspectral imager; Compare the abnormal signal occurrence ratio BJ with the abnormal signal occurrence ratio threshold: If the abnormal signal occurrence frequency ratio BJ ≥ the abnormal signal occurrence frequency ratio threshold, a wavelength offset suspected signal is generated; If the abnormal signal occurrence frequency ratio BJ is less than the abnormal signal occurrence frequency ratio threshold, no wavelength offset suspected signal is generated.
5. The optical correction method for spectral calibration of a hyperspectral imager according to claim 1, characterized in that: The offset determination value CV is obtained as follows: Obtain the spectrum curve area deviation ratio Ai, the spectrum curve abnormal peak number ratio Gi, and the spectrum curve abnormal peak position distance deviation ratio Hi; The spectral curve area deviation ratio Ai, the spectral curve abnormal peak number ratio Gi and the spectral curve abnormal peak position distance deviation ratio Hi are processed by the formula: Obtain an offset determination value CV, wherein s1, s2 and s3 are preset proportional coefficients, compare the obtained offset determination value CV with the offset determination threshold, and if the offset determination value CV is greater than or equal to the offset determination threshold KU, mark the measured spectrum curve as an abnormal measured spectrum curve; Counting the number of abnormal measured spectrum curves in the measured spectrum curves, performing ratio processing on the number of abnormal measured spectrum curves and the number of measured spectrum curves, and obtaining a ratio value JK of the number of abnormal measured spectrum curves; If the value JK of the proportion of the number of abnormal measured spectral curves is greater than or equal to the threshold value of the proportion of the number of abnormal measured spectral curves, an offset signal is generated; if the value JK of the proportion of the number of abnormal measured spectral curves is less than the threshold value of the proportion of the number of abnormal measured spectral curves, no offset signal is generated; The method for obtaining the abnormal peak position distance deviation ratio Hi of the spectrum curve is as follows: Based on the coordinates of the abnormal peak and the coordinates of the peak in the standard spectral curve corresponding to the number, the deviation distance between the abnormal peak and the peak in the standard spectral curve corresponding to the number is obtained, the deviation distances between all abnormal peaks and the peak in the standard spectral curve corresponding to the number are summed to obtain the total deviation distances between all abnormal peaks and the peak in the standard spectral curve corresponding to the number, the total deviation distances between all abnormal peaks and the peak in the standard spectral curve corresponding to the number are ratio-processed with the total deviation distance threshold between the abnormal peak and the peak in the standard spectral curve corresponding to the number, and the spectral curve abnormal peak position distance deviation ratio Hi is obtained.
6. The optical correction method for spectral calibration of a hyperspectral imager according to claim 5, characterized in that: The method for obtaining the spectral curve area deviation ratio Ai and the spectral curve abnormal peak number ratio Gi is as follows: Compare the measured spectrum curve with the standard spectrum curve in the XY two-dimensional coordinate system, measure the area enclosed between the spectrum curve and the standard spectrum curve, and the area enclosed between the standard spectrum curve and the X-axis, and perform ratio processing to obtain the spectrum curve area deviation ratio Ai; Based on the XY two-dimensional coordinate system, the coordinates of the position points of each peak in the measured spectrum curve are obtained, and the peak points are numbered. Similarly, the coordinates of the position points of each peak in the standard spectrum curve are obtained, and they are also numbered; The coordinates of the peaks in the measured spectrum curve are matched with the peaks in the standard spectrum curve corresponding to the numbers. If the coordinates of the peaks in the measured spectrum curve do not match the coordinates of the peaks in the standard spectrum curve corresponding to the numbers, the peaks in the measured spectrum curve are marked as abnormal peaks. The number of abnormal peaks in the peaks corresponding to the measured spectrum curve and the number of peaks in the measured spectrum curve are counted and ratio processing is performed to obtain the spectrum curve abnormal peak number ratio Gi.
7. The optical correction method for spectral calibration of a hyperspectral imager according to claim 1, characterized in that: The data point transmission fluctuation parameter FG is obtained in the following manner: Based on the analysis of the transmission data of the data point, the number ratio of the target time period and the time deviation ratio of the target time period are obtained, and the number ratio of the target time period and the time deviation ratio of the target time period are multiplied to obtain the data point transmission fluctuation parameter FG; The time deviation ratio of the target time period is obtained as follows: Perform difference processing on the interval time lengths corresponding to all target time periods and the reference time length, and sum the differences after taking the absolute values to obtain the time deviation value of the target time period, and perform ratio processing on the time deviation value of the target time period and the reference time length to obtain the time deviation ratio of the target time period; The data point transmission fluctuation parameter FG is compared with the data point transmission fluctuation parameter threshold. The specific comparison process is as follows: The preset data point transmission fluctuation parameter threshold is FJ; If the data point transmission fluctuation parameter FG ≥ the data point transmission fluctuation parameter threshold FJ, it means that the data point transmission stability of the hyperspectral imager during the measurement of the standard light source is poor; If the data point transmission fluctuation parameter FG is less than the data point transmission fluctuation parameter threshold FJ, it means that the data point transmission stability of the hyperspectral imager during the measurement of the standard light source is good.
8. The optical correction method for spectral calibration of a hyperspectral imager according to claim 7, characterized in that: The method for obtaining the quantity ratio of the target time period is as follows: Arrange the data points in order according to the transmission time points, extract the interval time lengths between the data points, and integrate all the extracted interval time lengths into an interval time length data group. In the interval time length data group, select the interval time length with the largest number of occurrences and mark it as a reference time length. Match all the interval time lengths in the interval time length data group with the reference time length respectively. If they do not match, mark the interval time period corresponding to the interval time length that does not match the reference time length as a target time period. The number of target time periods and the length of interval time are counted, and the ratios are processed to obtain the ratio of the number of target time periods.
9. The optical correction method for spectral calibration of a hyperspectral imager according to claim 1, characterized in that: The method for obtaining the time period overlap degree value AS is as follows: The detection period corresponding to the abnormal measurement spectrum curve is compared and analyzed with the target period. According to the comparison and analysis results, the abnormal measurement spectrum curve is divided into highly overlapping curves, moderately overlapping curves and non-overlapping curves. The number of highly overlapping curves and the number of abnormal measurement spectrum curves are counted and the ratio is processed to obtain the proportion of highly overlapping curves. The number of moderately overlapping curves is counted, and the ratio of the number of moderately overlapping curves to the number of abnormal measured spectrum curves is processed to obtain the ratio of the number of moderately overlapping curves; Obtain the total overlapping time between the detection time period and the target time period corresponding to all moderate overlap curves, extract the time length of the total overlapping time period and the time length of the target time period, and perform ratio processing on them to obtain the ratio of the overlapping time length; The obtained percentage of the number of highly overlapping curves, the percentage of the number of moderately overlapping curves, and the percentage of the length of the overlapping period are multiplied to obtain the period overlap degree value AS.
10. The optical correction method for spectral calibration of a hyperspectral imager according to claim 1, characterized in that: The time period overlap degree value AS is compared with the time period overlap degree threshold, and it is determined whether the cause of the wavelength deviation is poor data point transmission stability based on the comparison result, specifically: If the time period overlap degree value AS ≥ the time period overlap degree threshold, it means that the data point transmission stability is poor, resulting in wavelength deviation; If the time period overlap degree value AS is less than the time period overlap degree threshold, it means that the data point transmission stability is poor and does not cause wavelength deviation.
Citation Information
Patent Citations
Anomaly assessment device, anomaly assessment method, and anomaly assessment system
CN111247442A
Distortion correction method for push-broom hyperspectral imager
CN116228558A