# Distributed Visual Crowdsensing Framework for Area Coverage in Resource Constrained Environments
## 3 Methodology
### Data Redundancy Elimination
#### 3.3.1 Local Data Management
A newly produced photo with ID = \(b\) (photo \(b\)) has the following coverage values sequence: (\(s=1,\,b=1,\,k=1\)), (\(s=1,\,b=2,\,k=1\)), and (\(s=1,\,b=3,\,k=1\)). Utilizing Algorithm 3, the added value becomes 0. In the next step, the sensor searches in its local K-CoverPicTree to ascertain whether there exists a photo sharing a similar sequence of coverage features. As photo \(b\) covers a similar sequence of coverage features (\(s,\,b,\,k\)) as photo \(a\), it is regarded as redundant. 3. A newly produced photo with ID = \(c\) (photo \(c\)) has the following coverage sequence: (\(s=1,\,b=4,\,k=1\)), (\(s=1,\,b=1,\,k=1\)), and (\(s=1,\,b=2,\,k=1\)). Utilizing Algorithm 3, the added value is 1. Photo \(c\) is appended to the local K-CoverPicTree, and following the new addition, the local Boolean K-CoverPicTree node (\(1,\,4,\,1\)) is revised as 1. 4. A newly produced photo with ID = \(d\) (photo \(d\)) has the following sequence of coverage features: (\(s=1,\,b=1,\,k=1\)), (\(s=1,\,b=2,\,k=1\)), (\(s=1,\,b=3,\,k=1\)) and (\(s=1,\,b=4,\,k=1\)). For photo \(d\), the added value is 0. However, a photo with similar sequence of coverage features does not exist, and thus, photo \(d\) is appended to the local K-CoverPicTree. Adding photo \(d\) makes the photo \(a\) redundant because its coverage sequence values are a subset of the coverage sequence values of photo \(d\). Furthermore, this makes photo \(c\) redundant because its coverage sequence values are a subset of the coverage sequence values of photo \(d\). Figure 3(b) shows the final state of the local K-CoverPicTree after removing photo \(a\) and photo \(c\). Hence, each sensor can compute the redundant photos according to the full-view coverage area conditions. The steps to remove redundant photos are shown in Algorithm 4. First, in line 3, photos are filtered to find those that cover sub-region \(s\), Photos(\(s\)). Then, all photos that cover each Bol in sub-region \(s\) from the same sector view, Photos(\(s\), \(b\), \(k\)), are found, as stated in line 6. Then, in line 8, for each sector of value \(k\), photos covering the entire sub-region (i.e., all Bols within the sub-region) Photo(\(s\), \(k\)) are found. Redundant photos are then determined by subtracting Photos(\(s\), \(k\)) from Photos(\(s\), \(b\), \(k\)), as in line 11. This way, the sensor node keeps a log of photos with higher added value and deletes the photos that are redundant. In Figure 4, photo \(d\) covers (\(s=1\), \(b=\{1\), \(2\), \(3\), \(4\}\), \(k=1\)), while photo \(c\) covers (\(s=1\), \(b=\{1\), \(2\), \(4\}\), \(k=1\)). It appears that photo \(c\) covers sub-region 1. However, the photo does not correspond to line 8 because it does not cover all Bols of sub-region 1. Using lines 10 to 12, photo \(a\) and photo \(c\) are removed. ```
1:Input: Local K-CoverPicTree
2:for\(s=1\):\(5\)do
3: Find all photos that cover sub-region \(s\) (Photos(\(s\)))
4:for\(k=1\):\(K\)do
5:for\(b=1\):\(B\)do
6: Find photos that cover (\(s\), \(b\)) from the same sector view (Photos(\(s\), \(b\), \(k\)))
7:endfor
8: Find photos that cover all Bols of sub-region \(s\) from sector \(k\) (Photos(\(s\), \(1\):\(B\), \(k\)) = Photos(\(s\), \(k\)))
9:endfor
10:if (size of Photos(\(s\), \(k\)) > 0)do
11: Redundant Photos = Photos(\(s\), \(b\), \(k\)) - Photos(\(s\), \(k\))
12: Remove each redundant photo from the corresponding parent Node(\(s\), \(b\), \(k\)) in Local K-CoverPicTree
13:endif
14:endfor
```  
**Algorithm 4** Removing redundant photos  
Furthermore, each sensor node can compute the utility of its photos on the target area based on the final state of the local K-CoverPicTree. Accordingly, the steps to be taken in the  
Figure 4: Example of (**a**) adding photos and (**b**) removing redundant photos from the local K-CoverPicTree. computation of the utility value of the photos are shown in Algorithm 5. First, the initial value of the total utility is set to zero. Then, Algorithm 4 is called for finding the photos covering sub-region \(s\) from the same sector view.