Download An approach for generic detection of conic equation from images

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Four-vector wikipedia , lookup

Transcript
An approach for generic
detection of conic
equation from images
Maysa Macedo and Aura Conci
Universidade Federal Fluminense (UFF)
[email protected]
[email protected]
Hough Transform
ƒ Hough transform is a technique to identify parameters of
equations from forms in an image.
ƒ Each point on a curve votes for several combination of
parameters.
Image space: y= ax+b
Parameter space: b= -ax+y
b
y
x
a
Accumulator matrix
3- Bi-dimensional accumulator matrix
a
1- Form: straight line
Formula:
y= ax+b
0,1
2- Discrete representation:
0,3
0,4
0,5
0
Image space =>Parameter space
b= -ax+y
0,2
b
0,2
10
0,4
60
10
x=1 y=1 a=0,1 b=0,9
x=1 y=1 a=0,2 b=0,8
0,6
x=1 y=1 a=0,3 b=0,7
0,8
x=2 y=1 a=0,1 b=0,8
4
2
6
8
120 30
x=2 y=1 a=0,2 b=0,6
1
x=2 y=1 a=0,3 b=0,4
Elected straight line: y=0,4x+0,6
Hough Transform
„
General equation: b=y-ax
„
In practice, the polar form are used rather than explicit form to avoid
problems with lines that are nearly vertical ( b goes to infinity ! ).
„
Polar system of coordinates: ρ= x cos(θ) + y sen(θ)
b= angular coefficient
Image space : 2D
Parameter space: 2D
ρ
y
x
θ
Ranges
• Matrix accumulator range:
• ρ Æ -√ Ni2+Nj2 to √ Ni2+Nj2
• θ Æ -90o<θ≥90o
-y
-90º
0º
90º
x
-x
(0,Ni)
ρ
y
(0,Nj)
(Ni,Nj)
Detection of circular form
•
•
•
•
General equation: (x- x0)2 + (y- y0)2= r2 = ρ2
Parametric equation Cartesian system of coordinates
x0 = x - ρ cos θ
y0 = y - ρ sin θ,
•
where x0 e y0 are the coordinates of circle center.
Image space:2D
y
Parameter space: 3D
ρ
(x0, y0)
θ
x
Solution: technique perform changing ρ value in the possible range.
Parabolas
Parabola general equation on (ρ,β)
polar coordinates:
x ' = x f + ρ cos β cosω − ρ sin β sin ω
y
ρ
y ' = y f + ρ cos β sin ω + ρ sin β cos ω
ρ=
2d
1 − cos β
β
d
β≠0
where: d is the distance between focus
F=( xf,yf) and vertex (V),
In this case is necessary to
obtain a 4-D accumulator
array M (xf, yf, d, ω).
x
( xf ,yf )
V
ω
x’
Ellipses
The Cartesian coordinates :
x2 y2
+ 2 =1
2
s
t
where s is the biggest radius, t is
the smallest radius.
(ρ,τ) are the polar coordinates,
ρ is the distance between center
and an edge point in the ellipse,
and τ represents the angle
between ρ and horizontal totated
axis x´.:
ρ2 =
2 2
s t
s 2 sin 2 τ + t 2 cos 2 τ
x ' = x 0 + s cos τ cos α + t sin τ sin α
y ' = y 0 + t sin τ cos α − s cos τ sin α
Detecting ellipses without any adaptations is to cope with a 5-D
accumulator array M(x0, y0, s, t, α).
Hyperbolas:
x2 y 2
− 2 =1
2
m n
A polar representation of hyperbole is:
ρ
δ
2 2
m
n
ρ2 = 2
m sin 2 σ − n 2 cos 2 σ
Wehe: the half biggest axis is m .
n is the half of smallest axis in hyperbole,
ρ is the distance between centre and an edge point in the hyperbole
δ represents the angle between ρ and m axis.
(ρ, δ) are the polar coordinates: x ' = x + m cos δ cos σ − n sin δ sin σ
0
y ' = y 0 + n sin δ cos σ + m cos δ sin σ
5-D accumulator array
M(x0, y0, m, n, σ) is necessary
For Hough transform a
Proposed unified approach
ƒ This methodology intends to unify all type of
Hough detection based on each conic features.
ƒ From a minimum information it is possible
reconstruct a form.
ƒ Hand drawing can also be performed through
this method.
Conics
ƒ Identify a known form
ƒ Start the search for the polar coordinates
(polar radius, polar angle) of each image pixel,
ƒ Considers range of values involves the
election of each conic detection
Conic parameters
Set of parameters P= (p1, p2, p3,…).
Lower limits L= (l1, l2, l3,...)
Upper limits U=(u1, u2, u3,…)
Example:
Parabola P=(xf, yf, d, ω )
Lower limits L=(0,0,min,0) Upper, limits U=(Ni,Nj,max,2π )
Accumulator matrix dimension:
⎧length(P ) + 1 if the conic has rotation
D=⎨
otherwise
⎩length(P )
Detection scheme for complex images
Input image
Edge detection
Detect
form
Detect
form
Erase
detected
form
Finalize
detections
End
Conics detection in whatever position
Experiments
Input image
Detected form
(x0,y0)
s
t
α
Tempo de
execução
(82,92)
51
21
16
0, 078s
Approaching conic equation from
Hand drawing form
Experiments
Hand drawing form
Ellipse detected form
(x0,y0)
s
t
α
(67,55)
46
26
50o
Multiple Generic Form in the same image
The figure below consist of two straight lines and a parabola.
Input image
First detected straight line
Detected parabola
Second detected straight line
OutrasApplications
Aplicações
Other
Brinell Hardness test for metallographic images
Input Image
After threshold
Image after a filter
Detected circle
Equation of patterns for apparel industry
The figure below consist of two straight lines and two circle of arcs.
First Circle Arc
Arc
Lines
Second Circle
Arc
First Straight
Line
Second
Straight Line
x0
y0
ρ
Initial
Final
109
32
51
(74,70)
(144,69)
109
46
140
(5,140)
(216,136)
θ
ρ
-
Initial
Final
45
102
-
(5,141)
(73,71)
135
53
-
(145,70)
(215,140)
Finding radius variations and incomplete form
Input image of medicines, one of them has a fail and is detected as arch.
Pre-processed Image
Detected image
Conic equation identification using few points
Experiments
Input image
Image
Failed Edge Detected
Detected form
(x0,y0)
s
t
α
Time
(70,94)
62
30
0
0, 047s
Conclusion
ƒ
Conic detections (as open or closed curves)
ƒ
Generic equation parameters identification (also initial and
final points ).
ƒ
Accumulator matrix dimension
ƒ
Features extraction
ƒ
Store for rebuild
ƒ
Multiples application from edges detected images
An approach for generic
detection of conic form
Maysa Macedo and Aura Conci
Universidade Federal Fluminense (UFF)
[email protected]
[email protected]