Image Processing Reference
In-Depth Information
get_coords(angle):=
0.000000000000001
x1 ceil cos angle+
2 -0.5-
8
y1 ceil -sin angle+
2 -0.5-
8
x2 ceil cos angle-
2 -0.5-
8
y2 ceil -sin angle-
2 -0.5-
8
(x1 y1 x2 y2)
Code 4.9
Generating co-ordinates for interpolation
Non_max(edges):= for i 1..cols(edges 0,0 )-2
for j 1..rows(edges 0,0 )-2
Mx
(edges 0 , 0 ) j,i
My
(edges 0,1 ) j,i
Mx
My
0
if My 0
atan
0
if (My=0)(Mx>0)
2
-
2
0
otherwise
adds
get_coords(0)
My(edges )
...
0,2 j+adds 0,1 ,i+adds 0,0
M1
+(Mx-My)(edges )
0,2 j+adds 0,3 , i+adds 0,2
adds
get_coords(0+ π )
My(edges )
...
0,2 j+adds 0,1 , i+adds 0,0
M2
isbigger [[Mx·(edges 0,2 ) j,i >M1]·[Mx·(edges 0,2 ) j,i
M2]]+[[Mx·(edges 0,2 ) j,i <M1]·[Mx·(edges 0,2 ) j,i
M2]]
new_edge j,i
+(Mx-My)(edges )
0,2 j+adds 0,3 , i+adds 0,2
(edges 0,2 ) j,i if isbigger
new_edge j,i
0 otherwise
new_edge
Code 4.10
Non-maximum suppression
Search WWH ::




Custom Search