include some isolated or small regions. And a moving object
is always divided into several isolated regions. So
combining moving regions is necessary, that is to say, two
or more regions will be combined to one if they are near
enough. Some people use distance of center points of
regions to judge whether combining or not. In this article,
we combine two or more regions to one when the nearest
distance of them is below a threshold. Before calculating the
nearest distance D of two isolated regions (such as region A
and B), we first divide surroundings of region A into eight
parts, which can be reduced to three classes (I, II, III, seen
in Fig.1-1). In this article, relationship of region A and B
will include three cases. Case 1 means that region B is in
area I of region A completely (seen in Fig.1-2). Case 2
means that region B is above (or below) region A, and may
be completely or partly in area II of region A (seen in
Fig.1-3). Case 3 means that region B is in the left (or right)
of region A, and may be completely or partly in area III of
region A (seen in Fig.1-4). So we will define the nearest
distance of two regions according to different cases.
Positions of region A and B are including above three
situations. And the nearest distance D is calculated as
following: