## 3 Fundamental Concepts
### Packet Relaying and Energy Consumption  
After network deployment, source nodes will transmit some type of data according to the expected monitoring functions of the considered application, which may be visual (retrieving still images or video streams) or scalar (as humidity, pressure or temperature). The remaining nodes are employed for packet relaying, since the low-range wireless hardware of sensor nodes and the expected lack of communication infrastructure demand a multihop transmission network. Packets have some sort of destination address that is used by intermediate notes to forward (relay) them over the network, depending on the nature of the adopted MAC (Medium Access Control) and routing protocols. In fact, the way packets are relayed may vary considerably, depending on the hardware resources and the employed algorithms for congestion control and error recovery [1, 2]. For example, a relaying node may establish a timeout and wait for an ACK message from the next hop for every transmitted packet, while the receiving node may send back an ACK message for positive acknowledgment purposes. On the other hand, ACK messages may be employed for block acknowledgement, altering the way corrupted packets are transmitted and possibly retransmitted. The actual energy consumption in each node due to packet relaying functions depends on many factors, as the employed radio, the transmission power and the physical and MAC protocols. In the latter case, duty-cycle MAC protocols are often used in wireless sensor networks to avoid idle listening, which play an import role in energy wasting [25]. Completing such complex scenario, synchronization messages may be transmitted among nodes to optimize the sleeping time. As a result, mathematical formulations considering specific details of physical and MAC operations are very complex, pushing mathematic models to incorporate some level of simplifications [7, 26, 27]. Nevertheless, numeric analyses based on mathematical formulations are useful in initial verifications, when the performance of protocols and algorithms need to be assessed concerning the expected average energy consumption. We consider a WSN composed of \(P\) hop-by-hop wireless paths and \(S\) source nodes. Each path \(p\), \(p=1\), \(\ldots\), \(P\), comprises \(H_{(p)}\) intermediate nodes, where data packets flow from the source node (\(h=0\)) to the (unique) sink of the network (\(h=H_{(p)}+1\)). Every source node \(s\), \(s=1\), \(\ldots\), \(S\), is a camera-enabled sensor connected to the sink through at least one path \(p\). In each path \(p\) will be transmitted control and data packets. The size of the transmitted data packets may vary according to the link layer technology and the application requirements, but we expect small data packets (reducing the error probability [28]) with the same size. If we consider that most wireless sensor motes communicates through IEEE 802.15.4 wireless link-layer technology [2], the maximum frame size is 127 bytes, computing both useful payload and all packet overhead [28]. Excluding the MAC header and the overhead for network, transport and/or application layer protocols, as well as the image fragmentation header required for image decoding at the receiver size, the effective data size in each packet may be lower than 90 bytes in this link-layer technology [29]. In such way, it is natural to expect transmission of packets with maximum size to achieve minimal packet overhead. Thus, we consider that every data packet has the same size in bits, \(k\), corresponding to the entire packet, since all transmitted bits should be considered when estimating energy consumption. Over the considered visual sensor network will be transmitted \(I\) images of the same size, where each image \(i\), \(i=1,\...,\ i=I\), sizes \(B_{(i)}\) bits. If the packet header regarding all employed protocols sizes \(x\) bits, \(x<k\), the maximum effective payload size for every transmitted packet is \((k-x)\) bits.