CN111127498B - Canny edge detection method based on edge self-growth - Google Patents

Canny edge detection method based on edge self-growth Download PDF

Info

Publication number
CN111127498B
CN111127498B CN201911275163.XA CN201911275163A CN111127498B CN 111127498 B CN111127498 B CN 111127498B CN 201911275163 A CN201911275163 A CN 201911275163A CN 111127498 B CN111127498 B CN 111127498B
Authority
CN
China
Prior art keywords
value
point
edge
gradient
image
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.)
Active
Application number
CN201911275163.XA
Other languages
Chinese (zh)
Other versions
CN111127498A (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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN201911275163.XA priority Critical patent/CN111127498B/en
Publication of CN111127498A publication Critical patent/CN111127498A/en
Application granted granted Critical
Publication of CN111127498B publication Critical patent/CN111127498B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/181Segmentation; Edge detection involving edge growing; involving edge linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20004Adaptive image processing

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 based on edge self-growth, and belongs to the field of computers. The method comprises the following steps: 1) Smoothing filtering processing is carried out on the image, and Gaussian filtering is used for removing noise; 2) Calculating gradient amplitude values and directions in four directions of an image by using eight neighborhood operators, and synthesizing the gradient amplitude values and directions into a horizontal direction and a vertical direction by using a coordinate projection mode; 3) Performing non-maximum suppression calculation on the edge by utilizing the gradient direction, and suppressing non-edge points; 4) Calculating a high-low threshold value by using otsu; 5) Preliminarily obtaining edges by using the high and low threshold values; 6) And (5) performing fracture edge completion by using a self-growing algorithm to obtain a final edge image. The algorithm of the invention not only can obviously complement the defective edge to obtain a complete edge, but also can be applied to other edge detection operators, and has stronger practicability.

Description

Canny edge detection method based on edge self-growth
Technical Field
The invention belongs to the field of computers, and relates to a Canny edge detection method based on edge self-growth.
Background
Edge detection is a fundamental problem in image processing and computer vision, the purpose of which is to identify points in a digital image where the brightness changes significantly. The image edge detection greatly reduces the data volume, eliminates information which can be considered as irrelevant, reserves important structural attributes of the image, and has important influence on subsequent researches such as feature extraction, description, target identification and the like. Since the gray level changes on the edge are gentle and the gray level changes on both sides of the edge are faster, the edge of the image generally refers to the image feature with local discontinuity, the edge is the most significant part of the change, and the change of gray level, the abrupt change of color components and the abrupt change of texture structure can all form edge information. In general, the gray level change of the image can be represented by gradients, and the gradients are described by a first-order differential operator and a second-order differential operator, and then the detected gradients are selected and removed by a thresholding method. The operator algorithms are simple, have good instantaneity, but are more easily influenced by noise and threshold selection to generate false edges and edge disconnection, so that the edge positioning accuracy is influenced, and because edge detection is the basis of the digital image processing field, the inaccuracy of the edge detection can also influence a large number of other algorithms, and all researches on the image edge detection still have very important significance.
The conventional canny algorithm mainly has the following problems:
1) The traditional edge detection operator only detects the horizontal direction and the vertical direction, and lacks detection on edges in the diagonal direction;
2) The threshold value is set empirically, so that the self-adaption capability is poor;
3) The detected edge is broken, so that an incomplete phenomenon appears in the edge image.
Disclosure of Invention
In view of the above, the present invention aims to provide a Canny edge detection method based on edge self-growth.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a Canny edge detection method based on edge self-growth comprises the following steps:
1) Smoothing and filtering the image, and removing noise by Gaussian filtering;
2) Calculating gradient amplitude values of gray values by using 0 degree, 45 degree, 90 degree and 135 degree operators, synthesizing the gradient amplitude values calculated by using the 45 degree, 135 degree operators to 0 degree, 90 degree by using coordinate axis projection, and then calculating gradient directions;
3) Performing non-maximum value inhibition calculation on a gradient value perpendicular to the gradient direction, comparing the gradient value with two adjacent gradient values, if the gradient value is the maximum value, considering an image point as a possible edge, and reserving the value, otherwise, considering the value as not an edge, and directly taking 0;
4) The maximum value of the inter-class variance is calculated by using an OTSU algorithm and is used as a high threshold value, and a low threshold value is half of the high threshold value;
5) Binarizing the gradient by using the high and low threshold values to obtain a preliminary binarized edge image;
6) And (5) performing fracture edge completion by using a self-growing algorithm to obtain a final edge image.
Optionally, the step 1) specifically includes:
the filtering operation is carried out on the original gray image by using a two-dimensional Gaussian filter, and the Gaussian filter function is expressed as follows
By convolving the original image f (x, y) with a gaussian filter, a filtered image g (x, y) is obtained, the process of which is expressed as:
g(x,y)=f(x,y)*H(x,y) (2)
in the actual digital image processing, sigma takes a value of 1.4, and when the Gaussian template is 5 multiplied by 5, the Gaussian kernel function is
Optionally, the step 2) specifically includes:
the gradient values in all directions are calculated by using convolution kernels respectively, and the specific calculation formula is as follows:
after gradient values in 4 directions are obtained, the gradient is synthesized in two directions of horizontal and vertical by utilizing the coordinate projection principle, and the calculation mode is as follows:
the gradient amplitude G (x, y) and the gradient angle theta (x, y) of the gray value of the current pixel point are calculated as follows:
θ(x,y)=arctan[G Y (x,y)/G X (x,y)] (11)。
optionally, in the step 3):
for a point (x, y) on the gradient magnitude image, a 3 x 3 matrix is formed with its surrounding pixels, the matrix value is
The condition for judging whether the point is a possible edge point is as follows:
when w (x, y) meets the conditions, the value is the maximum value, the value is reserved, and when the value does not meet the conditions, the value is directly taken to be zero, the suppression of the non-maximum value is completed, and a new gradient matrix G' is obtained.
Optionally, in the step 4):
the gray value of a certain point in the gray image with the size of m multiplied by n is f (x, y), the range of the gray value is [0, L ], and the probability of the pixel point with the gray value of k appears is shown as a formula (14)
Setting the threshold value as T (T is more than 0 and less than L-1), dividing the image into two parts, wherein the proportion of the first part to the whole image is
The proportion of the second part to the whole image is
The first part gray average value is
The gray average value of the second part is
The gray average value of the whole image is
μ=ω 0 (T)μ 0 (T)+ω 1 (T)μ 1 (T) (19)
The inter-class variance between the two parts is
Solving the inter-class variance for all values of T, so that the T value when the inter-class variance g (T) takes the maximum value is the optimal threshold, namely solving the high threshold T of the canny algorithm h =t, low threshold T l =0.5T。
Optionally, in the step 5):
for any point G '(x, y) in the gradient matrix G', 1 is directly taken when the gradient matrix G 'is larger than the high threshold value, and 0 is directly taken when the gradient matrix G' is smaller than the low threshold value, namely
When G' (x, y) takes a value between the high and low thresholds
Optionally, the step 6) specifically includes:
a. judging breaking points by global scanning;
traversing the whole image of the binarized edge image T using a window w of 3 x 3 size, wherein
The traversing mode is from left to right, from top to bottom, the step is 1, the possible edge breaking point pixel distribution of the edge after non-maximum suppression is shown in fig. 4, and it can be known from the graph that when w (x, y) =1, whether the point is a breaking point starts to be judged;
when the sum S (w) =2 of the matrix w, the breaking point is directly determined;
when S (w) =3, the determination condition is:
wherein S (w 2n ) Is the sum of the 2 nd row of the matrix w, S (w n1 )、S(w n3 ) Respectively, the 1 st column sum and the 3 rd column sum of the matrix w, S (w n2 ) Is the sum of the 2 nd columns of the matrix w, S (w 1n )、S(w 3n ) Row 1 and row 3 of matrix w, respectively; judging a breaking point when the conditions are satisfied;
when the w matrix satisfies the breaking point judgment condition, that is, the breaking point a (x a ,y b ) =w (x, y), step b is entered; otherwise, moving the window, re-taking the value of w, continuing to judge in the step a until the whole window is traversed, and entering the step d;
b. searching another breaking point by setting a radius;
because the window w traverses from top to bottom, the search for another break point around the break point may not be performed above the change point; the search mode is similar to step a, the window is still used for traversing to obtain a matrix w', and when the search radius is 15, the traversing row range of the window is [ x ] a ,x a +15]The column range is [ y ] a -15,y a +15]When w' satisfying the condition determined in step a exists in this range, that is, another breaking point exists, searching for all breaking points in the range, and comparing the distances between them and the point a, selecting the minimum distance b (x b ,y b ) =w (x ', y'), enter step c; otherwise, returning to the step a and moving the window without another breaking point;
c. edge self-growth;
for both ends of the break, i.e. a (x a ,y b )、b(x b ,y b ) The two points are connected in shortest distance; firstly, calculating the difference value of the row and column values of the points a and b
From the traversal pattern, x ab Not less than 0, when y ab When the position is more than or equal to 0, the b point is positioned right to the a point, and then the x is compared ab 、y ab If x is the value of ab ≥y ab Order in principle
If x ab <y ab Order in principle
When y is ab When the value is less than 0, the b point is positioned at the left side of the a point, and the x is compared ab 、y ab If x is the value of ab ≥|y ab General rule of I
If x ab <|y ab General rule of I
Returning to the step a and moving the window after the growth is completed;
d. complete growth and output
Entering this step indicates that the broken edge has completed the self-growing repair, and the binary matrix T at this time is the final edge image.
The invention has the beneficial effects that: the method can perfect the calculation direction of the gradient, can adaptively determine the threshold value of edge binarization, can perform self-growth completion on the broken edge, and can effectively improve the edge integrity.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention. The objects and other advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the specification.
Drawings
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in the following preferred detail with reference to the accompanying drawings, in which:
FIG. 1 is an overall algorithm flow chart;
FIG. 2 is an edge detection operator; fig. 2 (a) - (d) are convolution kernels for each direction operator of 0 °, 45 °, 90 ° and 135 °, respectively;
FIG. 3 is a flow chart of an edge self-growing algorithm;
fig. 4 shows a possible break point pixel distribution.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that the illustrations provided in the following embodiments merely illustrate the basic idea of the present invention by way of illustration, and the following embodiments and features in the embodiments may be combined with each other without conflict.
Wherein the drawings are for illustrative purposes only and are shown in schematic, non-physical, and not intended to limit the invention; for the purpose of better illustrating embodiments of the invention, certain elements of the drawings may be omitted, enlarged or reduced and do not represent the size of the actual product; it will be appreciated by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The same or similar reference numbers in the drawings of embodiments of the invention correspond to the same or similar components; in the description of the present invention, it should be understood that, if there are terms such as "upper", "lower", "left", "right", "front", "rear", etc., that indicate an azimuth or a positional relationship based on the azimuth or the positional relationship shown in the drawings, it is only for convenience of describing the present invention and simplifying the description, but not for indicating or suggesting that the referred device or element must have a specific azimuth, be constructed and operated in a specific azimuth, so that the terms describing the positional relationship in the drawings are merely for exemplary illustration and should not be construed as limiting the present invention, and that the specific meaning of the above terms may be understood by those of ordinary skill in the art according to the specific circumstances.
With reference to fig. 1, the invention provides a Canny edge detection algorithm based on edge self-growth, which comprises the following steps:
1) Smoothing the image, removing noise by Gaussian filtering:
the two-dimensional Gaussian filter is utilized to carry out filtering operation on the original gray image, gaussian filtering is very effective on Gaussian noise which is subjected to normal distribution, but too large Gaussian templates can generate smoothing effect on the image, and edge boundaries are gradually blurred, so that the Gaussian templates with proper sizes are required to be selected.
The Gaussian filter function is represented as follows
By convolving the original image f (x, y) with a gaussian filter, a filtered image g (x, y) is obtained, the process of which is expressed as:
g(x,y)=f(x,y)*H(x,y) (2)
in the actual digital image processing, sigma takes a value of 1.4, and when the Gaussian template is 5 multiplied by 5, the Gaussian kernel function is
2) Calculating gradient magnitudes of gray values by using 0 °, 45 °, 90 ° and 135 ° operators, synthesizing the gradient magnitudes calculated by using 45 °, 135 ° operators to 0 °, 90 ° by using coordinate axis projection, and then calculating gradient directions:
as shown in fig. 2 (a) - (d), the convolution kernels of the operators in each direction of 0 ° to 135 ° are respectively used to calculate gradient values in each direction, and the specific calculation formula is as follows:
after gradient values in 4 directions are obtained, the gradient can be synthesized in two directions of horizontal and vertical by utilizing the coordinate projection principle, and the calculation mode is as follows:
the gradient amplitude G (x, y) and the gradient angle theta (x, y) of the gray value of the current pixel point can be calculated according to the method, wherein the gradient amplitude G (x, y) and the gradient angle theta (x, y) are respectively as follows:
3) Performing non-maximum suppression calculation on a gradient value perpendicular to the gradient direction, comparing the value with two adjacent gradient values, if the value is a maximum value, considering the point as a possible edge, and reserving the value, otherwise, considering the value as not an edge, and directly taking 0:
for a point (x, y) on the gradient magnitude image, a 3×3 matrix can be formed with its surrounding pixels, the matrix having a value of
The condition for judging whether the point is a possible edge point is as follows:
when w (x, y) meets the conditions, the value is the maximum value, the value is reserved, and when the value does not meet the conditions, the value is directly taken to be zero, the suppression of the non-maximum value is completed, and a new gradient matrix G' is obtained.
4) The maximum value of the inter-class variance is calculated by using an OTSU algorithm and is used as a high threshold value, and a low threshold value is half of the high threshold value:
the gray value of a certain point in the gray image with the size of m multiplied by n is f (x, y), the range of the gray value is [0, L ], and the probability of the pixel point with the gray value of k appears is shown as a formula (14)
Setting the threshold value as T (T is more than 0 and less than L-1), dividing the image into two parts, wherein the proportion of the first part to the whole image is
The proportion of the second part to the whole image is
The first part gray average value is
The gray average value of the second part is
The gray average value of the whole image is
μ=ω 0 (T)μ 0 (T)+ω 1 (T)μ 1 (T) (19)
The inter-class variance between the two parts is
Solving the inter-class variance for all values of T, so that the T value when the inter-class variance g (T) takes the maximum value is the optimal threshold, namely solving the high threshold T of the canny algorithm h =t, low threshold T l =0.5T。
5) Binarizing the gradient by using the high and low threshold values to obtain a preliminary binarized edge image:
for any point G '(x, y) in the gradient matrix G', 1 is directly taken when the gradient matrix G 'is larger than the high threshold value, and 0 is directly taken when the gradient matrix G' is smaller than the low threshold value, namely
When G' (x, y) takes a value between the high and low thresholds
6) And (3) performing fracture edge completion by using a self-growing algorithm to obtain a final edge image:
the edge self-growing algorithm flow is shown in fig. 3, and the specific steps are as follows:
a. judging breaking points by global scanning;
traversing the whole image of the binarized edge image T using a window w of 3 x 3 size, wherein
The traversing method is that from left to right, from top to bottom, the step is 1, the possible edge breaking point pixel distribution of the edge after non-maximum suppression is shown in fig. 4, and it can be seen from the graph that when w (x, y) =1, it starts to determine whether the point is a breaking point.
When the sum S (w) =2 of the matrix w, the breaking point is directly determined;
when S (w) =3, the determination condition is:
wherein S (w 2n ) Is the sum of the 2 nd row of the matrix w, S (w n1 )、S(w n3 ) Respectively, the 1 st column sum and the 3 rd column sum of the matrix w, S (w n2 ) Is the sum of the 2 nd columns of the matrix w, S (w 1n )、S(w 3n ) Respectively row 1 and row 3 of the matrix w. When the above condition is satisfied, the fracture point is determined.
When the w matrix satisfies the breaking point judgment condition, that is, the breaking point a (x a ,y b ) =w (x, y), step b is entered; otherwise, moving the window, re-taking the value of w, continuing to judge in the step a until the whole window is traversed, and entering the step d.
b. Searching another breaking point by setting a radius;
since the window w is traversed in the order from top to bottom, it is unnecessary to search for another break point around the break point above the point. The search mode is similar to step a, the window is still used for traversing to obtain a matrix w', and when the search radius is 15, the traversing row range of the window is [ x ] a ,x a +15]The column range is [ y ] a -15,y a +15]When w' satisfying the condition determined in step a exists in this range, that is, another breaking point exists, searching for all breaking points in the range, and comparing the distances between them and the point a, selecting the minimum distance b (x b ,y b ) =w (x ', y'), enter step c; otherwise, another breaking point does not exist, returning to the step a and moving the window.
c. The edges self-grow.
For both ends of the break, i.e. a (x a ,y b )、b(x b ,y b ) The two points are connected in shortest distance. Firstly, calculating the difference value of the row and column values of the points a and b
From the traversal pattern, x ab Not less than 0, when y ab When the position is more than or equal to 0, the b point is positioned right to the a point, and then the x is compared ab 、y ab If x is the value of ab ≥y ab Order in principle
If x ab <y ab Order in principle
When y is ab When the value is less than 0, the b point is positioned at the left side of the a point, and the x is compared ab 、y ab If x is the value of ab ≥|y ab General rule of I
If x ab <|y ab General rule of I
And returning to the step a and moving the window after the growth is completed.
d. Complete growth and output
Entering this step indicates that the broken edge has completed the self-growing repair, and the binary matrix T at this time is the final edge image.
Examples
Finally, it is noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made thereto without departing from the spirit and scope of the present invention, which is intended to be covered by the claims of the present invention.

Claims (1)

1. A Canny edge detection method based on edge self-growth is characterized by comprising the following steps: the method comprises the following steps:
1) Smoothing and filtering the image, and removing noise by Gaussian filtering;
2) Calculating gradient amplitude values of gray values by using 0 degree, 45 degree, 90 degree and 135 degree operators, synthesizing the gradient amplitude values calculated by using the 45 degree, 135 degree operators to 0 degree, 90 degree by using coordinate axis projection, and then calculating gradient directions;
3) Performing non-maximum value inhibition calculation on a gradient value A perpendicular to the gradient direction, comparing the gradient value A with two adjacent gradient values, if the gradient value A is the maximum value, considering an image point as a possible edge, and reserving the value, otherwise, considering the gradient value A as not an edge, and directly taking 0;
4) The maximum value of the inter-class variance is calculated by using an OTSU algorithm and is used as a high threshold, and a low threshold is half of the high threshold;
5) Binarizing the gradient by using a high threshold value and a low threshold value to obtain a preliminary binarized edge image;
6) Performing fracture edge completion by using a self-growing algorithm to obtain a final edge image;
the step 1) specifically comprises the following steps:
the filtering operation is carried out on the original gray image by using a two-dimensional Gaussian filter, and the Gaussian filter function is expressed as follows
By convolving the original image f (x, y) with a gaussian filter function, a filtered image g (x, y) is obtained, the process of which is expressed as:
g(x,y)=f(x,y)*H(x,y) (2)
in the actual digital image processing, sigma takes a value of 1.4, and when the Gaussian template is 5 multiplied by 5, the Gaussian kernel function is
The step 2) specifically comprises the following steps:
the gradient values in all directions are calculated by using convolution kernels respectively, and the specific calculation formula is as follows:
after gradient values in 4 directions are obtained, the gradient is synthesized in two directions of horizontal and vertical by utilizing the coordinate projection principle, and the calculation mode is as follows:
the gradient amplitude G (x, y) and the gradient angle theta (x, y) of the gray value of the current pixel point are calculated as follows:
θ(x,y)=arctan[G Y (x,y)/G X (x,y)] (11)
in the step 3):
for one point (x, y) on the gradient amplitude image, a 3×3 matrix is formed by the point (x, y) and surrounding pixels, wherein the matrix is
The condition for judging whether the point is a possible edge point is as follows:
when w (x, y) meets the conditions, the value is the maximum value, the value is reserved, and when the value does not meet the conditions, the value is directly taken to be zero, the suppression of the non-maximum value is completed, and a new gradient matrix G' is obtained;
in the step 4):
the gray value of a certain point in the gray image with the size of m multiplied by n is f (x, y), the range of the gray value is [0, L ], and the probability of the pixel point with the gray value of k is shown as a formula (14):
setting the threshold value as T, T is more than 0 and less than L-1, dividing the image into two parts, wherein the proportion of the first part to the whole image is
The proportion of the second part to the whole image is
The first part gray average value is
The gray average value of the second part is
The gray average value of the whole image is
μ=ω 0 (T)μ 0 (T)+ω 1 (T)μ 1 (T) (19)
The inter-class variance between the two parts is
Solving the inter-class variance for all values of T, so that the T value when the inter-class variance g (T) takes the maximum value is the optimal threshold, namely solving the high threshold T of the canny algorithm h =t, low threshold T l =0.5T;
In the step 5):
for any point G '(x, y) in the gradient matrix G', 1 is directly taken when the point G 'is larger than the high threshold value, and 0 is directly taken when the point G' is smaller than the low threshold value, namely
When G' (x, y) takes a value between the high and low thresholds
The step 6) is specifically as follows:
a. judging breaking points by global scanning;
traversing the whole image of the binarized edge image T by using a matrix w with the size of 3 multiplied by 3, wherein
The traversing mode is from left to right, from top to bottom, the step is 1, for the possible edge breaking point pixel distribution of the edge after non-maximum value inhibition, when w (x, y) =1, the judgment of whether the point is a breaking point is started;
when the sum S (w) =2 of the matrix w, the breaking point is directly determined;
when S (w) =3, the determination condition is:
wherein S (w 2n ) Is the sum of the 2 nd row of the matrix w, S (w n1 )、S(w n3 ) Respectively, the 1 st column sum and the 3 rd column sum of the matrix w, S (w n2 ) Is the sum of the 2 nd columns of the matrix w, S (w 1n )、S(w 3n ) Row 1 and row 3 of matrix w, respectively; judging a breaking point when the conditions are satisfied;
when the matrix w satisfies the breaking point judgment condition, that is, the breaking point a (x a ,y a ) =w (x, y), step b is entered; otherwise, moving the window, re-taking the value of w, continuing to judge in the step a until the whole window is traversed, and entering the step d;
b. searching another breaking point by setting a radius;
because the window w traverses from top to bottom, the other breaking point around the breaking point is searched without searching above the point; the search mode is similar to step a, the window is still used for traversing to obtain a matrix w', and when the search radius is 15, the traversing row range of the window is [ x ] a ,x a +15]The column range is [ y ] a -15,y a +15]When a matrix w' meeting the judgment condition of the breaking point in the step a exists in the range, namely another breaking point exists, searching all breaking points in the range, comparing the distances between the breaking points and the point a, and selecting the minimum distance to obtain a breaking point b (x) b ,y b ) =w ' (x ', y '), enter step c; otherwise, returning to the step a and moving the window without another breaking point;
c. edge self-growth;
for both ends of the break, i.e. a (x a ,y b )、b(x b ,y b ) The two points are connected in shortest distance; firstly, calculating the difference value of the row and column values of the points a and b
Knowing x by traversal ab Not less than 0, when y ab When the position is more than or equal to 0, the b point is positioned right to the a point, and then the x is compared ab 、y ab If x is the value of ab ≥y ab Order in principle
If x ab <y ab Order in principle
When y is ab When the value is less than 0, the b point is positioned at the left side of the a point, and the x is compared ab 、y ab If x is the value of ab ≥|y ab General rule of I
If x ab <|y ab General rule of I
Returning to the step a and moving the window after the growth is completed;
d. complete growth and output
Entering this step indicates that the broken edge has completed the self-growing repair, and the binary matrix T at this time is the final edge image.
CN201911275163.XA 2019-12-12 2019-12-12 Canny edge detection method based on edge self-growth Active CN111127498B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911275163.XA CN111127498B (en) 2019-12-12 2019-12-12 Canny edge detection method based on edge self-growth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911275163.XA CN111127498B (en) 2019-12-12 2019-12-12 Canny edge detection method based on edge self-growth

