CN113223032A - Double-sparse decomposition-based complex image Canny edge detection method - Google Patents
Double-sparse decomposition-based complex image Canny edge detection method Download PDFInfo
- Publication number
- CN113223032A CN113223032A CN202110460362.9A CN202110460362A CN113223032A CN 113223032 A CN113223032 A CN 113223032A CN 202110460362 A CN202110460362 A CN 202110460362A CN 113223032 A CN113223032 A CN 113223032A
- Authority
- CN
- China
- Prior art keywords
- sparse
- dictionary
- image
- decomposition
- double
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to a Canny edge detection method for a complex image based on double sparse decomposition. According to the invention, through structured NSCT decomposition, non-stationary change high-frequency component data which is difficult to express in an image is separated, and the matrix of the high-frequency component data is sparse. Therefore, only the high-frequency components obtained by NSCT decomposition are subjected to K-SVD dictionary learning, so that the specific basis vectors of the images can be fused into the dictionary to form complementation with the NSCT decomposition, the calculated amount of the algorithm can be greatly reduced, and the algorithm efficiency is improved; the invention adopts a double-sparse dictionary learning method, and can lose part of stably-changing high-frequency and low-frequency information while keeping the special characteristic information of the image, thereby reducing the richness of dictionary atomic data. Therefore, the K-SVD learning dictionary and the DCT dictionary are combined, the deficiency of the learning dictionary in the aspect of stably changing basis vectors is made up, and the sparse representation capability of the hybrid sparse dictionary is improved.
Description
Technical Field
The invention relates to digital image processing, in particular to a Canny edge detection method for a complex image based on double sparse decomposition.
Background
Many branches of image processing development arise, such as image compression, image inpainting, image segmentation, and image recognition. In a processing method for extracting features such as image segmentation and image recognition, an edge detection technology is required to facilitate data reduction and information purification. According to the method, the image is preprocessed by utilizing the characteristic extraction function of the double-sparse decomposition method, irrelevant information is removed, and the Canny operator is utilized to detect the edge, so that the accuracy of the edge detection result is improved.
Compared with the prior art:
(1) the image decomposition algorithm is mainly divided into a structured signal time-frequency analysis method and a self-adaptive signal analysis method. The signal structured time-frequency analysis method has higher speed, but the method can only process images with certain characteristics, and the algorithm adaptability is limited. The adaptive signal analysis method has good adaptability, but the algorithm complexity is high, so that the algorithm efficiency is low.
(2) The existing Canny edge detection algorithm has limited robustness, so the credibility and the accuracy of a detection result depend on the morphological conciseness of an image. The Zhao Heng et al performs amplitude square processing on the nuclear magnetic resonance image, and then performs Canny edge detection on the obtained amplitude square image, but the detection rate of the image except the nuclear magnetic resonance image is low; the method is characterized in that the method for representing the image by the NEQR quantum image representation model which is beneficial to realizing parallel processing is used for the Yuanzhen et al, and data which are not beneficial to edge detection are not screened by combining with feature analysis. (a quantum Canny edge detection method, Yuan Zhen Li Yahao A Yuan Huang Yuan 2017). The two methods have limited adaptability and have poor effect in the edge detection of complex texture images.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a Canny edge detection method for a complex image based on double sparse decomposition, and the technical scheme for solving the technical problem is as follows:
the method for detecting the Canny edge of the complex image based on the double sparse decomposition comprises the following steps:
step 1, performing non-subsampled contourlet transformation, namely NSCT decomposition on an image to be detected to obtain a sparse high-frequency component:
step 2, performing K-singular value decomposition on the sparse high-frequency component obtained by NSCT decomposition by using a DCT-DWT initial dictionary, performing dictionary training, and relaxing image data in the training to obtain a K-SVD learning dictionary, wherein a relaxation calculation formula is as follows:
where c is a constant, n is the size of the image data, and σ is a relaxation parameter;
step 3, merging the K-SVD learning dictionary and the DCT dictionary obtained by training into a mixed sparse dictionary;
step 4, performing sparse and redundant representation on the image to be detected by using a mixed sparse dictionary, performing double-sparse solution by using a VSSOMP algorithm, and performing double-sparse decomposition to obtain a simple texture image;
and 5, performing Canny edge detection on the simple texture image obtained by double sparse decomposition to obtain an edge detection result.
Further, the VSSOMP algorithm in step 4 specifically includes the following steps:
step 4.1, inputting an image y to be detected, a mixed sparse dictionary D and a step increment s;
step 4.2, constructing dictionary atom setAnd normalization, DiRepresenting dictionary atoms in the mixed sparse dictionary, i, j representing counting, dividing the image to be detected into m image blocks with consistent sizes, decomposing each image block into a plurality of vectors to obtain a vector setJ is more than or equal to 1 and less than or equal to m and residual error r is equal to yjThe initial step length L ═ s, according to the equation: y isj≈DGxjIteratively solving each vector yjSet of atoms D of the most suitable linear combination on DGAnd corresponding sparse coefficient xjJ is more than or equal to 1 and less than or equal to m; all xjThe formed matrix is the sparse representation coefficient matrix x of the image y to be detected.
Further, the sparse coefficient xjThe calculation method of (2) is as follows:
step 4.21, k is initialized to 0 and u ═ D is calculatedTr, selecting 1 atom with the largest absolute valueComputingAndif | | T | | non-woven phosphor>0.5 deletionObtaining atomic group DLAfter continuing L-1 operation in the previous step, let DG=DG∪DL;
Step 4.22, according to the sparse model:
Approximate solution using least squares:
step 4.23, setting threshold res1 to 1.15 × 64, res2 to 1.1 · res1, and if r > res2, making L to L + s, r to yj-DGxjMaking the iteration number k equal to k +1, and going to step 4.3; if res2 > r > res1, let L be L/2 and r be yj-DGxjMaking the iteration number k equal to k +1, and going to step 4.3; if r is less than res1, go to step 4.24;
step 4.24, outputting the final sparse coefficient xj。
The invention has the beneficial effects that: 1. through the structured NSCT decomposition, non-stationary change high-frequency component data which are difficult to express in the image are separated, and the matrix of the high-frequency component data is sparse. Therefore, only the high-frequency components obtained by NSCT decomposition are subjected to K-SVD dictionary learning, so that the specific basis vectors of the images can be fused into the dictionary to form complementation with the NSCT decomposition, the calculated amount of the algorithm can be greatly reduced, and the algorithm efficiency is improved; 2. the precision requirement of sparse representation in the K-SVD is properly relaxed by using a threshold relaxation method, and the number of atoms of sparse coding is reduced in a self-adaptive manner, so that the method has the advantages that firstly, overfitting is effectively avoided, and secondly, the efficiency of the K-SVD algorithm is greatly improved; 3. the NSCT-based K-SVD dictionary learning algorithm is also called a double-sparse dictionary learning method. The method can lose part of stably changed high-frequency and low-frequency information while retaining the special characteristic information of the image, so that the richness of the dictionary atom data is reduced. Therefore, the K-SVD learning dictionary and the DCT dictionary are combined, the deficiency of the learning dictionary in the aspect of stably changing basis vectors is made up, and the sparse representation capability of the hybrid sparse dictionary is improved; 4. a Variable Step Size OMP (VSSOMP) algorithm is provided by combining ideas of a regularized orthogonal matching pursuit algorithm and a sparsity self-adaptive matching pursuit algorithm, a frame of the OMP algorithm is used, a linear correlation principle is used in a dictionary atom selection stage, a plurality of atoms are selected and added into the iterative calculation, the calculation amount of the algorithm is reduced, a double-threshold control method is adopted to adjust the Step Size, the Step Size is reduced in time, the sparsity of the solution is improved, the defects in the ROMP algorithm are avoided, and the sparsity K does not need to be calculated in advance. 5. The image sparse decomposition method based on the double sparse learning dictionaries not only extracts high-frequency components in image signals, but also extracts feature vectors containing image high-frequency information in the decomposition process of the high-frequency information. Therefore, the image subjected to double sparse decomposition can filter out the interference texture. 6. The method has the advantages that a double-sparse image decomposition step based on NSCT is added in the edge detection, the high-frequency part in the image is purified, a part of false detection factors are eliminated in advance, the accuracy of the algorithm is guaranteed, the difficulty in identifying edge points is reduced, and the accuracy of the edge detection algorithm is improved.
Drawings
FIG. 1 is an exploded view of NSCT;
FIG. 2 is a flow chart of the K-SVD algorithm;
FIG. 3 is a flow chart of a K-SVD algorithm based on NSCT decomposition;
FIG. 4 is an image decomposition process based on a dual sparse learning dictionary;
FIG. 5 is a flow chart of dual sparsity based edge detection;
FIG. 6 is an original image of a complex texture image;
FIG. 7 is the result of dual sparse decomposition;
fig. 8 shows the edge detection results of the common Canny algorithm and the dual sparse decomposition-based complex image Canny algorithm, and the edge detection results of the common Canny algorithm and the dual sparse decomposition-based complex image Canny algorithm for the low-frequency feature component, where the sensitivities are all 0.3.
Detailed Description
The principles and features of this invention are described below in conjunction with the following drawings, which are set forth by way of illustration only and are not intended to limit the scope of the invention.
The invention comprises the following steps:
1. performing non-subsampled Contourlet (NSCT) on an original image of the complex image, and concentrating a feature vector with high representation difficulty in the image on a high-frequency part;
2. performing K-Singular Value Decomposition (K-SVD) dictionary training on the sparse high-frequency component obtained by NSCT Decomposition by using a DCT-DWT (Discrete Cosine Transform, DCT) dictionary as an initial dictionary, wherein a threshold Value in the K-SVD training is relaxed, and a relaxation calculation formula is as follows:
where c is a constant, n is the size of the image data, and σ is a relaxation parameter;
3. merging the K-SVD learning dictionary obtained by training and a DCT (discrete Cosine transform) dictionary into a mixed sparse dictionary;
4. performing sparse and redundant representation on the complex image original image by using a mixed sparse dictionary, and performing sparse solution by using a VSSOMP (variable Step Size ordered Matching pursuit) algorithm, wherein pseudo codes of the VSSOMP algorithm are as follows:
inputting: signal y, dictionary D, step increment s.
And (3) outputting: the coefficients x are sparsely represented.
Initialization: let k equal to 0, construct a dictionaryAnd normalizing to divide the signal y into m blocksResidual r ═ yjInitial step L ═ s (signal y is divided into m image blocks of size 8 x 8 and expanded into a vector y of size 64 x 1jThe dictionary D has a dictionary atoms in common, and i and j represent counting. According to the formula: y isj≈DGxjIteratively solving for each yj(1. ltoreq. j. ltoreq.m) atom group D of the most suitable linear combination on dictionary DGAnd corresponding sparse coefficient xj(1≤j≤m))
Main iteration: k is k +1
a. Selecting dictionary atoms:
calculate u ═ DTr, selecting 1 atom with the largest absolute valueComputingAndif | | T | | non-woven phosphor>0.5 deletionObtaining atomic group DL(DLThe absolute value of the inner product value of each atom vector in the vector is small, so that the correlation is weak, and the richness of the selection of the basis vectors is ensured).
After L-1 continuation of the operation in the previous step, let DG=DG∪DL.
b. Sparse coding:
according to the sparse model:
approximate solution using least squares:
c. and (3) residual error updating: r ═ yj-DGxj.
d. Stopping conditions are as follows: (setting threshold res1 ═ 1.15 × 64, res2 ═ 1.1 · res1)
If r is greater than res2, let L be L + s, continue iteration; if res2 is greater than r is greater than res1, making L equal to L/2, and continuing iteration; if r is less than res1, the loop is exited, the iteration is stopped, and y is obtainedjThe decomposition results of (a): sparse coefficient xjCalculate all image blocks y through the VSSOMP algorithmjIs a sparse representation coefficient xjObtaining a sparse representation coefficient matrix x of the image y;
5. dictionary atoms of the mixed sparse dictionary are divided into two categories according to the liveness of the dictionary atoms, and a mathematical formula of the dictionary atom liveness measurement method is as follows:
More active atoms are easier to represent complex texture information, and atoms with low activity are easier to represent simple-texture information; when T is defined as Activity (a), when T is>0.27, judging that the dictionary atom has higher activity, otherwise, obtaining the dictionary D with high activityHDictionary D with low livenessL。
6. Respectively extracting sparse representation coefficients corresponding to dictionary atoms with two liveness degrees, and dividing sparse coefficients x obtained by calculation of VSSOMP algorithm into two types, namely DH、DLThe corresponding sparse coefficient is divided into two parts, namely the sparse coefficient x corresponding to the complex textureHSparse coefficient x corresponding to compact textureL;
7. Reconstructing a dual-sparse decomposition result image which is pure in mathematical morphology by using sparse coefficients and a sparse dictionary corresponding to simple textures, wherein the mathematical expression is yL=DLxLThen, the matrixes with the size of 64 multiplied by 1 are adjusted to be matrixes with the size of 8 multiplied by 8, each matrix is an image block, and the simple texture image can be reconstructed by overlapping the image blocks;
8. and carrying out Canny edge detection on the simple texture image obtained by double sparse decomposition to obtain an edge detection result.
Example 1 Dual sparse decomposition of Complex images
1NSCT one-layer decomposition, double sparse decomposition with relaxation parameters of 20, dictionary atom activity measure threshold T being 0.27:
fig. 6 shows the complex texture image artwork:
the results of the double sparse decomposition are shown in FIG. 7:
as shown in fig. 8, the sensitivity is 0.3 for the edge detection results of the Canny algorithm for the complex image based on the dual sparse decomposition and the edge detection results of the Canny algorithm for the low-frequency feature component part based on the dual sparse decomposition;
as can be seen from the first two images in FIG. 8, the image of the edge detection result obtained by the double sparse decomposition method of the present invention is more accurate, the terrain edge is richer, and the line is smoother; as can be seen from the two subsequent images in FIG. 8, the background information obtained by the double sparse decomposition method of the present invention is more concise, and the edge lines are smoother and clearer. Namely, the double-sparse decomposition of the invention plays a certain role in filtering the interference information in the edge detection, and simultaneously better retains the edge information.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (3)
1. The method for detecting the Canny edge of the complex image based on double sparse decomposition is characterized by comprising the following steps of:
step 1, performing non-subsampled contourlet transformation, namely NSCT decomposition on an image to be detected to obtain a sparse high-frequency component:
step 2, performing K-singular value decomposition on the sparse high-frequency component obtained by NSCT decomposition by using a DCT-DWT initial dictionary, performing dictionary training, and relaxing image data in the training to obtain a K-SVD learning dictionary, wherein a relaxation calculation formula is as follows:
where c is a constant, n is the size of the image data, and σ is a relaxation parameter;
step 3, merging the K-SVD learning dictionary and the DCT dictionary obtained by training into a mixed sparse dictionary;
step 4, performing sparse and redundant representation on the image to be detected by using a mixed sparse dictionary, performing double-sparse solution by using a VSSOMP algorithm, and performing double-sparse decomposition to obtain a simple texture image;
and 5, performing Canny edge detection on the simple texture image obtained by double sparse decomposition to obtain an edge detection result.
2. The method for detecting Canny edges of a complex image based on double sparse decomposition according to claim 1, wherein the VSSOMP algorithm in the step 4 specifically comprises the following steps:
step 4.1, inputting an image y to be detected, a mixed sparse dictionary D and a step increment s;
step 4.2, constructing dictionary atom setAnd normalization, DiRepresenting dictionary atoms in the mixed sparse dictionary, i, j representing counting, dividing the image to be detected into m image blocks with consistent sizes, decomposing each image block into a plurality of vectors to obtain a vector setLet residual r be yjThe initial step length L ═ s, according to the equation: y isj≈DGxjIteratively solving each vector yjSet of atoms D of the most suitable linear combination on DGAnd corresponding sparse coefficient xjJ is more than or equal to 1 and less than or equal to m; all xjThe formed matrix is the sparse representation coefficient matrix x of the image y to be detected.
3. The dual sparse decomposition based complex image Canny edge detection method according to claim 1, wherein the sparse coefficient x isjThe calculation method of (2) is as follows:
step 4.21, k is initialized to 0 and u ═ D is calculatedTr, selecting 1 atom with the largest absolute value ComputingAndif the inner product of T is greater than 0.5 deletionObtaining atomic group DLAfter continuing L-1 operation in the previous step, let DG=DG∪DL;
Step 4.22, according to the sparse model:
Approximate solution using least squares:
step 4.23, setting threshold res1 to 1.15 × 64, res2 to 1.1 · res1, and if r > res2, making L to L + s, r to yj-DGxjMaking the iteration number k equal to k +1, and going to step 4.3; if res2 > r > res1, let L be L/2 and r be yj-DGxjMaking the iteration number k equal to k +1, and going to step 4.3; if r is less than res1, go to step 4.24;
step 4.24, outputting the final sparse coefficient xj。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110460362.9A CN113223032A (en) | 2021-04-27 | 2021-04-27 | Double-sparse decomposition-based complex image Canny edge detection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110460362.9A CN113223032A (en) | 2021-04-27 | 2021-04-27 | Double-sparse decomposition-based complex image Canny edge detection method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113223032A true CN113223032A (en) | 2021-08-06 |
Family
ID=77089291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110460362.9A Pending CN113223032A (en) | 2021-04-27 | 2021-04-27 | Double-sparse decomposition-based complex image Canny edge detection method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113223032A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428873A (en) * | 2022-04-07 | 2022-05-03 | 源利腾达(西安)科技有限公司 | Thoracic surgery examination data sorting method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081928A (en) * | 2010-11-24 | 2011-06-01 | 南京邮电大学 | Method for separating single-channel mixed voice based on compressed sensing and K-SVD |
CN103886050A (en) * | 2014-03-12 | 2014-06-25 | 佛山科学技术学院 | Image feature storing method, image searching method and device based on compressive sensing |
CN106981058A (en) * | 2017-03-29 | 2017-07-25 | 武汉大学 | A kind of optics based on sparse dictionary and infrared image fusion method and system |
CN108491868A (en) * | 2018-03-12 | 2018-09-04 | 广东工业大学 | A kind of image processing method and device based on k-means cluster and dictionary learning |
US20200019817A1 (en) * | 2018-07-11 | 2020-01-16 | Harbin Institute Of Technology | Superpixel classification method based on semi-supervised k-svd and multiscale sparse representation |
-
2021
- 2021-04-27 CN CN202110460362.9A patent/CN113223032A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081928A (en) * | 2010-11-24 | 2011-06-01 | 南京邮电大学 | Method for separating single-channel mixed voice based on compressed sensing and K-SVD |
CN103886050A (en) * | 2014-03-12 | 2014-06-25 | 佛山科学技术学院 | Image feature storing method, image searching method and device based on compressive sensing |
CN106981058A (en) * | 2017-03-29 | 2017-07-25 | 武汉大学 | A kind of optics based on sparse dictionary and infrared image fusion method and system |
CN108491868A (en) * | 2018-03-12 | 2018-09-04 | 广东工业大学 | A kind of image processing method and device based on k-means cluster and dictionary learning |
US20200019817A1 (en) * | 2018-07-11 | 2020-01-16 | Harbin Institute Of Technology | Superpixel classification method based on semi-supervised k-svd and multiscale sparse representation |
Non-Patent Citations (1)
Title |
---|
QINGQING MENG等: ""Sparse representation and reconstruction of image based on K-SVD dictionary learning"", 《2020 INTERNATIONAL CONFERENCE ON INTELLIGENT COMPUTING, AUTOMATION AND SYSTEMS (ICICAS)》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428873A (en) * | 2022-04-07 | 2022-05-03 | 源利腾达(西安)科技有限公司 | Thoracic surgery examination data sorting method |
CN114428873B (en) * | 2022-04-07 | 2022-06-28 | 源利腾达(西安)科技有限公司 | Thoracic surgery examination data sorting method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110599409B (en) | Convolutional neural network image denoising method based on multi-scale convolutional groups and parallel | |
Schlemper et al. | A deep cascade of convolutional neural networks for dynamic MR image reconstruction | |
CN107730451B (en) | Compressed sensing reconstruction method and system based on depth residual error network | |
Candes et al. | Enhancing sparsity by reweighted ℓ 1 minimization | |
CN109870729B (en) | Deep neural network magnetic resonance signal denoising method based on discrete cosine transform | |
CN107016656B (en) | Wavelet sparse basis optimization method in image reconstruction based on compressed sensing | |
CN106204482B (en) | Based on the mixed noise minimizing technology that weighting is sparse | |
CN111667444B (en) | Image compressed sensing reconstruction method based on multi-channel residual error network | |
CN105787895B (en) | Statistics compressed sensing image reconstructing method based on Hierarchical GMM | |
Xu et al. | Sparse coding with adaptive dictionary learning for underdetermined blind speech separation | |
Liu et al. | Mixed noise removal via robust constrained sparse representation | |
CN105488767B (en) | A kind of compressed sensing image fast reconstructing method based on Least-squares minimization | |
CN113112003A (en) | Data amplification and deep learning channel estimation performance improvement method based on self-encoder | |
Li et al. | Signal denoising with random refined orthogonal matching pursuit | |
CN113223032A (en) | Double-sparse decomposition-based complex image Canny edge detection method | |
Lin et al. | A Fourier domain training framework for convolutional neural networks based on the Fourier domain pyramid pooling method and Fourier domain exponential linear unit | |
CN114283058A (en) | Image super-resolution reconstruction method based on countermeasure network and maximum mutual information optimization | |
CN117076858B (en) | Deep learning-based low-frequency geomagnetic strong interference suppression method and system | |
CN108090914B (en) | Color image segmentation method based on statistical modeling and pixel classification | |
Cao et al. | Sparse representation of classified patches for CS-MRI reconstruction | |
CN111243047B (en) | Image compression sensing method based on self-adaptive nonlinear network and related product | |
Shastri et al. | Denoising generalized expectation-consistent approximation for MR image recovery | |
CN109188327B (en) | Magnetic resonance image fast reconstruction method based on tensor product complex small compact framework | |
CN109658467B (en) | Endoscope image sensing reconstruction method based on multi-dictionary improved compressed sensing framework | |
CN109584190B (en) | Contrast image enhancement method based on wavelet transformation low-frequency histogram limitation |
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 |