CN104715487B - A kind of sub-pixel edge detection method based on Zernike pseudo-matrix - Google Patents

A kind of sub-pixel edge detection method based on Zernike pseudo-matrix Download PDF

Info

Publication number
CN104715487B
CN104715487B CN201510153151.5A CN201510153151A CN104715487B CN 104715487 B CN104715487 B CN 104715487B CN 201510153151 A CN201510153151 A CN 201510153151A CN 104715487 B CN104715487 B CN 104715487B
Authority
CN
China
Prior art keywords
edge
pixel
image
edge detection
sub
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
CN201510153151.5A
Other languages
Chinese (zh)
Other versions
CN104715487A (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.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN201510153151.5A priority Critical patent/CN104715487B/en
Publication of CN104715487A publication Critical patent/CN104715487A/en
Application granted granted Critical
Publication of CN104715487B publication Critical patent/CN104715487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Medicines Containing Antibodies Or Antigens For Use As Internal Diagnostic Agents (AREA)

Abstract

The invention discloses a kind of sub-pixel edge detection method based on Zernike pseudo-matrix, it is characterised in that comprises the following steps:S1:Processing of making an uproar is removed to input picture;S2:The image for completing denoising is subjected to pixel edge detection:S3:Sub-pixel edge detection is carried out to pending image using Zernike pseudo-matrix method:S4:The error compensation of marginal position is carried out to pending image:S5:The amendment actual edge of sub-pixel edge detection is obtained, the sub-pixel edge that all pixels of pending image are handled, completed with image in the way of S4 detects.The method that the present invention is carried improves the precision of sub-pixel edge, and reduce the computation complexity needed for detection edge to insensitive for noise.

Description

Sub-pixel edge detection method based on pseudo Zernike moment
Technical Field
The invention relates to the technical field of image processing, in particular to a sub-pixel edge detection method based on a pseudo Zernike moment.
Background
Along with the rapid development of economy in China, the degree of mechanization and intellectualization in the industrial field is rapidly improved, and the development space of the edge detection technology of the image is considerable. The edge detection technology based on computer vision has the advantages of high precision, high speed, non-contact, high automation degree and the like. Because the image edge contains a large amount of useful information, whether the edge detection result is accurate or not also has important influence on the processing of subsequent images, such as object registration, object size measurement, object detection and identification, and the like, accurate extraction of the image edge is important in a detection system based on computer vision. In a computer vision system, the accuracy of the system is in a qualitative proportion to the accuracy of edge detection, that is, if the accuracy of the position of edge detection of a target object is high, the amount of information extracted from the feature information of the object is large, and the result and accuracy of subsequent related processing are high. The most direct and effective method for improving the accuracy of the system is to improve the resolution of hardware of the system, but the cost required for improving the resolution of the hardware is higher, for example, the resolution of a camera 256 × 256 is improved to the resolution of 1024 × 1024, the cost required by the system is dozens of times of price, the resolution is improved by using a computer vision technology, and the cost of the system can be effectively reduced while the detection accuracy is improved.
The traditional edge detection operators are: the edge detection method comprises a Sobel edge detection operator, a Roberts edge detection operator, a Prewitt edge detection operator, a Log edge detection operator, a Canny edge detection operator and the like, wherein the edge detection accuracy is in a pixel level, namely, the positioning accuracy is one pixel. With the increasing demand for detection accuracy, pixel-level edge detection has not been able to meet the requirements of actual industrial production, and sub-pixel edge detection techniques have been proposed, for example, when the detection accuracy is 0.2 pixel, the resolution of the system is increased by 5 times.
In the prior art, patent No. CN101477685 discloses a sub-pixel level image detection method with depth of field part processing quality. The method comprises the steps of firstly carrying out layered calibration on a machine vision system, secondly carrying out interpolation calculation on an original image, realizing accurate positioning of the edge of a part through a coarse-fine two-step method, and finally calculating the shape and key size parameters of the part with the depth of field by utilizing the established mapping relation between each layer of the image and each layer of the part, and obtaining quality data through comparative analysis. Although the technology has a faster detection speed, the technology performs sub-pixel edge detection by using an interpolation method, and since the interpolation technology itself is easily affected by noise, the technology is also easily affected by noise, which causes the accuracy of edge detection to be reduced, and further affects the subsequent image processing performance.
In 2012, kaur et al proposed using pseudo-Zernike for Sub-pixel edge detection in the Sub-pixel edge detection using pseudo-Zernike moment. The technology firstly extracts and obtains images, performs pseudo-Zernike moment operation and secondly obtainsTaking edge direction parametersDistribution and edge direction parameter differential valuesThen, whether the edge pixel exists is judged according to a preset threshold value T. However, the sub-pixel edge detection is carried out by the pseudo-Zernike moments, although the technology is insensitive to noise, namely the influence of the noise is overcome, the technology uses a pseudo-Zernike calculation method, and the calculation speed is influenced due to the fact that the calculation complexity of the pseudo-Zernike moments is high.
Disclosure of Invention
The invention provides a new sub-pixel edge detection method based on a pseudo Zernike moment, aiming at the problems of low precision, sensitivity to noise, high calculation complexity and the like of the existing sub-pixel edge detection method, and the specific scheme is as follows:
a sub-pixel edge detection method based on a pseudo Zernike moment comprises the following steps:
s1: denoising an input image;
s2: carrying out pixel level edge detection on the image subjected to denoising treatment: taking a pixel to be processed in the image to be processed as a center, carrying out weighted operation on the gray levels of the pixels in four directions around the pixel point, carrying out edge detection in the horizontal and vertical directions, and carrying out pixel level edge detection on all the pixels of the image to be processed according to the mode;
s3: performing sub-pixel edge detection on an image to be processed by adopting a pseudo Zernike moment method: establishing an edge detection model, and carrying out the following processing on all pixels of an image to be processed: calculating an orthogonal complex polynomial of the pixel, calculating a coefficient of a pixel correlation moment by using a result of the orthogonal complex polynomial, calculating the magnitude of the correlation moment by using the coefficient of the correlation moment, calculating a parameter of an edge by using the result of the correlation moment, and calculating a real edge position of the pixel by using the edge parameter;
s4: and (3) carrying out error compensation of edge positions on the image to be processed: establishing an error compensation edge model, solving a pseudo Zernike moment of a pixel by using the model, and solving an edge position estimated value, an actual edge error and a theoretical edge error of the pixel by using an error compensation edge;
s5: and acquiring a corrected actual edge of the sub-pixel edge detection, and processing all pixels of the image to be processed according to the S4 mode to complete the sub-pixel edge detection of the image.
In the step S1, the denoising processing is performed on the input image in the following manner:
s11: respectively calculating gray level variances corresponding to four windows around a pixel by taking the pixel to be processed in the image to be processed as a center;
s12: finding out the window corresponding to the minimum gray variance and calculating the gray mean value;
s13: replacing the gray value of the central pixel with the calculated gray average value; and performing the above operation on all pixels of the image to be processed to finish denoising processing.
And S3, adopting the following algorithm when a pseudo Zernike moment method is adopted to carry out pixel edge detection on the image:
wherein: (n + 1)/pi is a normalized parameter, the symbol "+" represents the conjugate calculation of the complex number, theta is the angle between the edge and the x-direction, p is the distance from the center to the straight line, i.e., the position of the pixel edge, and V nm (ρ, θ) is an orthogonal integral kernel function, and the above parameters are expressed by the formula:V nm (ρ,θ)=R nm (ρ)e imθ complex polynomial R in polar coordinates nm (p) is defined as
Wherein, m is more than or equal to 0 and less than or equal to n, and arctan () is an arc tangent function.
In S4, the following method is specifically adopted for performing edge position error compensation on the image: and (3) correcting the edge moment of the pixel by adopting formulas (28) and (29) according to the established error compensation edge model:
where f' (x, y) is the gray value of the rotated image,
and (3) calculating the edge position rho of the pixel by using the error compensation edge and adopting a formula (30), and solving the actual edge and theoretical edge error E of the pixel by adopting a formula (31):
the actual edge error of the pixel and the theoretical edge error E are:
solving the actual edge position of the correction pixel uses the following formula
ρ′ R =ρ-E
Wherein rho' R Is the actual edge position of the pixel after correction, ρ is the actual edge error, and E is the edge error value.
The invention discloses a sub-pixel edge detection method based on a pseudo-Zernike moment, which comprises the steps of carrying out denoising treatment by using a Kuwahara filter, carrying out pixel-level edge detection by using a Sobel operator, carrying out pixel edge detection by using the pseudo-Zernike moment, and compensating an edge position by using error compensation.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the sub-pixel edge detection method based on pseudo Zernike moments according to the present invention;
FIG. 2 is a schematic diagram of denoising image pixels according to the present invention;
FIG. 3 (a) is a schematic diagram of a step edge model before rotation in a two-dimensional step edge model;
FIG. 3 (b) is a schematic diagram of a rotated step edge model in a two-dimensional step edge model;
FIG. 4 is a schematic diagram of an error-compensated edge model in accordance with the present invention;
FIG. 5 is a schematic diagram illustrating sub-pixel edge detection results of composite images from different angles according to the present invention;
FIG. 6 is a diagram illustrating the sub-pixel edge detection effect of an actual image according to the present invention.
Detailed Description
In order to make the technical solutions and advantages of the present invention clearer, the following makes a clear and complete description of the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention:
the invention firstly utilizes a Kuwahara filter to carry out denoising processing on an image, secondly utilizes a Sobel operator to carry out pixel-level edge detection, secondly utilizes a pseudo Zernike matrix to carry out pixel edge detection, and finally utilizes error compensation to compensate the edge position of the image, wherein the invention is characterized in that a method for carrying out sub-pixel edge detection by utilizing the pseudo Zernike matrix and a method for carrying out edge correction by utilizing edge position error compensation are the invention points of the invention.
A sub-pixel edge detection method based on pseudo-Zernike moments as shown in fig. 1 includes the following steps:
s1: and performing denoising processing on the input image.
If the input image contains noise, the pixel level edge detection result is influenced, so a Kuwahara filter is firstly applied to denoising the input image. The basic idea of the Kuwahara filter is to select four windows as shown in fig. 2, calculate the gray variance of each window, and then replace the gray value of the central pixel with the gray mean value corresponding to the window with the smallest variance, and the specific implementation steps are as follows:
s11: respectively calculating gray level variances corresponding to four windows around a pixel by taking the pixel to be processed in the image to be processed as a center;
s12: finding out the window corresponding to the minimum gray variance and calculating the gray mean value;
s13: replacing the gray value of the central pixel with the calculated gray average value; and performing the above operation on all pixels of the image to be processed to finish denoising processing.
S2: carrying out pixel level edge detection on the image subjected to denoising treatment: taking a pixel to be processed in the image to be processed as a center, carrying out weighted operation on the gray levels of the pixels in four directions around the pixel point, carrying out edge detection in the horizontal and vertical directions, and carrying out pixel level edge detection on all the pixels of the image to be processed according to the mode.
A typical Sobel operator detects edges from horizontal and vertical directions by taking a processed pixel as a center and then performing gray-scale weighting operation on pixels in 4 directions around the pixel point, and a specific calculation formula is as follows.
f′ x (x,y)=f(x-1,y+1)+2f(x,y+1)+f(x+1,y+1)
(1)
-f(x-1,y-1)-2f(x,y-1)-f(x+1,y-1)
f′ y (x,y)=f(x-1,y-1)+2f(x-1,y)+f(x-1,y+1)
(2)
-f(x+1,y-1)-2f(x+1,y)-f(x+1,y+1)
G[f′(x,y)]=|f′ x (x,y)|+|f′ y (x,y)| (3)
Wherein, f x ’(x,y)、f y ' (x, y) are the first differential in the x (horizontal) and y (vertical) directions, respectively, G [ f (x, y)]F (x, y) is the gray value of the input image, which is the sum of the gradients of the Sobel operator.
After the gradient G [ f (x, y) ] is obtained, a threshold constant T can be assumed to be set, and image binarization is performed, namely when G [ f (x, y) ] > T, the corresponding pixel point is set to be 0, otherwise, the corresponding pixel point is set to be 255 or 1, when the size of the constant T is adjusted to achieve the best effect, and the value of T is 10-30 in the invention.
S3: performing sub-pixel edge detection on an image to be processed by adopting a pseudo Zernike moment method: establishing an edge detection model, and carrying out the following processing on all pixels of an image to be processed: calculating an orthogonal complex polynomial of the pixel, calculating a coefficient of a correlation moment of the pixel by using a result of the orthogonal complex polynomial, calculating the magnitude of the correlation moment by using the coefficient of the correlation moment, calculating a parameter of an edge by using the result of the correlation moment, and calculating a real edge position of the pixel by using the edge parameter.
Since Ghosal et al proposed the use of Zernike moments for sub-pixel edge detection in 1993, over two decades of research have been carried out and have been studied deeply by scholars to obtain good edge detection effect. Because the pseudo-Zernike moments have the rotation invariance of the Zernike moments, the pseudo-Zernike moments can provide more feature vectors than the Zernike moments, and the pseudo-Zernike moments are insensitive to image noise than the traditional Zernike moments, the pixel edge detection is carried out by utilizing the pseudo-Zernike moments.
pseudo-Zernike moment principle: in a unit circle, for a digital image, zernike moments can be defined as,
wherein (n + 1)/pi is a normalized parameter, which represents conjugation, theta is an included angle between the edge and the x direction, rho is a distance from the center to the straight line and is also the position of the edge, and V is nm (p, theta) is an orthogonal integral kernel function, the above parameters are expressed by the formula,
V nm (ρ,θ)=R nm (ρ)e imθ (8)
complex polynomial R in polar coordinates nm (p) is defined as the number of,
wherein m is more than or equal to 0 and less than or equal to n.
The image pixel edge detection method based on the pseudo Zernike moment comprises the following specific steps:
in order to perform edge detection, an ideal edge detection model is established, which is described in detail in the following equation and fig. 3,
h and h + k are gray values of the left side and the right side of the straight line respectively, theta is an included angle between the edge and the x direction, and rho is the distance from the center to the straight line and is also the position of the edge.
The step edge model before rotation in FIG. 3 (a), and the step edge model after rotation in FIG. 3 (b)
For calculating the parameters of the edges, PZ, as shown in FIG. 3 00 、PZ 10 、PZ 11 、PZ 20 Four moments need to be calculated, and the invention only utilizes PZ 10 ,PZ 11 ,PZ 20 Three moments are calculated.
According to the step edge model of FIG. 3, the detailed steps of the present invention are as follows
(1) Calculating the orthogonal complex polynomial, wherein the calculation process is detailed in the following formula:
for convenience of calculation, let R 20 And R 10 And carrying out merging operation, wherein the calculation result is as follows:
R 20 +4R 10 =-5+10ρ 2 (14)
(2) Calculating PZ 11 ,PZ 20 +4PZ 10 The calculation process of the coefficient of (b) is detailed in the following formula,
the invention uses 5X 5 template to obtain PZ through calculation 11 ,PZ 20 +4PZ 10 The coefficients of the three moments are shown in the following table:
TABLE 1PZ 11 Real coefficient of moment CPZ 11R
0.0452 0.0226 0.0 -0.0226 -0.0452
0.0453 0.0226 0.0 -0.0226 -0.0453
0.0452 0.0226 0.0 -0.0226 -0.0452
0.0453 0.0226 0.0 -0.0226 -0.0453
0.0452 0.0226 0.0 -0.0226 -0.0452
TABLE 2 PZ 11 Imaginary coefficient of moment CPZ 11I
0.0452 0.0453 0.0452 0.0453 0.0452
0.0226 0.0226 0.0226 0.0226 0.0226
0.0 0.0 0.0 0.0 0.0
-0.0226 -0.0226 -0.0226 -0.0226 -0.0226
-0.0452 -0.0453 -0.0452 -0.0453 -0.0452
TABLE 3 PZ 20 +4PZ 10 Coefficient of moment CPZ 20 +4CPZ 10
0.1227 -0.0692 -0.1333 -0.0692 0.1227
-0.0692 -0.2613 -0.3255 -0.2613 -0.0692
-0.1333 -0.3255 -0.3893 -0.3255 -0.1573
-0.0692 -0.2613 -0.3255 -0.2613 -0.0692
0.1227 -0.0692 -0.1573 -0.0692 0.1227
(3) Then, PZ is obtained by the following formula 11 ,PZ 20 +4PZ 10
Where f (n, m) is the grayscale value of the pixel edge detected position.
(4) Solving the edge parameters, wherein the calculation process is detailed as follows,
(5) The parameters (p, theta) of the edge can be obtained by using the equations (22 to 24), and the actual edge is calculated by,
where x, y are the positions where the pixel-level edges are detected, N =25.
S4: and (3) carrying out error compensation on edge positions of the image to be processed: and establishing an error compensation edge model, solving the pseudo Zernike moment of the pixel by using the model, and solving the edge position, the actual edge error and the theoretical edge error of the pixel by using the error compensation edge.
The edge model in the prior art is based on a step edge model, but the actual edge is not a step model, because the actual image is blurred to a certain extent by a convex lens of a CCD-based camera, and the edge is not a step model even if the actual image is not blurred after the actual image passes through the convex lens, but the data is subjected to digital operations such as data A/D acquisition transformation, quantization and the like, so that the data obtained by performing sub-pixel edge detection by the prior art and the pseudo-Zernike moment introduced above is not accurate, and here, in order to improve the problem introduced above, the invention uses an edge error technology to reduce the influence caused by the model error.
To illustrate the edge error compensation principle, the present invention establishes an error compensation edge model with the model shown in fig. 4: in fig. 4, h is a background gradation value, h + Δ k is a gradation value of an excessive band, h + k is a gradation value of a target object, ρ 1 And ρ 2 Is the distance from the center of the unit circle to both edges. From the relationship of the various parameters in fig. 4, it can be deduced that,
where ρ is R Is the actual edge.
If let Δ k/k = λ, then this can be obtained from the above equation
ρ R =ρ 2 -λ(ρ 21 ) (27)
The above compensation edge model is used to solve the pseudo-Zernike moments, and then the modified moments are described in the following formula:
where f' (x, y) is the grayscale value of the rotated image.
The edge position p obtained by using the error compensation edge is expressed by the following formula,
the actual edge error and the theoretical edge error E are
Since the size of the template selected by the invention is 5 multiplied by 5, lambda can be 0.5, rho 1 ,ρ 2 Respectively taking-0.2 and 0.2. The corrected actual edge of the error compensation based sub-pixel edge detection is
ρ′ R =ρ-E (32)
S5: and acquiring a corrected actual edge of the sub-pixel edge detection, and processing all pixels of the image to be processed according to the S4 mode to finish the sub-pixel edge detection of the image.
Example (b):
the invention has the beneficial effects that: to verify the effectiveness of the present invention, computer simulation experiments were performed. In the experiment, the experiment parameters are CPU IntelR core i 3.4 GHz and 2G memory, the video card is ATI Mobility Ration HD 5470, the system is Window7 family version, and the software programming environment is Matlab2010b. The experimental images of the present invention were images using artificial synthesis and actual images, and the size for the artificial synthesized picture was 400 pixels × 400 pixels, and the selection for the actual picture was 512 pixels × 512 pixels.
The invention refers to two documents, namely document [2], document [5] and document [6], and the invention method and the documents [2], document [5] and document [6] are subjected to simulation comparison experiments, and the specific simulation results are shown in fig. 5, table 6 and table 7.
TABLE 5 error of edge position for different methods
TABLE 6 errors of edge orientation for different methods
TABLE 7 edge detection time for different methods
As can be seen from table 5, in the case of the experiment of the straight lines with different angles, the position detection accuracy of the document [6] is higher than that of the document [5], while the detection accuracy of the document [2] is higher than that of the document [6], and the document [2] is improved, and the detection accuracy is further improved; as can be seen from table 6, different methods have different results for the detection of straight lines at different angles, and the direction detection accuracy of the document [6] is higher than that of the documents [5] and [2], because the document [6] uses an iterative method, which improves the direction detection accuracy to some extent, while the document [2] is higher than that of the document [5], and the document [2] is improved herein, and the detection accuracy is further improved, and the detection accuracy is the highest. From Table 7, it can be seen that the method proposed herein greatly improves the computational complexity of reference [2], comparable to reference [5 ].
As shown in fig. 5: FIG. 5 shows sub-pixel edge detection results for composite images at different angles: (a) to (f) edge detection results without adding white noise; (a) a detection result that the angle is zero; (b) a partial enlarged view of the detection result with an angle of zero; (c) a detection result with an angle of-45 degrees; (d) a partial enlarged view of the detection result at an angle of-45 degrees; (e) a detection result with an angle of 45 degrees; (f) a partial enlarged view of the detection result at an angle of 45 degrees; (g) to (l) edge detection results with noise added; (g) a detection result that the angle is zero; (h) a partial enlarged view of the detection result with an angle of zero; (i) a detection result with an angle of-45 degrees; (j) a partial enlarged view of the detection result at an angle of-45 degrees; (k) a detection result with an angle of 45 degrees; (l) partial enlarged view of the detection result at an angle of 45 degrees.
Sub-pixel edge detection effect of the actual image of fig. 6: (a) to (c) image detection results with rich edges; (a) a partial enlarged view of panel b; (b) detection of edges; (c) a partial enlarged view of panel b; (d) Detecting the detection image of the simple circular workpiece; (d) a partial enlarged view of panel e; (e) the detection result of the ring; (g) partial enlarged view of e diagram.
As can be seen from FIG. 5, the method based on one-dimensional gray moments has good detection accuracy for the gray images of the synthesized straight lines and good noise resistance. While it can be seen from fig. 6 that the method herein has a good effect in extracting the actual object edge, fig. 6 (c) shows that the extracted edge precision is higher for toy tigers with more edges, and fig. 6 (g) shows that the detection result is also good for simple ring-shaped workpieces.
The denoising technology of the invention utilizes a Kuwahara filter to carry out smooth denoising, and other replaceable smooth filters can be a mean filter, a median filter, a Gaussian filter, a direction smoothing filter and the like.
The pixel-level edge detection of the invention adopts Sobel edge detection, and a plurality of pixel-level edge detection technologies, such as Robert edge detection, laplace edge detection, log edge detection, canny edge and the like, are adopted at present, and can replace the pixel-level edge detection method of the invention.
The dimensions of the template used for the pseudo-Zernike moments in the present invention are 5 x 5, while other dimensions such as 3 x 3,7 x 7,9 x 9, etc. may be substituted for the dimensions of the template in the present invention.
Reference (e.g. patent/thesis/standard)
[1] The subpixel level image detection method for the depth-of-field part processing quality is adopted in Caojiafu, schbo, wanlin, zhangliang, china, and the publication number is as follows: cn101477685b.2011.06.01.
[2]Kaur A,Singh C.Sub-pixel edge detection using pseudo Zernike moment[J].Int.J.Signal Process.Image Process.Pattern Recognit.2011,4(2):107-118.
[3]Jain A K.Fundamentals of digital image processing[M].New York:Prentice-Hall,1989.
[4]Sobel I.Camera models and machine perception[D].Stanford:Stanford University,1970.
[5]Sun Q,Hou Y,Tan Q,et al.A robust edge detection method with sub-pixel accuracy[J].Optik International Journal for Light and Electron Optics,2014,125(14):3449-3453.
[6]Chen P,Chen F,Han Y,et al.Sub-pixel dimensional measurement with Logistic edge model[J].Optik-International Journal for Light and Electron Optics,2014,125(9):2076-2080.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.

Claims (4)

1. A sub-pixel edge detection method based on a pseudo Zernike moment is characterized by comprising the following steps:
s1: denoising an input image;
s2: carrying out pixel level edge detection on the image subjected to denoising treatment: taking a pixel to be processed in the image to be processed as a center, carrying out weighted operation on the gray levels of the pixels in four directions around the pixel point, carrying out edge detection in the horizontal and vertical directions, and carrying out pixel level edge detection on all the pixels of the image to be processed according to the mode;
s3: performing sub-pixel edge detection on an image to be processed by adopting a pseudo Zernike moment method: establishing an edge detection model, and carrying out the following processing on all pixels of an image to be processed: calculating an orthogonal complex polynomial of the pixel, calculating a coefficient of a pixel correlation moment by using a result of the orthogonal complex polynomial, calculating the magnitude of the correlation moment by using the coefficient of the correlation moment, calculating a parameter of an edge by using the result of the correlation moment, and calculating a real edge position of the pixel by using the edge parameter;
s4: and (3) carrying out error compensation on edge positions of the image to be processed: establishing an error compensation edge model, solving a pseudo Zernike moment of a pixel by using the model, and solving an edge position estimated value, an actual edge error and a theoretical edge error of the pixel by using an error compensation edge;
s5: acquiring a corrected actual edge of the sub-pixel edge detection, processing all pixels of the image to be processed according to the S4 mode, and finishing the sub-pixel edge detection of the image;
in S4, the following method is specifically adopted for performing edge position error compensation on the image: and (3) correcting the edge moment of the pixel by adopting formulas (28) and (29) according to the established error compensation edge model:
where f' (x, y) is the gray scale value of the rotated image,
and (3) calculating the edge position rho of the pixel by using the error compensation edge and adopting a formula (30), and solving the actual edge and theoretical edge error E of the pixel by adopting a formula (31):
the actual edge error of the pixel and the theoretical edge error E are:
2. the method of claim 1, further characterized by: in the step S1, the denoising processing is performed on the input image in the following manner:
s11: respectively calculating gray level variances corresponding to four windows around a pixel by taking the pixel to be processed in the image to be processed as a center;
s12: finding out the window corresponding to the minimum gray variance and calculating the gray mean value;
s13: replacing the gray value of the central pixel with the calculated gray average value; and performing the above operation on all pixels of the image to be processed to finish denoising.
3. The method of claim 1, further characterized by the step of: in S3, the following algorithm is adopted when a pseudo Zernike moment method is adopted to carry out pixel edge detection on the image:
wherein: (n + 1)/π is the normalized parameter, the symbol "+" indicates the conjugate of the complex number, θ is the angle between the edge and the x-direction, ρ is the distance from the center to the line, i.e., where the pixel edge is located, and V nm (ρ, θ) is the quadrature integral kernel function, and the above parameters are expressed by the formula:V nm (ρ,θ)=R nm (ρ)e imθ complex polynomial R in polar coordinates nm (p) is defined as
Wherein, m is more than or equal to 0 and less than or equal to n, and arctan () is an arctangent function.
4. The method of claim 1, further characterized by: solving the actual edge position of the correction pixel uses the following formula
ρ′ R =ρ-E
Wherein ρ' R Is the actual edge position of the pixel after correction, ρ is the actual edge error, and E is the edge error value.
CN201510153151.5A 2015-04-01 2015-04-01 A kind of sub-pixel edge detection method based on Zernike pseudo-matrix Active CN104715487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510153151.5A CN104715487B (en) 2015-04-01 2015-04-01 A kind of sub-pixel edge detection method based on Zernike pseudo-matrix

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510153151.5A CN104715487B (en) 2015-04-01 2015-04-01 A kind of sub-pixel edge detection method based on Zernike pseudo-matrix

Publications (2)

Publication Number Publication Date
CN104715487A CN104715487A (en) 2015-06-17
CN104715487B true CN104715487B (en) 2018-01-26

Family

ID=53414781

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510153151.5A Active CN104715487B (en) 2015-04-01 2015-04-01 A kind of sub-pixel edge detection method based on Zernike pseudo-matrix

Country Status (1)

Country Link
CN (1) CN104715487B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899888B (en) * 2015-06-18 2017-10-24 大连理工大学 A kind of image sub-pixel edge detection method based on Legendre squares
CN105761256B (en) * 2016-02-05 2019-02-26 成都康烨科技有限公司 The sub-pixel edge straight line acquisition methods and device of image
CN105894521A (en) * 2016-04-25 2016-08-24 中国电子科技集团公司第二十八研究所 Sub-pixel edge detection method based on Gaussian fitting
CN106204528A (en) * 2016-06-27 2016-12-07 重庆理工大学 A kind of size detecting method of part geometry quality
CN107218894B (en) * 2017-04-28 2020-02-18 合肥市雅视智能科技有限公司 Rapid and stable sub-pixel precision device thickness detection method
CN109509166B (en) * 2017-09-15 2021-05-04 凌云光技术股份有限公司 Printed circuit board image detection method and device
CN108038761A (en) * 2017-12-08 2018-05-15 快创科技(大连)有限公司 Shopping Propagate and management system based on AR technologies
CN107784567A (en) * 2017-12-08 2018-03-09 快创科技(大连)有限公司 Purchase experiences system based on augmented reality
CN108168439B (en) * 2017-12-29 2019-11-19 北京理工大学 A kind of crack width test method based on sub-pix
CN109859194B (en) * 2019-01-25 2023-06-02 淮阴师范学院 Image focusing measure realization method based on local edge detection
CN110298834B (en) * 2019-07-01 2021-03-23 中国电子科技集团公司第十三研究所 Correction method of pixel-level edge effect and terminal equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102034224A (en) * 2010-11-30 2011-04-27 辽宁师范大学 Pseudo-Zernike moment-based image denoising algorithm

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102034224A (en) * 2010-11-30 2011-04-27 辽宁师范大学 Pseudo-Zernike moment-based image denoising algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种改进的Zernike正交矩亚像素边缘检测算法;李金泉 等;《光学技术》;20030731;第29卷(第4期);第500-503页 *
利用Sobel-Zernike矩算子的快速亚像素边缘检测方法;曲迎东 等;《光电工程》;20031031;第30卷(第5期);第59-61页 *
基于Zerinke矩亚像素边缘检测的快速算法;杨浩 等;《计算机应用研究》;20111130;第28卷(第11期);第4380-4382页,第4385页 *

Also Published As

Publication number Publication date
CN104715487A (en) 2015-06-17

Similar Documents

Publication Publication Date Title
CN104715487B (en) A kind of sub-pixel edge detection method based on Zernike pseudo-matrix
CN104268857B (en) A kind of fast sub-picture element rim detection and localization method based on machine vision
CN102156996B (en) Image edge detection method
CN108765347B (en) Color enhancement method suitable for remote sensing image
CN101256156B (en) Precision measurement method for flat crack and antenna crack
JP6899189B2 (en) Systems and methods for efficiently scoring probes in images with a vision system
CN111474184A (en) AOI character defect detection method and device based on industrial machine vision
CN104899888B (en) A kind of image sub-pixel edge detection method based on Legendre squares
CN105354815B (en) It is a kind of that localization method is accurately identified based on flat-type micro part
CN114494045B (en) Large spur gear geometric parameter measurement system and method based on machine vision
CN111931538A (en) Positioning method of Micro QR two-dimensional code
CN110992263B (en) Image stitching method and system
CN112233116B (en) Concave-convex mark visual detection method based on neighborhood decision and gray level co-occurrence matrix description
CN107452028B (en) Method and device for determining position information of target image
CN104715491B (en) A kind of sub-pixel edge detection method based on one-dimensional Gray Moment
US20180174328A1 (en) Turning radius-based corner detection algorithm
Alemán-Flores et al. Line detection in images showing significant lens distortion and application to distortion correction
CN103020967A (en) Unmanned aerial vehicle aerial image accurate matching method based on island edge characteristics
CN111915485A (en) Rapid splicing method and system for feature point sparse workpiece images
CN113223066A (en) Multi-source remote sensing image matching method and device based on characteristic point fine tuning
CN114998571B (en) Image processing and color detection method based on fixed-size markers
CN109961393A (en) Subpixel registration and splicing based on interpolation and iteration optimization algorithms
CN108537810B (en) Improved Zernike moment sub-pixel edge detection method
CN112819823B (en) Round hole detection method, system and device for furniture plate
CN112634228A (en) Infrared image edge high-precision detection positioning method based on sub-pixel positioning algorithm

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant