Research Article

Integrating Image and Network-Based Topological Data through Spatial Data Fusion for Indoor Location-Based Services

calculateSEP (Node_part, Tolerance)
Step 0. Initialize constants
    r ⟵ image radius
    offset ⟵ camera height
    Node_part ⟵ role of Node in scene (type of space)
    Tolerance ⟵ allowable range of the SEP
Step 1. Check click_mouse if FALSE
 Step 1.1 Read topological data and obtain node parameters
    Node_ath, Node_atv ⟵ position of Node in scene
    Node_part ⟵ part of Node in scene
Step 2. Define function to obtain coordinates from user input
   getCoordinate (mouse_ath, mouse_atv, r, offset) {
    If camera direction is North, set Hd ⟵0, increasing clockwise
    Angle_H ⟵ (Hd + mouse_ath) PI/180
    Angle_V ⟵ mouse_atv PI/180
    ⟵ r cos (Angle_H)
    ⟵ r sin (Angle_H)
    ⟵ offset + rsin (Angle_V)}
Step 3. Set click_mouse as TRUE
 Step 3.1 Obtain mouse_ath, mouse_atv from click
 Step 3.2 Calculate coordinates
  Step 3.3.1 Obtain coordinate of user identified point
     ⟵ getCoordinate (mouse_ath, mouse_atv, r, offset)
  Step 3.3.2 If Node_part is Indoor Space
     ⟵ getCoordinate (mouse_ath, mouse_atv, r, offset)
  Step 3.3.3 If Node_part is Indoor Object
     ⟵ getCoordinate (mouse_ath, mouse_atv, r, offset)
Step 4. Calculate SEP matrix
 Step 4.1 Initialize: blank 3 x 3 SEP Matrix ⟵ 0
 Step 4.2 Set Tolerance depending on type of space or type of object
  Step 4.2.1 Calculate SEP Matrix values along XY plane
    IF XY distance is less than Tolerance, SEP_Matrix [0][0] ⟵ 1
    IF XY distance is same as Tolerance, SEP_Matrix [0][1] ⟵ 1
    IF XY distance is greater than Tolerance, SEP_Matrix [0][2] ⟵ 1
  Step 4.2.2 Calculate SEP Matrix values along YZ plane
    IF YZ distance is less than Tolerance, SEP_Matrix [1][0] ⟵ 1
    IF YZ distance is same as Tolerance, SEP_Matrix [1][1] ⟵ 1
    IF YZ distance is greater than Tolerance, SEP_Matrix [1][2] ⟵ 1
  Step 4.2.3 Calculate SEP Matrix values along XZ plane
    IF XZ distance is less than Tolerance, SEP_Matrix [2][0] ⟵ 1
    IF XZ distance is same as Tolerance, SEP_Matrix [2][1] ⟵ 1
    IF XZ distance is greater than Tolerance, SEP Matrix [2][2] ⟵ 1
Pseudocode 1 Identifying objects or spaces in images using the SEP matrix.