# Two-Dimensional Fuzzy Spatial Relations: A New Way of Computing and Representation

Authors: Nadeem Salamat; El-hadi Zahzah
Journal: Advances in Fuzzy Systems
 (2012)

---

## Abstract

Fuzziness is found everywhere, in modeling spatial relations, fuzziness is found at object level as well as in relation semantics. Commonly, fuzzy topological relations are computed between fuzzy objects. Fuzziness in relation semantics is represented by fuzzy topological relations between crisp objects and these types of fuzzy topological relations are much less developed. In this paper, we propose a method for combining fuzzy topological and directional relations. We also propose an algorithm for defuzzification of relations which provides us a binary topological and directional relation between a 2D object pair. These relations are represented in a neighborhood graph. For validation and assessment, a number of experiments have been performed on artificial data.


---

## Body

## 1. Introduction

The space can be studied through objects as well as spatial relationship between them. These spatial relations provide information about topological structure, orientation between objects and their relative locations. Topological relations are derived from geometric descriptions. The 9-intersections and region connection calculus (RCC) [1, 2] are well known methods for defining binary topological relations. The 9-intersection method depends on point set topology where topological parts (interior, boundary, and exterior) of an object participate. In this method, topological structure is studied by empty (∅) and nonempty (¬∅) intersections of topological parts. Eight basic topological configurations between 2D objects in ℝ2 are observed out of 512 possible configurations. Many extensions have been proposed in the 9-intersection method [3–6]. The 9-intersection method is extended to deal with fuzzy objects and 44 useful topological relations were developed with the 9-intersection between objects with extended boundaries [7]. The 9-intersection method is also extended to 16 intersections and a set of 152 useful configurations between fuzzy regions in ℝ2 are observed [8]. The 9-intersection and the 16-intersection method do not represent fuzzy topological relations between crisp objects.On the other hand, the RCC method provides information about the topological structure of an image corresponding to eight basic topological relations in two-dimensional space. The RCC method is applied to regular topological spaces and this calculus is based on the axiomatic theory in which regions are primitives [9]. In this theory, spatial relations are based on a connection relation C(x,y). This calculus is extended to fuzzy theory and fuzzy topological relations are developed between fuzzy objects [10–12] and a set of 46 topological configurations are considered. This theory is also extended to deal fuzziness at relation semantics and fuzzy connection relation based on nearness is defined [13]. In this case, the next question which comes into mind is that where does a topological relation hold in space?Topological relations ignore the directional property between objects. Many methods for determining the binary directional relations have been discussed in literature. The matrix and a projection-based cardinal directions relation method are developed in qualitative domains [14, 15]. In the matrix method, reference object is considered by its minimum bounding rectangle (MBR) and area around the reference object is divided into tiles. Intersections between argument object and these tiles are computed and relations are defined based on empty and nonempty intersections. In projection-based methods, two-dimensional projections are taken on both axis then Allen relations are used and nine directional relations are defined out of 169 possibilities. Both methods provide similar results and MBR of the reference object is called neutral or direction-less region. To reasoning about situations when argument object occupies space in the central tile of the reference object, a method of internal cardinal directional (ICD) relations was introduced in [16]. This method divides the central tile of the matrix method into four, nine, or 13 subtiles and internal cardinal directional relations between object pair are calculated by the intersection of subtiles and argument object. These methods describe the extended objects according to their relative position. Once a directional relation is determined then the next issue that arises is concerned to the binary topological relation between object pair. Either two objects are disjoint, meet, andoverlap or one object is inside the other. These methods do not address the issue of topological relation between the object pair.In existing methods, one single method cannot be used to describe object position adequately in terms of topological and directional relations in image-understanding process. In qualitative domains, topological relations are usually studied between fuzzy objects such as in the RCC and the 9-intersection methods and for directional relations, fuzziness is associated to a relation. In language, people use fuzziness in the relation semantics, for example“Both objects are approximately equal” or “ObjectAapproximately meets objectBfrom East.” In this case both objects are crisp but relations are fuzzy. In the second example, both objects do not meet, but the relation meet depends upon nearness in direction East.A method which can describe fuzzy topological and directional relations between crisp objects is required. For this purpose, the idea of combined topological and directional relations is not new, fuzzy methods [17–20] can be used to model the fuzzy topological and directional relations simultaneously. This method represents fuzziness at relation level along with the answer to the question, where a topological relation holds in space. These methods represent directional view of fuzzy topological relations as histograms, in this representation technique, it is hard to decide which fuzzy topological relation holds between 2D objects and what is the possible directional relation. In this paper, a method for the  binary  topological and directional relations is developed  and algorithm for the defuzzication is proposed.  These defuzzified topological and directional relations are represented in a neighborhood graph.This paper is structured as follows. Section2 describes the related work. Some preliminary definitions are introduced in Section 3. Section 4 discusses in detail the different terms and necessary computations for 1D Allen relations. In Section 5, our method for computing the topological relations along with directional aspects and their interpretation is given. We also develop an algorithm for defuzzification of spatial relations. A neighborhood graph for defuzzified topological and directional relations is presented in Section 6. Results for different situations are given in Sections 7 and 8 consist of conclusion and future work.


## 2. Related Work

A number of methods for determining fuzzy spatial relations are introduced in literature. In early years, fuzzy topological and fuzzy directional relations are studied separately. In most of the existing topological relations methods [3, 6, 21, 22], uncertainty is represented at object level but this also exists at relation level. This type of uncertainty can be handled by assigning fuzzy membership value to a relation. According to our best knowledge, Schockaert et al. [13] are pioneers in this field. They have defined the fuzzy relation “connection” based on nearness and the topological fuzzy relations in RCC theory. The basic question, that what is the binary directional relation between object pair remains unanswered.Many approaches were adopted for developing fuzzy directional relations, such as angle histogram method [23], mathematical morphology [24], where fuzziness is associated to a relation. Angle histogram is the first numerical description of object relative position. Force histograms [25] were the extension of angle histogram which deals only disjoint objects. In all these methods, fuzzy directional relations are studied and less attention has been paid to fuzzy topological relations while topological and directional relations are considered essential to understand scene configuration, modeling common sense knowledge and spatial reasoning.Allen relations [26] create 13 partitions around the reference interval or segment corresponding to each relation and these partitions represent eight topological relations in R. To represent fuzziness at relation’s level along with the direction information, fuzzy Allen relations are developed. This method deals with the positional fuzziness in topological relations. To answer the question, that where a topological relation exists, the idea of combined topological and directional relations information was initiated by Malki et al. [17] using the Allen relations. This work was revisited by Matsakis and Nikitenko [18] and fuzziness in the Allen relations was introduced. Problem of computational complexity is considered in [20] and fuzzy t-conorms along with polygonal approximation is used. This work is related to fuzzy spatial aspects where the topological and directional relations are evaluated according to fuzzy set theoretical viewpoint.These 1D fuzzy topological relations are used to model the fuzziness in directional relations. In this paper, the idea is to specify fuzzy topological relations between 2D objects along with qualitative directional information. For this purpose each pair of 2D objects is decomposed into parallel segments in every direction and use 1D Allen relations. Matsakis et al. [27, 28] used this sort of relations but they use a selected combination of Allen relations and two different systems for modeling the topological and directional relations.In this paper, we first decompose the 2D objects into parallel segments and fuzzy Allen relations are determined between each pair of segments for directional variation from[0,π]. At the next step, 1D fuzzy topological relations are combined into qualitative directions. For the combination of directions, a trigonometric membership function is used [23]. This function associates a degree to each direction and this function has a certain properties which are further explained in Section 5. This information is represented into a matrix, it is a quantitative information of topological and directional relations between object pair. An algorithm is also proposed to define the JEPD fuzzy topological and directional relation. In this paper, a neighborhood graph for this set of JEPD topological and directional relations is developed. This graph is useful for the extension of spatial relations theory into spatiotemporal relations theory and spatiotemporal reasoning.The method addressed fuzziness at two levels. Firstly, in case of topological relations, secondly, fuzziness according to the directional viewpoint. Method of combined fuzzy topological and directional (CTD) relations has twofold impacts, Allen relations are combined in such a way that whole space can be analyzed by using the directions[0,π] and this method answers well the question that where a topological relation exists in space. This method will be helpful to answer the query completely in managing database and detecting the small changes in scene descriptions.


