A method for restoring a binary image
Patent Information
- Application Number
- CN202310048459.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-31
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2043-01-31
AI Technical Summary
Existing graph learning methods have problems in optimizing the number of variables, resulting in low accuracy in restoring noisy binary images.
A graph learning method based on linear constraint optimization is adopted. The graph learning objective function is selected by constructing a model, and the learning coefficients of the polynomial kernel graph are optimized by using the Frank-Wolfe iterative linear programming algorithm. The binary image is restored by combining the multi-feature adjacency matrix, the regularized graph Laplacian matrix and the polynomial graph kernel function.
It improves the accuracy and efficiency of pixel restoration of binary images, reduces the solution complexity, and ensures the quality of image restoration under noisy conditions.
Smart Images

Figure CN115965556B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method for restoring binary images. Background Technology
[0002] Graph learning has been extensively studied for over a decade, and in recent years, interdisciplinary research between statistical machine learning and graph signal processing (GSP) has emerged, particularly in areas such as social network management, regression-based image quality assessment, image enhancement, and clustering. GSP focuses on processing signals defined on graphs, including pairwise similarities of vertices supporting the data and weighted edges representing observations. A key aspect of machine learning-based graph signal processing is designing a mechanism to capture the relationships between the processed data observations and establishing signal priors, such as graph signal smoothing priors, to effectively filter the graph signal, for example, facilitating data classification through signal extrapolation or label propagation.
[0003] Graph structures can be learned from two aspects: 1) the raw data collected (e.g., time series); and 2) the features constructed from data samples. Because successful graph filtering depends on the underlying graph model being the structure of the collected data, graph learning is crucial. Graph learning methods can be divided into two types: 1) data-driven graph learning, which learns graphs based on the raw data collected; and 2) feature-enabled graph learning, which uses constructed features to learn graphs.
[0004] For data-driven graph learning, the focus is on assigning modeling relationships to nodes across multiple spatial and / or temporal observations (graph signals) of the graph. Existing graph learning methods often update each graph node by solving linear equations or learning pairwise distance metrics, where the number of optimization variables increases dramatically with the number of data samples or feature dimensions.
[0005] Determining the number of optimization variables in graph learning methods to achieve high-accuracy restoration of noisy binary images is a problem that urgently needs to be solved. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies in the field of binary image restoration by providing a binary image restoration method to improve the processing performance of binary image pixel restoration.
[0007] The objective of this invention can be achieved through the following technical solutions:
[0008] A binary image restoration method includes the following steps:
[0009] Acquire the original binary image with noise;
[0010] Input the original binary image;
[0011] Based on the original binary image, a model is constructed to select the objective function;
[0012] Linearize the nonlinear constraints of the objective function selected by the model;
[0013] The objective function of the model is selected and iteratively gradient-finding and linear programming is performed until the function value converges, and finally the binary image is restored.
[0014] Furthermore, the input of the original binary image includes multiple features of the pixels of the input original binary image, and the multiple features include the pixel value, the pixel horizontal coordinate value, and the pixel vertical coordinate value.
[0015] Furthermore, the selection of the objective function for model construction includes the following steps:
[0016] Construct a multi-feature adjacency matrix;
[0017] Based on the aforementioned multi-feature adjacency matrix, a regularized graph Laplacian matrix is constructed.
[0018] Based on the regularized graph Laplacian matrix, a polynomial graph kernel function is constructed.
[0019] Based on the polynomial graph kernel function, a target function is selected to construct a model for the pixels in the original binary image.
[0020] Further, the multi-feature adjacency matrix is denoted as A, and the expression for the elements in the multi-feature adjacency matrix A is:
[0021]
[0022] Where f i M represents the multiple features of the pixels in the original binary image, and M is the metric matrix between the multiple features of the pixels in the original binary image.
[0023] Furthermore, the regularized graph Laplacian matrix is denoted as L, and its expression is:
[0024] L=D -1 / 2 (DA)D -1 / 2
[0025] Where D is a degree matrix, and the element expression is:
[0026]
[0027] Furthermore, the polynomial graph kernel function is denoted as... Its expression is:
[0028]
[0029] Where U is the eigenvector matrix of the regularized graph Laplacian matrix L, U is an N-order matrix, and λ i β represents the eigenvalues corresponding to the eigenvectors. i Represents the kernel coefficients of a polynomial.
[0030] Furthermore, the expression for the objective function selected by the model is:
[0031]
[0032] .
[0033] Furthermore, the nonlinear constraints of the model selection objective function are linearized, that is, the positive definite constraints in the model selection objective function are decomposed into inequality constraints, resulting in the following expression for the model selection objective function after the constraint conditions have been linearized:
[0034]
[0035]
[0036] Where 'a' is the numerical range limit, and 'μ' is a very small value that ensures... Positive definite allowance.
[0037] Furthermore, the gradient of the objective function at a given point is calculated for the model after the linearization of the constraints, and this gradient is used as the objective function to obtain the following linear programming problem:
[0038]
[0039]
[0040] Therefore, iterative gradient calculation and linear programming problem solving are performed to obtain the polynomial kernel coefficients β. i .
[0041] Furthermore, based on the obtained polynomial kernel coefficients β i The polynomial graph kernel function is obtained. The function value is then used to calculate the pixel values of the restored binary image. for:
[0042]
[0043] in This represents the pixel value of a pixel in a baseline binary image. This represents the regularized graph Laplacian submatrix of the binary image pixels to be restored and the reference binary image pixels. This represents the inverse of the regularized Laplacian submatrix of the pixels in the binary image to be restored.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] 1. This invention optimizes the learning coefficients of the polynomial kernel graph by using the model selection graph learning objective function, and restores noisy binary images by using linearized MSGL constraints and the Frank-Wolfe iterative linear programming algorithm. It has the advantages of high solution efficiency and high accuracy of restored binary images.
[0046] 2. This invention utilizes the pixel values, vertical coordinates, and horizontal coordinates of a binary image to form a multi-feature set of the binary image pixels. Then, it describes the correlation between the pixels of the binary image through an adjacency matrix, thereby improving the accuracy of the mathematical description of the correlation between pixels in a binary image obtained under noisy conditions and ensuring the accuracy of subsequent binary image restoration.
[0047] 3. This invention utilizes a degree matrix to regularize the diagonal elements of the graph Laplacian matrix to 1, while simultaneously transforming the off-diagonal elements of the graph Laplacian matrix accordingly, thereby improving the accuracy of overall binary image pixel restoration.
[0048] 4. This invention avoids learning the feature measurement relationship in the graph Laplacian matrix by linearly combining the graph Laplacian matrices of the nearest neighbor pixels of the binary image pixels at different levels, so that the number of optimization variables is the same as the number of user-defined nearest neighbors, which greatly improves the efficiency of binary image pixel restoration.
[0049] 5. This invention constructs a minimization optimization problem, defines data matching terms and complexity penalty terms, and adds positive definite constraints. Without introducing additional parameters, it constructs a convex optimization problem to solve the kernel function coefficients of the pixel polynomial graph of a binary image, thereby enabling the rapid solution of the combination coefficients.
[0050] 6. This invention transforms the positive definite nonlinear constraints into a series of linear constraints, each of which is related to the eigenvalue of the Laplacian matrix of the binary image pixel map. This linearizes the positive definite nonlinear constraints in the binary image pixel model selection objective function MSGL, thereby enabling the solution of MSGL through a linear solver and significantly improving the solution efficiency.
[0051] 7. This invention calculates the gradient of a given point in the binary image pixel objective function MSGL, which is transformed by linearization of constraints, and uses this gradient as the objective function to obtain a specific linear programming problem. This avoids nonlinear problems in the solution process of the binary image pixel restoration function and improves the solution efficiency. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the process of the present invention. Detailed Implementation
[0053] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0054] This invention provides a binary image restoration method, which utilizes a graph learning method based on linear constraint optimization. This method optimizes the polynomial kernel graph learning coefficients using the Model-Selection Graph Learning (MSGL) objective function, and restores noisy binary images by linearizing the constraints of the MSGL objective function and using the Frank-Wolfe iterative linear programming algorithm.
[0055] The Frank-Wolfe iterative linear programming algorithm is an algorithm for solving nonlinear programming problems under linear constraints. The innovation of this invention lies in combining the linear constraint model selection graph learning objective function MSGL of the Frank-Wolfe iterative linear programming algorithm to automatically restore noisy binary images.
[0056] The purpose of this invention is to address the shortcomings of existing technologies in the field of binary image restoration by providing a graph learning method and a binary image restoration method based on linear constraint optimization. This will improve the restoration accuracy for researchers in the field of binary image processing when designing graph learning methods and binary image restoration methods based on linear constraint optimization, and effectively enhance the processing performance of binary image pixel restoration.
[0057] This invention belongs to the field of semi-supervised learning. Semi-supervised learning (SSL) is a key research area in pattern recognition and machine learning, and it is a learning method that combines supervised and unsupervised learning. Semi-supervised learning uses a large amount of unlabeled data, as well as labeled data simultaneously, to perform pattern recognition tasks. When using semi-supervised learning, it requires as few people as possible to perform the work, while still achieving relatively high accuracy.
[0058] like Figure 1 As shown, the present invention includes the following steps:
[0059] Acquire the original binary image with noise;
[0060] Input the original binary image;
[0061] Based on the original binary image, a model is constructed to select the objective function;
[0062] Linearize the nonlinear constraints of the objective function selected by the model;
[0063] The objective function of the model is selected and iteratively gradient-finding and linear programming is performed until the function value converges, and finally the binary image is restored.
[0064] The specific technical solution steps include:
[0065] Step 1: Input a noisy initial binary image and construct a multi-feature adjacency matrix A:
[0066]
[0067] Where f i This represents the multiple features of pixels in the input binary image, including the pixel value, the pixel's x-coordinate, and the pixel's y-coordinate. M is the metric matrix between the multiple features of the binary image pixels, and A is the metric matrix between them. ij Represents the elements of the multi-feature adjacency matrix A.
[0068] Step 2: Construct the Laplacian matrix of the binary image pixel regularization graph:
[0069] L=D -1 / 2 (DA)D -1 / 2
[0070] Where D is a degree matrix, and the size of its elements is:
[0071]
[0072] Step 3: Construct the pixel polynomial graph kernel function for the binary image:
[0073]
[0074] Where U is the eigenvector matrix of the binary image pixel regularization Laplacian matrix L, and λ i β represents the eigenvalues corresponding to the eigenvectors. i Represents the pixel polynomial kernel coefficients of a binary image.
[0075] Step 4: Construct a binary image pixel model and select the objective function MSGL:
[0076]
[0077]
[0078] Step 5: MSGL-constrained linearization of the binary image pixel objective function:
[0079] As can be seen from step 4, the second term of g(β) It can be converted into:
[0080]
[0081] Taking the derivative of the binary image pixel objective function g(β) and setting it to zero, we get:
[0082]
[0083] Multiply both sides of the equation by the binary image pixel polynomial kernel coefficient β i :
[0084]
[0085] From the above derivation, we can further conclude that:
[0086]
[0087] Therefore, the following constraint conditions can be derived for selecting the objective function MSGL for the linearized transformation of binary image pixel models:
[0088]
[0089]
[0090] Where 'a' is the numerical range limit, and 'μ' is a very small value that ensures... Positive definite allowance.
[0091] Step 6: Solve the Frank-Wolfe iterative problem for the pixel objective function of the binary image:
[0092] For the binary image pixel model transformed by linearization of constraints in step 5, select the objective function MSGL to calculate the gradient at a given point, and use this gradient as the objective function to obtain the following linear programming problem:
[0093]
[0094]
[0095] Therefore, iterative gradient calculation and linear programming problem solving are performed to obtain the pixel polynomial kernel coefficients β of the binary image. i .
[0096] Step 7: Obtain the binary image pixel polynomial kernel coefficients β obtained in Step 6. i The pixel polynomial graph kernel function of the binary image is obtained. The function value is then used to calculate the pixel value y of the restored binary image:
[0097]
[0098] in This represents the pixel value of a pixel in a baseline binary image. Let represent the inverse of the regularized Laplacian submatrix of the corresponding binary image pixels to be restored. This represents the regularized graph Laplacian submatrix corresponding to the pixels of the binary image to be restored and the reference image. This represents the pixel value of the pixel in the binary image to be restored.
[0099] As shown in Table 1, the accuracy of binary image pixel restoration in the Matlab image library using the method proposed in this invention is verified. It can be seen that the method proposed in this invention has a high accuracy rate for restoring binary image pixels.
[0100] Table 1: Accuracy verification of MSGL in pixel restoration of binary images in Matlab image library
[0101]
[0102]
[0103] Figure 1 The intermediate-step multi-feature adjacency matrix implementation utilizes the pixel values, ordinates, and abscissas of a binary image to form a multi-feature set of binary image pixels. This set is then used to describe the correlation between binary image pixels through an adjacency matrix, improving the mathematical accuracy of the correlation between pixels in noisy binary images and ensuring the accuracy of subsequent binary image restoration. The specific technical features of this implementation are: constructing a feature metric matrix based on the feature distances between the binary image pixel values, ordinates, and abscissas, and then defining the feature distances between binary image pixels to construct a multi-feature adjacency matrix. The innovation lies in simultaneously utilizing the pixel values and spatial locations of binary image pixels, combining features from different modes such as pixel value attributes and spatial attributes to obtain highly robust multi-features. The technical effect of this implementation is to improve the mathematical accuracy of the correlation between pixels in noisy binary images, ensuring the accuracy of subsequent binary image restoration.
[0104] Figure 1The intermediate-step regularization of the graph Laplacian matrix utilizes a degree matrix to regularize the diagonal elements of the graph Laplacian matrix to 1, while simultaneously transforming the off-diagonal elements accordingly. This improves the accuracy of overall binary image pixel restoration. The specific technical features of this implementation are: using a degree matrix to regularize the diagonal elements of the graph Laplacian matrix to 1, and simultaneously transforming the off-diagonal elements accordingly. The innovation of this implementation is ensuring that all diagonal elements of the graph Laplacian matrix are 1, thus ensuring the uniformity of subsequent binary image pixel restoration. The technical effect of this implementation is that the diagonal elements of the graph Laplacian matrix are regularized to 1, while the off-diagonal elements are also transformed accordingly.
[0105] Figure 1 The mid-step polynomial graph kernel function implements a graph structure that simultaneously considers the nearest neighbor pixels of binary image pixels at different levels, thereby improving the accuracy of binary image pixel restoration. The specific technical features of this implementation are: linearly combining the graph Laplacian matrices of the nearest neighbor pixels of binary image pixels at different levels, defining the combination coefficients as optimization variables. The innovation of this implementation is that by defining the linear combination of the graph Laplacian matrices of the nearest neighbor pixels of binary image pixels at different levels, it avoids learning the feature metric relationships in the graph Laplacian matrix, making the number of optimization variables the same as the number of user-defined nearest neighbors, significantly improving the efficiency of binary image pixel restoration. The technical effect of this implementation is that by linearly combining the graph Laplacian matrices of the nearest neighbor pixels of binary image pixels at different levels, defining the combination coefficients as optimization variables, and then quickly solving for the combination coefficients subsequently.
[0106] Figure 1 The intermediate-step model selection objective function MSGL (Model-Selection Graph Learning) solves for the coefficients of the pixel polynomial graph kernel function of a binary image by constructing an optimization problem. The specific technical features of this implementation are: constructing a minimization optimization problem, defining data matching terms and complexity penalty terms, and adding positive definite constraints. The innovation of this implementation is that it constructs a convex optimization problem to solve for the coefficients of the pixel polynomial graph kernel function of a binary image without introducing additional parameters, thus enabling rapid subsequent calculation of the combined coefficients. The technical effect of this implementation is the ability to quickly solve for the combined coefficients.
[0107] Figure 1The intermediate-step objective function MSGL constraint linearization linearizes the positive definite nonlinear constraints in the binary image pixel model selection objective function MSGL, thereby enabling the solution of MSGL through a linear solver and significantly improving the solution efficiency. The specific technical feature of this implementation is that it transforms the positive definite nonlinear constraints into a series of linear constraints, where each linear constraint is related to the eigenvalue of the Laplacian matrix of the binary image pixel map. The innovation of this implementation lies in linearizing the positive definite nonlinear constraints in the binary image pixel model selection objective function MSGL, thereby enabling the solution of MSGL through a linear solver and significantly improving the solution efficiency. The technical effect of this implementation is that it enables the solution of MSGL through a linear solver, resulting in a significant improvement in solution efficiency.
[0108] Figure 1 The Frank-Wolfe iterative solution in the middle step realizes the selection of the objective function MSGL for a binary image pixel model with linear constraints using linear programming, significantly improving the solution efficiency. The specific technical features of this implementation are: calculating the gradient at a given point of the objective function MSGL for the binary image pixel model transformed by linearization of constraints, and using this gradient as the objective function to obtain a specific linear programming problem. The innovation of this implementation is that iteratively calculating the gradient at a given point of the objective function MSGL for the binary image pixel model transformed by linearization of constraints, and using this gradient as the objective function to obtain a specific linear programming problem, avoids nonlinear problems in the solution process of the binary image pixel restoration function, thus improving the solution efficiency. The technical effect of this implementation is that iteratively calculating the gradient at a given point of the objective function MSGL for the binary image pixel model transformed by linearization of constraints, and using this gradient as the objective function to obtain a specific linear programming problem, improves the solution efficiency.
[0109] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A binary image restoration method, characterized in that, Includes the following steps: Acquire the original binary image with noise; Input the original binary image; Based on the original binary image, a model is constructed to select the objective function; Linearize the nonlinear constraints of the objective function selected by the model; The objective function of the model is selected and iteratively gradient-finding and linear programming is performed until the function value converges, and finally the binary image is restored. The input original binary image includes multiple features of the pixels of the input original binary image, and the multiple features include the pixel value, the pixel horizontal coordinate value and the pixel vertical coordinate value of the binary image; The selection of the objective function for model construction includes the following steps: Construct a multi-feature adjacency matrix; Based on the aforementioned multi-feature adjacency matrix, a regularized graph Laplacian matrix is constructed. Based on the regularized graph Laplacian matrix, a polynomial graph kernel function is constructed. Based on the polynomial graph kernel function, a model is constructed for selecting the target function for the pixels in the original binary image; The multi-feature adjacency matrix is denoted as... Multi-feature adjacency matrix The expression for the element in the middle is: in: Represents the original binary image of the first... i Multiple features of a single pixel Represents the original binary image of the first... j Multiple features of a single pixel This is the metric matrix between multiple features of pixels in the original binary image; The regularized graph Laplacian matrix is denoted as Its expression is: in Let be a degree matrix, where the element expression is: The polynomial graph kernel function is denoted as Its expression is: in For regularized graph Laplacian matrix eigenvector matrix, P The highest power of the regularized graph Laplacian matrix is... It is an N-order matrix. Let k be the k-th eigenvalue of the regularized graph Laplacian matrix, where k is any natural number between 1 and N. Let represent the kernel coefficients of the i-th order polynomial; The expression for the objective function selected by the model is: Where: y is the pixel value vector of the reference binary image pixel. Linearizing the nonlinear constraints of the model selection objective function involves decomposing the positive definite constraints in the objective function into inequality constraints, resulting in the linearized expression of the model selection objective function: in, For numerical range limits, To ensure Positive definite allowance.
2. The binary image restoration method according to claim 1, characterized in that, By selecting the objective function of the linearized model under the aforementioned constraints and calculating the gradient at a given point, and using this gradient as the objective function, the following linear programming problem is obtained: Therefore, iterative gradient calculation and linear programming problem solving are performed to obtain the polynomial kernel coefficients. .
3. The binary image restoration method according to claim 2, characterized in that, Based on the obtained polynomial kernel coefficients The polynomial graph kernel function is obtained. The function value is then used to calculate the pixel values of the restored binary image. for: in This represents the pixel value of a pixel in a baseline binary image. This represents the regularized Laplacian submatrix of the binary image pixels to be restored and the reference binary image pixels. This represents the inverse of the regularized Laplacian submatrix of the pixels in the binary image to be restored.
Citation Information
Patent Citations
0 norm gradient minimization-based binary image restoration method
CN107067373A