Publications (2)

Publication Number Publication Date
CN111127498A CN111127498A (en) 2020-05-08
CN111127498B true CN111127498B (en) 2023-07-25

Family

ID=70499942

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911275163.XA Active CN111127498B (en) 2019-12-12 2019-12-12 Canny edge detection method based on edge self-growth

Country Status (1)

Country Link
CN (1) CN111127498B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112070792B (en) * 2020-08-25 2023-10-17 清华大学 Edge growth connection method and device for image segmentation
CN113627445B (en) * 2021-08-05 2023-08-15 福州大学 Formation planning system and method for multi-unmanned aerial vehicle aerial media
CN113870293B (en) * 2021-09-27 2022-10-14 东莞拓斯达技术有限公司 Image processing method, image processing device, electronic equipment and storage medium
CN115131387B (en) * 2022-08-25 2023-01-24 山东鼎泰新能源有限公司 Gasoline engine spray wall collision parameter automatic extraction method and system based on image processing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014177953A1 (en) * 2013-04-29 2014-11-06 Koninklijke Philips N.V. De-noised reconstructed image data edge improvement
CN105678760A (en) * 2016-01-04 2016-06-15 国家电网公司 Method for recognizing insulator image on the basis of Canny edge detection algorithm
AU2016101504A4 (en) * 2016-08-15 2016-09-29 Macau University Of Science And Technology Method for edge detection
CN107392930A (en) * 2017-08-07 2017-11-24 重庆邮电大学 A kind of quantum Canny edge detection methods
CN108109155A (en) * 2017-11-28 2018-06-01 东北林业大学 A kind of automatic threshold edge detection method based on improvement Canny
CN110428433A (en) * 2019-07-02 2019-11-08 西华师范大学 A kind of Canny edge detection algorithm based on local threshold

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101286233B (en) * 2008-05-19 2010-06-30 重庆邮电大学 Fuzzy edge detection method based on object cloud
CN102270299B (en) * 2011-08-24 2013-06-12 复旦大学 Edge connection algorithm realized in parallel based on breakpoints
US9412176B2 (en) * 2014-05-06 2016-08-09 Nant Holdings Ip, Llc Image-based feature detection using edge vectors
CN108022233A (en) * 2016-10-28 2018-05-11 沈阳高精数控智能技术股份有限公司 A kind of edge of work extracting method based on modified Canny operators
CN106845495B (en) * 2016-12-30 2019-05-24 浙江工业大学 Broken curve method of closing in a kind of image
CN108470343A (en) * 2017-02-23 2018-08-31 南宁市富久信息技术有限公司 A kind of improved method for detecting image edge
CN107220988B (en) * 2017-04-30 2020-09-18 南京理工大学 Part image edge extraction method based on improved canny operator
WO2019041590A1 (en) * 2017-08-31 2019-03-07 中国科学院微电子研究所 Edge detection method using arbitrary angle
CN109325935B (en) * 2018-07-24 2022-02-22 国网浙江省电力有限公司杭州供电公司 Power transmission line detection method based on unmanned aerial vehicle image
CN109360217A (en) * 2018-09-29 2019-02-19 国电南瑞科技股份有限公司 Power transmission and transforming equipment method for detecting image edge, apparatus and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014177953A1 (en) * 2013-04-29 2014-11-06 Koninklijke Philips N.V. De-noised reconstructed image data edge improvement
CN105678760A (en) * 2016-01-04 2016-06-15 国家电网公司 Method for recognizing insulator image on the basis of Canny edge detection algorithm
AU2016101504A4 (en) * 2016-08-15 2016-09-29 Macau University Of Science And Technology Method for edge detection
CN107392930A (en) * 2017-08-07 2017-11-24 重庆邮电大学 A kind of quantum Canny edge detection methods
CN108109155A (en) * 2017-11-28 2018-06-01 东北林业大学 A kind of automatic threshold edge detection method based on improvement Canny
CN110428433A (en) * 2019-07-02 2019-11-08 西华师范大学 A kind of Canny edge detection algorithm based on local threshold

