## 5 Analyses and Simulation Results  
### Simulation Environment  
In order to simulate presented methods, OMNet\(++\)[46] network simulator and MATLAB have been used. It is assumed that when the clustering algorithm is performed in upper-tier, all nodes are clustered in groups where most of them have _four_ members. Also, a node is selected as a cluster head of each cluster such that the locations of cluster heads in entire upper-tier become uniform. It is supposed that each cluster head reach Sink after three hops. In order to create this hierarchical structure, HDA algorithm [28] is used. Whereas upper-tier sensor nodes are equipped with GPS, Sink knows their geographical position and sends the queries to the related cluster head.  
The lower-tier consists of homogenous camera sensor nodes with image resolution 320 \(\times\) 240 and it is assumed that each image is in gray-scale. As camera sensors in lower-tier are near to each other and are placed in almost same direction (see subsection 3.2), camera sensors of each cluster have considerable overlaps. It is assumed that each cluster in lower-tier has 24 members in average. Needless to say, sensor nodes in upper-tier are different from lower-tier nodes. Also, each camera node can reach its cluster head in upper-tier by one hop. In order to get precise results from the simulations, the parameters of CC2420 [47] Chipcon transceiver, listed in Table 1, are used for transceiver part of sensor nodes in both tiers.  
In the simulations, it is assumed that desired area is related to the specific cluster head. Initially, at first query from Sink, all low-resolution images of camera sensors in the related cluster head, which belong to requested area, are sent to Sink. Figure 7 shows the assumed low-resolution images which are captured from the desired area by camera sensor nodes that are connected to the specified cluster head. The images are captured from cameras which are placed in a 3-D field [with the size of around  
\begin{table}
\begin{tabular}{l l} \hline
**Parameter** & **Value** \\ \hline Bit Rate & 250 k\({}_{\text{bps}}\) \\ Listen Power & 60 mJ/sec \\ Receive Power & 63 mJ/sec \\ Transmission Power & 57 mJ/sec \\ Setup Time & 1 msec \\ Communication Distance & 300m \\ \hline \end{tabular}
\end{table}
Table 1: CC2420 Transceiver parameters.  
3 m (width) \(\times\) 3.5 m (height) \(\times\) 1 m (depth)]. Besides, the distance of desired area (the door) and cameras in average is about 3.5 m.  
After first query and stitching in Sink based on all low-resolution camera images that are related to specific cluster head, the results of stitching procedure are: transformation matrixes, A Coverage Data Structure and a high-resolution image. Using Equation (8) each grid cell in average covered by 3.68 cameras (\(K=3.68\)). The high-resolution and wide stitched image produced from all low-resolution camera sensor images of desired area in Sink is shown in Figure 8.  
As mentioned in subsection 4.2.1, Coverage Data Structure is created based on stitched high-resolution image gridded in Sink. In generating this data structure, the size of grid cells is assumed to be \(80\times 60\) so number of grid cells which are covered by more than one camera (\(N\)) is 288. In the following subsections, we are going to analyze several aspects of the proposed methods.  
Figure 7: Assumed Camera Sensor Node Gray-Scale Images with Resolutions \(320\times 240\) Managed by Specific Cluster Head in Upper-Tier.