## 3. Preliminary Definitions

In this section, basic terms and definitions are denoted which are frequently used throughout the remainder of this paper.Fuzzy Membership Function
A membership functionμ in a set X is a function μ:X→[0,1]. Different fuzzy membership functions are proposed according to the requirements of the applications. For instance, trapezoidal membership function is defined as:
(1)μ(x;α,β,γ,δ)=max⁡(min⁡(x-αβ-α,1,δ-xδ-γ),0).
It is written as μ(α,β,γ,δ)(x) where x,α,β,γ,δ∈ℝ and α<β≤γ<δ.Fuzzy Set
A fuzzy setA in a set X is a set of pairs (X,μ(x)) such that A={(x,μ(x)∣x∈X)}, where μ represents a fuzzy membership function.Force Histogram
The force histogram attaches a weight to the argument objectA that object A lies afterB in direction θ, it is defined as:
(2)FAB(θ)=∫-∞+∞F(θ,Aθ(v),Bθ(v))dv.
The definition of Force histogram FAB(θ), directly depends on the definition of real valued functions ϕ, f, and F, which are used for the treatment of points, segments, and longitudinal sections, respectively [25]. These functions are defined as:
(3)ϕr(y)={1yr,ify>0,0,otherwise,f(xI,yIJθ,zJ)=∫xI+yIJθxI+yIJθ+zJ∫0zJϕ((u-w)dw)du,F(θ,Aθ(v),Bθ(v))=∑i=1⋯n,j=1⋯mf(xIi,yIiJjθ,zJj),
where n, m represent the number of segments of object A and object B, respectively, and variables (x,y,z) are explained in Figure 1.Figure 1
Oriented lineΔθ(v), segment as in B, longitudinal section as A.Conceptual Neighbor
Two relations between pairs of events areconceptual neighbors, if they can be directly transformed into one another by continuously deforming (by shortening, lengthening or moving) events in topological sense. A set of relations between pair of events form a conceptual neighborhood if its elements are path connected through conceptual neighbor relations [29].


## 4. Notations and Basic Terminology

This section describes the terminology used to decompose the2D objects into 1D parallel segments and computation of terms used in this paper.


### 4.1. Oriented Lines, Segments, and Longitudinal Sections

LetA and B be two spatial objects and (v,θ)∈ℝ, where v is any real number and θ∈[0,2π]. Let Δθ(v) be an oriented line at orientation angle θ and A∩Δθ(v) is the intersection of object A and oriented line Δθ(v). It is denoted by Aθ(v), called segment of object A and length of its projection interval on X-axis is x. Similarly for object B where B∩Δθ(v)=Bθ(v) is segment and length of its projection interval on X-axis is z, y is the difference between the minimum of projection points of A∩Δθ(v) and maximum value of projection points of B∩Δθ(v) (for details see [18]).In case of polygonal object approximation(x,y,z) are calculated from intersecting points of line and object boundary. Only those oriented lines are considered which pass through at least one vertex of two polygons. If there exists more than one segment, then it is called longitudinal section as in case of Aθ(v) in Figure 1.


### 4.2. 1D Allen Relations in Space

Allen [26] introduced 13 interval relations based on temporal interval algebra. These relations are arranged as 𝒜={<,m,o,s,f,d,eq,di,fi,si,oi,mi,>} with meanings before, meet, overlap, start, finish, during, equal, during by, finish by, start by, overlap by, meet by, and after. All the Allen relations in space are conceptually illustrated in Figure 2.Figure 2
Black segment represents the reference object and gray segment represents argument object.


### 4.3. Fuzzification of Allen Relations

There is a homeomorphism between Allen temporal relations and 1D topological relations. Due to this homeomorphism, Allen relations are used for extracting the combined directional and topological relations information by repeatedly decomposing a two-dimensional objects into 1D segments in every direction. Fuzzy Allen relations are used to represent 1D fuzzy topological relations between two line segments.The fuzzification process of Allen relations does not depend on particular choice of fuzzy membership function. Trapezoidal membership function (1) is used due to flexibility in shape. Let r(I,J) be an Allen relation between segments I and J where I∈A (argument object) and J∈B (reference object), r′ is the distance between r(I,J) and it’s conceptional neighborhood. We consider a fuzzy membership function such as defined in (1) and let μ:r′→[0,1]. The fuzzy Allen relations are defined as:(i)
f<(I,J)=μ(-∞,-∞,-b-3a/2,-b-a)(y), f>(I,J)=μ(0,a/2,∞,∞)(y),(ii)
fm(I,J)=μ(-b-3a/2,-b-a,-b-a,-b-a/2)(y),fmi(I,J)=μ(-a/2,0,0,a/2)(y),(iii)
fo(I,J)=μ(-b-a,-b-a/2,-b-a/2,b)(y),foi(I,J)=μ(-a,-a/2,-a/2,0)(y),(iv)
ff(I,J)=min(μ(-b+a/2,-a,-a,+∞)(y),μ(-3a/2,-a,-a,-a/2)(y),μ(z,2z,+∞,+∞)(x)),(v)
ffi(I,J)=min(μ-b-a/2,-b,-b,-b+a/2(y),μ(-∞,-∞,-b,-b+a/2)(y),μ(z,2z,+∞,+∞)(x)),(vi)
fs(I,J)=min(μ-b-a/2,-b,-b,-b+a/2(y), μ(-∞,-∞,-b,-b+a/2)(y),μ(-∞,-∞,z/2,z)(x)),(vii)
fsi(I,J)=min(μ3,μ(-3a/2,-a,-a,-a/2)(y), μ(z,2z,+∞,+∞)(x)),(viii)
fdi(I,J)=min(μ(-b,-b+a/2,-3a/2,-a)(y), μ(z,2z,+∞,+∞)(x)),(ix)
fd(I,J)=min(μ(-b,-b+a/2,-3a/2,-a)(y),μ(-∞,-∞,z/2,z)(x)),wherea=min(x,z),b=max(x,z) where x and z are the lengths of segment (I) and segment (J), respectively, and y is the difference between the minimum value of projection points of Aθ(v) and maximum value of projection points of Bθ(v).Most of relations are defined by one membership function likef<, f>, fm, and fmi and others are represented as a conjunction of more than one fuzzy membership function, such as ff, ffi, fs, fsi, fd, and fdi. In fuzzy set theory, sum of all the relations is one, this gives the definition for fuzzy equal relation. Fuzzy Allen relations are not JEPD because there exist at least two relations between two spatial objects. All these equations assign a numeric value to a spatial relation.


### 4.4. Treatment of Longitudinal Section

During the decomposition process of an object into segments, there can be multiple segments for a line depending on object shape and boundary that is called longitudinal section. Different segments of a longitudinal section are at a certain distance and these distances might affect end results. FuzzyT-norms, T-conorms, and fuzzy weighted operators are used for integration of available information, here for simplicity only T-conorm is used. 								(4)μ(OR)(u)=max⁡(μ(A)(u),μ(B)(u)),
where μA, μB represent the membership value for first and second segments of a longitudinal section. In this case each Allen relation has a fuzzy grade and the objective is to accumulate the best available information. The choice of this operator is discussed in [20]. When fuzzy operator OR is used, only one fuzzy value contributes for the resultant value that is maximum.


### 4.5. Normalization of Histogram of Fuzzy Allen Relations

The histogram of fuzzy Allen relations represents the total area of subregions ofA and B that are facing each other in given direction θ. Mathematically it can be written as [20]
(5)FrAB(θ)=∫-∞+∞Fr(θ,Aθ(v),Bθ(v))dv,
where Fr(θ,Aθ(v),Bθ(v))dv=r(Ik,Jk). In discrete space this integral can be written as sum of the surface areas. 								(6)FrAB(θ)=(X+Z)∑k=1nr(Ik,Jk),
where Z and X are the areas of reference and augment object, respectively, in direction θ and n is total number of segments to be treated and r(Ik,Jk) is an Allen relation for segments (Ik,Jk) and k=1,2,…,n. These histograms can easily be normalized by dividing an Allen relation by sum of them for every θ. It is represented by ⌈FrAB(θ)⌋ where r∈𝒜. ⌈FrAB(θ)⌋=FrAB(θ)/∑ρ∈AFρAB(θ) [18]. Each fuzzy Allen relation has its own weight in a specified direction θ. These normalized weights can be used to define the quantitative fuzzy directions.


### 4.6. Properties of Fuzzy Allen Relations

These fuzzy Allen relations verify some properties called reorientation of relations. Such as(i)
f>(θ)=f<(θ+π),fmi(θ)=fm(θ+π),foi(θ)=fo(θ+π),ff(θ)=fs(θ+π),(ii)
fsi(θ)=ffi(θ+π),f=(θ)=f=(θ+π),fdi(θ)=fdi(θ+π),fd(θ)=fd(θ+π).These relations can be written as𝒜1={<,m,o,s,d,fi,di,=} and their inverses as 𝒜2={>,mi,oi,f,d,si,di,=}. Two-dimensional eight topological relations are possible combination of eight independent Allen relations. These relations and their reorientation show that the whole 2D space can be explored with the help of Allen relations using the oriented lines varying from 0 to π.


## 4.1. Oriented Lines, Segments, and Longitudinal Sections

LetA and B be two spatial objects and (v,θ)∈ℝ, where v is any real number and θ∈[0,2π]. Let Δθ(v) be an oriented line at orientation angle θ and A∩Δθ(v) is the intersection of object A and oriented line Δθ(v). It is denoted by Aθ(v), called segment of object A and length of its projection interval on X-axis is x. Similarly for object B where B∩Δθ(v)=Bθ(v) is segment and length of its projection interval on X-axis is z, y is the difference between the minimum of projection points of A∩Δθ(v) and maximum value of projection points of B∩Δθ(v) (for details see [18]).In case of polygonal object approximation(x,y,z) are calculated from intersecting points of line and object boundary. Only those oriented lines are considered which pass through at least one vertex of two polygons. If there exists more than one segment, then it is called longitudinal section as in case of Aθ(v) in Figure 1.


## 4.2. 1D Allen Relations in Space

Allen [26] introduced 13 interval relations based on temporal interval algebra. These relations are arranged as 𝒜={<,m,o,s,f,d,eq,di,fi,si,oi,mi,>} with meanings before, meet, overlap, start, finish, during, equal, during by, finish by, start by, overlap by, meet by, and after. All the Allen relations in space are conceptually illustrated in Figure 2.Figure 2
Black segment represents the reference object and gray segment represents argument object.


## 4.3. Fuzzification of Allen Relations

There is a homeomorphism between Allen temporal relations and 1D topological relations. Due to this homeomorphism, Allen relations are used for extracting the combined directional and topological relations information by repeatedly decomposing a two-dimensional objects into 1D segments in every direction. Fuzzy Allen relations are used to represent 1D fuzzy topological relations between two line segments.The fuzzification process of Allen relations does not depend on particular choice of fuzzy membership function. Trapezoidal membership function (1) is used due to flexibility in shape. Let r(I,J) be an Allen relation between segments I and J where I∈A (argument object) and J∈B (reference object), r′ is the distance between r(I,J) and it’s conceptional neighborhood. We consider a fuzzy membership function such as defined in (1) and let μ:r′→[0,1]. The fuzzy Allen relations are defined as:(i)
f<(I,J)=μ(-∞,-∞,-b-3a/2,-b-a)(y), f>(I,J)=μ(0,a/2,∞,∞)(y),(ii)
fm(I,J)=μ(-b-3a/2,-b-a,-b-a,-b-a/2)(y),fmi(I,J)=μ(-a/2,0,0,a/2)(y),(iii)
fo(I,J)=μ(-b-a,-b-a/2,-b-a/2,b)(y),foi(I,J)=μ(-a,-a/2,-a/2,0)(y),(iv)
ff(I,J)=min(μ(-b+a/2,-a,-a,+∞)(y),μ(-3a/2,-a,-a,-a/2)(y),μ(z,2z,+∞,+∞)(x)),(v)
ffi(I,J)=min(μ-b-a/2,-b,-b,-b+a/2(y),μ(-∞,-∞,-b,-b+a/2)(y),μ(z,2z,+∞,+∞)(x)),(vi)
fs(I,J)=min(μ-b-a/2,-b,-b,-b+a/2(y), μ(-∞,-∞,-b,-b+a/2)(y),μ(-∞,-∞,z/2,z)(x)),(vii)
fsi(I,J)=min(μ3,μ(-3a/2,-a,-a,-a/2)(y), μ(z,2z,+∞,+∞)(x)),(viii)
fdi(I,J)=min(μ(-b,-b+a/2,-3a/2,-a)(y), μ(z,2z,+∞,+∞)(x)),(ix)
fd(I,J)=min(μ(-b,-b+a/2,-3a/2,-a)(y),μ(-∞,-∞,z/2,z)(x)),wherea=min(x,z),b=max(x,z) where x and z are the lengths of segment (I) and segment (J), respectively, and y is the difference between the minimum value of projection points of Aθ(v) and maximum value of projection points of Bθ(v).Most of relations are defined by one membership function likef<, f>, fm, and fmi and others are represented as a conjunction of more than one fuzzy membership function, such as ff, ffi, fs, fsi, fd, and fdi. In fuzzy set theory, sum of all the relations is one, this gives the definition for fuzzy equal relation. Fuzzy Allen relations are not JEPD because there exist at least two relations between two spatial objects. All these equations assign a numeric value to a spatial relation.


## 4.4. Treatment of Longitudinal Section

During the decomposition process of an object into segments, there can be multiple segments for a line depending on object shape and boundary that is called longitudinal section. Different segments of a longitudinal section are at a certain distance and these distances might affect end results. FuzzyT-norms, T-conorms, and fuzzy weighted operators are used for integration of available information, here for simplicity only T-conorm is used. 								(4)μ(OR)(u)=max⁡(μ(A)(u),μ(B)(u)),
where μA, μB represent the membership value for first and second segments of a longitudinal section. In this case each Allen relation has a fuzzy grade and the objective is to accumulate the best available information. The choice of this operator is discussed in [20]. When fuzzy operator OR is used, only one fuzzy value contributes for the resultant value that is maximum.


## 4.5. Normalization of Histogram of Fuzzy Allen Relations

The histogram of fuzzy Allen relations represents the total area of subregions ofA and B that are facing each other in given direction θ. Mathematically it can be written as [20]
(5)FrAB(θ)=∫-∞+∞Fr(θ,Aθ(v),Bθ(v))dv,
where Fr(θ,Aθ(v),Bθ(v))dv=r(Ik,Jk). In discrete space this integral can be written as sum of the surface areas. 								(6)FrAB(θ)=(X+Z)∑k=1nr(Ik,Jk),
where Z and X are the areas of reference and augment object, respectively, in direction θ and n is total number of segments to be treated and r(Ik,Jk) is an Allen relation for segments (Ik,Jk) and k=1,2,…,n. These histograms can easily be normalized by dividing an Allen relation by sum of them for every θ. It is represented by ⌈FrAB(θ)⌋ where r∈𝒜. ⌈FrAB(θ)⌋=FrAB(θ)/∑ρ∈AFρAB(θ) [18]. Each fuzzy Allen relation has its own weight in a specified direction θ. These normalized weights can be used to define the quantitative fuzzy directions.


## 4.6. Properties of Fuzzy Allen Relations

These fuzzy Allen relations verify some properties called reorientation of relations. Such as(i)
f>(θ)=f<(θ+π),fmi(θ)=fm(θ+π),foi(θ)=fo(θ+π),ff(θ)=fs(θ+π),(ii)
fsi(θ)=ffi(θ+π),f=(θ)=f=(θ+π),fdi(θ)=fdi(θ+π),fd(θ)=fd(θ+π).These relations can be written as𝒜1={<,m,o,s,d,fi,di,=} and their inverses as 𝒜2={>,mi,oi,f,d,si,di,=}. Two-dimensional eight topological relations are possible combination of eight independent Allen relations. These relations and their reorientation show that the whole 2D space can be explored with the help of Allen relations using the oriented lines varying from 0 to π.


## 5. Topological and Directional Relations

This section consists of five subsections. In Section5.1, fuzzy membership functions for directional relations and possible combination of 1D Allen relations are described. Section 5.2 discusses relationship between 1D Allen and topological relations. An algorithm for defuzzification of fuzzy relations is proposed in Section 5.3.


### 5.1. Fuzzy Membership Function for Directional Relations

The equations defined in Section4.3 assigns a numeric value to a spatial relation in a direction θ. To asses qualitative directions, a number of fuzzy membership functions have been proposed for assessing the directional relations, these functions include the trigonometric [23], triangular, and trapezoidal membership function or by means of favorable and unfavorable forces in force histograms method [25].In this paper, we prefer to use trigonometric functions which are easy to implement. The functionf(θ) to model the direction Right_of for four-directional system should have conditions, f(+(π/2))=0=f(-(π/2)) and f(0)=1. This function is increasing in the interval (-(π/2),0) and decreasing in the interval (0,π/2). At π/4 both relations Above or North and Right_of have equal values. Similarly at -(π/4) both Below or South and Right_of have equal values. Cos2(θ)=Sin2(θ)=1/2 at ±(π/4) are the best choices.To formulate eight directions, straightway process is to narrow the interval, that is,f(+(π/4))=0=f(-(π/4)) and f(0)=1 for relation Right_of. For this purpose double-angle trigonometric functions are used which satisfies all the above cited conditions. Directions are represented as {E,NE,N,NW,W,SW,S,SE} with meanings East, North_East, North, North_West, West, South_West, South, and South_East.The angle distribution is taken to the half plane so opposite Allen relations are used to define the opposite directions except the directionEast and West where union of both relations is used. This exception is used due to the reorientation of relations. Domain of East and West relations lies in different Allen relations (domain of East directional relation is [-π/4,π/4] and f<(θ)=f>(θ+π). This combination of relations results in the decrease of computational complexity due to angle distribution from [0,π]). Mathematically these relations are written as:(i)
fE=∑θ=0π/4𝒜2×cos2(2θ)+∑θ=3π/4π𝒜1×cos2(2θ),(ii)
fW=∑θ=0π/4𝒜1×cos2(2θ)+∑θ=3π/4π𝒜2×cos2(2θ),(iii)
fN=∑θ=π/43π/4𝒜2×cos2(2θ),(iv)
fS=∑θ=π/43π/4𝒜1×cos2(2θ),(v)
fNE=∑θ=0π/2𝒜2×sin2(2θ),(vi)
fNW=∑θ=π/2π𝒜2×sin2(2θ),(vii)
fSW=∑θ=0π/2𝒜1×sin2(2θ),(viii)
fSE=∑θ=π/2π𝒜1×sin2(2θ),where𝒜i, i=1,2 given in Section 4.6 are the fuzzy Allen relations with 𝒜2 is the reorientation of 𝒜1 and f∈{D,M,PO,TPP,NTPP,TPPI,NTPPI,EQ} is a topological relation (Disjoint, Meet, Partially overlap, Tangent proper part, Nontangent proper part, Tangent proper part Inverse, Nontangent proper part Inverse, and Equal). In this way the relations are manipulated as a (8×8) matrix (C(i,j)) where row holds the topological relations and columns have the qualitative directional aspects of 2D scene information. Relations are expressed in numeric values where each value (c(i,j)) represents the percentage area of two objects under a specific topological relation in that qualitative direction.


### 5.2. Computing Two-Dimensional Topological Relations from Allen Relations

Simple 1D definitions cannot be extended and applied directly to a 2D space. Some assumptions have to be adopted and these definitions are extended to two-dimensional case through logic.In the case of merging the topological and directional relations, some of the topological relations depend on a finite direction and limited set of points such asM, PO, TPP, TPPI. Relations like NTPP, NTPPI, and EQ hold if the relation holds in all directions. The topological relations which exist in a finite directions, they share with another topological relation existing in another direction. The relations which exist in all directions, they share directional relations. Temporal Allen relations represent the eight topological relations in spatial domain ℝ, these relations can be extended to spatial domain ℝ2 through the logical implication. These relations are defined as follows:DisjointD(A,B)
In theRCC theory, two objects are disjoint when there does not exist a connection relation (e.g., Disjoint(A,B)⇒¬C(A,B)). A fuzzy connection relation based on nearness1 is defined using the resemblance relation. This states that if two objects are at a certain distance and resemblance relation is zero degree then objects will be disjoint. In our method, functions fm and fmi play the same role as the resemblance relation Rα,β(A,B) with variable α=0 for the 1D interval. In such a case both functions, f> and f<, capture the semantics of ¬Rα,β(I,J), representing disjoint topological relation between two intervals on a real line. This provides us additional information that argument interval is either before or after the reference interval. This definition of disjointness of 1D intervals can be extended to two-dimensional objects by following relation:
(7)(A,B)aredisjoint⟺{∨θ∈[0,π](I,J)aredisjoint},
where A,B are 2D objects. Now follow equation (7), objects have fuzzy disjoint topological relation in a direction θ if all parallel segments are topologically disjoint in direction θ. A fuzzy disjoint topological relation exists in 2D domain if it exists in all directions, that is, all the f< or f> behave like crisp functions and have a unit value along all oriented lines in [0,π]. All the other functions have zero values and objects are at certain distance. These relations are explained in Table 1.Table 1
Explanation of rows and columns in representation matrix.
Row(i)12345678Top. rel.DMPOTPPNTPPTPPINTPPIEQColumn(j)12345678Dir. rel.ENENNWWSWSSEMeetM(A,B)
According to the topological view point, two objects have ameet topological relation when they share at least one boundary point and they do not share the interior regions of two objects. In our method of defining the topological relations, two functions are introduced fm and fmi. Both functions play similar role like the resemblance relation defined by Schockaert et al. in [13], where degree of closeness is one, when the intervals share a common point and smooth transition from closeness to apart depends upon the size of the smaller interval. Both functions capture some additional semantics regarding position of the interval, either the interval is after or before the reference interval. To make the sense in 2D scene, overall Meet relation holds if at least one fm or fmi has some nonzero value for any θ∈[0,π] and all the other directions have the Disjoint topological relation. These relations are explained in Table 3.Partially OverlapPO(A,B)
Partially overlap relation in topology (or overlap) exists when two objects share their interior region, in such a case their boundaries intersect at least from two points. Inℝ the functions fo and foi capture the overlap semantics on the interval along with the directional information. When 2D objects are decomposed into 1D segments, each pair of segments may have the different topological relations in different directions, for example, the object segments in direction θi may have overlap relation while in direction θj may have meet topological relation and in direction θk both the segments may be disjoint, where i≠j≠k∧θi,θj,θk∈[0,π]. This shows that overlap in 2D objects has other topological relations between 1D segments of both objects. These relations are explained in Table 4.Tangent Proper PartTPP(A,B) and TPPI(A,B)
TPP(A,B) topological relation hold in 2D space when A⊂B and they share a common point on the boundary. In 1D spaces the relation fs or ff shares the same semantics, if f is a crisp relation. In case of f is a fuzzy relation they represent the fuzzy semantics. When a 2D object is decomposed into 1D segments, in a limited number of directions, they have the relation fs or ff while in other directions object is contained in the container, during Allen relation exists. Similarly in case of TPPI topological relation, in some directions the 1D segments share the common boundary point and fsi and ffi fuzzy Allen relations exist while in other directions the di Allen relation exists. In our system of defining the topological and directional relations information, TPP (TPPI) relation exists in some direction while in other directions NTPP (respectivelyNTPPI) relation exists. These relations are explained in Tables 5 and 6.Nontangent Proper PartNTPP(A,B)
This topological relation holds when argument object is contained in reference object and both objects do not share boundary. It means that object is contained in container object in all directions. When 1D Allen relations are applied to the spatial domain, relationd captures same semantics. If each segment of an argument object is contained in the segment of a reference object in all directions, then argument object is topologically inside the reference object and they do not share boundary. Representing the fuzzy semantics, it is observed that this relation holds when there is a certain distance between boundaries of both objects. Situations having such relations are explained in first row in Table 7 of Section 7.6.Nontangent Proper Part InverseNTPPI(A,B)
This topological relation holds when the container is an argument object and reference object is contained in the argument object, for example, objectB is a reference and A is an argument object and object B is contained in object A, both objects do not share boundary points. It means that the object is contained in the container object in all directions. When the 1D relations are applied to the spatial domain, the relation di captures the same semantics. If each segment of an argument object is contained in the segment of a reference object and this relation holds in all the directions, then there exists topological relation NTPPI for a pair of 2D objects. As explained in second row in Table 7 of Section 7.6.EqualEQ(A,B)
Two objectsA and B are equal if they share the interior, exterior, and boundary. Semantically both objects have the same interior, boundary, and exterior. In RCC system equal topological relations are defined as EQ(A,B)≡defP(A,B)∧P(B,A). Geometrically two regions are called equal when both objects seem equal in all directions. Function f= in our system captures the semantics equal if two intervals are equal. When this relation is applied to 1D segments of 2D objects, segments of both objects must be equal in all directions. These results that degree of EQ topological relation distributed equally in all directions. As explained in third row in Table 7 of Section 7.6.


### 5.3. Defuzzification of Relations

Numerical values of a relation are stored in a matrix called fuzzy matrix of relations. The relations are manipulated in (8×8) matrix where topological relations are represented into rows and columns show directional distribution of each topological relation. The normalized histogram of fuzzy Allen relations represents a percentage surface area of two objects in a given direction θ. Multiplication with the directional fuzzy set normalizes this histogram over the whole 2D space. Hence, each entity of this matrix represents percentage surface area of two objects, C(i,j) represents the ith topological relation in jth direction. Rows and columns of the representation matrix are explained below2.These relations are not jointly exhaustive and pairwise disjoint (JEPD). To approximate 2D topological and directional relation, an algorithm for defuzzification of relations is proposed.Defuzzification can be performed by a multiple ways, topological relations do not depend on numerical values. Two dimensional objects are decomposed into one-dimensional segments and two dimensional overlap topological relations give rise to all the one-dimensional topological relations in different directions. Another reason is that our question at hand is that where a topological relation holds between the object pair, we proceeds for extracting topological relation then proceed for directional relation. Fuzzy directional relations are distributed over multiple directions and reasoning about directional relations is performed by plausible occurrence of relation so we choose the maximum numerical value of directional relation.As discussed in Section5.2, that when a 2D object having a partially overlap relation is decomposed into 1D segments, then almost all the relations are possible between the segments in different directions. This distribution of 1D spatial relations depends upon the size of objects and overlapping surface area of objects. Due to this reason extraction method must be started from overlap relation. If partial overlap relation does not exist anywhere then we search for other possible topological relation. Proposed algorithm for 2D topological relation from 1D topological relations is described as Algorithm 1. The output of this algorithm is a pair of JEPD topological and directional relation. These relations are possible to represent in a neighborhood graph for topological and directional relations.Algorithm 1:Algorithm for defuzzification of 2D fuzzy topological and directional relations.
fori,j=1 to 8 doifC(3,j)≠0 thentopological relation is overlap and directional relation ismaxj(C(2,j),C(3,j),C(4,j),C(6,j))else ifC(4,j)≠0 thentopological relation isTPP and directional relation is maxj(C(4,j))else ifC(6,j)≠0 thentopological relation isTPPI and directional relation is maxj(C(6,j))else if all C(5,:) are approximately equal for all j thentopological relation will be NTPPelse if all C(7,:) are approximately equal for all j thentopological relation isNTPPIelse if all C(8,:) are approximately equal for all j thentopological relation will beEQelse ifC(2,j)≠0∧C(i,j)=0∨i≥3 thentopological relation is meetM and directional relation is maxj(C(2,j))elsetopological relation is Disjoint and directional relation ismaxj(C(1,j))end ifend for


## 5.1. Fuzzy Membership Function for Directional Relations

The equations defined in Section4.3 assigns a numeric value to a spatial relation in a direction θ. To asses qualitative directions, a number of fuzzy membership functions have been proposed for assessing the directional relations, these functions include the trigonometric [23], triangular, and trapezoidal membership function or by means of favorable and unfavorable forces in force histograms method [25].In this paper, we prefer to use trigonometric functions which are easy to implement. The functionf(θ) to model the direction Right_of for four-directional system should have conditions, f(+(π/2))=0=f(-(π/2)) and f(0)=1. This function is increasing in the interval (-(π/2),0) and decreasing in the interval (0,π/2). At π/4 both relations Above or North and Right_of have equal values. Similarly at -(π/4) both Below or South and Right_of have equal values. Cos2(θ)=Sin2(θ)=1/2 at ±(π/4) are the best choices.To formulate eight directions, straightway process is to narrow the interval, that is,f(+(π/4))=0=f(-(π/4)) and f(0)=1 for relation Right_of. For this purpose double-angle trigonometric functions are used which satisfies all the above cited conditions. Directions are represented as {E,NE,N,NW,W,SW,S,SE} with meanings East, North_East, North, North_West, West, South_West, South, and South_East.The angle distribution is taken to the half plane so opposite Allen relations are used to define the opposite directions except the directionEast and West where union of both relations is used. This exception is used due to the reorientation of relations. Domain of East and West relations lies in different Allen relations (domain of East directional relation is [-π/4,π/4] and f<(θ)=f>(θ+π). This combination of relations results in the decrease of computational complexity due to angle distribution from [0,π]). Mathematically these relations are written as:(i)
fE=∑θ=0π/4𝒜2×cos2(2θ)+∑θ=3π/4π𝒜1×cos2(2θ),(ii)
fW=∑θ=0π/4𝒜1×cos2(2θ)+∑θ=3π/4π𝒜2×cos2(2θ),(iii)
fN=∑θ=π/43π/4𝒜2×cos2(2θ),(iv)
fS=∑θ=π/43π/4𝒜1×cos2(2θ),(v)
fNE=∑θ=0π/2𝒜2×sin2(2θ),(vi)
fNW=∑θ=π/2π𝒜2×sin2(2θ),(vii)
fSW=∑θ=0π/2𝒜1×sin2(2θ),(viii)
fSE=∑θ=π/2π𝒜1×sin2(2θ),where𝒜i, i=1,2 given in Section 4.6 are the fuzzy Allen relations with 𝒜2 is the reorientation of 𝒜1 and f∈{D,M,PO,TPP,NTPP,TPPI,NTPPI,EQ} is a topological relation (Disjoint, Meet, Partially overlap, Tangent proper part, Nontangent proper part, Tangent proper part Inverse, Nontangent proper part Inverse, and Equal). In this way the relations are manipulated as a (8×8) matrix (C(i,j)) where row holds the topological relations and columns have the qualitative directional aspects of 2D scene information. Relations are expressed in numeric values where each value (c(i,j)) represents the percentage area of two objects under a specific topological relation in that qualitative direction.


## 5.2. Computing Two-Dimensional Topological Relations from Allen Relations

Simple 1D definitions cannot be extended and applied directly to a 2D space. Some assumptions have to be adopted and these definitions are extended to two-dimensional case through logic.In the case of merging the topological and directional relations, some of the topological relations depend on a finite direction and limited set of points such asM, PO, TPP, TPPI. Relations like NTPP, NTPPI, and EQ hold if the relation holds in all directions. The topological relations which exist in a finite directions, they share with another topological relation existing in another direction. The relations which exist in all directions, they share directional relations. Temporal Allen relations represent the eight topological relations in spatial domain ℝ, these relations can be extended to spatial domain ℝ2 through the logical implication. These relations are defined as follows:DisjointD(A,B)
In theRCC theory, two objects are disjoint when there does not exist a connection relation (e.g., Disjoint(A,B)⇒¬C(A,B)). A fuzzy connection relation based on nearness1 is defined using the resemblance relation. This states that if two objects are at a certain distance and resemblance relation is zero degree then objects will be disjoint. In our method, functions fm and fmi play the same role as the resemblance relation Rα,β(A,B) with variable α=0 for the 1D interval. In such a case both functions, f> and f<, capture the semantics of ¬Rα,β(I,J), representing disjoint topological relation between two intervals on a real line. This provides us additional information that argument interval is either before or after the reference interval. This definition of disjointness of 1D intervals can be extended to two-dimensional objects by following relation:
(7)(A,B)aredisjoint⟺{∨θ∈[0,π](I,J)aredisjoint},
where A,B are 2D objects. Now follow equation (7), objects have fuzzy disjoint topological relation in a direction θ if all parallel segments are topologically disjoint in direction θ. A fuzzy disjoint topological relation exists in 2D domain if it exists in all directions, that is, all the f< or f> behave like crisp functions and have a unit value along all oriented lines in [0,π]. All the other functions have zero values and objects are at certain distance. These relations are explained in Table 1.Table 1
Explanation of rows and columns in representation matrix.
Row(i)12345678Top. rel.DMPOTPPNTPPTPPINTPPIEQColumn(j)12345678Dir. rel.ENENNWWSWSSEMeetM(A,B)
According to the topological view point, two objects have ameet topological relation when they share at least one boundary point and they do not share the interior regions of two objects. In our method of defining the topological relations, two functions are introduced fm and fmi. Both functions play similar role like the resemblance relation defined by Schockaert et al. in [13], where degree of closeness is one, when the intervals share a common point and smooth transition from closeness to apart depends upon the size of the smaller interval. Both functions capture some additional semantics regarding position of the interval, either the interval is after or before the reference interval. To make the sense in 2D scene, overall Meet relation holds if at least one fm or fmi has some nonzero value for any θ∈[0,π] and all the other directions have the Disjoint topological relation. These relations are explained in Table 3.Partially OverlapPO(A,B)
Partially overlap relation in topology (or overlap) exists when two objects share their interior region, in such a case their boundaries intersect at least from two points. Inℝ the functions fo and foi capture the overlap semantics on the interval along with the directional information. When 2D objects are decomposed into 1D segments, each pair of segments may have the different topological relations in different directions, for example, the object segments in direction θi may have overlap relation while in direction θj may have meet topological relation and in direction θk both the segments may be disjoint, where i≠j≠k∧θi,θj,θk∈[0,π]. This shows that overlap in 2D objects has other topological relations between 1D segments of both objects. These relations are explained in Table 4.Tangent Proper PartTPP(A,B) and TPPI(A,B)
TPP(A,B) topological relation hold in 2D space when A⊂B and they share a common point on the boundary. In 1D spaces the relation fs or ff shares the same semantics, if f is a crisp relation. In case of f is a fuzzy relation they represent the fuzzy semantics. When a 2D object is decomposed into 1D segments, in a limited number of directions, they have the relation fs or ff while in other directions object is contained in the container, during Allen relation exists. Similarly in case of TPPI topological relation, in some directions the 1D segments share the common boundary point and fsi and ffi fuzzy Allen relations exist while in other directions the di Allen relation exists. In our system of defining the topological and directional relations information, TPP (TPPI) relation exists in some direction while in other directions NTPP (respectivelyNTPPI) relation exists. These relations are explained in Tables 5 and 6.Nontangent Proper PartNTPP(A,B)
This topological relation holds when argument object is contained in reference object and both objects do not share boundary. It means that object is contained in container object in all directions. When 1D Allen relations are applied to the spatial domain, relationd captures same semantics. If each segment of an argument object is contained in the segment of a reference object in all directions, then argument object is topologically inside the reference object and they do not share boundary. Representing the fuzzy semantics, it is observed that this relation holds when there is a certain distance between boundaries of both objects. Situations having such relations are explained in first row in Table 7 of Section 7.6.Nontangent Proper Part InverseNTPPI(A,B)
This topological relation holds when the container is an argument object and reference object is contained in the argument object, for example, objectB is a reference and A is an argument object and object B is contained in object A, both objects do not share boundary points. It means that the object is contained in the container object in all directions. When the 1D relations are applied to the spatial domain, the relation di captures the same semantics. If each segment of an argument object is contained in the segment of a reference object and this relation holds in all the directions, then there exists topological relation NTPPI for a pair of 2D objects. As explained in second row in Table 7 of Section 7.6.EqualEQ(A,B)
Two objectsA and B are equal if they share the interior, exterior, and boundary. Semantically both objects have the same interior, boundary, and exterior. In RCC system equal topological relations are defined as EQ(A,B)≡defP(A,B)∧P(B,A). Geometrically two regions are called equal when both objects seem equal in all directions. Function f= in our system captures the semantics equal if two intervals are equal. When this relation is applied to 1D segments of 2D objects, segments of both objects must be equal in all directions. These results that degree of EQ topological relation distributed equally in all directions. As explained in third row in Table 7 of Section 7.6.


## 5.3. Defuzzification of Relations

Numerical values of a relation are stored in a matrix called fuzzy matrix of relations. The relations are manipulated in (8×8) matrix where topological relations are represented into rows and columns show directional distribution of each topological relation. The normalized histogram of fuzzy Allen relations represents a percentage surface area of two objects in a given direction θ. Multiplication with the directional fuzzy set normalizes this histogram over the whole 2D space. Hence, each entity of this matrix represents percentage surface area of two objects, C(i,j) represents the ith topological relation in jth direction. Rows and columns of the representation matrix are explained below2.These relations are not jointly exhaustive and pairwise disjoint (JEPD). To approximate 2D topological and directional relation, an algorithm for defuzzification of relations is proposed.Defuzzification can be performed by a multiple ways, topological relations do not depend on numerical values. Two dimensional objects are decomposed into one-dimensional segments and two dimensional overlap topological relations give rise to all the one-dimensional topological relations in different directions. Another reason is that our question at hand is that where a topological relation holds between the object pair, we proceeds for extracting topological relation then proceed for directional relation. Fuzzy directional relations are distributed over multiple directions and reasoning about directional relations is performed by plausible occurrence of relation so we choose the maximum numerical value of directional relation.As discussed in Section5.2, that when a 2D object having a partially overlap relation is decomposed into 1D segments, then almost all the relations are possible between the segments in different directions. This distribution of 1D spatial relations depends upon the size of objects and overlapping surface area of objects. Due to this reason extraction method must be started from overlap relation. If partial overlap relation does not exist anywhere then we search for other possible topological relation. Proposed algorithm for 2D topological relation from 1D topological relations is described as Algorithm 1. The output of this algorithm is a pair of JEPD topological and directional relation. These relations are possible to represent in a neighborhood graph for topological and directional relations.Algorithm 1:Algorithm for defuzzification of 2D fuzzy topological and directional relations.
fori,j=1 to 8 doifC(3,j)≠0 thentopological relation is overlap and directional relation ismaxj(C(2,j),C(3,j),C(4,j),C(6,j))else ifC(4,j)≠0 thentopological relation isTPP and directional relation is maxj(C(4,j))else ifC(6,j)≠0 thentopological relation isTPPI and directional relation is maxj(C(6,j))else if all C(5,:) are approximately equal for all j thentopological relation will be NTPPelse if all C(7,:) are approximately equal for all j thentopological relation isNTPPIelse if all C(8,:) are approximately equal for all j thentopological relation will beEQelse ifC(2,j)≠0∧C(i,j)=0∨i≥3 thentopological relation is meetM and directional relation is maxj(C(2,j))elsetopological relation is Disjoint and directional relation ismaxj(C(1,j))end ifend for


## 6. Neighborhood Graph

Conceptual neighborhood graphs describe the possible continuous transitions. Graphs in topological relations describe the topological transitions between object pair when topological transformations are applied. These transformations denote the movement, expansion, and contraction of objects. On the other hand, neighborhood graph in directional relations captures only movement.These neighborhood graphs are frequently used for common sense reasoning and path planning in many A.I. fields. These graphs are developed between the crisp relations. Combined topological and directional relations, after the defuzzification process behaves like the crisp relations. A graph can describe the three types of movements, here for simplicity we represent one part of the complete graph.In Figure3, it is shown that every node of the neighborhood graph has eight edges except from the nodes representing the D and TPP relations. Each node represents a pair (α,β) of relations where α represents the topological and β represents the orientation relation. In this neighborhood graph each node has eight neighbors circular, straight, and diagonal neighbors, respectively, represent directional, topological, and topological-directionalneighbors.Figure 3
Neighborhood graph in the system of combined topological and directional relations (CTD) method.


## 7. Experiments

The fuzzy relations that are manipulated in(8×8) matrix where topological relations are represented into rows and columns show the directional distribution of each topological relation. Values in each cell represent the strength of the relation between pair of the objects. Throughout this paper reference object B is represented by dark grey color and light grey object represents the argument object A. In these tables, object pairs are represented in first column, second column shows the graphical representation of results. In third column, results for the defuzzified topological and directional relations are represented, these results are produced by the Algorithm 1. Throughout the rest of paper, the abbreviation Top. rel. is used for topological relation and Dir. is used for directional relation.


### 7.1. Fuzzy Disjoint (D) Topological Relation

In this section the fuzzy disjoint topological relations in different directions are considered. As in Table2, first column represents spatial position of objects and second column represents the overall 2D topological and directional relations and defuzzified topological and directional relation by Algorithm 1 are depicted in third column. As object A changes its position, its directional relation also changes, in first row of Table 2, argument object lies in E to the reference object B. The Algorithm generates the topological relation Disjoint and directional relation East. In second row, argument object lies in direction North_West, it histogram representation shows that in the North_West direction, it has the maximum membership value, as a result, algorithm allocates it a directional relation North_West.Table 2
Topological relation D.
Obj. pairsMatrix rep.Algo. outputTop. rel. = DDir. = ETop. rel.= DDir = N_WTop. rel. = DDir = WTop. rel. = DDir. = S_WTable 3
Topological relation M.
Obj. pairsMatrix rep. of relationsAlgo. outputTop. rel. = MDir. = EastTop. rel. = MDir = NorthTop. rel. = MDir = NWTop. rel. = MDir. = WTable 4
Object pairs with PO topological relation.
Obj. pairsMatrix rep. of relationsAlgo. outputTop. rel. = PODir. = EastTop. rel. = PODir = NTop. rel. = PODir = WTop. rel. = PODir. = STable 5
Object pairs with TPP topological and their directional relations.
Obj. pairsMatrix rep. of relationsAlgo. outputTop. rel. = TPPDir. = ETop. rel. = TPPDir = NTop. rel. = TPPDir = WTop. rel. = TPPDir. = STable 6
Object pairs with TPPI topological and their directional relations.
Obj. pairsMatrix rep.Algo. outputTop. rel. = TPPIDir. = ETop. rel. = TPPIDir = NTop. rel. = TPPIDir = WestTop. rel. = TPPIDir. = SouthTable 7
Topological relations NTPP, NTPPI and EQ.
Obj. pairsMatrix rep.Algo. outputTop. rel. = NTPPDir. = AllTop. rel. = NTPPIDir. = AllTop. Rel. = EqualDir. = All


### 7.2. Fuzzy Meet (M) Topological Relation

Fuzzy meetM relations in topology exist when the objects are exactly meeting or very close to each other and it seems that they are sharing the boundary. The Table 3 represents the fuzzy meet topological relation (M).First column shows the object locations at different directions of argument objectA with respect to the reference object B. First rows show that the argument object A touches the object B from the East direction (first column). Second column shows its histogram representation where the relations are shared between the Disjoint and Meet (second column) and their 2D topological relation generated by the algorithm are shown in third column. Similarly second row represents the argument object touches the reference object from North direction, for this object pair algorithm produces the result that M topological relation with North directional relation. In the third row argument object seems touching from the north_ west direction, hence the output of algorithm shows that M topological relation holds with directional relation North_West. Similarly argument object in last row nearly touches from west as a result the algorithm for defuzzification of spatial relations produces the resultant direction as West.


### 7.3. Fuzzy Overlap (PO) Topological Relation

In this example we consider the overlapping objects in different directions. The object relative position, topological and directional relations, and the topological and directional relations generated by the Algorithm1 are described in Table 3.In the first column, object pairs are represented having the topological relationPartially_Overlap in different directions, second column represents topological and directional relations in a histogram representation. The results generated by algorithm are denoted in third column. As soon as object changes their position, topological and directional relations matrix also changes. The directional relation between overlapping objects depends upon the relative size, shape and overlapping surface area of objects. In all the above-cited examples, object A is smaller relatively to object B.


### 7.4. Fuzzy TPP Topological Relation

In crisp topological relations, this relation holds when the argument object lies inside the reference object and share the boundary with the reference object. In fuzzy relations, this relation (TPP) holds when the argument object lies inside the reference object near the boundary. In this method an entity in the matrix represents the degree of topological relation in a particular direction, as a result this relation holds in a particular direction along with the other fuzzy topological NTPP relation in other directions. For example in first row of the Table4 where object lies near the eastern edge of reference object, their relations show that highest value of topological relation, TPP, exists in direction East while in all other directions fuzzy topological relation, NTPP, holds. Third column represent the topological and directional relation which is the algorithm output.


### 7.5. Fuzzy TPPI Topological Relation

In this example, reference objectB is considered inside the argument object A. The object pairs are shown in first column of the Table 5. Second column shows the histogram representation of relations and third column shows the results produced by the Algorithm 1 as a single topological and directional relation.Obviously it is an inverse relation as a result visually reference object seems to be in opposite direction of the directional relation. In first row of the table, visually reference object lies near theWest edge of the argument object, but its relation is East, this is due to the inverse topological relation. When the objects commute, the topological and directional relations become inverse, for example consider the object pairs in third row of Table 4 and first row of Table 5, both represent the same object pair, when the objects commute, both the topological and directional relations become inverse to each other. Similarly for the other object pairs in Tables 4 and 5, same object is used to represent the object pair when objects commute the topological and directional relations become inverse.


### 7.6. Fuzzy NTPP, NTPPI, and EQ Topological Relations

In these examples, all those topological relations which must exist in all the directions are considered.Here, it is explained that a single topological relation must be held in all the directions for reference object. The object pairs are represented in first column of the Table6. In first row, argument object A lies inside the reference object B as a result the NTPP relation holds equally in all directions, these results are represented in first row of the table, the algorithm generates the directional relation All which means that this topological relation holds in all directions. In second row reference object B lies inside the argument object, as a result inverse topological relation holds in all directions. Third rows show the situation, when both objects are equal in size, thus fuzzy equal relation holds if both objects have equal size in all directions.


## 7.1. Fuzzy Disjoint (D) Topological Relation

In this section the fuzzy disjoint topological relations in different directions are considered. As in Table2, first column represents spatial position of objects and second column represents the overall 2D topological and directional relations and defuzzified topological and directional relation by Algorithm 1 are depicted in third column. As object A changes its position, its directional relation also changes, in first row of Table 2, argument object lies in E to the reference object B. The Algorithm generates the topological relation Disjoint and directional relation East. In second row, argument object lies in direction North_West, it histogram representation shows that in the North_West direction, it has the maximum membership value, as a result, algorithm allocates it a directional relation North_West.Table 2
Topological relation D.
Obj. pairsMatrix rep.Algo. outputTop. rel. = DDir. = ETop. rel.= DDir = N_WTop. rel. = DDir = WTop. rel. = DDir. = S_WTable 3
Topological relation M.
Obj. pairsMatrix rep. of relationsAlgo. outputTop. rel. = MDir. = EastTop. rel. = MDir = NorthTop. rel. = MDir = NWTop. rel. = MDir. = WTable 4
Object pairs with PO topological relation.
Obj. pairsMatrix rep. of relationsAlgo. outputTop. rel. = PODir. = EastTop. rel. = PODir = NTop. rel. = PODir = WTop. rel. = PODir. = STable 5
Object pairs with TPP topological and their directional relations.
Obj. pairsMatrix rep. of relationsAlgo. outputTop. rel. = TPPDir. = ETop. rel. = TPPDir = NTop. rel. = TPPDir = WTop. rel. = TPPDir. = STable 6
Object pairs with TPPI topological and their directional relations.
Obj. pairsMatrix rep.Algo. outputTop. rel. = TPPIDir. = ETop. rel. = TPPIDir = NTop. rel. = TPPIDir = WestTop. rel. = TPPIDir. = SouthTable 7
Topological relations NTPP, NTPPI and EQ.
Obj. pairsMatrix rep.Algo. outputTop. rel. = NTPPDir. = AllTop. rel. = NTPPIDir. = AllTop. Rel. = EqualDir. = All


## 7.2. Fuzzy Meet (M) Topological Relation

Fuzzy meetM relations in topology exist when the objects are exactly meeting or very close to each other and it seems that they are sharing the boundary. The Table 3 represents the fuzzy meet topological relation (M).First column shows the object locations at different directions of argument objectA with respect to the reference object B. First rows show that the argument object A touches the object B from the East direction (first column). Second column shows its histogram representation where the relations are shared between the Disjoint and Meet (second column) and their 2D topological relation generated by the algorithm are shown in third column. Similarly second row represents the argument object touches the reference object from North direction, for this object pair algorithm produces the result that M topological relation with North directional relation. In the third row argument object seems touching from the north_ west direction, hence the output of algorithm shows that M topological relation holds with directional relation North_West. Similarly argument object in last row nearly touches from west as a result the algorithm for defuzzification of spatial relations produces the resultant direction as West.


## 7.3. Fuzzy Overlap (PO) Topological Relation

In this example we consider the overlapping objects in different directions. The object relative position, topological and directional relations, and the topological and directional relations generated by the Algorithm1 are described in Table 3.In the first column, object pairs are represented having the topological relationPartially_Overlap in different directions, second column represents topological and directional relations in a histogram representation. The results generated by algorithm are denoted in third column. As soon as object changes their position, topological and directional relations matrix also changes. The directional relation between overlapping objects depends upon the relative size, shape and overlapping surface area of objects. In all the above-cited examples, object A is smaller relatively to object B.


## 7.4. Fuzzy TPP Topological Relation

In crisp topological relations, this relation holds when the argument object lies inside the reference object and share the boundary with the reference object. In fuzzy relations, this relation (TPP) holds when the argument object lies inside the reference object near the boundary. In this method an entity in the matrix represents the degree of topological relation in a particular direction, as a result this relation holds in a particular direction along with the other fuzzy topological NTPP relation in other directions. For example in first row of the Table4 where object lies near the eastern edge of reference object, their relations show that highest value of topological relation, TPP, exists in direction East while in all other directions fuzzy topological relation, NTPP, holds. Third column represent the topological and directional relation which is the algorithm output.


## 7.5. Fuzzy TPPI Topological Relation

In this example, reference objectB is considered inside the argument object A. The object pairs are shown in first column of the Table 5. Second column shows the histogram representation of relations and third column shows the results produced by the Algorithm 1 as a single topological and directional relation.Obviously it is an inverse relation as a result visually reference object seems to be in opposite direction of the directional relation. In first row of the table, visually reference object lies near theWest edge of the argument object, but its relation is East, this is due to the inverse topological relation. When the objects commute, the topological and directional relations become inverse, for example consider the object pairs in third row of Table 4 and first row of Table 5, both represent the same object pair, when the objects commute, both the topological and directional relations become inverse to each other. Similarly for the other object pairs in Tables 4 and 5, same object is used to represent the object pair when objects commute the topological and directional relations become inverse.


## 7.6. Fuzzy NTPP, NTPPI, and EQ Topological Relations

In these examples, all those topological relations which must exist in all the directions are considered.Here, it is explained that a single topological relation must be held in all the directions for reference object. The object pairs are represented in first column of the Table6. In first row, argument object A lies inside the reference object B as a result the NTPP relation holds equally in all directions, these results are represented in first row of the table, the algorithm generates the directional relation All which means that this topological relation holds in all directions. In second row reference object B lies inside the argument object, as a result inverse topological relation holds in all directions. Third rows show the situation, when both objects are equal in size, thus fuzzy equal relation holds if both objects have equal size in all directions.


## 8. Conclusion and Future Work

In this paper a new method for developing fuzzy topological and directional relations was proposed and all the topological relations are generated using fuzzy Allen relations and directions are evaluated with the help of trigonometric functions. This method deals with fuzziness at two levels, fuzziness in the topological relations due to their geometrical description and fuzziness in directional relations. This method also deals objects with holes or convex objects. Longitudinal section holds when objects with holes or convex objects are decomposed into 1D segments. A method is described in Section4.4 to deal with a longitudinal section. It is a numerical description of relative position of objects and value in each cell that represents the strength of the relation between object pair.This method can be used in designing and managing spatial database, where one single model can answer adequately a query. This method can detect small changes in a spatial scene when implemented to the same pair of objects at two different time instant. In this way this method can replace the implementation of four methods (topological, directional, distance, and internal cardinal directional (ICD) relations) of spatial relations which are used to compare a scene.An algorithm for defuzzification of spatial relations is also given such that we can estimate the 2D fuzzy topological relation along with the directional components. These defuzzified spatial relations are represented by a neighborhood graph. These results will be helpful in extending this work to a spatiotemporal aspects and fuzzy spatiotemporal reasoning and natural language processing. These results will be used in future to develop the spatiotemporal relations and motion verbs.



---

*Source: 167939-2012-04-29.xml*