CN104715487A - Method for sub-pixel edge detection based on pseudo Zernike moments - Google Patents

Method for sub-pixel edge detection based on pseudo Zernike moments Download PDF

Info

Publication number
CN104715487A
CN104715487A CN201510153151.5A CN201510153151A CN104715487A CN 104715487 A CN104715487 A CN 104715487A CN 201510153151 A CN201510153151 A CN 201510153151A CN 104715487 A CN104715487 A CN 104715487A
Authority
CN
China
Prior art keywords
rho
pixel
edge
integral
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.)
Granted
Application number
CN201510153151.5A
Other languages
Chinese (zh)
Other versions
CN104715487B (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

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

Abstract

The invention discloses a method for sub-pixel edge detection based on pseudo Zernike moments. The method is characterized by comprising the following steps: 1, performing noise removal on an input image; 2, performing pixel-level edge detection on the image after noise removal; 3, performing sub-pixel edge detection on a to-be-processed image by adopting a pseudo Zernike moment method; 4, performing error compensation of edge positions on the to-be-processed image; and 5, obtaining a corrected actual edge after the sub-pixel edge detection, and processing all pixels of the to-be-processed image according to the manner of the step 4 to finish the sub-pixel edge detection of the image. The method provided by the invention is insensitive to noise, so that the accuracy of a sub-pixel edge is improved, and the computational complexity required by edge detection is reduced.

Description

A kind of sub-pixel edge detection method based on Zernike pseudo-matrix
Technical field
The present invention relates to technical field of image processing, particularly relate to a kind of sub-pixel edge detection method based on Zernike pseudo-matrix.
Background technology
Along with the fast development of China's economy, robotic, the intelligentized degree of industrial circle is by very fast improve, and the development space of the edge detecting technology of image is also considerable.Edge detecting technology based on computer vision has that precision is high, speed is fast, noncontact, automaticity advantages of higher.Because image border contains a large amount of useful informations, edge detection results whether accurate, to the process of successive image, as the dimensional measurement of object registration, object, the detection and indentification etc. of object, also there is important impact, therefore extract image border exactly and occupy critical role in based on the detection system of computer vision.In computer vision system, the precision of system becomes a direct ratio qualitatively with the precision of rim detection, if namely the positional precision of the rim detection of target object is high, the quantity of information of the feature information extraction of object is many, and the result of follow-up relevant process and precision are by height.Improve the resolution that system accuracy is the most direct, effective method is the hardware of raising system, but the cost needed for raising hardware resolution is higher, such as, the resolution of camera 256 × 256 is brought up to the resolution of 1024 × 1024, cost needed for system will differ the price of tens times, improve resolution with computer vision technique, while raising accuracy of detection, effectively can reduce system cost.
Traditional edge detection operator has: Sobel edge detection operator, Roberts edge detection operator, Prewitt edge detection operator, Log edge detection operator, Canny edge detection operator etc., the precision of these rim detection is all Pixel-level, that is, the precision of location is all a pixel.Improve constantly along with to the requirement of accuracy of detection, the rim detection of Pixel-level can not meet the demand of actual industrial production, there has been proposed Sub-pixel Edge Detection Technology, such as, when the precision detected is 0.2 pixel, is equivalent to systemic resolution and improves 5 times.
Prior art Patent number discloses a kind of sub-pixel level image detection process with field part depth machining quality for CN101477685.First this invention carries out layering demarcation to Vision Builder for Automated Inspection, secondly, interpolation calculation is carried out to original image, the accurate location of part edge is realized by thick smart two-step approach, the each aspect of the image of foundation and each aspect mapping relations of part are finally utilized to calculate the shape with depth of field part, critical size parameter, obtains qualitative data by comparative analysis.Although this technology has detection speed faster, but this technology utilizes the method for interpolation to carry out sub-pixel edge detection, because interpolation technique itself is easy to affected by noise, so this technology is also easy to the interference by noise, the precision of rim detection can be caused like this to reduce, and then affect follow-up image procossing performance.
Other 2012, Kaur etc. proposed to utilize pseudo-Zernike to carry out sub-pixel edge detection in document " Sub-pixel edge detection using pseudoZernike moment ".First this technology extracts acquisition image, carries out Zernike pseudo-matrix computing, secondly, obtains edge direction parameter distribution and edge direction parameter difference score value then, edge pixel is judged whether according to predetermined threshold value T.But this technology carries out sub-pixel edge detection by Zernike pseudo-matrix, although this technology is to insensitive for noise, namely overcome the impact of noise, this technology uses the computing method of pseudo-Zernike, because Zernike pseudo-matrix computation complexity is comparatively large, just have impact on the speed of calculating so like this.
Edge model of the prior art is based on step edge model, and the edge of reality can not be all step model, this is because the image of reality is certain fuzzy through all having based on the convex lens of the camera of CCD, even if backward is can not be fuzzy after convex lens, but data gather conversion through data A/D, the digital manipulation such as quantification, edge also can not be step model, detect obtain data or inaccurate so carry out sub-pixel edge through prior art and introduced Zernike pseudo-matrix above, so at this, in order to improve problem described above, the present invention will use a kind of marginal error technology to reduce the impact caused because of model error.
In order to the error compensation principle at edge is described, the present invention sets up an error compensation edge model, has model as shown in Figure 4: the h in Fig. 4 is background gray levels, and h+ Δ k is the gray-scale value of excessively band, and h+k is the gray-scale value of destination object, ρ 1and ρ 2the distance of center to two edges of unit circle.By the relation of parameters in Fig. 4, can release,
Δk k = ρ 2 - ρ R ρ 2 - ρ 1 - - - ( 26 )
Wherein, ρ rit is actual edge.
If make Δ k/k=λ, so can be obtained fom the above equation
ρ R=ρ 2-λ(ρ 21) (27)
Utilize compensation edge model above to ask Zernike pseudo-matrix, each square so revised refers to following formula:
PZ 20 + 4 PZ 10 = ∫ ∫ x 2 + y 2 f ′ ( x , y ) ( 10 x 2 + 10 y 2 - 5 ) dxdy = ∫ - 1 ρ 1 ∫ - 1 - x 2 1 - x 2 h ( 10 x 2 + 10 y 2 - 5 ) dxdy + ∫ ρ 1 ρ 2 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( 10 x 2 + 10 y 2 - 5 ) dxdy + ∫ ρ 2 1 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( 10 x 2 + 10 y 2 - 5 ) dxdy = 10 Δk 3 [ ρ 1 ( 1 - ρ 1 2 ) 3 / 2 - ρ 2 ( 1 - ρ 2 2 ) 3 / 2 ] + 10 k 3 ρ 2 ( 1 - ρ 2 2 ) 3 / 2 - - - ( 28 )
PZ 11 = ∫ ∫ x 2 + y 2 f ′ ( x , y ) ( x - jy ) dxdy = ∫ - 1 ρ 1 ∫ - 1 - x 2 1 - x 2 h ( x - jy ) dxdy + ∫ ρ 1 ρ 2 ∫ - 1 - x 2 1 - x 2 h ( x - j y ) dxdy + ∫ ρ 2 1 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( x - j y ) dxdy = 2 Δk 3 [ ( 1 - ρ 1 2 ) 3 / 2 - ( 1 - ρ 2 2 ) 3 / 2 ] + 2 k 3 ( 1 - ρ 2 2 ) 3 / 2 - - - ( 29 )
Wherein, f ' (x, y) is the gray-scale value of rotated image.
Error compensation edge is utilized to try to achieve marginal position ρ for shown in following formula,
ρ = PZ 20 + 4 PZ 10 5 PZ 11 = ( 1 - λ ) ρ 2 ( 1 - ρ 2 2 ) 3 / 2 + λ ρ 1 ( 1 - ρ 1 2 ) 3 / 2 λ ( 1 - ρ 1 2 ) 3 / 2 + ( 1 - λ ) ( 1 - ρ 2 2 ) 3 / 2 - - - ( 30 )
The error E at actual marginal error and theoretical edge is
E = ρ - ρ R = λ ( λ - 1 ) ( ρ 1 - ρ 2 ) [ ( 1 - ρ 1 2 ) 3 / 2 - ( 1 - ρ 2 2 ) 3 / 2 ] λ ( 1 - ρ 1 2 ) 3 / 2 + ( 1 - λ ) ( 1 - ρ 2 2 ) 3 / 2 - - - ( 31 )
The template size chosen due to the present invention is 5 × 5, therefore λ desirable 0.5, ρ 1, ρ 2get-0.2,0.2 respectively.The correction actual edge detected based on the sub-pixel edge of error compensation is
ρ′ R=ρ-E (32)
S5: obtain the correction actual edge that sub-pixel edge detects, detects the sub-pixel edge that all pixels of pending image have processed image according to the mode of S4.
Summary of the invention
The present invention is directed to existing sub-pixel edge detection method precision not high, to noise-sensitive, the problems such as computation complexity is high, propose a kind of sub-pixel edge detection method based on Zernike pseudo-matrix newly, concrete scheme is:
Based on a sub-pixel edge detection method for Zernike pseudo-matrix, comprise the following steps:
S1: removal is carried out to input picture and to make an uproar process;
S2: the image completing denoising is carried out pixel edge detection: in pending image centered by pending pixel, the gray scale of the pixel of surrounding's four direction of this pixel is computed weighted, carry out rim detection from the direction of horizontal and vertical, in the manner described above pixel edge detection is carried out to all pixels of pending image;
S3: adopt Zernike pseudo-matrix method to carry out sub-pixel edge detection to pending image: to set up Model for Edge Detection, all pixels of pending image are handled as follows: calculate the orthogonal complex polynomails of pixel, utilize orthogonal multiple multi-form result to calculate the coefficient of pixel Correlation Moment, utilize the size of the coefficient calculations Correlation Moment of Correlation Moment, utilize the result of Correlation Moment to calculate the parameter at edge, utilize edge parameters to calculate the real marginal position of pixel;
S4: the error compensation of pending image being carried out to marginal position: set up error compensation edge model, utilize this model to ask the Zernike pseudo-matrix of pixel, adopt error compensation edge to try to achieve the marginal position valuation of pixel, actual marginal error and theoretical margin error;
S5: obtain the correction actual edge that sub-pixel edge detects, detects the sub-pixel edge that all pixels of pending image processed, completed image according to the mode of S4.
In S1, removal is carried out to input picture and makes an uproar process in the following way:
S11: in pending image centered by pending pixel, calculates the gray variance corresponding to four windows around this pixel respectively;
S12: find out the minimum corresponding window of above-mentioned gray variance, and calculate its gray average;
S13: the gray-scale value gray average calculated being replaced center pixel; Aforesaid operations is carried out to all pixels of pending image and completes denoising.
Zernike pseudo-matrix method is adopted to carry out adopting following algorithm when pixel edge detects to image in S3:
PZ nm = n + 1 π Σ X Σ Y f ( x , y ) V nm * ( ρ , θ )
Wherein: (n+1)/π is normalized parameter, symbol " * " represents that the conjugation of plural number calculates, and θ is the angle in edge and x direction, and ρ is the distance that straight line is arrived at center, i.e. the position at pixel edge place, V nm(ρ, θ) is orthogonal integration kernel function, and above-mentioned parameter profit is formulated as: v nm(ρ, θ)=R nm(ρ) e im θ, under polar coordinates, complex polynomails R nm(ρ) be defined as
R nm ( ρ ) = Σ s = 0 n - | m | ( - 1 ) s ( 2 n + 1 - s ) ! ρ n - s s ! ( n + | m | + 1 - s ) ! ( n - | m | - s ) !
Wherein, 0≤| m|≤n, arctan () they are arctan functions.
In S4, the error compensation of marginal position carried out to image concrete in the following way: adopt formula (28) according to the error compensation edge model set up, (29) carry out the correction of pixel edge square:
PZ 20 + 4 PZ 10 = ∫ ∫ x 2 + y 2 f ′ ( x , y ) ( 10 x 2 + 10 y 2 - 5 ) dxdy = ∫ - 1 ρ 1 ∫ - 1 - x 2 1 - x 2 h ( 10 x 2 + 10 y 2 - 5 ) dxdy + ∫ ρ 1 ρ 2 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( 10 x 2 + 10 y 2 - 5 ) dxdy + ∫ ρ 2 1 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( 10 x 2 + 10 y 2 - 5 ) dxdy = 10 Δk 3 [ ρ 1 ( 1 - ρ 1 2 ) 3 / 2 - ρ 2 ( 1 - ρ 2 2 ) 3 / 2 ] + 10 k 3 ρ 2 ( 1 - ρ 2 2 ) 3 / 2 - - - ( 28 )
PZ 11 = ∫ ∫ x 2 + y 2 f ′ ( x , y ) ( x - jy ) dxdy = ∫ - 1 ρ 1 ∫ - 1 - x 2 1 - x 2 h ( x - jy ) dxdy + ∫ ρ 1 ρ 2 ∫ - 1 - x 2 1 - x 2 h ( x - j y ) dxdy + ∫ ρ 2 1 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( x - j y ) dxdy = 2 Δk 3 [ ( 1 - ρ 1 2 ) 3 / 2 - ( 1 - ρ 2 2 ) 3 / 2 ] + 2 k 3 ( 1 - ρ 2 2 ) 3 / 2 - - - ( 29 )
Wherein, f ' (x, y) is the gray-scale value of rotated image,
Utilize error compensation edge to adopt formula (30) to try to achieve the marginal position ρ of pixel, adopt formula (31) to solve edge and the theoretical margin error E of the reality of pixel:
ρ = PZ 20 + 4 PZ 10 5 PZ 11 = ( 1 - λ ) ρ 2 ( 1 - ρ 2 2 ) 3 / 2 + λ ρ 1 ( 1 - ρ 1 2 ) 3 / 2 λ ( 1 - ρ 1 2 ) 3 / 2 + ( 1 - λ ) ( 1 - ρ 2 2 ) 3 / 2 - - - ( 30 )
Then the actual edge error of pixel and the error E at theoretical edge are:
E = ρ - ρ R = λ ( λ - 1 ) ( ρ 1 - ρ 2 ) [ ( 1 - ρ 1 2 ) 3 / 2 - ( 1 - ρ 2 2 ) 3 / 2 ] λ ( 1 - ρ 1 2 ) 3 / 2 + ( 1 - λ ) ( 1 - ρ 2 2 ) 3 / 2 - - - ( 31 )
Solve the actual edge position revising pixel and adopt following formula
ρ′ R=ρ-E
Wherein ρ ' rbe the actual edge position of pixel after revising, ρ is actual marginal error, and E is the error amount at edge.
A kind of sub-pixel edge detection method based on Zernike pseudo-matrix disclosed by the invention, first Kuwahara wave filter is utilized to carry out the process of denoising, next utilizes Sobel operator to carry out pixel edge detection, then Zernike pseudo-matrix is utilized to carry out pixel edge detection, error compensation edge position is finally utilized to compensate, the method that the present invention carries, to insensitive for noise, improves the precision of sub-pixel edge, and decreases the computation complexity needed for Edge detected.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the application, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the sub-pixel edge detection method that the present invention is based on Zernike pseudo-matrix;
Fig. 2 is the schematic diagram in the present invention, image pixel being carried out to denoising;
Fig. 3 (a) is the step edge model schematic before rotation in two-dimentional step edge model;
Fig. 3 (b) is step edge model schematic postrotational in two-dimentional step edge model;
Fig. 4 is the schematic diagram that medial error of the present invention compensates edge model;
Fig. 5 is the sub-pixel edge testing result schematic diagram of the composograph of different angles in the present invention;
Fig. 6 is the schematic diagram of the sub-pixel edge Detection results of real image in the present invention.
Embodiment
For making technical scheme of the present invention and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, clear complete description is carried out to the technical scheme in the embodiment of the present invention:
First the present invention utilizes Kuwahara wave filter to carry out denoising to image, next utilizes Sobel operator to carry out pixel edge detection, then Zernike pseudo-matrix is utilized to carry out pixel edge detection, finally utilize error compensation to compensate image edge location, wherein utilize Zernike pseudo-matrix carry out the method for sub-pixel edge detection and utilize marginal position error compensation to be inventive point of the present invention to carry out the method for the correction at edge.
A kind of sub-pixel edge detection method based on Zernike pseudo-matrix as shown in Figure 1, comprises the following steps:
S1: removal is carried out to input picture and to make an uproar process.
If input picture, containing noise, will affect pixel edge testing result, therefore first apply Kuwahara wave filter to its denoising.The basic thought of Kuwahara wave filter is four windows chosen as shown in Figure 2, calculates its gray variance respectively to each window, and then replace the gray-scale value of center pixel with the gray average corresponding to window that variance is minimum, its concrete performing step is as follows:
S11: in pending image centered by pending pixel, calculates the gray variance corresponding to four windows around this pixel respectively;
S12: find out the minimum corresponding window of above-mentioned gray variance, and calculate its gray average;
S13: the gray-scale value gray average calculated being replaced center pixel; Aforesaid operations is carried out to all pixels of pending image and completes denoising.
S2: the image completing denoising is carried out pixel edge detection: in pending image centered by pending pixel, the gray scale of the pixel of surrounding's four direction of this pixel is computed weighted, carry out rim detection from the direction of horizontal and vertical, in the manner described above pixel edge detection is carried out to all pixels of pending image.
Typical Sobel operator is centered by the pixel processed, and then to the intensity-weighted computing of the pixel in surrounding 4 directions of pixel, carry out Edge detected from the direction of horizontal and vertical, specific formula for calculation 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) be x (level) direction and the first differential in y (vertical) direction respectively, the gradient summation that G [f (x, y)] is Sobel operator, f (x, y) is the gray-scale value of input picture.
Obtaining gradient G [f (x, y)], false givenly can establish a threshold constant T, carry out image binaryzation, namely as G [f (x, y)] >T, corresponding pixel points is set as 0, otherwise be set as 255 or 1, if when the size of adjustment constant T reaches optimum efficiency, T value is 10 ~ 30 in the present invention.
S3: adopt Zernike pseudo-matrix method to carry out sub-pixel edge detection to pending image: to set up Model for Edge Detection, all pixels of pending image are handled as follows: calculate the orthogonal complex polynomails of pixel, utilize orthogonal multiple multi-form result to calculate the coefficient of pixel Correlation Moment, utilize the size of the coefficient calculations Correlation Moment of Correlation Moment, utilize the result of Correlation Moment to calculate the parameter at edge, utilize edge parameters to calculate the real marginal position of pixel.
From Ghosal etc. since 1993 propose to utilize Zernike square to carry out sub-pixel edge detection, through the research of two more than ten years, scholars have conducted in-depth research it, and the good rim detection effect obtained.Because Zernike pseudo-matrix is while the rotational invariance with Zernike square, Zernike pseudo-matrix can provide more proper vector than Zernike square, and Zernike pseudo-matrix is more insensitive to picture noise than traditional Zernike square, so the present invention utilizes Zernike pseudo-matrix to carry out pixel edge detection.
Zernike pseudo-matrix principle: in unit circle, for digital picture, Zernike square can be defined as,
PZ nm = n + 1 π Σ X Σ Y f ( x , y ) V nm * ( ρ , θ ) - - - ( 5 )
Wherein, (n+1)/π is normalized parameter, and * represents conjugation, and θ is the angle in edge and x direction, and ρ is the distance that straight line is arrived at center, is also the position at place, edge, V nm(ρ, θ) is orthogonal integration kernel function, and above-mentioned parameter profit is formulated as,
ρ = x 2 + y 2 - - - ( 6 )
θ = arctan y x - - - ( 7 )
V nm(ρ,θ)=R nm(ρ)e imθ(8)
Under polar coordinates, complex polynomails R nm(ρ) be defined as,
R nm ( ρ ) = Σ s = 0 n - | m | ( - 1 ) s ( 2 n + 1 - s ) ! ρ n - s s ! ( n + | m | + 1 - s ) ! ( n - | m | - s ) ! - - - ( 9 )
Wherein, 0≤| m|≤n.
Image pixel edge detection method concrete steps based on Zernike pseudo-matrix are:
In order to carry out rim detection, need set up desirable Model for Edge Detection, following formula and Fig. 3 are described in detail,
f ( x , y , ρ , θ ) = h , x cos θ + y sin θ ≤ ρ h + k , x cos θ + y sin θ > ρ - - - ( 10 )
Wherein, h and h+k is the gray-scale value of the straight line left and right sides respectively, and θ is the angle in edge and x direction, and ρ is the distance that straight line is arrived at center, is also the position at place, edge.
As the step edge model before Fig. 3 (a) rotation, step edge model as postrotational in Fig. 3 (b)
As shown in Figure 3 in order to the parameter of edge calculation, PZ 00, PZ 10, PZ 11, PZ 20four squares need to calculate, and the present invention only make use of PZ 10, PZ 11, PZ 20three squares calculate.
According to the step edge model of Fig. 3, detailed step of the present invention is as follows
(1) calculate orthogonal complex polynomails, its computation process refers to following formula:
R 10 = Σ s = 0 1 ( - 1 ) s ( 2 n + 1 - s ) ! ρ n - s s ! ( n + | m | + 1 - s ) ! ( n - | m | - s ) ! = - 2 + 3 ρ - - - ( 11 )
R 11 = Σ s = 0 0 ( - 1 ) s ( 2 n + 1 - s ) ! ρ n - s s ! ( n + | m | + 1 - s ) ! ( n - | m | - s ) ! = ρ - - - ( 12 )
R 20 = Σ s = 0 2 ( - 1 ) s ( 2 n + 1 - s ) ! ρ n - s s ! ( n + | m | + 1 - s ) ! ( n - | m | - s ) ! = 3 - 12 ρ + 10 ρ 2 - - - ( 13 )
Conveniently calculate, by R 20and R 10carry out union operation, its result of calculation is:
R 20+4R 10=-5+10ρ 2(14)
(2) PZ is calculated 11, PZ 20+ 4PZ 10its computation process of coefficient refer to following formula,
CPZ nm = n + 1 π ∫ ∫ x 2 + y 2 ≤ 1 V nm * ( ρ , θ ) dxdy - - - ( 15 )
CPZ 11 R = ∫ ∫ x 2 + y 2 ( x ) dxdy - - - ( 16 )
CPZ 11 I = ∫ ∫ x 2 + y 2 ( y ) dxdy - - - ( 17 )
CPZ 20 + 4 PZ 10 = ∫ ∫ x 2 + y 2 ( 10 x 2 + 10 y 2 - 5 ) dxdy - - - ( 18 )
The present invention's template of 5 × 5 passes through the PZ calculated 11, PZ 20+ 4PZ 10the coefficient of three squares is respectively as shown in the table:
Table 1PZ 11the real coefficient CPZ of square 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 11the empty coefficient CPZ of square 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 10the coefficient CPZ of square 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 utilize following formula, ask PZ respectively 11, PZ 20+ 4PZ 10,
PZ 11 R = Σ i = - 2 2 Σ j = - 2 2 f ( i + m , j + n ) CPZ 11 R - - - ( 19 )
PZ 11 I = Σ i = - 2 2 Σ j = - 2 2 f ( i + m , j + n ) CPZ 11 I - - - ( 20 )
PZ 20 + 4 PZ 10 = Σ i = - 2 2 Σ j = - 2 2 f ( i + m , j + n ) ( CPZ 20 + 4 CPZ 10 ) - - - ( 21 )
Wherein, f (n, m) is the gray-scale value of the position that pixel edge detects.
(4) the solving of edge parameters, the detailed following formula of its computation process,
θ = arctan IM [ PZ 11 ] RE [ PZ 11 ] - - - ( 22 )
ρ = PZ 20 + 4 PZ 10 5 PZ 11 - - - ( 23 )
k = 3 PZ 11 ( 1 - ρ 2 ) 3 / 2 - - - ( 24 )
(5) utilize formula (22 ~ 24) just the parameter (ρ, θ) at edge can be obtained, the computation process at so real edge is,
x sub y sub = x y + N 2 ρ cos θ sin θ - - - ( 25 )
Wherein, x, y are the positions that pixel edge detects, N=25.
S4: the error compensation of pending image being carried out to marginal position: set up error compensation edge model, utilizes this model to ask the Zernike pseudo-matrix of pixel, adopts error compensation edge to try to achieve the marginal position of pixel, actual marginal error and theoretical margin error.
Embodiment:
Beneficial effect of the present invention is: in order to verify validity of the present invention, carried out computer simulation experiment.In an experiment, experiment parameter is CPU IntelR CoreTM i3 2.4GHz, and 2G internal memory, video card is ATIMobility Radeon HD 5470, and system is Window7 home edition, and software programming environment is Matlab2010b.The image of the present invention's experiment is the image and the real image that utilize Prof. Du Yucang, and the size for the picture of Prof. Du Yucang is 400 pixel × 400 pixels, and selects to be 512 pixel × 512 pixels for the picture of reality.
The present invention is with reference to two documents, i.e. document [2], document [5], document [6], by inventive method and document [2], document [5], document [6] has carried out simulation comparison experiment, and concrete simulation result is as shown in Fig. 5 and table 5, table 6 and table 7.
The error of the marginal position of table 5 distinct methods
The error of the edge direction of table 6 distinct methods
The edge-detection time of table 7 distinct methods
As can be seen from Table 5, under the experimental conditions of different angles straight line, the accuracy of detection of the ratio of precision document [5] of the position detection of document [6] is high, and document [2] is higher than the accuracy of detection of document [6], and herein document [2] is improved, its precision detected has had again further raising; As can be seen from Table 6, to the detection of different angles straight line, diverse ways has different results, the ratio of precision document [5] of the angle detecting of document [6] and the accuracy of detection of document [2] high, this is because document [6] make use of the method for iteration, this improves angle detecting precision to a certain extent, and document [2] is higher than the accuracy of detection of document [5], and herein document [2] is improved, its precision detected has had again further raising, and its accuracy of detection is the highest.The method carried herein as can be seen from Table 7 carries out very large improvement to document [2] computation complexity, suitable with document [5].
As shown in Figure 5: the sub-pixel edge testing result of the composograph of Fig. 5 different angles: (a) ~ (f) does not add the edge detection results of white noise; A () angle is the testing result of zero; B () angle is the partial enlarged drawing of the testing result of zero; C () angle is the testing result of-45 degree; D () angle is the partial enlarged drawing of the testing result of-45 degree; E () angle is the testing result of 45 degree; F () angle is the partial enlarged drawing of the testing result of 45 degree; G () ~ (l) adds the edge detection results of noise; G () angle is the testing result of zero; H () angle is the partial enlarged drawing of the testing result of zero; I () angle is the testing result of-45 degree; J () angle is the partial enlarged drawing of the testing result of-45 degree; K () angle is the testing result of 45 degree; L () angle is the partial enlarged drawing of the testing result of 45 degree.
The sub-pixel edge Detection results of Fig. 6 real image: (a) ~ (c) has the image testing result enriching edge; The partial enlarged drawing of (a) b figure; The testing result at (b) edge; The partial enlarged drawing of (c) b figure; The detected image testing result of the simple circular ring work piece of (d) ~ (g); The partial enlarged drawing of (d) e figure; The testing result of (e) annulus; The partial enlarged drawing of (g) e figure.
As can be seen from Figure 5, the gray level image of method to the straight line of synthesis herein based on one dimension Gray Moment has good accuracy of detection, and has good anti-noise ability.And as can be seen from Figure 6, the object edge that method is herein extracting reality also has good effect, Fig. 6 (c) display is for the toy tiger had compared with multiple edge, its edge definition extracted is higher, Fig. 6 (g) shows, for simple annular workpieces, equally also have good testing result.
Noise-removed technology of the present invention utilizes the smoothing denoising of Kuwahara wave filter, and other smothing filterings that can replace can be, mean filter, median filter, Gaussian filter, directional smoothing filter device etc.
What pixel edge of the present invention detected employing is Sobel rim detection, at present a lot of pixel edge detection technique, such as Robert rim detection, Laplace rim detection, Log rim detection, Canny edges etc., can replace pixel edge detection method of the present invention by these methods.
In the present invention, the size of Zernike pseudo-matrix employing template is the size of 5 × 5, and the size of other sizes such as 3 × 3,7 × 7,9 × 9 etc. can replace the size of template in the present invention.
List of references (as patent/paper/standard)
[1] Cao Jianfu, Shi Bo, Wang Lin, Zhang Jialiang. there is the sub-pixel level image detection process of field part depth machining quality. China, publication number: 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:StanfordUniversity,1970.
[5]Sun Q,Hou Y,Tan Q,et al.A robust edge detection method with sub-pixelaccuracy[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 Logisticedge model[J].Optik-International Journal for Light and Electron Optics,2014,125(9):2076-2080.
The above; be only the present invention's preferably embodiment; but protection scope of the present invention is not limited thereto; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; be equal to according to technical scheme of the present invention and inventive concept thereof and replace or change, all should be encompassed within protection scope of the present invention.

Claims (5)

1., based on a sub-pixel edge detection method for Zernike pseudo-matrix, it is characterized in that comprising the following steps:
S1: removal is carried out to input picture and to make an uproar process;
S2: the image completing denoising is carried out pixel edge detection: in pending image centered by pending pixel, the gray scale of the pixel of surrounding's four direction of this pixel is computed weighted, carry out rim detection from the direction of horizontal and vertical, in the manner described above pixel edge detection is carried out to all pixels of pending image;
S3: adopt Zernike pseudo-matrix method to carry out sub-pixel edge detection to pending image: to set up Model for Edge Detection, all pixels of pending image are handled as follows: calculate the orthogonal complex polynomails of pixel, utilize orthogonal multiple multi-form result to calculate the coefficient of pixel Correlation Moment, utilize the size of the coefficient calculations Correlation Moment of Correlation Moment, utilize the result of Correlation Moment to calculate the parameter at edge, utilize edge parameters to calculate the real marginal position of pixel;
S4: the error compensation of pending image being carried out to marginal position: set up error compensation edge model, utilize this model to ask the Zernike pseudo-matrix of pixel, adopt error compensation edge to try to achieve the marginal position valuation of pixel, actual marginal error and theoretical margin error;
S5: obtain the correction actual edge that sub-pixel edge detects, detects the sub-pixel edge that all pixels of pending image processed, completed image according to the mode of S4.
2. a kind of sub-pixel edge detection method based on Zernike pseudo-matrix according to claim 1, is further characterized in that: carry out removal to input picture in S1 and make an uproar process in the following way:
S11: in pending image centered by pending pixel, calculates the gray variance corresponding to four windows around this pixel respectively;
S12: find out the minimum corresponding window of above-mentioned gray variance, and calculate its gray average;
S13: the gray-scale value gray average calculated being replaced center pixel; Aforesaid operations is carried out to all pixels of pending image and completes denoising.
3. a kind of sub-pixel edge detection method based on Zernike pseudo-matrix according to claim 1, is further characterized in that: adopt Zernike pseudo-matrix method to carry out adopting following algorithm when pixel edge detects to image in S3:
P Z nm = n + 1 π Σ X Σ Y f ( x , y ) V nm * ( ρ , θ )
Wherein: (n+1)/π is normalized parameter, symbol " * " represents that the conjugation of plural number calculates, and θ is the angle in edge and x direction, and ρ is the distance that straight line is arrived at center, i.e. the position at pixel edge place, V nm(ρ, θ) is orthogonal integration kernel function, and above-mentioned parameter profit is formulated as: v nm(ρ, θ)=R nm(ρ) e im θ, under polar coordinates, complex polynomails R nm(ρ) be defined as
R nm ( ρ ) = Σ s = 0 n - | m | ( - 1 ) s ( 2 n + 1 - s ) ! ρ n - s s ! ( n + | m | + 1 - s ) ! ( n - | m | - s ) !
Wherein, 0≤| m|≤n, arctan () they are arctan functions.
4. a kind of sub-pixel edge detection method based on Zernike pseudo-matrix according to claim 1, is further characterized in that: carry out the error compensation of marginal position to image in S4 concrete in the following way: adopt formula (28) according to the error compensation edge model set up, (29) carry out the correction of pixel edge square:
PZ 20 + 4 P Z 10 = ∫ ∫ x 2 + y 2 f ′ ( x , y ) ( 10 x 2 + 10 y 2 - 5 ) dxdy = ∫ - 1 ρ 1 ∫ - 1 - x 2 1 - x 2 h ( 10 x 2 + 10 y 2 - 5 ) dxdy + ∫ ρ 1 ρ 2 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( 10 x 2 + 10 y 2 - 5 ) dxdy + ∫ ρ 2 1 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( 10 x 2 + 10 y 2 - 5 ) dxdy = 10 Δk 3 [ ρ 1 ( 1 - ρ 1 2 ) 3 / 2 - ρ 2 ( 1 - ρ 2 2 ) 3 / 2 ] + 10 k 3 ρ 2 ( 1 - ρ 2 2 ) 3 / 2 - - - ( 28 )
PZ 11 = ∫ ∫ x 2 + y 2 f ′ ( x , y ) ( x - jy ) dxdy = ∫ - 1 ρ 1 ∫ - 1 - x 2 1 - x 2 h ( x - jy ) dxdy + ∫ p 1 ρ 2 ∫ - 1 - x 2 1 - x 2 h ( x - jy ) dxdy + ∫ ρ 2 1 ∫ - 1 - x 2 1 - x 2 ( h + k ) ( x - jy ) dxdy = 2 Δk 3 [ ( 1 - ρ 1 2 ) 3 / 2 - ( 1 - ρ 2 2 ) 3 / 2 ] + 2 k 3 ( 1 - ρ 2 2 ) 3 / 2 - - - ( 29 )
Wherein, f ' (x, y) is the gray-scale value of rotated image,
Utilize error compensation edge to adopt formula (30) to try to achieve the marginal position ρ of pixel, adopt formula (31) to solve edge and the theoretical margin error E of the reality of pixel:
ρ = PZ 20 + 4 P Z 10 5 PZ 11 = ( 1 - λ ) ρ 2 ( 1 - ρ 2 2 ) 3 / 2 + λρ 1 ( 1 - ρ 1 2 ) 3 / 2 λ ( 1 - ρ 1 2 ) 3 / 2 + ( 1 - λ ) ( 1 - ρ 2 2 ) 3 / 2 - - - ( 30 )
Then the actual edge error of pixel and the error E at theoretical edge are:
E = ρ - ρ R = λ ( λ - 1 ) ( ρ 1 - ρ 2 ) [ ( 1 - ρ 1 2 ) 3 / 2 - ( 1 - ρ 2 2 ) 3 / 2 ] λ ( 1 - ρ 1 2 ) 3 / 2 + ( 1 - λ ) ( 1 - ρ 2 2 ) 3 / 2 . - - - ( 31 )
5. a kind of sub-pixel edge detection method based on Zernike pseudo-matrix according to claim 1, is further characterized in that: solve the actual edge position revising pixel and adopt following formula
ρ′ R=ρ-E
Wherein ρ ' rbe the actual edge position of pixel after revising, ρ is actual marginal error, and E is the error amount at edge.
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 true CN104715487A (en) 2015-06-17
CN104715487B 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)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104899888A (en) * 2015-06-18 2015-09-09 大连理工大学 Legemdre moment-based image subpixel edge detection method
CN105761256A (en) * 2016-02-05 2016-07-13 成都康烨科技有限公司 Image sub-pixel edge line acquisition method and device
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
CN107218894A (en) * 2017-04-28 2017-09-29 合肥雅视智能科技有限公司 A kind of subpixel accuracy thickness of detector detection method of fast and stable
CN107784567A (en) * 2017-12-08 2018-03-09 快创科技(大连)有限公司 Purchase experiences system based on augmented reality
CN108038761A (en) * 2017-12-08 2018-05-15 快创科技(大连)有限公司 Shopping Propagate and management system based on AR technologies
CN108168439A (en) * 2017-12-29 2018-06-15 北京理工大学 Fracture width detection key technology based on sub-pix
CN109509166A (en) * 2017-09-15 2019-03-22 凌云光技术集团有限责任公司 Printed circuit board image detection method and device
CN109859194A (en) * 2019-01-25 2019-06-07 淮阴师范学院 A kind of image Focus field emission array implementation method based on Local Edge Detection
CN110298834A (en) * 2019-07-01 2019-10-01 中国电子科技集团公司第十三研究所 The modification method and terminal device of pixel edge effect

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
曲迎东 等: "利用Sobel-Zernike矩算子的快速亚像素边缘检测方法", 《光电工程》 *
李金泉 等: "一种改进的Zernike正交矩亚像素边缘检测算法", 《光学技术》 *
杨浩 等: "基于Zerinke矩亚像素边缘检测的快速算法", 《计算机应用研究》 *

Cited By (15)

* 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
CN104899888A (en) * 2015-06-18 2015-09-09 大连理工大学 Legemdre moment-based image subpixel edge detection method
CN105761256A (en) * 2016-02-05 2016-07-13 成都康烨科技有限公司 Image sub-pixel edge line acquisition method and device
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
CN107218894A (en) * 2017-04-28 2017-09-29 合肥雅视智能科技有限公司 A kind of subpixel accuracy thickness of detector detection method of fast and stable
CN107218894B (en) * 2017-04-28 2020-02-18 合肥市雅视智能科技有限公司 Rapid and stable sub-pixel precision device thickness detection method
CN109509166A (en) * 2017-09-15 2019-03-22 凌云光技术集团有限责任公司 Printed circuit board image detection method and device
CN107784567A (en) * 2017-12-08 2018-03-09 快创科技(大连)有限公司 Purchase experiences system based on augmented reality
CN108038761A (en) * 2017-12-08 2018-05-15 快创科技(大连)有限公司 Shopping Propagate and management system based on AR technologies
CN108168439A (en) * 2017-12-29 2018-06-15 北京理工大学 Fracture width detection key technology based on sub-pix
CN109859194A (en) * 2019-01-25 2019-06-07 淮阴师范学院 A kind of image Focus field emission array implementation method based on Local Edge Detection
CN109859194B (en) * 2019-01-25 2023-06-02 淮阴师范学院 Image focusing measure realization method based on local edge detection
CN110298834A (en) * 2019-07-01 2019-10-01 中国电子科技集团公司第十三研究所 The modification method and terminal device of pixel edge effect

Also Published As

Publication number Publication date
CN104715487B (en) 2018-01-26

Similar Documents

Publication Publication Date Title
CN104715487A (en) Method for sub-pixel edge detection based on pseudo Zernike moments
CN104268857B (en) A kind of fast sub-picture element rim detection and localization method based on machine vision
CN105335973B (en) Apply to the visual processing method of strip machining production line
CN107341802B (en) Corner sub-pixel positioning method based on curvature and gray scale compounding
CN108898147B (en) Two-dimensional image edge flattening method and device based on angular point detection
CN104715491B (en) A kind of sub-pixel edge detection method based on one-dimensional Gray Moment
CN105261022B (en) PCB board matching method and device based on outer contour
CN111474184A (en) AOI character defect detection method and device based on industrial machine vision
CN111126174A (en) Visual detection method for robot to grab parts
CN105930858A (en) Fast high-precision geometric template matching method enabling rotation and scaling functions
CN108007388A (en) A kind of turntable angle high precision online measuring method based on machine vision
CN112419297A (en) Bolt looseness detection method, device, equipment and storage medium
CN104899888B (en) A kind of image sub-pixel edge detection method based on Legendre squares
JP6899189B2 (en) Systems and methods for efficiently scoring probes in images with a vision system
CN105865344A (en) Workpiece dimension measuring method and device based on machine vision
CN110189314A (en) Automobile instrument panel image position method based on machine vision
CN107742289A (en) One kind is based on machine vision revolving body workpieces detection method
CN107192716A (en) A kind of workpiece, defect quick determination method based on contour feature
CN105354815A (en) Flat micro-part based accurate identification and positioning method
CN107356213B (en) Optical filter concentricity measuring method and terminal equipment
CN106023171A (en) Image corner detection method based on turning radius
CN109448059B (en) Rapid X-corner sub-pixel detection method
CN112233116A (en) Concave-convex mark visual detection method based on neighborhood decision and gray level co-occurrence matrix description
CN108447092B (en) Method and device for visually positioning marker
CN106529548A (en) Sub-pixel level multi-scale Harris corner detection 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