CN-119625604-B - Foreground and background separation method based on weighted F-norm robust principal component analysis
Abstract
The invention relates to the technical field of image processing, in particular to a foreground and background separation method based on weighted F norm robust principal component analysis, which comprises the following steps of obtaining a video to be processed and reconstructing the video to be processed into a two-dimensional matrix; the method comprises the steps of combining a weighted least square method with low-rank matrix decomposition to construct a video foreground and background separation model based on robust principal component analysis, inputting the two-dimensional matrix into the video foreground and background separation model, and solving by adopting an alternate minimization method to obtain two low-rank matrices U, V and a sparse matrix S, wherein the result obtained by multiplying the two low-rank matrices U, V is used as the background of a video to be processed, and the sparse matrix S is used as the foreground of the video to be processed. The method has the advantages of simple solving process, and more accuracy and robustness.
Inventors
- LI KEXIN
- WEN YOUWEI
Assignees
- 云南财经大学
Dates
- Publication Date
- 20260512
- Application Date
- 20241125
Claims (5)
- 1. The foreground and background separation method based on weighted F-norm robust principal component analysis is characterized by comprising the following steps: s1, acquiring a video to be processed, and reconstructing the video to be processed into a two-dimensional matrix; S2, combining a weighted least square method with low-rank matrix decomposition to construct a video foreground and background separation model based on robust principal component analysis; S3, inputting the two-dimensional matrix into the video foreground and background separation model, and solving by adopting an alternating minimization method to obtain two low-rank matrices U, V and a sparse matrix S, wherein the result obtained by multiplying the two low-rank matrices U, V is used as the background of the video to be processed, and the sparse matrix S is used as the foreground of the video to be processed; the expression of the video foreground and background separation model is as follows: Wherein Y represents a two-dimensional matrix of inputs, the F denotes the Frobenius norm, represents element-wise multiplication, W represents a weight matrix, λ is a regularization parameter; the step of solving the video foreground and background separation model by adopting an alternating minimization method comprises the following steps: S31, initializing a parameter W 0 ,U 0 ,V 0 and a near-end parameter t, and iteratively updating various variables; S32, on the (k+1) th iteration, giving W k ,U k ,V k , solving a secondary optimization problem about the sparse matrix S, and updating S k+1 ; S33, given S k+1 , updating two low-rank matrixes U and V by adopting a near-end block coordinate descent method, and updating U k+1 、V k+1 ; S34, given S k+1 and W k , the weight matrix W k+1 is updated.
- 2. The foreground and background separation method based on weighted F-norm robust principal component analysis of claim 1, wherein at the k+1st iteration, S k+1 is represented as: by taking the derivative of S ij and setting to zero, the updated formula of S ij is derived: Wherein, the X ij ,(U k V k ) ij , Element values respectively representing the i, j-th positions of the matrix S k+1 ,X,(U k V k ),W k ; Representing elements Square of (d).
- 3. The foreground and background separation method based on weighted F-norm robust principal component analysis of claim 1, wherein the update procedure of U k+1 at the k+1st iteration comprises: given S k+1 , update U using the near-end tile coordinate descent method: Wherein t is a near-end parameter, and the optimal conditions are as follows: (Y-UV k -S k+1 )(V k ) T +t(U-U k )=0 The method can obtain the following steps: U k+1 =[tU k +(Y-S k+1 )(V k ) T ][V k (V k ) T +tI] -1 .
- 4. The foreground and background separation method based on weighted F-norm robust principal component analysis of claim 1, wherein the update procedure of V k+1 at the k+1st iteration comprises: given S k+1 ,U k+1 , update V using the near-end tile coordinate descent method: The optimal conditions are determined as follows: -(U k+1 ) T ((Y-U k+1 V-S k+1 ))+t(V-V k )=0 The method comprises the following steps: V k+1 =[tI+(U k+1 ) T U k+1 ] -1 [tV k +(U k+1 ) T (Y-S k+1 )].
- 5. the foreground and background separation method based on weighted F-norm robust principal component analysis of claim 1, wherein the updating process of the weight matrix W k+1 at the k+1th iteration comprises: The estimate t k is: calculating the weight of the current step Wherein p >0; The update weight matrix W k+1 is:
Description
Foreground and background separation method based on weighted F-norm robust principal component analysis Technical Field The invention relates to the technical field of image processing, in particular to a foreground and background separation method based on weighted F-norm robust principal component analysis. Background Robust Principal Component Analysis (RPCA) is a key technique for decomposing data into low rank and sparse components, playing an important role in applications such as image processing and anomaly detection. Conventional RPCA methods generally useNorm regularization to force sparsity, but this approach may introduce bias, especially when dealing with large noise or outliers, leading to sub-optimal estimates. To solve these problems, non-convex regularization methods have been proposed by the scholars, but these methods are complex to optimize and are susceptible to initial conditions, resulting in unstable solutions. Therefore, how to simplify the solving process to improve the separation efficiency of the foreground and background of the image, avoid distortion and information loss, and is a technical problem that needs to be solved by those skilled in the art. Disclosure of Invention In view of the above, the invention provides a foreground and background separation method based on weighted F-norm robust principal component analysis, which has simpler solving process, and more accuracy and robustness. In order to achieve the above purpose, the present invention adopts the following technical scheme: s1, acquiring a video to be processed, and reconstructing the video to be processed into a two-dimensional matrix; S2, combining a weighted least square method with low-rank matrix decomposition to construct a video foreground and background separation model based on robust principal component analysis; S3, inputting the two-dimensional matrix into the video foreground and background separation model, and solving by adopting an alternating minimization method to obtain two low-rank matrices U, V and a sparse matrix S, wherein the result obtained by multiplying the two low-rank matrices U, V is used as the background of the video to be processed, and the sparse matrix S is used as the foreground of the video to be processed. Further, the expression of the video foreground and background separation model is as follows: Wherein Y represents a two-dimensional matrix of inputs, the F denotes the Frobenius norm, represents element-wise multiplication, W represents a weight matrix, and λ is a regularization parameter. Further, the step of solving the video foreground and background separation model by adopting an alternating minimization method comprises the following steps: S31, initializing a parameter W 0,U0,V0 and a near-end parameter t, and iteratively updating various variables; S32, on the (k+1) th iteration, giving W k,Uk,Vk, solving a secondary optimization problem about the sparse matrix S, and updating S k+1; S33, given S k+1, updating two low-rank matrixes U and V by adopting a near-end block coordinate descent method, and updating U k+1、Vk+1 S34, given S k+1 and W k, the weight matrix W k+1 is updated. Further, the steps of updating S k+1,Uk+1,Vk+1 and W k+1 are described. At the k+1st iteration, S k+1 is denoted as: by taking the derivative of S ij and setting to zero, the updated formula of S ij is derived: Wherein, the Yij,(UkVk)ij,Element values respectively representing the i, j-th positions of the matrix S k+1,Y,(UkVk),Wk; Representing elements Square of (d). At the k+1st iteration, the update procedure for U k+1 includes, given U k,Sk+1,Vk, updating U k+1 using the near-end tile coordinate descent method: Wherein t is a near-end parameter, and the optimal condition is determined as follows: (Y-UVk-Sk+1)(Vk)T+t(U-Uk)=0. The method comprises the following steps: Uk+1=[tUk+(Y-Sk+1)(Vk)T][Vk(Vk)T+tI]-1 At the k+1st iteration, given S k+1,Uk+1, update V k+1 using the near-end tile coordinate descent method: The optimal conditions are determined as follows: -(Uk+1)T((Y-Uk+1V-Sk+1))+t(V-Vk)=0 The method comprises the following steps: Vk+1=[tI+(Uk+1)TUk+1]-1[tVk+(Uk+1)T(Y-Sk+1)]. At the k+1st iteration, the update procedure for the given S k+1 weight matrix W k+1 includes: The estimate t k is: calculating the weight of the current step Wherein p >0. The update weight matrix W k+1 is: Compared with the prior art, the invention has the following beneficial effects: The invention provides a novel video foreground and background separation model based on robust principal component analysis, which combines a weighted least square method and low-rank matrix decomposition, and uses weighted F norms to represent sparse components, thereby simplifying the solving process and comparing with the traditional method The norm method reduces the bias. Meanwhile, an alternate minimization algorithm is adopted, wherein each sub-problem has an explicit solution, so that the calculation efficiency is imp