A spectral curve similarity evaluation method based on bionic vision
By using a biomimetic vision-based method for evaluating the similarity of spectral curves, and employing a Gaussian window function to segment the spectral curves, the problem that existing technologies cannot reflect differences in spectral shape and absorption peak characteristics is solved, thus achieving accurate evaluation and efficient calculation of spectral curve similarity.
Patent Information
- Application Number
- CN202411872101.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Existing methods for evaluating the similarity of spectral curves cannot effectively reflect differences in the shape of the spectrum and the characteristics of absorption peaks; they can only reflect differences in size.
A biomimetic vision-based approach is adopted to acquire data through a dispersive spectrometer, process the spectral curves in segments, apply Gaussian window functions for windowing, calculate the integral value of the spectral segments, and evaluate the similarity of the spectral curves in combination with error thresholds.
It retains key information from the spectral curves, compresses information from non-interesting spectral bands, improves the accuracy and computational efficiency of similarity evaluation, and is suitable for real-time processing.
Smart Images

Figure CN119880829B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for evaluating the similarity of spectral curves, specifically a method for evaluating the similarity of spectral curves based on biomimetic vision. Background Technology
[0002] A spectral curve is a curve showing the relationship between spectral wavelength and other variables. For example, keeping the intensity of incident light constant, measuring the energy corresponding to light at different frequencies, and plotting the curve showing the relationship between the two.
[0003] Spectra are often referred to as the optical "fingerprint" of matter. Spectral curves are widely used for the classification and identification of substances, which necessitates the evaluation of spectral curve similarity to determine the similarity between two or more spectral curves. Existing methods for evaluating spectral curve similarity mainly include the following:
[0004] 1. Euclidean distance method: This method measures the similarity between two spectra by the Euclidean distance between them. However, it only reflects differences in the magnitude of the spectra and does not accurately reflect differences in their shape.
[0005] 2. Spectral Angle Matching Method: This method assesses similarity by calculating the angle between two spectral curves. However, this method does not accurately reflect spectral characteristics such as absorption peaks. Summary of the Invention
[0006] The purpose of this invention is to address the technical problems of existing spectral curve similarity evaluation methods, which can only reflect differences in spectral magnitude but not in spectral shape or absorption peaks. This invention provides a spectral curve similarity evaluation method based on biomimetic vision.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A method for evaluating spectral curve similarity based on biomimetic vision, characterized by the following steps:
[0009] S1. Obtain raw spectral data using a dispersive spectrometer;
[0010] S2. Determine the number of spectral segments N of the original spectral data and the wavelength range of each spectral segment, N≥3, and divide the original spectral data into N spectral segments according to the wavelength range, and plot the original spectral curves of N spectral segments.
[0011] S3. Normalize the original spectral curves of N spectral bands to obtain normalized spectral curves of N spectral bands.
[0012] S4. Determine the Gaussian window function for the normalized spectral curve of each spectral band;
[0013] S5. Apply the corresponding window function to the normalized spectral curve of each spectral band to obtain windowed curves of N spectral bands.
[0014] S6. Calculate the integral value of the windowed curve for each spectral band;
[0015] S7. Select reference spectral data from the spectral curve database, and divide the reference spectral data into N reference spectral segments according to the number of spectral segments N and the wavelength range of each spectral segment in S2. Plot N reference spectral curves, and calculate the reference windowed curve integral value of each spectral segment according to the methods in S3-S6.
[0016] S8. Evaluate whether the original spectral curve and the reference spectral curve are similar based on the windowed curve integral value of each spectral segment in S6 and the reference windowed curve integral value of each spectral segment in S7, and complete the spectral curve similarity evaluation based on bionic vision.
[0017] In S1, the raw spectral data includes wavelengths and the energy corresponding to each wavelength.
[0018] In S4, the expression for the Gaussian window function is:
[0019]
[0020] Where, ω i (n) is a window function for a certain frequency band range, n i0 Let α be the wavelength at the center point of the i-th spectral band. i Let be the Gaussian window width parameter for the i-th spectral band, and n be the wavelength within the i-th spectral band, where n is a positive integer.
[0021] In S5, the expression for applying a windowing function to the normalized spectral curve of each spectral band is as follows:
[0022] f(n i )′=f(n i )·ω(n i );
[0023] Among them, f i (n)′ is the windowed curve for the i-th spectral segment, f i (n) represents the original spectral curve within the i-th spectral band.
[0024] In S6, the formula for calculating the windowed curve integral value for each spectral band is:
[0025]
[0026] Among them, t iis the integral value of the windowed curve in the i-th spectral band, m is the minimum wavelength of the i-th spectral band, and M represents the maximum wavelength of the i-th spectral band.
[0027] The specific process of S8 is as follows:
[0028] S8.1. For the windowed curve integral value of each spectral segment in S6 and the reference windowed curve integral value of each spectral segment in S7, calculate the error value Δt in the i-th spectral segment. i The formula is:
[0029] △t i =(t i -t i ') 2 ;
[0030] Where, t′ i The integral value of the reference windowed curve within the i-th spectral segment;
[0031] S8.2, Set the error threshold P within the i-th spectral band. i ;
[0032] S8.3 Determine the error value within the i-th spectral band and its relation to the error threshold P. i The magnitude of the error is such that the error value in all spectral bands is not greater than the corresponding error threshold P. i If the original spectral curve is similar to the reference spectral curve, then the original spectral curve is similar to the reference spectral curve; otherwise, they are not similar.
[0033] The beneficial effects of this invention are:
[0034] 1. The present invention provides a method for evaluating the similarity of spectral curves based on biomimetic vision, similar to the way human eyes distinguish colors. The method involves windowing the spectral curves obtained by the spectrometer, retaining the information of the spectral bands of interest, and compressing the information of spectral bands other than the spectral bands of interest, which is beneficial for the similarity evaluation of key information of the spectral curves.
[0035] 2. The present invention provides a spectral curve similarity evaluation method based on biomimetic vision, which has low computational cost and is easy to implement in real time. Attached Figure Description
[0036] Figure 1 It is a graph showing the human eye's perception of color;
[0037] Figure 2 It is a curve of human eye's color perception simulated using window functions;
[0038] Figure 3 This is a schematic diagram of the original spectrum in embodiment S1 of the spectral curve similarity evaluation method based on biomimetic vision of the present invention;
[0039] Figure 4This is a schematic diagram of the Gaussian window function used in embodiment S3 of the biomimetic vision-based spectral curve similarity evaluation method of the present invention;
[0040] Figure 5 This is a curve obtained by applying a window function to the original spectral curve of each spectral band after performing windowing processing on it in Implementation S4 of the Spectral Curve Similarity Evaluation Method Based on Bionic Vision of the present invention.
[0041] Figure 6 This is a visualization diagram of the similarity of three spectral bands when the original spectral curve is similar to the reference spectral curve in an embodiment S7 of the present invention, which is a method for evaluating the similarity of spectral curves based on biomimetic vision.
[0042] Figure 7 This is a visualization diagram of the similarity of three spectral bands in an embodiment S7 of the present invention, where the original spectral curve and the reference spectral curve are not similar.
[0043] Specific implementation party
[0044] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] This embodiment is based on the fact that the human eye is a precise and efficient imaging system. The human retina consists of cone cells that recognize three colors: red (R), green (G), and blue (B), and rod cells. Under good lighting conditions, the three types of cone cells perceive red, green, and blue colors, and the color perception curve is as follows: Figure 1 As shown, computer synthesis enables humans to perceive a colorful world. According to some literature, the human eye can perceive over 160,000 colors. This ability to distinguish colors is extremely powerful. The spectral response curves of cone cells reveal that the human eye's perception of red (R), green (G), and blue (B) is not a "pure color." Each color represents a range resembling a mountain peak, and there is overlap between red, green, and blue.
[0046] The color curve of human eye perception simulated using window functions, such as Figure 2 As shown, the color curve perceived by the human eye through the window function retains the information of the spectral segment of interest and compresses the information of the spectral segment outside the spectral segment of interest, which is beneficial for the similarity assessment of key information of the spectral curve.
[0047] Some people possess tetrachromatic vision. This means that such people's eyes can perceive a fourth color in addition to red, green, and blue, allowing them to distinguish a wider variety of colors.
[0048] Based on the above theoretical background, this invention proposes a method for evaluating the similarity of spectral curves based on biomimetic vision. The method involves windowing the dispersive spectrum, obtaining a new spectral curve from the processed data, and then evaluating the similarity.
[0049] This embodiment presents a spectral curve similarity evaluation method based on biomimetic vision, comprising the following steps:
[0050] S1. Raw spectral data for 401 visible spectral bands were acquired using a dispersive spectrometer, with the visible spectral range being 350 nm to 750 nm. The raw spectral data included wavelengths and corresponding energies. The raw spectral curves for the visible light band obtained by simulating a dispersive spectrometer are shown below. Figure 3 As shown.
[0051] S2. Determine the number of spectral segments in the original spectral data, and the wavelength range of each spectral segment: 350nm-550nm, 400nm-700nm, 400nm-750nm. Divide the original spectral data into three spectral segments according to the wavelength range and plot the original spectral curve for each spectral segment.
[0052] S3. Normalize the original spectral curves of the three spectral bands to obtain normalized spectral curves of the three spectral bands.
[0053] S4. Determine the Gaussian window function for the normalized spectral curve of each spectral band; in this embodiment, the window function used is the Gaussian window function, such as... Figure 4 As shown, the expression for the Gaussian window function is:
[0054]
[0055] Where, ω i (n) is a window function for a certain frequency band range, n i0 Let α be the wavelength at the center point of the i-th spectral band. i Let be the Gaussian window width parameter for the i-th spectral band, and n be the wavelength within the i-th spectral band, where n is a positive integer.
[0056] In this embodiment, the center point of the first window function is 450nm, and the width is 200nm (350nm-550nm); the center point of the second window function is 540nm, and the width is 300nm (400nm-700nm); the center point of the third window function is 570nm, and the width is 350nm (400nm-750nm). Thus, three window functions ω1(n), ω2(n), and ω3(n) are obtained.
[0057]
[0058] S5. Apply the appropriate Gaussian window function to the original spectral curve of each spectral band, such as... Figure 5 As shown, windowed curves for three spectral bands are obtained; the expression is:
[0059] f1(n)′=f1(n)·ω1(n),350≤n<550,
[0060] f2(n)′=f2(n)·ω2(n),400≤n<700,
[0061] f3(n)′=f3(n)·ω3(n),400 <n≤750,
[0062] Among them, f1(n)′, f2(n)′, and f3(n)′ are the windowed curves of the 1st, 2nd, and 3rd spectral bands, and f1(n), f2(n), and f3(n) are the original spectral curves within the 1st, 2nd, and 3rd spectral bands.
[0063] S6. Calculate the integral value of the windowed curve within each spectral band; the formula is:
[0064]
[0065] Where t1, t2, and t3 are the windowed curve integral values in the 1st, 2nd, and 3rd spectral segments, respectively.
[0066] S7. Select the reference spectral data from the spectral curve database, and according to the number of spectral segments 3 and the wavelength range of each spectral segment in S2, the first wavelength range is 350nm-550nm, the center point is 450nm, and the width is 200nm; the second wavelength range is 400nm-700nm, the center point is 540nm, and the width is 300nm; the third wavelength range is 400nm-750nm, the center point is 570nm, and the width is 350nm. Plot the reference spectral curve for each spectral segment, and use the method in S3-S6 to obtain the integral values of the reference windowed curve for each spectral segment, t′1, t′2, t′3.
[0067] S8. Evaluate the similarity between the original spectral curve and the reference spectral curve based on the windowed curve integral values of each spectral segment in S6 and the reference windowed curve integral values of each spectral segment in S7, thus completing the spectral curve similarity evaluation based on biomimetic vision. The specific process is as follows:
[0068] S8.1. For the windowed curve integral value in each spectral segment of S6 and the reference windowed curve integral value in the corresponding spectral segment of S7, calculate the error values Δt1, Δt2, and Δt3 using the following formula:
[0069] △t1=(t1-t1') 2 ;
[0070] △t2=(t2-t'2) 2 ;
[0071] △t3=(t3-t'3) 2 .
[0072] S8.2 Set the error thresholds P1, P2, and P3 within the third spectral band;
[0073] S8.3 Determine the magnitude of the error value within the third spectral band compared to the error thresholds P1, P2, and P3. If the following conditions are met...
[0074] △t1≤P1,△t2≤P2,△t3≤P3.
[0075] If the original spectral curve is similar to the reference spectral curve, then it is similar to the reference spectral curve; otherwise, it is not similar.
[0076] When the original spectral curve is similar to the reference spectral curve, a similarity visualization diagram of the three spectral bands is plotted, as follows: Figure 6 As shown; when the original spectral curve and the reference spectral curve are not similar, or the similarity is very small, a similarity visualization diagram of the three spectral bands is drawn respectively, as shown. Figure 7 As shown. According to Figure 6 and Figure 7 It can be seen that if the difference between the original spectral curve and the reference spectral curve in each band is less than the error threshold, the graphs drawn from the two spectral curves based on the integral values of the windowed curves in each spectral band should be similar in shape.
[0077] The above description is merely a specific embodiment of the present invention and a comparison of the effects of the specific embodiments with relevant comparative examples. However, the scope of protection of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for evaluating spectral curve similarity based on biomimetic vision, characterized in that, Includes the following steps: S1. Obtain raw spectral data using a dispersive spectrometer; S2. Determine the number of spectral segments N of the original spectral data and the wavelength range of each spectral segment, N≥3, and divide the original spectral data into N spectral segments according to the wavelength range, and plot the original spectral curves of N spectral segments. S3. Normalize the original spectral curves of N spectral bands to obtain normalized spectral curves of N spectral bands. S4. Determine the Gaussian window function for the normalized spectral curve of each spectral band; S5. Apply the corresponding window function to the normalized spectral curve of each spectral band to obtain windowed curves of N spectral bands. S6. Calculate the integral value of the windowed curve for each spectral band; S7. Select reference spectral data from the spectral curve database, and divide the reference spectral data into N reference spectral segments according to the number of spectral segments N and the wavelength range of each spectral segment in S2. Plot N reference spectral curves, and calculate the reference windowed curve integral value of each spectral segment according to the methods in S3-S6. S8. Evaluate whether the original spectral curve and the reference spectral curve are similar based on the windowed curve integral value of each spectral segment in S6 and the reference windowed curve integral value of each spectral segment in S7, and complete the spectral curve similarity evaluation based on bionic vision.
2. The spectral curve similarity evaluation method based on biomimetic vision according to claim 1, characterized in that, In S1, the raw spectral data includes wavelengths and the energy corresponding to each wavelength.
3. The spectral curve similarity evaluation method based on biomimetic vision according to claim 2, characterized in that, In S4, the expression for the Gaussian window function is: Where, ω i (n) is a window function for a certain frequency band range, n i0 Let α be the wavelength at the center point of the i-th spectral band. i Let be the Gaussian window width parameter for the i-th spectral band, and n be the wavelength within the i-th spectral band, where n is a positive integer.
4. The spectral curve similarity evaluation method based on biomimetic vision according to claim 3, characterized in that, In S5, the expression for applying a windowing function to the normalized spectral curve of each spectral band is as follows: f(n i )′=f(n i )·ω(n i ); Among them, f i (n)′ is the windowed curve for the i-th spectral segment, f i (n) represents the original spectral curve within the i-th spectral band.
5. The spectral curve similarity evaluation method based on biomimetic vision according to claim 4, characterized in that, In S6, the formula for calculating the windowed curve integral value for each spectral band is: Among them, t i is the integral value of the windowed curve in the i-th spectral band, m is the minimum wavelength of the i-th spectral band, and M represents the maximum wavelength of the i-th spectral band.
6. The spectral curve similarity evaluation method based on biomimetic vision according to claim 5, characterized in that, The specific process of S8 is as follows: S8.
1. For the windowed curve integral value of each spectral segment in S6 and the reference windowed curve integral value of each spectral segment in S7, calculate the error value Δt in the i-th spectral segment. i The formula is: △t i =(t i -t’ i ) 2 ; Among them, t' i The integral value of the reference windowed curve within the i-th spectral segment; S8.2, Set the error threshold P within the i-th spectral band. i ; S8.3 Determine the error value within the i-th spectral band and its relation to the error threshold P. i The magnitude of the error is such that the error value in all spectral bands is not greater than the corresponding error threshold P. i If the original spectral curve is similar to the reference spectral curve, then the original spectral curve is similar to the reference spectral curve; otherwise, they are not similar.
Citation Information
Patent Citations
Spectral estimation parameter generation device, method of generating spectral estimation parameter, and spectral estimation device
CN102788642A
Multispectral image reconstruction method based on weighted guided filtering
CN116188305A