# Distributed Visual Crowdsensing Framework for Area Coverage in Resource Constrained Environments
## 3 Methodology
### Data Redundancy Elimination
#### 3.3.2 Communication between Two Nodes  
Within disruption tolerant networks (DTN), there is no constant contact between all sensor nodes and the command center or server [11]. The sensors leverage free links, including Wi-Fi and Bluetooth, to transfer photos between each other. When a sensor node detects a peer in its communication range, contact is happening between the two sensor nodes. The target of sharing photos between nodes is to increase the amounts of photos on each node. Hence, when communication occurs between any node and the server, more photos (i.e., more information) become available. An example of the communication pattern used in the proposed system is shown in Figure 5. Sensor nodes \(a\), \(b\), \(c\), and \(d\) are located within the target area. Only sensor node \(c\) has access to the command center. However, sensor nodes \(a\) and \(b\) are in the communication range of each other, allowing photos to be shared between sensor node \(a\) and sensor node \(b\). After receiving photos from sensor node \(b\), sensor node \(a\) can send photos from its storage to the command center through sensor node \(c\). Sensor node \(a\) can now store photos from sensor node \(b\) in addition to its own. In this manner, the command center is able to obtain photos from any connected sensor node inside the target area. To simulate the interrupted contact with the server, it was assumed that 15 randomly selected sensor nodes out of the total nodes could contact and transmit photos to the command center. When sensor node \(a\) receives photos from other sensor nodes, it records the information of the source sensor node and the last time of contact with the source. Sensor node \(a\) then estimates the probability that it has encountered another sensor node within time \(t\): \(P(T_{a}\leq t)=1-\mathrm{e}^{-\lambda_{a}t}\), where \(T_{a}\) is the inter-contact time between sensor node \(a\) and other sensor nodes and \(\lambda_{a}\) represents the contact frequency between sensor node \(a\) and other sensor nodes [11]. In the local K-CoverPicTree, photos are removed if \(P(T_{a}\leq t)\) is higher than a specified threshold [11]. Hence, each node should manage the cache memory of its photos. First, it calculates the time, \(t\), elapsed from the last contact with other sensors. This is followed by the calculation of the \(P(T_{sensor}\leq t)\). If \(P(T_{sensor}\leq t)\) is higher than a threshold of 0.8, a sensor removes all photo IDs from its local K-CoverPicTree. Algorithm 6 is applied to update the Boolean K-CoverPicTree. This step is important to update the cache memory of each sensor node and prevent storing old photos. When two sensor nodes \(a\) and \(b\) make contact, the sensor node's delivery probability to the command center is computed, as defined in [24]. The possibility of delivering photographs to the command center is increased if the communication between sensor node \(a\) and the command center is frequent. We assume sensor node \(a\) has the highest probability of delivering the photos to the command center, resulting in the following general sequence:  
1. Sensor nodes \(a\) and \(b\) share the initial local K-CoverPicTree with each other without photos transmission. 2. Each sensor node then searches for Photo IDs that share similar sub-regions IDs between its local K-CoverPicTree and the local K-CoverPicTree of the other sensor nodes. In this regard, the sensor node processes only the photos with common sub-region IDs between the two sensors. In other words, within the target area, only certain photos from certain sub-region IDs are processed, resulting in the reduction of the overhead of transmission of photos associated with all sub-regions within the network. Each sensor node finds the common sub-regions (S-common) between its local K-CoverPicTree and local K-CoverPicTree of other sensor nodes. 3. Sensor node \(a\) applies Algorithm 6 to merge its local K-CoverPicTree with the local K-CoverPicTree of sensor node \(b\) according to the shared sub-regions (S-common).