Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
,
(1)
( ) ( )
2 2
1
1 n
i i
i i v
y y
d x x
_
+
+
+
,
(2)
1
.
cos
p n
p n
v
v v
v v
d d
d d
_
,
(3)
where, ( )
,
i j
x y
are the co-ordinates of the current vertex,
( )
1 1
,
i j
x y
are the co-ordinates of previous vertex and
( )
1 1
,
i j
x y
+ + are the co-ordinates of the next vertex. Thus for
every vertex,
f m
v
feature list contains vertex coordinate
position, distances with the previous and next neighbour
and angle as shown in Table 1.
Step: 3-Matching. The features of the vertices extracted in
the previous step determine the degree of matching
possibility of any two fragments being compared.
Matching criteria necessitates the summation of angles of
vertices of two polygons, i.e.,
im
v
of
th
i polygon,
( ) 1 i f
and
jm
v
of the
th
j polygon, ( ) 1 / j f i j
must be equal to 360. If the complement of angles is 360
then a matching parameter,
angles
w
is set to 1.
The previous and next distances ( ) ,
pr ne
v v
of the
th
m
vertex of
th
i fragment,
im
v
and previous and next distances
of
( ) ,
pr ne
v v
of the th
m
vertex of
th
j
fragment
are compared.
The fragments considered for matching are allotted a
matching degree,
matching
w
such that
( ) ( ) ( ) ( )
( )
( ) ( ) ( ) ( )
( )
1 and =1
5 and =1
im pr jm pr im ne jm ne
im pr jm pr im ne jm ne
v v v v angles
matching
v v v v angles
if d d or d d w
w
if d d and d d w
'
(4)
matching
w
is increased, if polygons,
i
P
and
j
P
of fragments i
and j under consideration satisfy certain degrees of
matching as follows,
matching
+2, 1/5 '
1, 1/10 '
, .
w
matching matching
matching matching
matching
if of polygons perimeter matches
if of polygons perimeter matches
otherwise
w w
w w
w
(5)
Step:4-Reconstruction. Once the metric to find matching
fragments has been determined, the process enters the
reconstruction phase. The algorithm compares each
fragment with all other fragments to find best matching as
that match which maximizes matching
w
. The fragments with
maximum matching
w
are merged to form a new fragment.
The features of new fragment are added to the feature list,
the merged vertices are removed and the matching process
is continued i.e., if fragments i and j
are merged to form a
new fragment, the polygon, ij
P
of newly formed fragment
is added in the fragments list and the whole reconstruction
procedure is continued from the first step for the remaining
number of fragments.
IV. APB ALGORITHM
APB algorithm is proposed by Arindam Biswas,
Partha Bhowmick and Bhargab B. Battacharya for the
reconstruction of hand shredded documents. The various
stages of the algorithm are explained through the following
steps:
Step:1-Pre-processing. Contours,
f
C
of scanned images
f
I
of f torn fragments are extracted using differential
operators [4].
Fig. 5. Reconstruction results of APB algorithm
Table 1.Feature List for ELC Algorithm
Corners m
v
(vertices) of each contour are detected
using the bending values [13] of discrete points
constituting f
C
.
Step: 2- Feature extraction. After pre-processing, the
feature list is generated for all contours
f
C
. Feature list for
the APB algorithm includes the distance between
consecutive corners determined in the clockwise direction.
Distance between consecutive corners,
m
v
and
n
v
( ) ( )
1 mod n m f +
of individual contours is calculated
in clockwise direction as
( ) ( )
2
2
mn i j
i j
y y
d x x
_
+
,
(6)
Chain code ( ) cc of edge segment between
m
v
and
n
v
of
individual fragments contour is determined. Edge
identification number,
m
e
and length of the chain code of
edge,
fm
, ( ) 4 to 5 pixels
are taken as matching
document by APB algorithm for merging. The matching
fragments suffer from one or two pixel variance due to
acquisition defects or due to pre-processing techniques.
Though the pre-processing steps of APB algorithm
generates one or two pixel variances, the distance
matching criteria with the predefined threshold ( )
overcomes pre-processing limitations of APB algorithm.
Since the reconstruction stage of APB algorithm deals only
with distance, it works with any type of hand torn
fragments.
Comparing the APB and ELC algorithms, the ELC
algorithm though passes through improved pre-processing
stages is limited in the reconstruction of specific fragments
vertex coordinate
n v
d
v
1
v
( )
1 1
, x y
( ) 1,m
v
d
( ) 1,2
v
d 1
v
2
v
( )
2 2
, x y
( ) 2,1
v
d
( ) 2,3
v
d
2
v
3
v
.
.
.
m
v
( )
2 2
, x y
.
.
.
( ) ,
m m
x y
( ) 3,2
v
d
.
.
.
( ) , 1 m m
v
d
( ) 3,4
v
d
.
.
.
( ) ,1 m
v
d
3
v
.
.
.
m
v