CN108491868A - A kind of image processing method and device based on k-means cluster and dictionary learning - Google Patents

A kind of image processing method and device based on k-means cluster and dictionary learning Download PDF

Info

Publication number
CN108491868A
CN108491868A CN201810201253.3A CN201810201253A CN108491868A CN 108491868 A CN108491868 A CN 108491868A CN 201810201253 A CN201810201253 A CN 201810201253A CN 108491868 A CN108491868 A CN 108491868A
Authority
CN
China
Prior art keywords
image
dictionary
cluster
sparse coefficient
denoising
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810201253.3A
Other languages
Chinese (zh)
Inventor
刘坤
蔡述庭
翁少佳
陈平
李卫军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201810201253.3A priority Critical patent/CN108491868A/en
Publication of CN108491868A publication Critical patent/CN108491868A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides a kind of image processing methods and device based on k means cluster and dictionary learning, initialisation image parameter carries out piecemeal processing to noise image, given image block is clustered with k mean algorithms, MOD AK SVD dictionary training algorithms are used to each cluster, obtain training cluster dictionary { D1,D2,D3...Dk, then it polymerize each piecemeal dictionary { D1,D2,D3...DkFormed complete dictionary D so that D={ D1,D2,D3...Dk, it obtains each piecemeal dictionary and the excessively complete dictionary D of composition, then uses OMP (orthogonal matching pursuit) algorithm, solve corresponding sparse coefficient, by the way that certain iterations, the corresponding dictionary of renewal learning and sparse coefficient is arranged, to reconstruct the image after denoising.Algorithm provided by the invention and existing sparse coding algorithm (Sparse coding) algorithm, improved sparse coding (ISC) algorithm, PSNR (Y-PSNR) value of image denoising effect is compared under the conditions of different noise variance δ and mixed noise density d, it can be found that the denoising effect of the present invention will reach better effect.

Description

A kind of image processing method and device based on k-means cluster and dictionary learning
Technical field
The present invention relates to technical field of image processing more particularly to a kind of figures based on k-means cluster and dictionary learning As processing method and processing device.
Background technology
21 century is stepped into this means that the stepped into information epoch, with the development of science and technology, the transmission form of information is no longer only Various multimedia forms including being limited only to voice, but had evolved to image, data, word etc..And people are connecing When by external information, 80% comes from visual information, and digital picture is the most important source that people obtain visual information, with this Meanwhile with the development of computer technology, huge achievement is all achieved in the various aspects image procossing such as academic research and application, And be deep into daily life, study and work many fields.The research contents of digital image processing techniques Be related to extensively, including image denoising, image segmentation, image enhancement, image recognition, image restoration, image coding, at multiresolution Reason etc..
Due to the influence of imaging device and environment, when obtaining the information of image, the capital that keeping away can not keep away occurs respectively for we The interference of kind external cause or internal cause, causes image to be mingled with many noises, causes image that degradation phenomena occurs.To make us obtain Information it is imperfect even wrong, such image can not clearly reflect original real information, therefore study The technologies such as image denoising are of great significance and are widely applied foreground.
Consider a noise image, there is Y=Y0+ V, Y are the image observed, Y0It is unknown original image, V is superposition Zero-mean white noise.Our target, which is one algorithm erased noise from Y of design, makes it as close as original image Y0
It does not need Accurate Reconstruction generally when handling noise image, following sparse bayesian learning can be converted into and asked Topic:
min||x||0s.t.||Y-DX||≤ε
Wherein, ε is a normal number, when ε is sufficiently small, it is believed that be accurately reconstructed signal, ε=0 to a certain extent When as rarefaction representation problem.
Image denoising algorithm dictionary-based learning, dictionary learning algorithm is generally used typically to have image denoising at present MOD dictionary learning algorithms, K-MOD dictionary learnings algorithm and AK-MOD algorithms, general process are:
If one group of signal Y=[y1,y2…yn], the target of MOD algorithms is to find a dictionary D and a sparse matrix X, So that the reconstructed error of signal is minimum:
Here x is the row of matrix X, and MOD is a kind of renewal process of the alternating iteration between dictionary upgrading and sparse coding. Sparse coding process is to each signal ynIndividually carry out rarefaction representation.
It is not examined such as sparse coding algorithm (Sparse coding) algorithm currently based on the Image denoising algorithm of dictionary learning Consider the correlation between image block, using integrated solution method, denoising effect is general, improved sparse coding (ISC) algorithm, though Correlation between the image block so considered, but its dictionary is undertrained fully, denoising effect is bad.
Invention content
An embodiment of the present invention provides it is a kind of based on k-means cluster and dictionary learning image processing method and device, For solve traditional dictionary it is undertrained fully, the bad technical problem of denoising effect.
A kind of image processing method based on k-means cluster and dictionary learning provided by the invention, including:
Initialisation image parameter obtains waiting for the noise image of piecemeal, and the noise image for treating piecemeal carries out image block acquisition Image block;
It runs k-means algorithms and K cluster of cluster calculation acquisition is carried out to image block, MOD-AK- is run to each cluster SVD dictionary learning algorithms obtain training cluster dictionary { D1,D2,D3...Dk};
By training cluster dictionary { D1,D2,D3…DkIt was polymerized to complete dictionary D={ D1,D2,D3…Dk};
Operation OMP orthogonal matching pursuit algorithms solve the sparse coefficient of corresponding excessively complete dictionary D
According to sparse coefficientCalculate reconstruct denoising image;
Judge whether iterations reach preset targeted number, if so, output reconstruct denoising image, if it is not, then will Iterations add the step of returning to initialisation image parameter together, and the initial value of the iterations is 1.
Preferably, the initialisation image parameter obtains waiting for the noise image of piecemeal, and the noise image for treating piecemeal carries out Image block obtains image block and specifically includes:
It enables
Be arranged image block size be n*n, dictionary size k, Lagrange multiplier λ1, cluster numbers K, image is big The small fragmental image processing for N*N obtains (N-n+1)2A image block;
Wherein, y is pending noise image,To wait for the noise image of piecemeal,For the weight after last iteration Structure denoising image, β are preset related coefficient, and j is iterations and initial value is 1.
Preferably, the operation k-means algorithms obtain k cluster to image block progress cluster calculation and specifically include:
Image block is divided into K classes by calculating the Euclidean distance between each segment, forms K cluster.
Preferably, described that training cluster dictionary { D is obtained to each cluster operation MOD-AK-SVD dictionary learning algorithms1,D2, D3...DkSpecifically include:
Randomly build a dictionary Dk, to DkExecute normalized;
Main iterative process is executed according to k-th of cluster;
JudgeWhether preset minimum value is less than or equal to, if so, output dictionary Dk, if it is not, then returning Execute main iterative process;
Wherein, the main iterative process is:
Operation OMP orthogonal matching pursuit algorithms solve dictionary DkSparse coefficient;
It runs MOD and AK-AVD algorithms and updates dictionary, that is, calculate following equation:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
Dictionary atom d is updated according to following equationj0And sparse coefficient
dj0=Ej0xj0
Wherein, Y indicates picture signal matrix, XKIndicate sparse coefficient matrix, dj0Represent DKIn jth 0 arrange,Represent XK In 0 row of jth, Ωj0Indicate that corresponding set of circumstances, M are constant.
Preferably, the operation OMP orthogonal matching pursuit algorithms solve the sparse coefficient of corresponding excessively complete dictionary D Specially:
According to the sparse coefficient of excessively complete dictionary DThe sparse coefficient of complete dictionary D was calculated in solution formula
The sparse coefficient of the excessively complete dictionary DSolution formula be:
Wherein,For the corresponding sparse coefficient of iteration j ith cluster, RijIndicate corresponding piece of extraction operator, X tables Diagram indicates error parameter as signal matrix, T (σ).
Preferably, described according to sparse coefficientCalculating reconstruct denoising image is specially:
Reconstruct denoising image is calculated according to denoising image formula;
The denoising image formula is:
Wherein,Indicate that the hot-tempered image that goes after iteration j, R are that image block extracts operator, λ1For Lagrangian constant, X For noise image, D is updated dictionary,For the corresponding sparse coefficient of iteration j ith cluster, I is cell matrix.
A kind of image processing apparatus based on k-means cluster and dictionary learning provided by the invention, including:
Image block module obtains waiting for the noise image of piecemeal for initialisation image parameter, treats the noise pattern of piecemeal Image block is obtained as carrying out image block;
Cluster and dictionary learning module, it is poly- to image block progress cluster calculation acquisition K for running k-means algorithms Class obtains training cluster dictionary { D to each cluster operation MOD-AK-SVD dictionary learning algorithms1,D2,D3...Dk};
Dictionary aggregation module, for cluster dictionary { D will to be trained1,D2,D3...DkIt was polymerized to complete dictionary D={ D1, D2,D3...Dk};
Sparse coefficient computing module solves corresponding excessively complete dictionary D's for running OMP orthogonal matching pursuit algorithms Sparse coefficient
Denoising image module is reconstructed, for according to sparse coefficientCalculate reconstruct denoising image;
Loop iteration module, for judging whether iterations reach preset targeted number, if so, output reconstruct is gone It makes an uproar image, executes image block module if it is not, then adding iterations to return together, the initial value of the iterations is 1.
Preferably, described image piecemeal module specifically includes:
Image initial unit, for enabling
Image block unit for image block size to be arranged is n*n, dictionary size k, Lagrange multiplier λ1、 Cluster numbers are K, and the fragmental image processing that image size is N*N is obtained (N-n+1)2A image block;
Wherein, y is pending noise image,To wait for the noise image of piecemeal,For the weight after last iteration Structure denoising image, β are preset related coefficient, and j is iterations and initial value is 1.
Preferably, the cluster and dictionary learning module specifically include:
Cluster cell forms K cluster for image block to be divided into K classes by calculating the Euclidean distance between each segment;
Normalization unit, for randomly building a dictionary Dk, to DkExecute normalized;
Main iteration unit, for executing main iterative process according to k-th of cluster;
Judging unit, for judgingWhether preset minimum value is less than or equal to, if so, output dictionary Dk, main iterative process is executed if it is not, then returning;
Wherein, the main iterative process is:
Operation OMP orthogonal matching pursuit algorithms solve dictionary DkSparse coefficient;
It runs MOD and AK-AVD algorithms and updates dictionary, that is, calculate following equation:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
Dictionary atom d is updated according to following equationj0And sparse coefficient
dj0=Ej0xj0
Wherein, Y indicates picture signal matrix, XKIndicate sparse coefficient matrix, dj0Represent DKIn jth 0 arrange,Represent XK In 0 row of jth, Ωj0Indicate that corresponding set of circumstances, M are constant.
Preferably,
The sparse coefficient computing module is specifically used for the sparse coefficient according to excessively complete dictionary DSolution formula calculates To the sparse coefficient of excessively complete dictionary D
The reconstruct denoising image module is specifically used for calculating reconstruct denoising image according to denoising image formula;
The sparse coefficient of the excessively complete dictionary DSolution formula be:
Wherein,For the corresponding sparse coefficient of iteration j ith cluster, RijIndicate corresponding piece of extraction operator, X tables Diagram indicates error parameter as signal matrix, T (σ).
The denoising image formula is:
Wherein,Indicate that the hot-tempered image that goes after iteration j, R are that image block extracts operator, λ1For Lagrangian constant, X For noise image, D is updated dictionary,For the corresponding sparse coefficient of iteration j ith cluster, I is cell matrix.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages:
A kind of image processing method based on k-means cluster and dictionary learning provided by the invention, including:Initialization figure As parameter obtains waiting for the noise image of piecemeal, the noise image for treating piecemeal carries out image block and obtains image block;Run k- Means algorithms carry out cluster calculation to image block and obtain K cluster, and MOD-AK-SVD dictionary learning algorithms are run to each cluster Obtain training cluster dictionary { D1,D2,D3...Dk};By training cluster dictionary { D1,D2,D3...DkIt was polymerized to complete dictionary D= {D1,D2,D3...Dk};Operation OMP orthogonal matching pursuit algorithms solve the sparse coefficient of corresponding excessively complete dictionary DAccording to Sparse coefficientCalculate reconstruct denoising image;Judge whether iterations reach preset targeted number, if so, output reconstruct Denoising image, if it is not, iterations are then added the step of returning to initialisation image parameter together, the initial value of the iterations It is 1.Initialisation image parameter of the present invention carries out piecemeal processing to noise image, with k mean algorithms to given image block into Row cluster uses MOD-AK-SVD dictionary training algorithms to each cluster, obtains training cluster dictionary { D1,D2,D3...Dk, so After polymerize each piecemeal dictionary { D1,D2,D3...DkFormed complete dictionary D so that D={ D1,D2,D3...Dk, obtain each piecemeal Then dictionary and the excessively complete dictionary D of composition use OMP (orthogonal matching pursuit) algorithm, solve corresponding sparse coefficient, pass through Certain iterations, the corresponding dictionary of renewal learning and sparse coefficient are set, to reconstruct the image after denoising.The present invention The algorithm of offer and existing sparse coding algorithm (Sparse coding) algorithm, improved sparse coding (ISC) algorithm, PSNR (Y-PSNR) value of image denoising effect is compared under the conditions of different noise variance δ and mixed noise density d, can With discovery, our denoising effect will reach better effect.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention without having to pay creative labor, may be used also for those of ordinary skill in the art To obtain other attached drawings according to these attached drawings.
Fig. 1 is an a kind of reality of image processing method based on k-means clusters and dictionary learning provided by the invention Apply the flow chart of example;
Fig. 2 is another of a kind of image processing method based on k-means clusters and dictionary learning provided by the invention The schematic diagram of embodiment;
Fig. 3 is an a kind of reality of image processing apparatus based on k-means clusters and dictionary learning provided by the invention Apply the schematic diagram of example;
Fig. 4 is an a kind of reality of image processing apparatus based on k-means clusters and dictionary learning provided by the invention Apply the schematic diagram of cluster and dictionary learning module in example.
Specific implementation mode
An embodiment of the present invention provides it is a kind of based on k-means cluster and dictionary learning image processing method and device, For solve traditional dictionary it is undertrained fully, the bad technical problem of denoising effect.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field All other embodiment that those of ordinary skill is obtained without making creative work, belongs to protection of the present invention Range.
Referring to Fig. 1, the one of a kind of image processing method based on k-means clusters and dictionary learning provided by the invention A embodiment, including:
101, initialisation image parameter obtains waiting for the noise image of piecemeal, and the noise image for treating piecemeal carries out image block Obtain image block;
102, operation k-means algorithms carry out cluster calculation to image block and obtain K cluster, and MOD- is run to each cluster AK-SVD dictionary learning algorithms obtain training cluster dictionary { D1,D2,D3...Dk};
103, by training cluster dictionary { D1,D2,D3...DkIt was polymerized to complete dictionary D={ D1,D2,D3...Dk};
104, operation OMP orthogonal matching pursuit algorithms solve the sparse coefficient of corresponding excessively complete dictionary D
105, according to sparse coefficientCalculate reconstruct denoising image;
106, judge whether iterations reach preset targeted number, if so, output reconstruct denoising image, if it is not, Iterations are then added into the step of returning to initialisation image parameter together, the initial value of iterations is 1.
Please refer to table 1, algorithm provided by the invention and existing sparse coding algorithm (Sparse coding) algorithm change Into sparse coding (ISC) algorithm, the PSNR of image denoising effect under the conditions of different noise variance δ and mixed noise density d (Y-PSNR) value is compared, it can be found that our denoising effect will reach better effect.
Table 1
Referring to Fig. 2, a kind of image processing method based on k-means clusters and dictionary learning provided by the invention is another One embodiment, including:
(1) algorithm iteration number j=1,2...J are set, enabled That is initialisation image parameter.Wherein, y is pending noise image,To wait for the noise image of piecemeal,For the last time Reconstruct denoising image after iteration, β are preset related coefficient, and j is iterations and initial value is 1.
Be arranged image block size be n*n, dictionary size k, Lagrange multiplier λ1, cluster numbers K, image is big The small fragmental image processing for N*N obtains (N-n+1)2A image block.
(2) given image block is clustered with k mean algorithms, each cluster is instructed with MOD-AK-SVD dictionaries Practice algorithm, obtains training cluster dictionary { D1,D2,D3...Dk, i.e.,:
Image block is divided into K classes by calculating the Euclidean distance between each segment, forms K cluster.
Randomly build a dictionary Dk, to DkExecute normalized;
Main iterative process is executed according to k-th of cluster;
JudgeWhether preset minimum value is less than or equal to, if so, output dictionary Dk, if it is not, then returning Execute main iterative process;
It should be noted that the dictionary D exported at this timekIt is exactly the corresponding piecemeal dictionary of k-th of cluster, repeats (2) step Calculating process (can also algorithm be carried out to each cluster simultaneously), k is calculated from 1 update to K, so that it may to obtain K piecemeal word Allusion quotation clusters dictionary { D to get to training1,D2,D3...Dk}。
Wherein, main iterative process is:
Operation OMP orthogonal matching pursuit algorithms solve dictionary DkSparse coefficient;
It runs MOD and AK-AVD algorithms and updates dictionary, that is, calculate following equation:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
Dictionary atom d is updated according to following equationj0And sparse coefficient
dj0=Ej0xj0
Wherein, Y indicates picture signal matrix, XKIndicate sparse coefficient matrix, dj0Represent DKIn jth 0 arrange,Represent XK In 0 row of jth, Ωj0Indicate that corresponding set of circumstances, M are constant.
(3) by training cluster dictionary { D1,D2,D3…DkIt was polymerized to complete dictionary D={ D1,D2,D3…Dk};
(4) OMP (orthogonal matching pursuit) algorithm is used, solves corresponding sparse coefficient, i.e.,:
According to the sparse coefficient of excessively complete dictionary DThe sparse coefficient of complete dictionary D was calculated in solution formula
Cross the sparse coefficient of complete dictionary DSolution formula be:
Wherein,For the corresponding sparse coefficient of iteration j ith cluster, RijIndicate corresponding piece of extraction operator, X tables Diagram indicates error parameter as signal matrix, T (σ).
(5) denoising image is reconstructed, i.e.,:
Reconstruct denoising image is calculated according to denoising image formula;
Denoising image formula is:
Wherein,Indicate that the hot-tempered image that goes after iteration j, R are that image block extracts operator, λ1For Lagrangian constant, X For noise image, D is updated dictionary,For the corresponding sparse coefficient of iteration j ith cluster, I is cell matrix.
It should be noted that formula is to calculate the formula for removing hot-tempered image, and when also to carry out next iteration, denoising at this time Image formulaReplace formulaInThe initialization for carrying out image parameter, when no longer When iteration, denoising image formula calculatesIt is exactly the image of final output.
(6) judge whether iterations reach preset targeted number, if so, output reconstruct denoising image, if it is not, then The initial value of the step of returning to initialisation image parameter by iterations plus together, iterations is 1.Iterations j=1,2 ... J, the i.e. initial value of iterations j are 1, J are iterated to since 1, J is targeted number.
To be clearly understood that technical scheme of the present invention, relevant speciality term will be explained below:
K-means algorithms, i.e. k mean algorithms, specially:By calculating corresponding Euclidean distance, constantly it polymerize from k The point of the nearest mean value of central point enables Euclidean distance aggregating into one kind very close to point, reaches classifying quality.
Dictionary learning algorithm typically has MOD dictionary learning algorithms, K-MOD dictionary learnings algorithm and AK-MOD, if one group Signal Y=[y1,y2…yn], the target of MOD algorithms is to find a dictionary D and a sparse matrix X so that the reconstruct of signal Error is minimum:
Here x is the row of matrix X, and MOD is a kind of renewal process of the alternating iteration between dictionary upgrading and sparse coding. Sparse coding process is to each signal ynIndividually carry out rarefaction representation.
The step of excessively complete dictionary training based on MOD algorithms:
Initialize dictionary:Random one dictionary D0 of construction, standardizes to D0.
Main iterative process:
Sparse coding step:Sparse coefficient is found out using OMP tracing algorithms:
Dictionary is updated using MOD algorithms:
IfReach enough fractional values of setting, stops calculating.Otherwise, next iteration is carried out.D(k) It is exactly the dictionary that we finally obtain.
K-SVD algorithms are proposed by Aharon et al..Keep dictionary in addition to jth 0 arrange other than all row fix, dj0 this Row can be realized with the multiplication in same X to be updated, and object function is as follows:
Wherein,It is residual matrix,Represent the jth row in X.To dj0WithIt is simple by one To Ej0Rank-l approach to make above formula minimum, thus obtain the update of dictionary atom.
The step of excessively complete dictionary training based on K-SVD algorithms:
Initialize dictionary:Random one dictionary D0 of construction, standardizes to D0.
Main iterative process:
Sparse coding step:Sparse coefficient is found out using OMP (orthogonal matching pursuit) algorithm.
Dictionary is updated using K-SVD algorithms:The following steps update each column and coefficient X (k) of dictionary, define sample group dj0:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
djIt is the jth row in X (k), is decomposed using SVD:
Update dictionary atom dj0, sparse coefficientdj0=u1,
IfReach enough fractional values of setting, stops calculating.Otherwise, next iteration is carried out.D(k) It is exactly the dictionary that we finally obtain.
AK-SVD algorithms:
Calculation amount is reduced by providing the approximate solution that SVD is decomposed.AK-SVD utilizes residual matrix Ej0To dj0WithIt carries out It alternately updates, as follows:
djo=Ej0xj0
Dictionary training generally can be divided into two processes:One is sparse coding, that is to say sparse decomposition, another is word The update of allusion quotation
MOD-AK-SVD dictionary learning algorithms are to combine MOD algorithms and AK-SVD algorithms to carry out repeatedly dictionary Update solves the algorithm of dictionary.
It is to a kind of implementation of the image processing method based on k-means clusters and dictionary learning provided by the invention above Example is described in detail, below will be to a kind of image procossing based on k-means cluster and dictionary learning provided by the invention Device is described in detail.
Referring to Fig. 3, the one of a kind of image processing apparatus based on k-means clusters and dictionary learning provided by the invention A embodiment, including:
Image block module 201 obtains waiting for the noise image of piecemeal for initialisation image parameter, treats the noise of piecemeal Image carries out image block and obtains image block;
Cluster and dictionary learning module 202 carry out cluster calculation acquisition K for running k-means algorithms to image block Cluster obtains training cluster dictionary { D to each cluster operation MOD-AK-SVD dictionary learning algorithms1,D2,D3...Dk};
Dictionary aggregation module 203, for cluster dictionary { D will to be trained1,D2,D3…DkIt was polymerized to complete dictionary D={ D1, D2,D3…Dk};
Sparse coefficient computing module 204 solves corresponding excessively complete dictionary for running OMP orthogonal matching pursuit algorithms The sparse coefficient of D
Denoising image module 205 is reconstructed, for according to sparse coefficientCalculate reconstruct denoising image;
Loop iteration module 206, for judging whether iterations reach preset targeted number, if so, output weight Structure denoising image executes image block module if it is not, then adding iterations to return together, and the initial value of iterations is 1.
Further, image block module 201 specifically includes:
Image initial unit, for enabling
Image block unit for image block size to be arranged is n*n, dictionary size k, Lagrange multiplier λ1、 Cluster numbers are K, and the fragmental image processing that image size is N*N is obtained (N-n+1)2A image block;
Wherein, y is pending noise image,To wait for the noise image of piecemeal,For the weight after last iteration Structure denoising image, β are preset related coefficient, and j is iterations and initial value is 1.
Referring to Fig. 4, further, cluster and dictionary learning module 202 specifically include:
Cluster cell 301, for image block to be divided into K classes by calculating the Euclidean distance between each segment, composition K is poly- Class;
Normalization unit 302, for randomly building a dictionary Dk, to DkExecute normalized;
Main iteration unit 303, for executing main iterative process according to k-th of cluster;
Judging unit 304, for judgingWhether preset minimum value is less than or equal to, if so, output Dictionary Dk, main iterative process is executed if it is not, then returning;
Wherein, main iterative process is:
Operation OMP orthogonal matching pursuit algorithms solve dictionary DkSparse coefficient;
It runs MOD and AK-AVD algorithms and updates dictionary, that is, calculate following equation:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
Dictionary atom d is updated according to following equationj0And sparse coefficient
dj0=Ej0xj0
Wherein, Y indicates picture signal matrix, XKIndicate sparse coefficient matrix, dj0Represent DKIn jth 0 arrange,Represent XK In 0 row of jth, Ωj0Indicate that corresponding set of circumstances, M are constant.
Sparse coefficient computing module 204 is specifically used for the sparse coefficient according to excessively complete dictionary DSolution formula is calculated Cross the sparse coefficient of complete dictionary D
Denoising image module 205 is reconstructed to be specifically used for calculating reconstruct denoising image according to denoising image formula;
Cross the sparse coefficient of complete dictionary DSolution formula be:
Wherein,For the corresponding sparse coefficient of iteration j ith cluster, RijIndicate corresponding piece of extraction operator, X tables Diagram indicates error parameter as signal matrix, T (σ).
Denoising image formula is:
Wherein,Indicate that the hot-tempered image that goes after iteration j, R are that image block extracts operator, λ1For Lagrangian constant, X For noise image, D is updated dictionary,For the corresponding sparse coefficient of iteration j ith cluster, I is cell matrix.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before Stating embodiment, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to preceding The technical solution recorded in each embodiment is stated to modify or equivalent replacement of some of the technical features;And these Modification or replacement, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of image processing method based on k-means cluster and dictionary learning, which is characterized in that including:
Initialisation image parameter obtains waiting for the noise image of piecemeal, and the noise image for treating piecemeal carries out image block acquisition image Block;
It runs k-means algorithms and K cluster of cluster calculation acquisition is carried out to image block, MOD-AK-SVD words are run to each cluster Allusion quotation learning algorithm obtains training cluster dictionary { D1,D2,D3...Dk};
By training cluster dictionary { D1,D2,D3…DkIt was polymerized to complete dictionary D={ D1,D2,D3…Dk};
Operation OMP orthogonal matching pursuit algorithms solve the sparse coefficient of corresponding excessively complete dictionary D
According to sparse coefficientCalculate reconstruct denoising image;
Judge whether iterations reach preset targeted number, if so, output reconstruct denoising image, if it is not, then by iteration Number adds the step of returning to initialisation image parameter together, and the initial value of the iterations is 1.
2. a kind of image processing method based on k-means cluster and dictionary learning according to claim 1, feature exist In the initialisation image parameter obtains waiting for the noise image of piecemeal, and the noise image for treating piecemeal carries out image block acquisition Image block specifically includes:
It enables
Be arranged image block size be n*n, dictionary size k, Lagrange multiplier λ1, cluster numbers K, be by image size The fragmental image processing of N*N obtains (N-n+1)2A image block;
Wherein, y is pending noise image,To wait for the noise image of piecemeal,It is gone for the reconstruct after last iteration It makes an uproar image, β is preset related coefficient, and j is iterations and initial value is 1.
3. a kind of image processing method based on k-means cluster and dictionary learning according to claim 1, feature exist In the operation k-means algorithms carry out k cluster of cluster calculation acquisition to image block and specifically include:
Image block is divided into K classes by calculating the Euclidean distance between each segment, forms K cluster.
4. a kind of image processing method based on k-means cluster and dictionary learning according to claim 1, feature exist In described to obtain training cluster dictionary { D to each cluster operation MOD-AK-SVD dictionary learning algorithms1,D2,D3…DkSpecific Including:
Randomly build a dictionary Dk, to DkExecute normalized;
Main iterative process is executed according to k-th of cluster;
JudgeWhether preset minimum value is less than or equal to, if so, output dictionary Dk, if it is not, then returning to execution Main iterative process;
Wherein, the main iterative process is:
Operation OMP orthogonal matching pursuit algorithms solve dictionary DkSparse coefficient;
It runs MOD and AK-AVD algorithms and updates dictionary, that is, calculate following equation:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
Dictionary atom d is updated according to following equationj0And sparse coefficient
dj0=Ej0xj0
Wherein, Y indicates picture signal matrix, XKIndicate sparse coefficient matrix, dj0Represent DKIn jth 0 arrange,Represent XKIn 0 row of jth, Ωj0Indicate that corresponding set of circumstances, M are constant.
5. a kind of image processing method based on k-means cluster and dictionary learning according to claim 1, feature exist In the operation OMP orthogonal matching pursuit algorithms solve the sparse coefficient of corresponding excessively complete dictionary DSpecially:
According to the sparse coefficient of excessively complete dictionary DThe sparse coefficient of complete dictionary D was calculated in solution formula
The sparse coefficient of the excessively complete dictionary DSolution formula be:
Wherein,For the corresponding sparse coefficient of iteration j ith cluster, RijIndicate that corresponding piece of extraction operator, X indicate figure As signal matrix, T (σ) indicates error parameter.
6. a kind of image processing method based on k-means cluster and dictionary learning according to claim 1, feature exist In described according to sparse coefficientCalculating reconstruct denoising image is specially:
Reconstruct denoising image is calculated according to denoising image formula;
The denoising image formula is:
Wherein,Indicate that the hot-tempered image that goes after iteration j, R are that image block extracts operator, λ1For Lagrangian constant, X is to make an uproar Acoustic image, D are updated dictionary,For the corresponding sparse coefficient of iteration j ith cluster, I is cell matrix.
7. a kind of image processing apparatus based on k-means cluster and dictionary learning, which is characterized in that including:
Image block module obtains waiting for the noise image of piecemeal for initialisation image parameter, treat the noise image of piecemeal into Row image block obtains image block;
Cluster and dictionary learning module carry out K cluster of cluster calculation acquisition for running k-means algorithms to image block, right Each cluster operation MOD-AK-SVD dictionary learning algorithms obtain training cluster dictionary { D1,D2,D3...Dk};
Dictionary aggregation module, for cluster dictionary { D will to be trained1,D2,D3…DkIt was polymerized to complete dictionary D={ D1,D2,D3… Dk};
Sparse coefficient computing module solves the sparse of corresponding excessively complete dictionary D for running OMP orthogonal matching pursuit algorithms Coefficient
Denoising image module is reconstructed, for according to sparse coefficientCalculate reconstruct denoising image;
Loop iteration module, for judging whether iterations reach preset targeted number, if so, output reconstruct denoising figure Picture executes image block module if it is not, then adding iterations to return together, and the initial value of the iterations is 1.
8. a kind of image processing apparatus based on k-means cluster and dictionary learning according to claim 7, feature exist In described image piecemeal module specifically includes:
Image initial unit, for enabling
Image block unit for image block size to be arranged is n*n, dictionary size k, Lagrange multiplier λ1, cluster numbers For K, the fragmental image processing that image size is N*N is obtained (N-n+1)2A image block;
Wherein, y is pending noise image,To wait for the noise image of piecemeal,It is gone for the reconstruct after last iteration It makes an uproar image, β is preset related coefficient, and j is iterations and initial value is 1.
9. a kind of image processing apparatus based on k-means cluster and dictionary learning according to claim 7, feature exist In the cluster and dictionary learning module specifically include:
Cluster cell forms K cluster for image block to be divided into K classes by calculating the Euclidean distance between each segment;
Normalization unit, for randomly building a dictionary Dk, to DkExecute normalized;
Main iteration unit, for executing main iterative process according to k-th of cluster;
Judging unit, for judgingWhether preset minimum value is less than or equal to, if so, output dictionary DkIf It is no, then it returns and executes main iterative process;
Wherein, the main iterative process is:
Operation OMP orthogonal matching pursuit algorithms solve dictionary DkSparse coefficient;
It runs MOD and AK-AVD algorithms and updates dictionary, that is, calculate following equation:
Ωj0=i | 1≤i≤M, X(k)(j0,i)≠0};
Calculate residual matrix:
Dictionary atom d is updated according to following equationj0And sparse coefficient
dj0=Ej0xj0
Wherein, Y indicates picture signal matrix, XKIndicate sparse coefficient matrix, dj0Represent DKIn jth 0 arrange,Represent XKIn 0 row of jth, Ωj0Indicate that corresponding set of circumstances, M are constant.
10. a kind of image processing apparatus based on k-means cluster and dictionary learning according to claim 7, feature It is,
The sparse coefficient computing module is specifically used for the sparse coefficient according to excessively complete dictionary DSolution formula was calculated The sparse coefficient of complete dictionary D
The reconstruct denoising image module is specifically used for calculating reconstruct denoising image according to denoising image formula;
The sparse coefficient of the excessively complete dictionary DSolution formula be:
Wherein,For the corresponding sparse coefficient of iteration j ith cluster, RijIndicate that corresponding piece of extraction operator, X indicate figure As signal matrix, T (σ) indicates error parameter;
The denoising image formula is:
Wherein,Indicate that the hot-tempered image that goes after iteration j, R are that image block extracts operator, λ1For Lagrangian constant, X is to make an uproar Acoustic image, D are updated dictionary,For the corresponding sparse coefficient of iteration j ith cluster, I is cell matrix.
CN201810201253.3A 2018-03-12 2018-03-12 A kind of image processing method and device based on k-means cluster and dictionary learning Pending CN108491868A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810201253.3A CN108491868A (en) 2018-03-12 2018-03-12 A kind of image processing method and device based on k-means cluster and dictionary learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810201253.3A CN108491868A (en) 2018-03-12 2018-03-12 A kind of image processing method and device based on k-means cluster and dictionary learning

Publications (1)

Publication Number Publication Date
CN108491868A true CN108491868A (en) 2018-09-04

Family

ID=63338863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810201253.3A Pending CN108491868A (en) 2018-03-12 2018-03-12 A kind of image processing method and device based on k-means cluster and dictionary learning

Country Status (1)

Country Link
CN (1) CN108491868A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375205A (en) * 2018-09-28 2019-02-22 清华大学 Multiple types unmanned plane scene recognition method dictionary-based learning and device
CN110033495A (en) * 2019-03-25 2019-07-19 西安交通大学 MR image reconstructing method based on K- mean cluster dictionary learning
CN110349101A (en) * 2019-06-26 2019-10-18 上海集成电路研发中心有限公司 A kind of multiple dimensioned united Wavelet image denoising method
CN110632566A (en) * 2019-08-31 2019-12-31 南京理工大学 Radio fuse foil strip interference resisting method based on sparse representation
CN110687605A (en) * 2019-09-30 2020-01-14 成都理工大学 Improved K-SVD algorithm-based algorithm analysis application in seismic signal processing
CN110766695A (en) * 2019-09-26 2020-02-07 山东工商学院 Image matting algorithm research based on sparse representation
CN111626312A (en) * 2019-02-28 2020-09-04 武汉科技大学 Wind turbine bearing fault diagnosis method based on fast multi-separation dictionary learning
CN112488949A (en) * 2020-12-08 2021-03-12 深圳先进技术研究院 Low-dose PET image restoration method, system, equipment and medium
CN110176029B (en) * 2019-04-29 2021-03-26 华中科技大学 Image restoration and matching integrated method and system based on level sparse representation
CN112713907A (en) * 2020-12-23 2021-04-27 中南大学 Marine CSEM noise reduction method and system based on dictionary learning
CN113139918A (en) * 2021-04-23 2021-07-20 大连大学 Image reconstruction method based on decision-making gray wolf optimization dictionary learning
CN113223032A (en) * 2021-04-27 2021-08-06 武汉纺织大学 Double-sparse decomposition-based complex image Canny edge detection method
CN114757854A (en) * 2022-06-15 2022-07-15 深圳市安星数字系统有限公司 Night vision image quality improving method, device and equipment based on multispectral analysis
CN115564680A (en) * 2022-10-17 2023-01-03 陕西师范大学 Image denoising method based on two-dimensional multipath matching pursuit algorithm
CN116233477A (en) * 2023-03-09 2023-06-06 聊城市茌平区润德勘察测绘有限公司 Live broadcast real-time transmission image preprocessing system based on algorithm and application

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590779A (en) * 2017-08-07 2018-01-16 浙江工业大学 A kind of image denoising deblurring method based on image block cluster dictionary training

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590779A (en) * 2017-08-07 2018-01-16 浙江工业大学 A kind of image denoising deblurring method based on image block cluster dictionary training

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAI SHUTING ET AL: "A Dictionary-Learning Algorithm Based on Method of Optimal Directions and Approximate K-SVD", 《PROCEEDINGS OF THE 35TH CHINESE CONTROL CONFERENCE》 *
王欣 等: "一种改进的基于K-SVD字典的图像去噪算法", 《电子设计工程》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375205A (en) * 2018-09-28 2019-02-22 清华大学 Multiple types unmanned plane scene recognition method dictionary-based learning and device
CN111626312A (en) * 2019-02-28 2020-09-04 武汉科技大学 Wind turbine bearing fault diagnosis method based on fast multi-separation dictionary learning
CN110033495A (en) * 2019-03-25 2019-07-19 西安交通大学 MR image reconstructing method based on K- mean cluster dictionary learning
CN110176029B (en) * 2019-04-29 2021-03-26 华中科技大学 Image restoration and matching integrated method and system based on level sparse representation
CN110349101A (en) * 2019-06-26 2019-10-18 上海集成电路研发中心有限公司 A kind of multiple dimensioned united Wavelet image denoising method
CN110349101B (en) * 2019-06-26 2023-11-14 上海集成电路研发中心有限公司 Multi-scale combined wavelet image denoising method
CN110632566A (en) * 2019-08-31 2019-12-31 南京理工大学 Radio fuse foil strip interference resisting method based on sparse representation
CN110766695A (en) * 2019-09-26 2020-02-07 山东工商学院 Image matting algorithm research based on sparse representation
CN110766695B (en) * 2019-09-26 2023-08-22 山东工商学院 Image sparse representation-based matting method
CN110687605A (en) * 2019-09-30 2020-01-14 成都理工大学 Improved K-SVD algorithm-based algorithm analysis application in seismic signal processing
CN112488949A (en) * 2020-12-08 2021-03-12 深圳先进技术研究院 Low-dose PET image restoration method, system, equipment and medium
CN112713907A (en) * 2020-12-23 2021-04-27 中南大学 Marine CSEM noise reduction method and system based on dictionary learning
CN112713907B (en) * 2020-12-23 2022-03-15 中南大学 Marine CSEM noise reduction method and system based on dictionary learning
CN113139918A (en) * 2021-04-23 2021-07-20 大连大学 Image reconstruction method based on decision-making gray wolf optimization dictionary learning
CN113139918B (en) * 2021-04-23 2023-11-10 大连大学 Image reconstruction method based on decision-making gray wolf optimization dictionary learning
CN113223032A (en) * 2021-04-27 2021-08-06 武汉纺织大学 Double-sparse decomposition-based complex image Canny edge detection method
CN114757854A (en) * 2022-06-15 2022-07-15 深圳市安星数字系统有限公司 Night vision image quality improving method, device and equipment based on multispectral analysis
CN115564680A (en) * 2022-10-17 2023-01-03 陕西师范大学 Image denoising method based on two-dimensional multipath matching pursuit algorithm
CN116233477A (en) * 2023-03-09 2023-06-06 聊城市茌平区润德勘察测绘有限公司 Live broadcast real-time transmission image preprocessing system based on algorithm and application
CN116233477B (en) * 2023-03-09 2023-12-01 广州中仪英斯泰克电子科技有限公司 Live broadcast real-time transmission image preprocessing system based on algorithm and application

Similar Documents

Publication Publication Date Title
CN108491868A (en) A kind of image processing method and device based on k-means cluster and dictionary learning
Yu et al. Transmatch: A transfer-learning scheme for semi-supervised few-shot learning
Ye et al. Good subnetworks provably exist: Pruning via greedy forward selection
CN108171762B (en) Deep learning compressed sensing same-class image rapid reconstruction system and method
CN108846445B (en) Image processing method
US20170011741A1 (en) Method for Distinguishing Components of an Acoustic Signal
Shi et al. Rank-one matrix completion with automatic rank estimation via L1-norm regularization
CN113610151A (en) System, method, equipment and storage medium for solving small sample image classification based on prototype network self-encoder network mechanism
Meng et al. Few-shot image classification algorithm based on attention mechanism and weight fusion
US20200082213A1 (en) Sample processing method and device
CN107967674B (en) Nuclear magnetic resonance image denoising method based on image block self-similarity prior
Li et al. Direct-optimization-based DC dictionary learning with the MCP regularizer
CN113592008B (en) System, method, device and storage medium for classifying small sample images
Wei et al. Non-homogeneous haze removal via artificial scene prior and bidimensional graph reasoning
Fonseca et al. Model-agnostic approaches to handling noisy labels when training sound event classifiers
Chen et al. Sparse general non-negative matrix factorization based on left semi-tensor product
Almadan et al. Benchmarking neural network compression techniques for ocular-based user authentication on smartphones
CN109376651A (en) The system that a kind of GPU based on CUDA framework accelerates spike classification
Liu et al. An efficient collaborative filtering method for image noise and artifact removal
Cheng et al. User-controllable arbitrary style transfer via entropy regularization
CN109727219A (en) A kind of image de-noising method and system based on image sparse expression
Wang et al. Single image rain removal via cascading attention aggregation network on challenging weather conditions
CN113707172B (en) Single-channel voice separation method, system and computer equipment of sparse orthogonal network
Li et al. Clustering of short texts based on dynamic adjustment for contrastive learning
Zeng et al. Slice-based online convolutional dictionary learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180904