A rare earth molten salt reaction state recognition method based on Farneback-GRU
Through the Farneback-GRU method, the visual pan-tilt system and optical flow method are used to analyze the displacement of rare earth molten salt images, combined with the gated recurrent unit neural network, accurate identification of the reaction state of rare earth molten salt is achieved, solving the problem of relying on experience judgment, and improving recognition accuracy and production safety.
Patent Information
- Application Number
- CN202310900641.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-07-21
AI Technical Summary
Existing technology mainly relies on the experience of front-line technicians to judge the reaction status of rare earth molten salts, and cannot accurately identify whether the reaction is sufficient, affecting electrolysis control and production safety.
The Farneback-GRU method is adopted to collect image signals through a two-degree-of-freedom visual pan-tilt platform. The image displacement is analyzed using the Farneback optical flow method. The motion field features are processed in combination with the gated recurrent unit neural network to achieve accurate identification of the reaction state of rare earth molten salt.
It improves the accuracy of rare earth molten salt reaction state identification, enhances the learning ability of time series characteristics, has good robustness, meets production inspection standards, and improves production safety factor.
Smart Images

Figure CN117173605B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rare earth metal electrolysis production, and in particular to a rare earth molten salt reaction state identification method based on Farneback-GRU. Background Art
[0002] In the rare earth metal electrolysis production process, technicians' accurate control of the molten salt reaction state can provide key feedback parameters for optimizing electrolysis control and improving the quality of electrolysis products. In the fluoride rare earth molten salt system, the reaction state is mainly divided into two categories: sufficient reaction and insufficient reaction. Currently, the identification of the reaction state of rare earth molten salt mainly relies on the experience and knowledge of front-line technicians to judge the reaction state of the molten salt according to the intensity of the molten salt reaction. In actual production activities, the level of human technical skills has a great impact on safe production.
[0003] Therefore, seeking an effective method to identify the reaction state of rare earth molten salt is of great significance for optimizing the electrolysis process and improving the production safety factor. Summary of the Invention
[0004] In order to overcome the shortcomings of the existing technology that mainly relies on the experience and knowledge of front-line technicians to judge the reaction state of the molten salt according to the intensity of the molten salt reaction, and cannot accurately judge whether the reaction state is sufficient, the present invention provides a rare earth molten salt reaction state identification method based on Farneback-GRU.
[0005] The technical implementation scheme of the present invention is: a rare earth molten salt reaction state identification method based on Farneback-GRU, characterized by comprising the following steps:
[0006] S1: The image signal of the rare earth molten salt video stream is acquired by a two-degree-of-freedom visual pan-tilt platform;
[0007] S2: Analyze the displacement between two frames of rare earth molten salt video stream using Farneback optical flow method;
[0008] S3: obtaining a motion field distribution feature by applying a calculation error optimization method to a displacement calculation formula between two frames of images used for the displacement, wherein the rare earth molten salt velocity feature is a vectorized normalized velocity feature with time series information;
[0009] S4: performing a scale transformation to convert the pixel unit of the motion field distribution feature into the actual physical field scale;
[0010] S5: performing median filtering on the motion field distribution characteristics to reduce current pulse noise and environmental random noise;
[0011] S6: The accurate reaction state of rare earth molten salt is obtained by using a gated recurrent unit neural network to process the actual physical scale of the motion field distribution characteristics.
[0012] Preferably, the two-degree-of-freedom gimbal is driven by two servos to perform three-dimensional space movement. The two-degree-of-freedom gimbal is equipped with a color industrial camera. The sensor type of the color industrial camera is CMOS, the shooting pixel of the color industrial camera is 1.3 million, and the maximum frame rate of the color industrial camera can reach 90fps.
[0013] Preferably, the steps of extracting the velocity field characteristics of rare earth molten salt using the Farneback optical flow method are as follows:
[0014] Assume that the image domain information expression is:
[0015] f(x)=x T Ax+b T x+c
[0016] If the domain information expression of the previous frame image is:
[0017] f1(x)=x T A1x+b1 T x+c1
[0018] Assuming that the next frame of image has a displacement d, based on the basic assumptions of optical flow: constant image gradient and constant local optical flow, the image domain information can be expressed as:
[0019]
[0020] By assumption, the coefficients of the above polynomials are equal:
[0021] A2=A1
[0022] b2=b1-2A1d
[0023]
[0024] The image displacement calculation formula can be obtained from the above formula:
[0025]
[0026] The above formula derives the displacement calculation formula between the two frames of images, introducing a local polynomial to replace the global polynomial in the image domain information expression; the local polynomial expansion of the two images is performed to obtain the expansion coefficients A1(x), b1(x), c1(x) and A2(x), b2(x), c2(x) of the two images respectively; based on the optical flow assumption that A2=A1, the following approximation is made to reduce the error:
[0027]
[0028] In addition, Δb(x) is introduced:
[0029]
[0030] At this time, the displacement calculation formula is updated from the image displacement calculation formula to:
[0031] A(x)d(x)=Δb(x)
[0032] Assuming that the image displacement changes slowly enough, d(x) needs to satisfy the minimization objective of the following function:
[0033]
[0034] Where w(Δx) is the weight parameter corresponding to the image pixel; the displacement calculation formula can be obtained by the least squares method:
[0035] d(x)=(∑wA T A) -1 ∑wA T Δb
[0036] Establish an 8-parameter 2D motion parametric model:
[0037] d x (x,y)=a1+a2x+a3y+a7x 2 +a8xy
[0038] d y (x,y)=a4+a5x+a6y+a7x 2 +a8xy
[0039] The above formula can be expressed in matrix form:
[0040] d=Sp
[0041]
[0042] p=(a1,a2,a3,a4,a5,a6,a7,a8) T
[0043] Substitute the motion parameterized model into The new weighted least squares expression can be obtained:
[0044]
[0045] According to the least squares method, the parameterized model can be expressed as:
[0046]
[0047] The process of solving the parameterized model first calculates and The weighted average is used to solve the displacement d; the above parameterized model calculates the displacement change between two frames of images, introduces prior displacement to update the model and image pyramid technology to construct a multi-resolution input image.
[0048] Preferably, the calculation error optimization method is to introduce a local polynomial to replace the global polynomial in the image domain information expression; perform local polynomial expansion on the two images to obtain the expansion coefficients A1(x), b1(x), c1(x) and A2(x), b2(x), c2(x) of the two images respectively; based on the optical flow assumption, A2=A1 should be satisfied, but in practice, the following approximation is required to reduce the error:
[0049]
[0050] In addition, Δb(x) is introduced:
[0051]
[0052] At this time, the displacement calculation formula is updated from the image displacement calculation formula to:
[0053] A(x)d(x)=Δb(x)
[0054] Since the displacement calculation formula for each pixel will bring a huge amount of calculation, the neighborhood range of image calculation is narrowed. Assuming that the image displacement changes slowly enough, d(x) needs to meet the minimization goal of the following function:
[0055]
[0056] Where w(Δx) is the weight parameter corresponding to the image pixel; the displacement calculation formula can be obtained by the least squares method:
[0057] d(x)=(∑wA T A) -1 ∑wA T Δb
[0058] Furthermore, the 8-parameter 2D motion parameterized model is updated:
[0059] d x (x,y)=a1+a2x+a3y+a7x 2 +a8xy
[0060] d y (x,y)=a4+a5x+a6y+a7x 2 +a8xy
[0061] The above formula can be expressed in matrix form:
[0062] d=Sp
[0063]
[0064] p=(a1,a2,a3,a4,a5,a6,a7,a8) T
[0065] Substitute the motion parameterized model into The new weighted least squares expression can be obtained:
[0066]
[0067] According to the least squares method, the parameterized model can be expressed as:
[0068]
[0069] In the process of solving the parameterized model, we can first calculate and Then the displacement d is solved by weighted average; the displacement of the motion field is statistically analyzed, and the displacement statistical histograms of the two types of motion fields with sufficient response and insufficient response are compared.
[0070] Preferably, the scale transformation steps are as follows: first, the cathode rod of the rare earth electrolytic cell is vertically inserted into the molten salt and has a fixed diameter. The ratio of the cathode rod diameter in the image to the actual cathode rod diameter is calculated as a normalized conversion factor. The molten salt area is separated by threshold segmentation, and then the contour of the molten salt area is extracted. Finally, two parallel lines with the most distribution points in the vertical direction are fitted according to the contour.
[0071] Normalized image displacement d t The expression is:
[0072]
[0073] Where d represents the image displacement solved by the Farneback optical flow method, D n Denotes the distance between the cathode rod fitting contours, D t It means the actual diameter of the cathode rod is 85mm.
[0074] Preferably, the median filter is to perform median filtering on the normalized velocity feature data extracted from the rare earth molten salt video stream; the sampling time of the rare earth molten salt video stream is 1s, and through calculation, N-1 normalized velocity values can be obtained within 1s.
[0075] Furthermore, N=the frame rate of the color industrial camera 90 fps.
[0076] Preferably, the gated recurrent unit neural network is composed of individual recurrent units in series; the series of the gated recurrent units can form a neural network layer, and the weight parameters in the network structure are updated by a back propagation algorithm, and the layers are connected in series through the output connected to the input.
[0077] Further, the calculation process of the gated recurrent unit neural network is as follows: the input value X t of the current unit and the state h t-1 output by the previous unit are combined through a nonlinear combination to form the input of the reset gate and the update gate:
[0078] r t =σ(W t ·[h t-1 ,x t ]+b r )
[0079] z t =σ(W z ·[h t-1 ,x t ]+b z )
[0080] In the formula, r t represents the output of the reset gate, z t represents the output of the reset gate; W t and W z represent the weight parameters of the reset gate and the update gate, respectively; b r and b z represent the bias matrix of the reset gate and the update gate, respectively; · represents matrix dot multiplication; [] represents matrix splicing; and σ represents a nonlinear activation function sigmoid:
[0081]
[0082] The updated candidate state is:
[0083]
[0084] In the formula, H t represents the candidate state of the current unit; W represents the weight parameter corresponding to the candidate state; and represents the Hadamard product of the matrix; b n represents the weight parameter corresponding to the candidate state; and tanh represents a hyperbolic tangent function:
[0085]
[0086] Finally, the output of the hidden layer (unit) is:
[0087]
[0088] The gated recurrent unit maintains valid output information in the incremental time series information by controlling the filtering through the reset gate and the update gate.
[0089] Compared with the prior art, the present invention has the following advantages:
[0090] (1) In view of the process in which technicians distinguish the reaction state according to the intensity of the rare earth molten salt reaction, this method uses the Farneback dense optical flow method to extract the motion field information of the rare earth molten salt, so as to quantify the intensity of the molten salt reaction and indirectly reflect the reaction state of the molten salt.
[0091] (2) Based on the actual characteristics of the rare earth electrolysis environment, a scale transformation method for normalizing the motion field information is proposed and the current and environmental noise are filtered out through median filtering.
[0092] (3) The Farneback-GRU model is proposed to enhance the learning and recognition capabilities of time series features. The model accuracy of this method is much higher than that of similar classic models, meeting the detection standards of production enterprises; and it has good robustness, which is of great significance to production control. BRIEF DESCRIPTION OF THE DRAWINGS
[0093] Figure 1 Shown is a motion field displacement statistical histogram of a specific embodiment of a rare earth molten salt reaction state identification method based on Farneback-GRU of the present invention;
[0094] Figure 2 The present invention shows a rare earth molten salt cathode rod profile fitting based on Farneback-GRU in a specific embodiment of the rare earth molten salt reaction state identification method;
[0095] Figure 3 Shown is a comparison diagram of velocity signal before and after median filtering of a specific embodiment of a rare earth molten salt reaction state identification method based on Farneback-GRU of the present invention;
[0096] Figure 4 What is shown is a gated recurrent unit of a specific embodiment of a rare earth molten salt reaction state identification method based on Farneback-GRU of the present invention;
[0097] Figure 5 What is shown is a gated recurrent unit neural network of a specific implementation method of the rare earth molten salt reaction state identification method based on Farneback-GRU of the present invention. DETAILED DESCRIPTION
[0098] The present invention will be further described below with reference to the accompanying drawings and examples.
[0099] Example
[0100] Collection of rare earth molten salt image signals:
[0101] The rare earth molten salt images were acquired using a two-degree-of-freedom visual gimbal, which is driven by two MG996R servos for three-dimensional motion. The gimbal is equipped with a color industrial camera (model: MV-CA013-21UC). The camera sensor is a CMOS sensor with 1.3 million pixels and a maximum frame rate of 90fps.
[0102] Optical flow method to extract velocity characteristics of rare earth molten salt:
[0103] (1)Farneback optical flow method
[0104] Optical flow methods are mainly divided into dense optical flow method and sparse optical flow method. Dense optical flow method requires optical flow solution for all pixels of the image, while sparse optical flow method only needs to solve optical flow for part of the image. Therefore, the calculation results of dense optical flow method are more accurate. There are two classic dense optical flow methods: Horn-Schunck and Farneback. The Horn-Schunck optical flow method derives the optical flow iterative formula by introducing a global smoothness constraint on the basis of the basic optical flow equation. The Farneback optical flow method derives a new velocity field estimation equation based on polynomial expansion. Therefore, this method first extracts the velocity field characteristics of rare earth molten salt through the Farneback optical flow method.
[0105] Assume that the image domain information expression is:
[0106] f(x)=x T Ax+b T x+c
[0107] If the domain information expression of the previous frame image is:
[0108] f1(x)=x T A1x+b1 T x+c1
[0109] Assuming that the next frame of image has a displacement d, based on the basic assumption of optical flow (constant image gradient and constant local optical flow), its image domain information can be expressed as:
[0110]
[0111] By assumption, the coefficients of the above polynomials are equal:
[0112] A2=A1
[0113] b2=b1-2A1d
[0114]
[0115] The image displacement calculation formula can be obtained from the above formula:
[0116]
[0117] Although the above formula has theoretically derived the displacement calculation formula between two frames of images, in actual solutions, using a single polynomial model to approximate complex image information often leads to large calculation errors. To solve this problem, a local polynomial is introduced to replace the global polynomial in the image domain information expression. The local polynomial expansion is performed on the two images to obtain the expansion coefficients A1(x), b1(x), c1(x) and A2(x), b2(x), c2(x) of the two images respectively. Based on the optical flow assumption, A2=A1 should be satisfied, but in practice, the following approximation is required to reduce the error:
[0118]
[0119] In addition, Δb(x) is introduced:
[0120]
[0121] At this time, the displacement calculation formula is updated from the image displacement calculation formula to:
[0122] A(x)d(x)=Δb(x)
[0123] Since the displacement calculation formula for each pixel will bring a huge amount of calculation, in order to minimize the neighborhood range of image calculation as much as possible, assuming that the image displacement changes slowly enough, then d(x) needs to meet the minimization goal of the following function:
[0124]
[0125] Where w(Δx) is the weight parameter corresponding to the image pixel; the displacement calculation formula can be obtained by the least squares method:
[0126] d(x)=(∑wA T A) -1 ∑wA T Δb
[0127] In order to improve the robustness of the model, an 8-parameter 2D motion parameterized model is established:
[0128] d x (x,y)=a1+a2x+a3y+a7x 2 +a8xy
[0129] d y (x,y)=a4+a5x+a6y+a7x 2 +a8xy
[0130] The above formula can be expressed in matrix form:
[0131] d=Sp
[0132]
[0133] p=(a1,a2,a3,a4,a5,a6,a7,a8) T
[0134] Substitute the motion parameterized model into The new weighted least squares expression can be obtained:
[0135]
[0136] According to the least squares method, the parameterized model can be expressed as:
[0137]
[0138] In the process of solving the parameterized model, we can first calculate and The displacement d is then solved through weighted averaging. At this point, the model can effectively calculate the displacement change between two frames, but when the displacement changes significantly, the model will still introduce large errors. Generally speaking, the displacement change between two frames of industrial cameras with higher frame rates is relatively small. To overcome the errors caused by large displacements, the model can be updated by introducing prior displacements and image pyramid technology to construct multi-resolution input images. The Farneback optical flow method is used to extract the motion field distribution characteristics of the rare earth molten salt video stream.
[0139] In order to more intuitively reflect the intensity of the electrolytic molten salt reaction, this method performs statistics on the displacement of the motion field; Figure 1 The figure shows the comparison of the displacement statistics histograms of two types of motion fields: one with sufficient response and one with insufficient response.
[0140] from Figure 1 It can be seen that the maximum displacement of fully reacted molten salt is greater than that of incompletely reacted molten salt; this also verifies that fully reacted molten salt exhibits more intense physical characteristics, which are reflected in the larger image displacement. Figure 1 Therefore, the maximum value of each motion field displacement is extracted as a feature.
[0141] (2) Scale transformation
[0142] Since the unit of the optical flow calculation result is pixel, a conversion factor is needed to convert the image scale to the actual physical field scale, so that the molten salt flow field obtained from different electrolytic cells can be normalized to the same scale range. The cathode rod of the rare earth electrolytic cell is vertically inserted into the molten salt and has a fixed diameter. The ratio of the diameter of the cathode rod in the image to the actual diameter of the cathode rod can be calculated as a normalization conversion factor.
[0143] First, the molten salt region is separated by threshold segmentation, then the profile of the molten salt region is extracted, and finally two parallel lines with the most distributed points in the vertical direction are fitted according to the profile; Figure 2 The results of image processing are shown, in which the two approximate semicircles are the profiles of the molten salt region, and the two parallel vertical lines are the profiles of the cathode rod fitting.
[0144] D n represents the distance between the profiles of the cathode rod, D t represents the actual diameter of the cathode rod is 85mm, then the normalized image displacement d t The expression is:
[0145]
[0146] (3) Median filtering
[0147] The normalized velocity feature in the rare earth molten salt video stream has been extracted; since the camera will be affected by the pulse noise caused by the current and the random noise of the environment when imaging, the data is processed by median filtering; since the sampling time is 1s, through calculation, N-1 (N=90fps in this method) normalized velocity values can be obtained within 1s; since the sampling time is small enough, the order of the median filter is set to N-1.
[0148] As Figure 3 shown in a group of normalized velocity signals before and after median filtering, it can be seen from Figure 3 that the median filter can effectively distinguish the two types of signals, which lays a foundation for the recognition of signals by neural network.
[0149] Gated recurrent unit neural network
[0150] The result of feature extraction is a vectorized normalized speed feature with time series information; recurrent neural networks can better process time series data due to their special network structure, which can remember previous information and use it for current neuron output calculation; recurrent neural networks include RNN, LSTM and GRU; the gradient of RNN network tends to have gradient explosion or gradient disappearance with the increase of neuron information storage; in order to overcome this problem, LSTM network is proposed, which improves the structure of neuron based on RNN; the core of LSTM is LSTM memory unit, which controls the flow of time series information through forget gate, input gate and output gate to solve the gradient problem; however, LSTM network greatly increases the computational amount of model solving; in order to optimize the calculation amount of LSTM, scholars use GRU unit to replace LSTM memory unit, such as Figure 4 As shown in the structure diagram of the gated recurrent unit.
[0151] GRU mainly consists of reset gate and update gate; the calculation process of the gated unit is that the input value X t of the current unit and the state h t-1 output by the previous unit are combined through nonlinear combination to form the input of reset gate and update gate:
[0152] r t =σ(W t ·[h t-1 ,x t ]+b r )
[0153] z t =σ(W z ·[h t-1 ,x t ]+b z )
[0154] In the formula, r t represents the output of the reset gate, z t represents the output of the reset gate; W t and W z represent the weight parameters of the reset gate and the update gate respectively; b r and b z represent the bias matrix of the reset gate and the update gate respectively; · represents matrix point multiplication; [] represents matrix splicing; σ represents the nonlinear activation function sigmoid:
[0155]
[0156] Then update the candidate state:
[0157]
[0158] In the formula, Ht Represents the candidate state of this unit; W represents the weight parameter corresponding to the candidate state; represents the Hadamard product of the matrix; b n Represents the weight parameter corresponding to the candidate state; tanh represents the double tangent function:
[0159]
[0160] Finally, the output of this hidden layer (unit) is:
[0161]
[0162] The gated recurrent unit filters the output information by resetting the gate and updating the gate control, so that it can maintain a relatively stable amount of effective information in the increasing time series information.
[0163] The gated recurrent unit neural network is composed of various recurrent units connected in series. Its structure and calculation process are as follows: Figure 5 shown.
[0164] Figure 5 In, v i Represents the i-th normalized speed feature within one sampling time; the series connection between gated recurrent units can form a layer of neural network layers, each layer of the network updates the weight parameters in the network structure through the back propagation algorithm, and the layers can also be connected in series by connecting the output to the input; generally speaking, the number of gated recurrent units in each layer and the number of layers are derived from experimental experience.
[0165] This method quantifies the intensity of the molten salt reaction by extracting the velocity field characteristics of the molten salt. The velocity field measurement methods of the fluid are mainly divided into contact measurement and non-contact measurement. Traditional contact measurement methods include pitot tubes, propeller flowmeters and hot wire flowmeters. Non-contact measurement methods include acoustic Doppler technology (ADV), laser Doppler technology (LDV) and image analysis methods based on high-speed CCD cameras. Contact measurement easily interferes with the flow field of the object being measured and is not suitable for high-temperature and highly corrosive environments. Among non-contact measurements, the velocity measurement technology based on the Doppler principle has the advantages of high accuracy and good stability, but its velocity measurement cost is also correspondingly high. In recent years, with the rapid development of image processing technology and image sensors, the image analysis method based on CCD cameras has attracted much attention due to its low cost and simple velocity measurement principle. Based on the corrosive and high-temperature characteristics of rare earth molten salts and the economic characteristics of rare earth metal production enterprises, this method uses an image analysis method based on CCD cameras to extract the velocity field characteristics of the molten salt.
[0166] The optical flow method is a commonly used and relatively mature method for analyzing image velocity fields. Motion can be represented by a motion field, which reflects the three-dimensional motion state of the physical world. The optical flow field is the projection of the motion field on a two-dimensional image. By solving the optical flow field, the motion field that cannot be directly solved in a sequence of images can be approximately calculated. The optical flow method is mainly divided into two types: dense optical flow method and sparse optical flow method. The dense optical flow method requires optical flow solution for all pixels of the image, while the sparse optical flow method only needs to solve optical flow for some image pixels. Therefore, the dense optical flow method extracts richer features and has more accurate calculation results, while the sparse optical flow method has the advantage of fast calculation speed.
[0167] This method extracts the characteristics of temporal motion field signals through dense optical flow, scale transformation and median filtering, and combines the gated recurrent unit neural network to establish a nonlinear mapping model between the characteristic signals and the reaction state of rare earth molten salt, providing important closed-loop feedback for the online control of rare earth electrolyzers, which has the effect of improving production safety and realizing unmanned factories.
[0168] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes may be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A rare earth molten salt reaction state identification method based on Farneback-GRU, characterized in that The steps include: S1: The image signal of the rare earth molten salt video stream is acquired by a two-degree-of-freedom visual pan-tilt platform; S2: Analyze the displacement between two frames of rare earth molten salt video stream using Farneback optical flow method; S3: obtaining a motion field distribution feature by applying a calculation error optimization method to a displacement calculation formula between two frames of images used for the displacement, wherein the rare earth molten salt velocity feature is a vectorized normalized velocity feature with time series information; S4: performing a scale transformation to convert the pixel unit of the motion field distribution feature into the actual physical field scale; S5: performing median filtering on the motion field distribution characteristics to reduce current pulse noise and environmental random noise; S6: The accurate reaction state of rare earth molten salt is obtained by using a gated recurrent unit neural network to process the actual physical scale of the motion field distribution characteristics.
2. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 1, characterized in that: The two-degree-of-freedom gimbal is driven by two servos to move in three-dimensional space. The two-degree-of-freedom gimbal is equipped with a color industrial camera. The sensor type of the color industrial camera is CMOS, the shooting pixel of the color industrial camera is 1.3 million, and the maximum frame rate of the color industrial camera can reach 90fps.
3. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 2, characterized in that: The steps of extracting the velocity field characteristics of rare earth molten salt using the Farneback optical flow method are as follows: Assume that the image domain information expression is: f(x)=x T Ax+b T x+c If the domain information expression of the previous frame image is: f1(x)=x T A1x+b1 T x+c1 Assuming that the next frame of image has a displacement d, based on the basic assumptions of optical flow: constant image gradient and constant local optical flow, the image domain information can be expressed as: By assumption, the coefficients of the above polynomials are equal: A2=A1 b2=b1-2A1d The image displacement calculation formula can be obtained from the above formula: The above formula derives the displacement calculation formula between the two frames of images, introducing a local polynomial to replace the global polynomial in the image domain information expression; the local polynomial expansion of the two images is performed to obtain the expansion coefficients A1(x), b1(x), c1(x) and A2(x), b2(x), c2(x) of the two images respectively; based on the optical flow assumption that A2=A1, the following approximation is made to reduce the error: In addition, Δb(x) is introduced: At this time, the displacement calculation formula is updated from the image displacement calculation formula to: A(x)d(x)=Δb(x) Assuming that the image displacement changes slowly enough, d(x) needs to satisfy the minimization objective of the following function: Where w(Δx) is the weight parameter corresponding to the image pixel; the displacement calculation formula can be obtained by the least squares method: d(x)=(∑wA T A) -1 ∑wA T Δb Establish an 8-parameter 2D motion parametric model: d x (x,y)=a1+a2x+a3y+a7x 2 +a8xy d y (x,y)=a4+a5x+a6y+a7x 2 +a8xy The above formula can be expressed in matrix form: d=Sp p=(a1,a2,a3,a4,a5,a6,a7,a8) T Substitute the motion parameterized model into The new weighted least squares expression can be obtained: According to the least squares method, the parameterized model can be expressed as: The process of solving the parameterized model first calculates and The weighted average is used to solve the displacement d; the above parameterized model calculates the displacement change between two frames of images, introduces prior displacement to update the model and image pyramid technology to construct a multi-resolution input image.
4. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 3, characterized in that: The computational error optimization method is to introduce local polynomials to replace the global polynomials in the image domain information expression; perform local polynomial expansion on the two images to obtain the expansion coefficients A1(x), b1(x), c1(x) and A2(x), b2(x), c2(x) of the two images respectively; based on the optical flow assumption, A2=A1 should be satisfied, but in practice, the following approximation is required to reduce the error: In addition, Δb(x) is introduced: At this time, the displacement calculation formula is updated from the image displacement calculation formula to: A(x)d(x)=Δb(x) Since the displacement calculation formula for each pixel will bring a huge amount of calculation, the neighborhood range of image calculation is narrowed. Assuming that the image displacement changes slowly enough, d(x) needs to meet the minimization goal of the following function: The displacement calculation formula can be obtained by the least squares method: d(x)=(∑wA T A) -1 ∑wA T Δb Where w(Δx) is the weight parameter corresponding to the image pixel.
5. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 3, characterized in that: Update 8-parameter 2D motion parameterized model: d x (x,y)=a1+a2x+a3y+a7x 2 +a8xy d y (x,y)=a4+a5x+a6y+a7x 2 +a8xy The above formula can be expressed in matrix form: d=Sp p=(a1,a2,a3,a4,a5,a6,a7,a8) T Substitute the motion parameterized model into The new weighted least squares expression can be obtained: According to the least squares method, the parameterized model can be expressed as: In the process of solving the parameterized model, we can first calculate and Then the displacement d is solved by weighted average; the displacement of the motion field is statistically analyzed, and the displacement statistical histograms of the two types of motion fields with sufficient response and insufficient response are compared.
6. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 5, characterized in that: The scaling steps are as follows: First, the cathode rod of the rare earth electrolyzer is inserted vertically into the molten salt and has a fixed diameter. The ratio of the cathode rod diameter in the image to the actual cathode rod diameter is calculated as the normalization conversion factor. The molten salt area is separated by threshold segmentation, and then the contour of the molten salt area is extracted. Finally, two parallel lines with the most distribution points in the vertical direction are fitted according to the contour. Normalized image displacement d t The expression is: Where d represents the image displacement solved by the Farneback optical flow method, D n Denotes the distance between the cathode rod fitting contours, D t It means the actual diameter of the cathode rod is 85mm.
7. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 6, characterized in that: Median filtering is to perform median filtering on the normalized velocity feature data extracted from the rare earth molten salt video stream; the sampling time of the rare earth molten salt video stream is 1 second, and through calculation, N-1 normalized velocity values can be obtained within 1 second.
8. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 7, characterized in that: N = color industrial camera frame rate 90fps.
9. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 8, characterized in that: The gated recurrent unit neural network is composed of various recurrent units connected in series; the series connection between gated recurrent units can form a neural network layer. Each layer of the network updates the weight parameters in the network structure through the back propagation algorithm, and the layers are connected in series by connecting the output to the input.
10. The rare earth molten salt reaction state identification method based on Farneback-GRU according to claim 9, characterized in that: The computational flow of the gated recurrent unit neural network is as follows: the input value Xt of the current unit and the state ht-1 of the previous unit output are nonlinearly combined to form the inputs of the reset gate and the update gate: r t =σ(W t ·[h t-1 ,x t ]+b r ) z t =σ(W z ·[h t-1 ,x t ]+b z ) Where r t represents the output of the reset gate, z t Represents the output of the reset gate; W t and W z Represent the weight parameters of the reset gate and update gate respectively; b r and b z Represent the bias matrices of the reset gate and update gate respectively; · represents matrix dot multiplication; [] represents matrix concatenation; σ represents the nonlinear activation function sigmoid: Update candidate status: Where H t Represents the candidate state of this unit; W represents the weight parameter corresponding to the candidate state; represents the Hadamard product of the matrix; b n Represents the weight parameter corresponding to the candidate state; tanh represents the double tangent function: Finally, the output of this hidden layer (unit) is: The gated recurrent unit maintains valid output information in the incremental time series information by controlling the filtering through the reset gate and the update gate.