CN111161296A - Multi-scale edge detection method based on discrete wavelet transform - Google Patents
Multi-scale edge detection method based on discrete wavelet transform Download PDFInfo
- Publication number
- CN111161296A CN111161296A CN201911408070.XA CN201911408070A CN111161296A CN 111161296 A CN111161296 A CN 111161296A CN 201911408070 A CN201911408070 A CN 201911408070A CN 111161296 A CN111161296 A CN 111161296A
- Authority
- CN
- China
- Prior art keywords
- image
- weak
- edge
- weak edge
- point
- 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.)
- Granted
Links
- 238000003708 edge detection Methods 0.000 title claims abstract description 28
- 238000000034 method Methods 0.000 title claims abstract description 20
- 230000001629 suppression Effects 0.000 claims abstract description 9
- 230000009466 transformation Effects 0.000 claims description 6
- 238000000844 transformation Methods 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000001514 detection method Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
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
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 discloses a multi-scale edge detection method based on discrete wavelet transform, which comprises the following steps: s1, continuously carrying out two discrete wavelet transforms on the non-maximum value suppression image; s2 using the unmarked weak edge point with the largest information amount as the current contour tracing starting pointAnd tracing the contour to the starting pointMarking is carried out; s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer imageIf there are weak edge pointsAnd the starting point of contour tracingIf the first layer image is not adjacent to the second layer image but adjacent to the first layer image in the (l + 1) th layer image and strong edge points exist in the neighborhood, judging the weak edge pointsAnd the starting point of contour tracingThere is an edge therebetween, and step S2 is performed. The method provides a higher-accuracy contour tracking mode, reduces false edges, and can detect the missing real edges of the traditional lag boundary tracking algorithm.
Description
Technical Field
The invention belongs to the technical field of image edge detection, and particularly relates to a multi-scale edge detection method based on discrete wavelet transform.
Background
Edge detection is an indispensable link before image analysis and identification, and is one of important fields of research and application of the current image processing technology. The edge detection is widely applied to the technical fields of product appearance detection, part defect detection, face identification, fingerprint identification and the like. The traditional edge detection operators are many and can be divided into a first order differential operator and a second order differential operator. The Canny edge detection algorithm is a recognized optimal edge detection operator. Although the Sobel operator has higher edge detection efficiency than Canny, the Sobel operator cannot accurately locate the edge and has poor fine texture processing. Therefore, under the condition of high requirement on the quality of edge detection, the Canny edge detection algorithm is most widely applied. The Canny algorithm has the advantage of being less susceptible to noise, using two different thresholds to detect strong and weak edges, respectively, and including the weak edge in the output image only when the weak and strong edges are connected.
The conventional Canny algorithm is divided into four steps in total: 1. carrying out noise reduction processing on the image by Gaussian filtering; 2. calculating the magnitude and direction of the gradient by using the finite difference of the first-order partial derivatives; 3. carrying out non-maximum suppression on the gradient amplitude to form a non-maximum suppression image; 4. and (4) detecting and tracking the contour by using a dual-threshold algorithm. In order to further improve the accuracy of the Canny edge detection algorithm, a large amount of research is carried out by scholars at home and abroad. The optimization core of the edge detection algorithm is to detect more real edges and reduce the detected false edges. However, the traditional contour tracing algorithm may miss out a part of real edges with low gradient amplitude when performing boundary tracing and the effect of contour tracing affected by noise is not ideal.
Disclosure of Invention
The invention provides a multi-scale edge detection method based on discrete wavelet transform, aiming at improving the detection precision of image edge detection.
The invention is realized in this way, a multi-scale edge detection method based on discrete wavelet transform, the method specifically includes the following steps:
s1, continuously performing two discrete wavelet transformations on the non-maximum value suppression image, and assuming that the original image of the non-maximum value suppression image is on the l-th layer, obtaining two higher-level images after the two continuous discrete wavelet transformations, namely the l + 1-th layer image and the l + 2-th layer image respectively;
s2 using the unmarked weak edge point with the largest information amount as the current contour tracing starting pointAnd tracing the contour to the starting pointMarking is carried out;
s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer imageIf weak edge pointAnd the starting point of contour tracingThe images of the l layer are not adjacent to each other, the images of the l +1 layer are adjacent to each other, and strong edge points exist in the adjacent domains of the l +1 layer, and then the weak edge points are judgedAnd the starting point of contour tracingThere is an edge therebetween, and step S2 is performed.
Further, the information amount of the weak edge point information is judged based on the number of strong edge points in the neighborhood of the weak edge point and the local entropy of the image of the local area.
Further, the method for acquiring the weak edge point with the maximum information amount specifically comprises the following steps:
s21, calculating the number of strong edge points in each weak edge point neighborhood in the image, marking the weak edge point with the largest number of strong edge points, if the number n of the marked weak edge points is more than 1, executing a step S22, and if the number n of the marked weak edge points is equal to 1, judging the weak edge points to be the weak edge points with the largest information content;
s22, taking the marked weak edge point as a center, calculating the image local entropy of the local area where n x n is located, and judging the weak edge point with the maximum image local entropy as the weak edge point with the maximum information content;
further, the local entropy of the image is calculated by using formula (1), and the calculation formula (1) is specifically as follows:
wherein f (i, j) is the frequency of the appearance of the characteristic binary group, N is the image scale, and N is the length and width of the local image.
The multi-scale edge detection method based on discrete wavelet transform provided by the invention has the following beneficial effects: 1) tracking start point selection algorithm: the most important signal in the image signal is ensured to be used as an object for priority contour tracking, the influence of high-frequency noise mixed in the edge signal on contour tracking is avoided to a certain extent, false edges in the edge detection result are reduced, and the contour tracking effect of a contour tracking algorithm is improved; 2) multi-scale contour tracking algorithm: the corresponding relation between the low-level edge points and the high-level edge points is established in a wavelet transformation mode, missing detection edges meeting edge connection conditions are searched while low-level contour tracking is carried out through the corresponding relation, more image details with low gradient amplitude values are detected, more real edge points are effectively extracted by an algorithm, more closed real edges are found, and the edges of the images can be clearly extracted.
Drawings
Fig. 1 is a flowchart of a discrete wavelet transform-based multi-scale edge detection method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of discrete wavelet transform provided by the embodiment of the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be given in order to provide those skilled in the art with a more complete, accurate and thorough understanding of the inventive concept and technical solutions of the present invention.
Fig. 1 is a flowchart of a discrete wavelet transform-based multi-scale edge detection method according to an embodiment of the present invention, where the method specifically includes the following steps:
s1, continuously performing two discrete wavelet transforms on the non-maximum-value suppression image, assuming that the original image of the non-maximum-value suppression image is on the l-th layer, and obtaining two higher-level images after two continuous discrete wavelet transforms, which are the l + 1-th layer image and the l + 2-th layer image, respectively, as shown in fig. 2;
s2, marking the unmarked weak edge point with the largest information quantityAs a contour tracing starting point, and tracing the contour tracing starting pointMarking is carried out;
s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer imageIf weak edge pointAnd the starting point of contour tracingThe images of the l layer are not adjacent to each other, the images of the l +1 layer are adjacent to each other, and strong edge points exist in the adjacent domains of the l +1 layer, and then the weak edge points are judgedAnd the starting point of contour tracingThere is an edge therebetween, and step S2 is executed if the current contour traces the starting pointIf no edge exists between the weak edge points and all the weak edge points, executing step S2 until all the weak edge points are marked;
in an embodiment of the invention, weak edge pointsAnd weak edge pointThe determination formula of whether there is an edge therebetween is as follows:
wherein,is to measure weak edge pointsAndwhether there is an identifier of an edge between, when there is a weak edge pointAndwhen a real edge exists between the two edges, the value is 1, otherwise, the value is 0,measure weak edge pointsWhether an identifier of a strong edge point exists in the neighborhood of the l-th layer image or not, and when the value is 1, the identifier represents a weak edge pointThe identifier of the strong edge point exists in the neighborhood of the first layer image, and when the value is 0, the identifier represents the weak edge pointThere are no strong edge points in the neighborhood of the l-th layer image,measure weak edge pointsWhether an identifier of a strong edge point exists in the neighborhood of the l-th layer image or not, and when the value is 1, the identifier represents a weak edge pointThe identifier of the strong edge point exists in the neighborhood of the first layer image, and when the value is 0, the identifier represents the weak edge pointThere are no strong edge points in the neighborhood of the l-th layer image,measure weak edge pointsAndwhether the l +1 layer images are adjacent or not and whether strong edge points exist in all the neighborhoods or not are judged, and when the value of the strong edge points is 1, the weak edge points are representedAndadjacent in the l +1 layer image, strong edge points exist in the neighborhood, and the value of the strong edge points is zero, which represents the weak edge pointsAndand no strong edge points exist in the l +1 layer image or the periphery of the weak edge points.
In an embodiment of the invention, weak edge pointsThe neighborhood of (A) is defined as a weak edge pointIn the embodiment of the present invention, in the non-maximum-value-suppressed image, the strong edge point is an edge pixel point whose gradient value is generated based on the high threshold HT, and the weak edge point is an edge pixel point generated based on the low threshold LT, where LT is generally 0.4 HT.
In the embodiment of the present invention, the information amount of the weak edge point information is determined based on the number of the strong edge points in the neighborhood of the weak edge point, where the larger the number of the strong edge points in the neighborhood is, the larger the information amount of the weak edge point is, and when the number of the strong edge points in the neighborhood is the same, the information amount of the weak edge point is determined based on the local entropy of the image in the local region, and the larger the local entropy of the image is, the larger the information amount of the weak edge point is, the implementation method specifically includes the following steps:
s21, calculating the number of strong edge points in each weak edge point neighborhood in the image, marking the weak edge point with the largest number of strong edge points, if the number n of the marked weak edge points is more than 1, executing a step S22, and if the number n of the marked weak edge points is equal to 1, judging the weak edge points to be the weak edge points with the largest information content;
s22, taking the marked weak edge point as a center, calculating the image local entropy of the local area where n x n is located, and judging the weak edge point with the maximum image local entropy as the weak edge point with the maximum information content;
in the embodiment of the present invention, the image local entropy is calculated by using formula (1), and the calculation formula (1) is specifically as follows:
wherein f (i, j) is the frequency of occurrence of the feature binary group, the neighborhood gray level mean value of the image is selected as the spatial feature quantity of gray level distribution, the feature binary group is formed with the pixel gray level of the image and is marked as (i, j), wherein i represents the gray level value of the pixel (i is greater than or equal to 0 and less than or equal to 255), j represents the neighborhood gray level mean value (j is greater than or equal to 0 and less than or equal to 255), N is the scale of the image, and N is the length and width of the local image.
The multi-scale edge detection method based on discrete wavelet transform provided by the invention has the following beneficial effects: 1) the most important (largest information amount) signal in the image signal is used as an object for priority contour tracking, so that the influence of high-frequency noise mixed in the edge signal on contour tracking is avoided to a certain extent, false edges in an edge detection result are reduced, and the contour tracking effect of a contour tracking algorithm is improved; 2) the corresponding relation between the low-level edge points and the high-level edge points is established in a wavelet transformation mode, missing detection edges meeting edge connection conditions are searched while low-level contour tracking is carried out through the corresponding relation, more image details with low gradient amplitude values are detected, more real edge points are effectively extracted by an algorithm, more closed real edges are found, and the edges of the images can be clearly extracted.
The invention has been described above with reference to the accompanying drawings, it is obvious that the invention is not limited to the specific implementation in the above-described manner, and it is within the scope of the invention to apply the inventive concept and solution to other applications without substantial modification.
Claims (4)
1. A multi-scale edge detection method based on discrete wavelet transform is characterized by comprising the following steps:
s1, continuously performing two discrete wavelet transformations on the non-maximum value suppression image, wherein the original image of the non-maximum value suppression image is on the l-th layer, and two higher-level images obtained after the two continuous discrete wavelet transformations are respectively an l + 1-th layer image and an l + 2-th layer image;
s2 using the unmarked weak edge point with the largest information amount as the current contour tracing starting pointAnd tracing the contour to the starting pointMarking is carried out;
s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer imageIf weak edge pointAnd the starting point of contour tracingNot adjacent in the l layer image, but adjacent in the l +1 layer image, and all exist in the adjacent domain of the l +1 layerAt the strong edge point, the weak edge point is determinedAnd the starting point of contour tracingThere is an edge therebetween, and step S2 is performed.
2. The discrete wavelet transform-based multi-scale edge detection method as claimed in claim 1, wherein the information amount of the weak edge point information is determined based on the number of strong edge points in the neighborhood of the weak edge point and the local entropy of the image in the local region.
3. The discrete wavelet transform-based multi-scale edge detection method as claimed in claim 2, wherein the method for obtaining the weak edge point with the maximum information amount specifically comprises the following steps:
s21, calculating the number of strong edge points in each weak edge point neighborhood in the image, marking the weak edge point with the largest number of strong edge points, if the number n of the marked weak edge points is more than 1, executing a step S22, and if the number n of the marked weak edge points is equal to 1, judging the weak edge points to be the weak edge points with the largest information content;
s22, the image local entropy of the local region where n × n is located is calculated with the marked weak edge point as the center, and the weak edge point with the largest image local entropy is determined as the weak edge point with the largest information amount.
4. The discrete wavelet transform-based multi-scale edge detection method as claimed in claim 3, wherein the local entropy of the image is calculated by using formula (1), and the calculation formula (1) is specifically as follows:
wherein f (i, j) is the frequency of occurrence of the feature binary group, i represents the gray value of the pixel, j represents the mean value of the neighborhood gray, N is the scale of the image, and N is the length and width of the local image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911408070.XA CN111161296B (en) | 2019-12-31 | 2019-12-31 | Multi-scale edge detection method based on discrete wavelet transformation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911408070.XA CN111161296B (en) | 2019-12-31 | 2019-12-31 | Multi-scale edge detection method based on discrete wavelet transformation |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111161296A true CN111161296A (en) | 2020-05-15 |
CN111161296B CN111161296B (en) | 2023-04-25 |
Family
ID=70559745
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911408070.XA Active CN111161296B (en) | 2019-12-31 | 2019-12-31 | Multi-scale edge detection method based on discrete wavelet transformation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111161296B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117094999A (en) * | 2023-10-19 | 2023-11-21 | 南京航空航天大学 | Cross-scale defect detection method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040008904A1 (en) * | 2003-07-10 | 2004-01-15 | Samsung Electronics Co., Ltd. | Method and apparatus for noise reduction using discrete wavelet transform |
CN102081792A (en) * | 2010-12-30 | 2011-06-01 | 西北农林科技大学 | Multi-scale red jujube image crack edge detection method based on wavelet transformation |
CN102968798A (en) * | 2012-12-12 | 2013-03-13 | 北京航空航天大学 | SAR (Synthetic Aperture Radar) image sea-land segmentation method based on wavelet transform and OTSU threshold |
CN103440644A (en) * | 2013-08-08 | 2013-12-11 | 中山大学 | Multi-scale image weak edge detection method based on minimum description length |
CN104424653A (en) * | 2013-09-06 | 2015-03-18 | 冉骏 | Image edge detection method based on wavelet transformation |
-
2019
- 2019-12-31 CN CN201911408070.XA patent/CN111161296B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040008904A1 (en) * | 2003-07-10 | 2004-01-15 | Samsung Electronics Co., Ltd. | Method and apparatus for noise reduction using discrete wavelet transform |
CN102081792A (en) * | 2010-12-30 | 2011-06-01 | 西北农林科技大学 | Multi-scale red jujube image crack edge detection method based on wavelet transformation |
CN102968798A (en) * | 2012-12-12 | 2013-03-13 | 北京航空航天大学 | SAR (Synthetic Aperture Radar) image sea-land segmentation method based on wavelet transform and OTSU threshold |
CN103440644A (en) * | 2013-08-08 | 2013-12-11 | 中山大学 | Multi-scale image weak edge detection method based on minimum description length |
CN104424653A (en) * | 2013-09-06 | 2015-03-18 | 冉骏 | Image edge detection method based on wavelet transformation |
Non-Patent Citations (1)
Title |
---|
陶玲,王惠南,田芝亮: "磁共振图像的一种多尺度边缘检测算法" * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117094999A (en) * | 2023-10-19 | 2023-11-21 | 南京航空航天大学 | Cross-scale defect detection method |
CN117094999B (en) * | 2023-10-19 | 2023-12-22 | 南京航空航天大学 | Cross-scale defect detection method |
Also Published As
Publication number | Publication date |
---|---|
CN111161296B (en) | 2023-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110223296B (en) | Deformed steel bar surface defect detection method and system based on machine vision | |
CN109242853B (en) | PCB defect intelligent detection method based on image processing | |
Deng et al. | Image edge detection algorithm based on improved canny operator | |
CN105913415B (en) | A kind of image sub-pixel edge extracting method with extensive adaptability | |
CN102509300B (en) | Defect detection method and system | |
CN109919960B (en) | Image continuous edge detection method based on multi-scale Gabor filter | |
CN107220649A (en) | A kind of plain color cloth defects detection and sorting technique | |
CN112308872B (en) | Image edge detection method based on multi-scale Gabor first derivative | |
CN113971681A (en) | Edge detection method for belt conveyor in complex environment | |
Jia | Fabric defect detection based on open source computer vision library OpenCV | |
CN111161296A (en) | Multi-scale edge detection method based on discrete wavelet transform | |
CN118037715A (en) | Intelligent welding spot analysis optimization method and system for PCBA board | |
CN102313740B (en) | Solar panel crack detection method | |
CN117496109A (en) | Image comparison and analysis method and device, electronic equipment and storage medium | |
CN111178111A (en) | Two-dimensional code detection method, electronic device, storage medium and system | |
Yuhan et al. | Detection of road surface crack based on PYNQ | |
CN110298799B (en) | PCB image positioning correction method | |
Kong et al. | Adaptive image edge detection model using improved Canny algorithm | |
CN114266719A (en) | Hough transform-based product detection method | |
Niu et al. | Application of CEM algorithm in the field of tunnel crack identification | |
Chen et al. | An efficient and robust corner detection algorithm for furniture boards | |
Wang et al. | Fast adaptive threshold for the canny edge detector | |
Zheng et al. | A new local enhancement algorithm for small target detection based on top-hat transform | |
Sri et al. | Edge detection by using lookup table | |
Wu et al. | A newly improved canny algorithm of image edge detection |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |