An optical sensor based on AI algorithm
By adopting noise classification model in optical sensors, rewriting Laplace operators and improved CNN models, the shortcomings of traditional optical sensors in noise processing, phase deployment and pressure response are solved, and more efficient and accurate pressure measurement is achieved.
Patent Information
- Application Number
- CN202410246049.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2044-03-05
AI Technical Summary
When processing interference fringe images, traditional optical sensors have problems such as low noise processing efficiency, large error, unreliable fringe phase expansion, insensitive to pressure changes, and slow response.
Using an optical sensor based on AI algorithm, the noise classification model is used to denoise the interference fringe image, the Laplace operator is rewritten by the fast Fourier transform differential method for phase expansion, and the phase expansion graph is processed using the improved CNN model to obtain the pressure value.
It improves the quality of interference fringe images, reduces noise interference, improves the accuracy and response speed of pressure measurement, and can quickly adapt to different environments.
Smart Images

Figure CN118111600B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical sensors, and in particular to an optical sensor based on an AI algorithm. Background Art
[0002] Optical sensors are sensors that use changes in optical signals to reflect the magnitude of the measured pressure. Traditional optical sensors have technical problems such as low noise processing efficiency and large errors in interference fringe patterns; they are also greatly affected by unreliable fringes when performing phase unwrapping of interference fringe images; and they are insensitive to pressure changes and have slow responses. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides an optical sensor based on an AI algorithm. In view of the technical problems of low noise processing efficiency and large errors in interference fringe patterns in traditional technologies, the present invention adopts a noise classification model to classify the noise of the interference fringe image, and denoises according to the classification results to obtain a denoised image; in view of the technical problem that the interference fringe image is greatly affected by unreliable fringes when phase unfolding, the present invention rewrites the Laplace operator according to the fast Fourier transform differential method, and uses the rewritten Laplace operator to phase unfold the denoised image to generate a phase unfolding image; there is a technical problem of insensitivity to pressure changes and slow response. The present invention adopts an improved CNN model to process the phase unfolding image to obtain a pressure value.
[0004] The technical solution adopted by the present invention is as follows: The present invention provides an optical sensor based on an AI algorithm, wherein the optical sensor based on the AI algorithm comprises a stainless steel polished diaphragm, a translucent glass slide, a light source, a built-in camera, a built-in AI chip, a display screen and a power supply;
[0005] The stainless steel polished diaphragm and the translucent glass sheet form an FP cavity, and interference fringes are generated in the FP cavity. When the stainless steel polished diaphragm is subjected to pressure, it is deformed, causing the interference fringes to change.
[0006] The built-in camera captures the interference fringes in the FP cavity in real time to obtain an interference fringe image, and transmits the interference fringe image to the preprocessing module;
[0007] The built-in AI chip includes a preprocessing module, a phase unwrapping module and a pressure measurement module. The preprocessing module uses a noise classification model to classify the noise of the interference fringe image, performs denoising according to the classification result, and obtains a denoised image. The phase unwrapping module rewrites the Laplace operator according to the fast Fourier transform differential method, and performs phase unwrapping on the denoised image using the rewritten Laplace operator to generate a phase unwrapping map. The pressure measurement module inputs the phase unwrapping map into the CNN model for processing to obtain a pressure value.
[0008] The display screen displays the pressure value in real time;
[0009] The power supply provides power support for the display screen and the light source.
[0010] The preprocessing module uses a denoising method based on noise classification to denoise the interference fringe image. The denoising method based on noise classification specifically includes the following steps:
[0011] Step A1: collecting an interference fringe image set, wherein the interference fringe image set includes interference fringe images and corresponding labels, and the labels include no noise, salt and pepper noise, Gaussian noise, and speckle noise;
[0012] Step A2: Create and initialize a noise classification model, which is constructed by mixing the 5 convolutional layers of the pre-trained AlexNet model and the SVM model. Input the interference fringe image set into the noise classification model, automatically extract the features of the interference fringe image using the 5 convolutional layers of the pre-trained AlexNet model, train and classify the SVM model, output the predicted label, and define the constraints of the SVM model as follows:
[0013]
[0014] In the formula, O i is the predicted label, is the weight vector, k is the kernel function, x i is the interference fringe image, c is the penalty coefficient for misclassification, γ i is the distance from the misclassified interference fringe image to the hyperplane;
[0015] Step A3: When the predicted label is speckle noise, a quantum adaptive threshold function method is used to remove the speckle noise. The quantum adaptive threshold function method specifically includes the following steps:
[0016] Step A31: Define a linear filter and use a spectral equalization method to remove the correlation of the interference fringe image. The formula used is as follows:
[0017] L(x,y)=(|H(x,y)|+ε) -0.5 ;
[0018] Where x is the abscissa of the interference fringe image, y is the ordinate of the interference fringe image, L(x,y) is the Fourier spectrum of the linear filter, H(x,y) is the complex point spread function, and ε is a free parameter for adjusting the degree of decorrelation;
[0019] Step A32: performing logarithmic transformation on the interference fringe image to obtain a logarithmic transformation image, and calculating complex wavelet coefficients of the logarithmic transformation image;
[0020] Step A33: De-noise the complex wavelet coefficients based on a quantum-inspired adaptive threshold function to distinguish between noise coefficients and signal coefficients. The formula used is as follows:
[0021]
[0022] Where s is the high frequency scale, is the state under s, Y is the complex wavelet coefficient of the logarithmic transformation image, which is a complex number;
[0023] Step A34: Perform normalization;
[0024] Step A35: Calculate the adaptive estimation parameters using the following formula:
[0025]
[0026] Where K is the adaptive estimation parameter, It is normalized
[0027] Step A36: Calculate the new complex wavelet coefficients using the Map estimator. The formula used is as follows:
[0028]
[0029] In the formula, is the update coefficient, Y is the complex wavelet coefficient of the logarithmic transformation image, which is a complex number, Y r is the real part of Y, Y i is the imaginary part of Y, σ and K are the parameters of the logarithmic transformation image;
[0030] Step A37: Replace the complex wavelet coefficients with the updated coefficients and perform exponential permutation on the logarithmic transformed image to obtain a denoised image.
[0031] Step A4: When the predicted label is Gaussian noise, the Wiener filtering method is used to remove the Gaussian noise. The formula used is as follows:
[0032]
[0033] In the formula, is the interference fringe image after removing Gaussian noise, x is the horizontal coordinate of the interference fringe image, y is the vertical coordinate of the interference fringe image, U(x,y) is the degradation function, U * (x,y) is the complex conjugate function of U(x,y), δ n is the power spectrum of Gaussian noise, δ s is the power spectrum of the signal process, g(x,y) is the interference fringe image;
[0034] Performing a two-dimensional inverse Fourier transform on the interference fringe image after removing Gaussian noise, converting the interference fringe image after removing Gaussian noise from the frequency domain to the spatial domain, and obtaining a denoised image;
[0035] Step A5: When the predicted label is salt and pepper noise, the median filtering method is used to remove the salt and pepper noise to obtain a denoised image;
[0036] Step A6: When the predicted label is noise-free, the interference fringe image is marked as a denoised image.
[0037] The phase unwrapping module uses a Laplace operator-based method to perform phase unwrapping, and the Laplace operator-based method specifically includes the following steps:
[0038] Step B1: Rewrite the forward two-dimensional Laplace operator according to the fast Fourier transform differentiation method. The formula used is as follows:
[0039]
[0040] In the formula, is the rewritten forward two-dimensional Laplace operator, x is the horizontal coordinate of the denoised image, y is the vertical coordinate of the denoised image, N is the number of pixels in Fourier space, M is the number of pixels in Fourier space, F is the Fourier transform of f(x,y), F -1 is the inverse Fourier transform of f(x,y), is the horizontal coordinate in Fourier space, μ m is the ordinate in Fourier space;
[0041] Step B2: Rewrite the inverse two-dimensional Laplace operator using the following formula:
[0042]
[0043] In the formula, is to rewrite the inverse two-dimensional Laplace operator;
[0044] Step B3: Calculate the local phase gradient changes of the forward two-dimensional Laplace operator and the inverse two-dimensional Laplace operator of the wrapped phase of the denoised image. The formula used is as follows:
[0045]
[0046] Where k(x,y) is the local phase gradient change, Im{} is the imaginary part of the complex number, and τ w (x,y) is the wrapped phase of the denoised image;
[0047] Step B4: Calculate the global scaling factor using the following formula:
[0048]
[0049] Where α is the correction function, is the cumulative sum of x from 1 to N, is the cumulative sum of y from 1 to M, S i is the global scaling factor. When α takes the minimum value, S i The value of is the correction factor;
[0050] Correct k(x,y) using the correction factor;
[0051] Step B5: Use MATLAB to perform fuzzy logic edge detection on the denoised image, generate an edge weight function, and create a secondary mask based on the fuzzy logic parameters. The formula used is as follows:
[0052]
[0053] Where B(x,y) is the secondary mask and I(x,y) is the edge weight function;
[0054] Step B6: Reassign the pixels of the denoised image using the following formula:
[0055]
[0056] Where C(x,y) is the pixel after reassignment of the denoised image;
[0057] Step B7: Update the wrapped phase of the denoised image using the following formula:
[0058] τ′ w (x,y)=τ w (x,y)·B(x,y)+C(x,y);
[0059] In the formula, τ' w (x,y are the updated wrapped phases of the denoised image;
[0060] Step B8: Execute steps B3 and B4 to generate a phase unwrapped image. The formula used is as follows:
[0061] τ(x,y)=τ′ w (x,y)+k′(x,y);
[0062] Where τ(x,y) is the phase unwrapped image of the denoised image, and k'(x,y) is the corrected k(x,y).
[0063] The pressure measurement module processes the phase expansion image using a machine learning method based on a CNN model. The machine learning method based on a CNN model specifically includes the following steps:
[0064] Step C1: collecting a pressure interference phase image set, wherein the pressure interference phase image set includes a pressure interference phase image and a corresponding pressure value, and dividing the pressure interference phase image set into a training set and a test set in a ratio of 3:1;
[0065] Step C2: Create and initialize a CNN model, input the training set into the CNN model, and train the CNN model to output pressure values;
[0066] Step C3: Input the test set into the CNN model and calculate the cross entropy damage. The formula used is as follows:
[0067]
[0068] Where CE is the cross entropy damage value, is the pressure value of the ith pressure interference image, The predicted pressure value for the i-th pressure interference image, m is the number of pressure interference phase images in the test set, is the cumulative sum of i from 1 to m;
[0069] Step C4: Define the loss function of the CNN model. The formula used is as follows:
[0070]
[0071] Where w is the bias parameter, b is the regularization parameter, β is the sparsity penalty parameter, θ(w,b) is the loss value of the CNN model, j is the jth convolutional layer, M is the total number of convolutional layers in the CNN model, γ is the expected activation value, is the mean activation value;
[0072] Step C5: Set the training loss threshold to s. When the loss value is equal to or less than s, the training ends. Otherwise, continue training.
[0073] Step C6: Input the phase unwrapped image into the trained CNN model, and the CNN model outputs the pressure value.
[0074] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0075] (1) In view of the technical problems of low efficiency and large error in the noise processing of interference fringe patterns in the conventional technology, the present invention adopts a noise classification model to classify the noise of the interference fringe image, performs denoising according to the classification result, obtains a denoised image, improves the quality of the interference fringe image, and reduces the interference of noise;
[0076] (2) In order to solve the technical problem that the interference fringe image is greatly affected by unreliable fringes when performing phase unwrapping, the present invention rewrites the Laplace operator according to the fast Fourier transform differential method, uses the rewritten Laplace operator to perform phase unwrapping on the denoised image, generates a phase unwrapping diagram, improves the accuracy of pressure measurement, and makes the measurement result more accurate;
[0077] (3) In order to solve the technical problems of insensitivity to pressure changes and slow response, the present invention processes the phase expansion image through an improved CNN model to obtain the pressure value, which can quickly provide the pressure value and adapt to different environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 A schematic diagram of the structure of an optical sensor based on an AI algorithm provided by the present invention;
[0079] Figure 2 A schematic flow chart of a denoising method based on noise classification provided by the present invention.
[0080] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0081] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0082] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0083] Example 1: See Figure 1 , an optical sensor based on an AI algorithm provided in this embodiment, the optical sensor based on the AI algorithm includes a stainless steel polished diaphragm 1000, a built-in translucent glass slide 1100, a light source 1200, a built-in camera 1300, a built-in AI chip 1400, a display screen 1500 and a power supply 1600;
[0084] The stainless steel polished diaphragm 1000 and the built-in translucent glass slide 1100 form an FP cavity. The light source 1200 generates interference fringes in the FP cavity. When the stainless steel polished diaphragm 1000 is subjected to pressure, it deforms, causing the interference fringes to change.
[0085] The built-in camera 1300 captures the interference fringes in the FP cavity in real time, obtains the interference fringes image, and transmits the interference fringes image to the built-in AI chip 1400;
[0086] The built-in AI chip 1400 includes a preprocessing module, a phase unwrapping module and a pressure measurement module. The preprocessing module uses a noise classification model to classify the noise of the interference fringe image, performs denoising according to the classification result, and obtains a denoised image. The phase unwrapping module rewrites the Laplace operator according to the fast Fourier transform differential method, and performs phase unwrapping on the denoised image using the rewritten Laplace operator to generate a phase unwrapping map. The pressure measurement module inputs the phase unwrapping map into the CNN model for processing to obtain a pressure value.
[0087] The display screen 1500 displays the pressure value in real time;
[0088] The power supply 1600 provides power support for the light source 1200 and the display screen 1500 .
[0089] Example 2: See Figure 1 and Figure 2 This embodiment is based on the above embodiment. The preprocessing module uses a denoising method based on noise classification to denoise the interference fringe image. The denoising method based on noise classification specifically includes the following steps:
[0090] Step A1: collecting an interference fringe image set, wherein the interference fringe image set includes interference fringe images and corresponding labels, and the labels include no noise, salt and pepper noise, Gaussian noise, and speckle noise;
[0091] Step A2: Create and initialize a noise classification model, which is constructed by mixing the 5 convolutional layers of the pre-trained AlexNet model and the SVM model. Input the interference fringe image set into the noise classification model, automatically extract the features of the interference fringe image using the 5 convolutional layers of the pre-trained AlexNet model, train and classify the SVM model, output the predicted label, and define the constraints of the SVM model as follows:
[0092]
[0093] In the formula, O i is the predicted label, is the weight vector, k() is the kernel function, x iis the interference fringe image, c is the penalty coefficient for misclassification, γ i is the distance from the misclassified interference fringe image to the hyperplane;
[0094] Step A3: When the predicted label is speckle noise, a quantum adaptive threshold function method is used to remove the speckle noise. The quantum adaptive threshold function method specifically includes the following steps:
[0095] Step A31: Define a linear filter and use a spectral equalization method to remove the correlation of the interference fringe image. The formula used is as follows:
[0096] L(x,y)=(|H(x,y)|+ε) -0.5 ;
[0097] Where x is the abscissa of the interference fringe image, y is the ordinate of the interference fringe image, L(x,y) is the Fourier spectrum of the linear filter, H(x,y) is the complex point spread function, and ε is a free parameter for adjusting the degree of decorrelation;
[0098] Step A32: performing logarithmic transformation on the interference fringe image to obtain a logarithmic transformation image, and calculating complex wavelet coefficients of the logarithmic transformation image;
[0099] Step A33: De-noise the complex wavelet coefficients based on a quantum-inspired adaptive threshold function to distinguish between noise coefficients and signal coefficients. The formula used is as follows:
[0100]
[0101] Where s is the high frequency scale, is the state under s, Y is the complex wavelet coefficient of the logarithmic transformation image, which is a complex number;
[0102] Step A34: Perform normalization;
[0103] Step A35: Calculate the adaptive estimation parameters using the following formula:
[0104]
[0105] Where K is the adaptive estimation parameter, It is normalized
[0106] Step A36: Calculate the new complex wavelet coefficients using the Map estimator. The formula used is as follows:
[0107]
[0108] In the formula, is the update coefficient, Y is the complex wavelet coefficient of the logarithmic transformation image, which is a complex number, Y r is the real part of Y, Y i is the imaginary part of Y, σ and K are the parameters of the logarithmic transformation image;
[0109] Step A37: Replace the complex wavelet coefficients with the updated coefficients and perform exponential permutation on the logarithmic transformed image to obtain a denoised image.
[0110] Step A4: When the predicted label is Gaussian noise, the Wiener filtering method is used to remove the Gaussian noise. The formula used is as follows:
[0111]
[0112] In the formula, is the interference fringe image after removing Gaussian noise, x is the horizontal coordinate of the interference fringe image, y is the vertical coordinate of the interference fringe image, U(x,y) is the degradation function, U * (x,y) is the complex conjugate function of U(x,y), δ n is the power spectrum of Gaussian noise, δ s is the power spectrum of the signal process, g(x,y) is the interference fringe image;
[0113] Performing a two-dimensional inverse Fourier transform on the interference fringe image after removing Gaussian noise, converting the interference fringe image after removing Gaussian noise from the frequency domain to the spatial domain, and obtaining a denoised image;
[0114] Step A5: When the predicted label is salt and pepper noise, the median filtering method is used to remove the salt and pepper noise to obtain a denoised image;
[0115] Step A6: When the predicted label is noise-free, the interference fringe image is marked as a denoised image.
[0116] Through the above operations, in order to solve the technical problems of low efficiency and large error in noise processing in interference fringe patterns in traditional technologies, the present invention adopts a noise classification model to classify the noise of the interference fringe image, denoises according to the classification results, obtains a denoised image, improves the quality of the interference fringe image, and reduces noise interference.
[0117] Example 3, see Figure 1 This embodiment is based on the above embodiment, and the phase unwrapping module adopts a method based on the Laplace operator to perform phase unwrapping. The method based on the Laplace operator specifically includes the following steps:
[0118] Step B1: Rewrite the forward two-dimensional Laplace operator according to the fast Fourier transform differentiation method. The formula used is as follows:
[0119]
[0120] In the formula, is the rewritten forward two-dimensional Laplace operator, x is the horizontal coordinate of the denoised image, y is the vertical coordinate of the denoised image, N is the number of pixels in Fourier space, M is the number of pixels in Fourier space, F is the Fourier transform of f(x,y), F -1 is the inverse Fourier transform of f(x,y), is the horizontal coordinate in Fourier space, μ m is the ordinate in Fourier space;
[0121] Step B2: Rewrite the inverse two-dimensional Laplace operator using the following formula:
[0122]
[0123] In the formula, is to rewrite the inverse two-dimensional Laplace operator;
[0124] Step B3: Calculate the local phase gradient changes of the forward two-dimensional Laplace operator and the inverse two-dimensional Laplace operator of the wrapped phase of the denoised image. The formula used is as follows:
[0125]
[0126] Where k(x,y) is the local phase gradient change, Im{} is the imaginary part of the complex number, and τ w (x,y) is the wrapped phase of the denoised image;
[0127] Step B4: Calculate the global scaling factor using the following formula:
[0128]
[0129] Where α is the correction function, is the cumulative sum of x from 1 to N, is the cumulative sum of y from 1 to M, S i is the global scaling factor. When α takes the minimum value, S i The value of is the correction factor;
[0130] Correct k(x,y) using the correction factor;
[0131] Step B5: Use MATLAB to perform fuzzy logic edge detection on the denoised image, generate an edge weight function, and create a secondary mask based on the fuzzy logic parameters. The formula used is as follows:
[0132]
[0133] Where B(x,y) is the secondary mask and I(x,y) is the edge weight function;
[0134] Step B6: Reassign the pixels of the denoised image using the following formula:
[0135]
[0136] Where C(x,y) is the pixel after reassignment of the denoised image;
[0137] Step B7: Update the wrapped phase of the denoised image using the following formula:
[0138] τ′ w (x,y)=τ w (x,y)·B(x,y)+C(x,y);
[0139] In the formula, τ' w (x,y are the updated wrapped phases of the denoised image;
[0140] Step B8: Execute steps B3 and B4 to generate a phase unwrapped image. The formula used is as follows:
[0141] τ(x,y)=τ′ w (x,y)+k′(x,y);
[0142] Where τ(x,y) is the phase unwrapped image of the denoised image, and k'(x,y) is the corrected k(x,y).
[0143] Through the above operations, in order to solve the technical problem that the interference fringe image is greatly affected by unreliable fringes when performing phase unwrapping, the present invention rewrites the Laplace operator according to the fast Fourier transform differentiation method, uses the rewritten Laplace operator to perform phase unwrapping on the denoised image, generates a phase unwrapping diagram, improves the accuracy of pressure measurement, and makes the measurement result more accurate.
[0144] Example 4, see Figure 1 This embodiment is based on the above embodiment. The pressure measurement module uses a machine learning method based on a CNN model to process the phase expansion image. The machine learning method based on a CNN model specifically includes the following steps:
[0145] Step C1: collecting a pressure interference phase image set, wherein the pressure interference phase image set includes a pressure interference phase image and a corresponding pressure value, and dividing the pressure interference phase image set into a training set and a test set in a ratio of 3:1;
[0146] Step C2: Create and initialize a CNN model, input the training set into the CNN model, and train the CNN model to output pressure values;
[0147] Step C3: Input the test set into the CNN model and calculate the cross entropy damage. The formula used is as follows:
[0148]
[0149] Where CE is the cross entropy damage value, is the pressure value of the ith pressure interference image, The predicted pressure value for the i-th pressure interference image, m is the number of pressure interference phase images in the test set, is the cumulative sum of i from 1 to m;
[0150] Step C4: Define the loss function of the CNN model. The formula used is as follows:
[0151]
[0152] Where w is the bias parameter, b is the regularization parameter, β is the sparsity penalty parameter, θ(w,b) is the loss value of the CNN model, j is the jth convolutional layer, M is the total number of convolutional layers in the CNN model, γ is the expected activation value, is the mean activation value;
[0153] Step C5: Set the training loss threshold to s. When the loss value is equal to or less than s, the training ends. Otherwise, continue training.
[0154] Step C6: Input the phase unwrapped image into the trained CNN model, and the CNN model outputs the pressure value.
[0155] Through the above operations, in order to solve the technical problem of insensitivity to pressure changes and slow response, the present invention processes the phase expansion image through an improved CNN model to obtain the pressure value, which can quickly provide the pressure value and adapt to different environments.
[0156] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0157] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0158] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. An optical sensor based on AI algorithm, characterized in that: Includes a stainless steel polished diaphragm, a translucent glass, a light source, a built-in camera, a built-in AI chip, a display screen, and a power supply; The stainless steel polished diaphragm and the translucent glass sheet form an FP cavity, and interference fringes are generated in the FP cavity. When the stainless steel polished diaphragm is subjected to pressure, it is deformed, causing the interference fringes to change. The built-in camera captures the interference fringes in the FP cavity in real time to obtain an interference fringe image, and transmits the interference fringe image to the preprocessing module; The built-in AI chip includes a preprocessing module, a phase unwrapping module and a pressure measurement module. The preprocessing module uses a noise classification model to classify the noise of the interference fringe image, performs denoising according to the classification result, and obtains a denoised image. The phase unwrapping module rewrites the Laplace operator according to the fast Fourier transform differential method, and performs phase unwrapping on the denoised image using the rewritten Laplace operator to generate a phase unwrapping map. The pressure measurement module inputs the phase unwrapping map into the CNN model for processing to obtain a pressure value. The display screen displays the pressure value in real time; The power supply provides power support for the display screen and the light source; The phase unwrapping module adopts a Laplace operator-based method to perform phase unwrapping, rewrites the Laplace operator according to the fast Fourier transform differential method, and generates a rewritten forward two-dimensional Laplace operator and a rewritten inverse two-dimensional Laplace operator. The Laplace operator-based method specifically includes the following steps: Step B1: Calculate the local phase gradient changes of the forward two-dimensional Laplace operator and the inverse two-dimensional Laplace operator of the wrapped phase of the denoised image. The formula used is as follows: ; In the formula, is the local phase gradient change, is the horizontal coordinate of the denoised image, is the ordinate of the denoised image, is the rewritten forward two-dimensional Laplace operator, is the rewritten inverse two-dimensional Laplace operator, is the imaginary part of a complex number, is the wrapped phase of the denoised image; Step B2: Calculate the global scaling factor using the following formula: ; In the formula, is the correction function, yes From 1 to The cumulative sum of yes From 1 to The cumulative sum of is the global scaling factor, when When taking the minimum value, The value of is the correction factor; Use correction factor Make corrections; Step B3: Use MATLAB to perform fuzzy logic edge detection on the denoised image, generate an edge weight function, create a secondary mask based on the fuzzy logic parameters, reassign pixels of the denoised image, and update the wrapped phase of the denoised image. The formula used is as follows: ; In the formula, is the updated wrapped phase of the denoised image, is the secondary mask, are the pixels of the denoised image after reassignment; Step B4: Execute steps B1 and B2 to generate a phase unwrapped image. The formula used is as follows: ; In the formula, is the phase unwrapped image of the denoised image, It is corrected .
2. The optical sensor based on AI algorithm according to claim 1, characterized in that: The preprocessing module uses a machine learning classification method to classify the noise of the interference fringe image. The machine learning classification method specifically includes the following steps: Step A1: collecting an interference fringe image set, wherein the interference fringe image set includes interference fringe images and corresponding labels, and the labels include no noise, salt and pepper noise, Gaussian noise, and speckle noise; Step A2: creating and initializing a noise classification model, wherein the noise classification model is constructed by mixing the five convolutional layers of the pre-trained AlexNet model and the SVM model, inputting the interference fringe image set into the noise classification model, automatically extracting features from the interference fringe image using the five convolutional layers of the pre-trained AlexNet model, training and classifying the SVM model, and outputting a predicted label; Step A3: When the predicted label is speckle noise, the speckle noise is removed using a quantum adaptive threshold function method to generate a denoised image; Step A4: When the predicted label is Gaussian noise, the Wiener filtering method is used to remove the Gaussian noise and generate a denoised image; Step A5: When the predicted label is salt and pepper noise, the median filtering method is used to remove the salt and pepper noise to generate a denoised image; Step A6: When the predicted label is noise-free, the interference fringe image is marked as a denoised image.
3. The optical sensor based on AI algorithm according to claim 2, characterized in that: In step A3, when the predicted label is speckle noise, a quantum adaptive threshold function method is used to remove the speckle noise. The quantum adaptive threshold function method specifically includes the following steps: Step A31: Define a linear filter and use a spectral equalization method to remove the correlation of the interference fringe image. The formula used is as follows: ; In the formula, is the horizontal coordinate of the interference fringe image, is the ordinate of the interference fringe image, is the Fourier spectrum of the linear filter, is the complex point spread function, is a free parameter that adjusts the degree of decorrelation; Step A32: performing logarithmic transformation on the interference fringe image to obtain a logarithmic transformation image, and calculating complex wavelet coefficients of the logarithmic transformation image; Step A33: De-noise the complex wavelet coefficients based on a quantum-inspired adaptive threshold function to distinguish between noise coefficients and signal coefficients. The formula used is as follows: ; In the formula, is the high frequency scale, is The state below is the complex wavelet coefficient of the logarithmic transformed image, in complex form; Step A34: Perform normalization; Step A35: Calculate the adaptive estimation parameters using the following formula: ; In the formula, is the adaptive estimation parameter, It is normalized ; Step A36: Calculate the new complex wavelet coefficients using the Map estimator. The formula used is as follows: ; In the formula, is the update coefficient, is the complex wavelet coefficient of the logarithmic transformed image, in complex form, yes The real part of yes The imaginary part of and are the parameters of the logarithmic transformed image; Step A37: Replace the complex wavelet coefficients with the updated coefficients and perform exponential permutation on the logarithmic transformed image to obtain a denoised image.
4. The optical sensor based on AI algorithm according to claim 3, characterized in that: In step A4, when the predicted label is Gaussian noise, the Gaussian noise is removed using a Wiener filtering method, wherein the Wiener filtering method specifically includes the following steps: Step A41: Use the Wiener filtering method to remove Gaussian noise. The formula used is as follows: ; In the formula, is the interference fringe image after removing Gaussian noise, is the lateral coordinate of the interference fringe image, is the longitudinal coordinate of the interference fringe image, is the degradation function, yes The complex conjugate function of is the power spectrum of Gaussian noise, is the power spectrum of the signal process, is the interference fringe image; Step A42: Perform a two-dimensional inverse Fourier transform on the interference fringe image after removing Gaussian noise, convert the interference fringe image after removing Gaussian noise from the frequency domain to the spatial domain, and obtain a denoised image.
5. The optical sensor based on AI algorithm according to claim 4, characterized in that: The pressure measurement module processes the phase expansion image using a machine learning method based on a CNN model. The machine learning method based on a CNN model specifically includes the following steps: Step C1: collecting a pressure interference phase image set, wherein the pressure interference phase image set includes a pressure interference phase image and a corresponding pressure value, and dividing the pressure interference phase image set into a training set and a test set in a ratio of 3:1; Step C2: Create and initialize a CNN model, input the training set into the CNN model, and train the CNN model to output pressure values; Step C3: Input the test set into the CNN model and calculate the cross entropy damage. The formula used is as follows: ; In the formula, is the cross entropy damage value, It is The pressure value of the pressure interference image, For The predicted pressure value of the pressure interference image, is the number of pressure interferometry phase images in the test set, yes From 1 to The cumulative sum of Step C4: Define the loss function of the CNN model. The formula used is as follows: ; In the formula, is the bias parameter, is the regularization parameter, is the sparsity penalty parameter, is the loss value of the CNN model, It is convolutional layers, is the total number of convolutional layers in the CNN model, is the expected activation value, is the mean activation value; Step C5: Set the training loss threshold to , when the loss value is equal to or less than When , the training ends, otherwise, continue the training; Step C6: Input the phase unwrapped image into the trained CNN model, and the CNN model outputs the pressure value.
Citation Information
Patent Citations
Frequency-modulated continuous wave laser interference pressure sensor and detection method thereof
CN112050976A