CN111161296A - Multi-scale edge detection method based on discrete wavelet transform - Google Patents

Multi-scale edge detection method based on discrete wavelet transform Download PDF

Info

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
Application number
CN201911408070.XA
Other languages
Chinese (zh)
Other versions
CN111161296B (en
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.)
Wuhu Hit Robot Technology Research Institute Co Ltd
Original Assignee
Wuhu Hit Robot Technology Research Institute Co Ltd
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 Wuhu Hit Robot Technology Research Institute Co Ltd filed Critical Wuhu Hit Robot Technology Research Institute Co Ltd
Priority to CN201911408070.XA priority Critical patent/CN111161296B/en
Publication of CN111161296A publication Critical patent/CN111161296A/en
Application granted granted Critical
Publication of CN111161296B publication Critical patent/CN111161296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge 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 point
Figure DDA0002349214810000011
And tracing the contour to the starting point
Figure DDA0002349214810000012
Marking is carried out; s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer image
Figure DDA0002349214810000013
If there are weak edge points
Figure DDA0002349214810000014
And the starting point of contour tracing
Figure DDA0002349214810000015
If 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 points
Figure DDA0002349214810000016
And the starting point of contour tracing
Figure DDA0002349214810000017
There 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

Multi-scale edge detection method based on discrete wavelet transform
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 point
Figure BDA0002349214790000021
And tracing the contour to the starting point
Figure BDA0002349214790000022
Marking is carried out;
s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer image
Figure BDA0002349214790000023
If weak edge point
Figure BDA0002349214790000024
And the starting point of contour tracing
Figure BDA0002349214790000025
The 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 judged
Figure BDA0002349214790000026
And the starting point of contour tracing
Figure BDA0002349214790000027
There 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:
Figure BDA0002349214790000031
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 quantity
Figure BDA0002349214790000041
As a contour tracing starting point, and tracing the contour tracing starting point
Figure BDA0002349214790000042
Marking is carried out;
s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer image
Figure BDA0002349214790000043
If weak edge point
Figure BDA0002349214790000044
And the starting point of contour tracing
Figure BDA0002349214790000045
The 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 judged
Figure BDA0002349214790000046
And the starting point of contour tracing
Figure BDA0002349214790000047
There is an edge therebetween, and step S2 is executed if the current contour traces the starting point
Figure BDA0002349214790000048
If 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 points
Figure BDA0002349214790000049
And weak edge point
Figure BDA00023492147900000410
The determination formula of whether there is an edge therebetween is as follows:
Figure BDA00023492147900000411
wherein,
Figure BDA00023492147900000412
is to measure weak edge points
Figure BDA00023492147900000413
And
Figure BDA00023492147900000414
whether there is an identifier of an edge between, when there is a weak edge point
Figure BDA00023492147900000415
And
Figure BDA00023492147900000416
when a real edge exists between the two edges, the value is 1, otherwise, the value is 0,
Figure BDA00023492147900000417
measure weak edge points
Figure BDA00023492147900000418
Whether 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 point
Figure BDA00023492147900000419
The 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 point
Figure BDA00023492147900000420
There are no strong edge points in the neighborhood of the l-th layer image,
Figure BDA00023492147900000421
measure weak edge points
Figure BDA00023492147900000422
Whether 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 point
Figure BDA00023492147900000423
The 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 point
Figure BDA00023492147900000424
There are no strong edge points in the neighborhood of the l-th layer image,
Figure BDA00023492147900000425
measure weak edge points
Figure BDA00023492147900000426
And
Figure BDA00023492147900000427
whether 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 represented
Figure BDA0002349214790000051
And
Figure BDA0002349214790000052
adjacent 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 points
Figure BDA0002349214790000053
And
Figure BDA0002349214790000054
and 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 points
Figure BDA0002349214790000055
The neighborhood of (A) is defined as a weak edge point
Figure BDA0002349214790000056
In 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:
Figure BDA0002349214790000057
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 point
Figure FDA0002349214780000011
And tracing the contour to the starting point
Figure FDA0002349214780000012
Marking is carried out;
s3, finding weak edge points with strong edge points in the neighborhood of the l-th layer image
Figure FDA0002349214780000013
If weak edge point
Figure FDA0002349214780000014
And the starting point of contour tracing
Figure FDA0002349214780000015
Not 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 determined
Figure FDA0002349214780000016
And the starting point of contour tracing
Figure FDA0002349214780000017
There 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:
Figure FDA0002349214780000021
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.
CN201911408070.XA 2019-12-31 2019-12-31 Multi-scale edge detection method based on discrete wavelet transformation Active CN111161296B (en)

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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094999A (en) * 2023-10-19 2023-11-21 南京航空航天大学 Cross-scale defect detection method

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
陶玲,王惠南,田芝亮: "磁共振图像的一种多尺度边缘检测算法" *

Cited By (2)

* Cited by examiner, † Cited by third party
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