Also Published As

Publication number Publication date
CN111127498A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
CN111127498B (en) Canny edge detection method based on edge self-growth
CN110717489B (en) Method, device and storage medium for identifying text region of OSD (on Screen display)
CN115272346A (en) PCB production process online detection method based on edge detection
CN110197153B (en) Automatic wall identification method in house type graph
CN112288693B (en) Round hole detection method and device, electronic equipment and storage medium
CN108830832A (en) A kind of plastic barrel surface defects detection algorithm based on machine vision
CN108182383B (en) Vehicle window detection method and device
CN114399522A (en) High-low threshold-based Canny operator edge detection method
CN104376319B (en) A kind of method based on anisotropic Gaussian core extraction closed edge image outline
CN108445009B (en) Crack detection method for solar cell panel
CN105741281B (en) Method for detecting image edge based on neighborhood dispersion
CN112528868B (en) Illegal line pressing judgment method based on improved Canny edge detection algorithm
CN109544577B (en) Improved straight line extraction method based on edge point grouping
CN116740072B (en) Road surface defect detection method and system based on machine vision
CN116109637B (en) System and method for detecting appearance defects of turbocharger impeller based on vision
CN113744142B (en) Image restoration method, electronic device and storage medium
CN107832732B (en) Lane line detection method based on treble traversal
CN107808165B (en) Infrared image matching method based on SUSAN corner detection
CN102509265A (en) Digital image denoising method based on gray value difference and local energy
CN109064420B (en) Multilayer PCB section image process parameter extraction method
CN113011498B (en) Feature point extraction and matching method, system and medium based on color image
CN113744200B (en) Camera dirt detection method, device and equipment
CN115880228A (en) Multi-defect merging method and device, computer equipment and storage medium
CN109949245B (en) Cross laser detection positioning method and device, storage medium and computer equipment
CN111105408B (en) Building surface crack detection method and system based on image processing

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