Abstract

In a wireless multimedia sensor network (WMSN), the minimization of network energy consumption is a crucial task not just for scalar data but also for multimedia. In this network, a camera node (CN) captures images and transmits them to a base station (BS). Several sensor nodes (SNs) are also placed throughout the network to facilitate the proper functioning of the network. Transmitting an image requires a large amount of energy due to the image size and distance; however, SNs are resource constrained. Image compression is used to scale down image size; however, it is accompanied by a computational complexity trade-off. Moreover, direct image transmission to a BS requires more energy. Thus, in this paper, we present a distributed image compression architecture over WMSN for prolonging the overall network lifetime (at high throughput). Our scheme consists of three subtasks: determining the optimal camera radius for prolonging the CN lifetime, distributing image compression tasks among the potential SNs to balance the energy, and, finally, adopting a multihop hierarchical routing scheme to reduce the long-distance transmission energy. Simulation results show that our scheme can prolong the overall network lifetime and achieve high throughput, in comparison with a traditional routing scheme and its state-of-the-art variants.

1. Introduction

The Internet plays a vital role in communication by connecting people around the world through millions of networking devices [1]. The availability of advanced low-cost devices has led to the development of the Internet of Things (IoT). The Internet is moving toward the IoT and Cloud Computing, including Big Data, which has become the most important global technology platform for the future [2]. Typically, the IoT is composed of smart things (or smart devices), which have the ability to detect (sense) or cooperate (communicate) with a physical environment and other devices over large-scale and easy-to-deliver channels (wireless) with optional preprocessing or control those devices to deliver some particular tasks (processing) [1].

The wireless sensor network (WSN) is another key part of the IoT, which is used in many fields, such traffic, military, industry, and environmental monitoring and control [2, 3]. In general, a single wireless sensor node (SN) consists of a readily available and inexpensive sensor, a data processor, memory, a receiver/transceiver, and power units for capturing scalar data, such as temperature, pressure, humidity, velocity, acceleration, and location [4]. Recently, information has been changing from scalar data to multimedia data, such as image, video, and audio data. The IoT and Cloud Computing also provide a backend solution for processing such huge multimedia data streams, which have high computational requirements; for example, Wireless Multimedia Sensor Networks (WMSNs) are used for video streaming, video conferencing, and video surveillance [5].

A WMSN extends a typical WSN by adding multimedia services and devices, such as a Complementary Metal Oxide Semiconductor (CMOS) camera and a microphone, to capture images, video, or audio, which allows the device to retrieve not only scalar data but also multimedia streams. To facilitate understanding, for all devices or sensor nodes (SN) within a WMSN, there are two main types of nodes: camera nodes (CNs) and typical sensor nodes, which are called normal nodes (NNs) and are traditionally used to aid the transmission or perform other scalar-based sensing tasks. Typically, a CN captures the multimedia content and sends it to an NN for processing or transmission to its base station (BS). Although there are various practical transmission schemes [69], a hierarchical structure is typically applied, such as a cluster-based approach [10], which has the key advantages of direct-transmission energy optimization and zoning, which prolong the network lifetime.

Figure 1 shows an example of SN deployment; here, there are two possible clusters: a transmission cluster of the NN (here, its representation as cluster head is included) and a camera cluster. As shown in Figure 1(a), a transmission cluster will be normally formed according to criteria that are related to the energy usage, such as distance and remaining power. In each cluster, the sensor node members will send the data to its corresponding cluster head (CH) before further transmitting the aggregated data toward the BS. Similarly, in Figure 1(b), with the introduction of a CN, a camera cluster is a cluster that has one CN and many nearby NNs, which typically function as relay nodes toward the BS. In this cluster, camera cluster optimization is difficult to achieve since the energy of each node has been changing over time. In addition, having too small of a coverage area may lead to having insufficiently many sensor nodes for processing or transmitting data, whereas having too large of a coverage area may cause more energy to be required for communication to its node members.

In general, an SN (NN or CN) comes with resource constraints, such as limited memory, buffer size, data processing, data transmission, and capacity of battery that is very difficult to recharge [11]. Moreover, multimedia data require a large amount of bandwidth and more energy for data delivery, which causes SNs to deplete their energy quickly and shortens the network lifetime; most of the energy of the WMSN is used for data transmission. One possible solution is to compress such data to reduce their size. An image can be compressed because it is composed of many pixels that are closely correlated to one another. By exploiting this correlation, image compression techniques can reduce the size of the image efficiently [12].

Although many image compression techniques have been proposed, most are very complicated and have high resource requirements; thus, they cannot perform well in a resource-constrained WMSN [1316]. If the image compression process relies on a single SN, this sensor node may quickly run out of energy. A few dead SNs can cause the failure of the entire network, especially SNs that break or divide the network into an unbalanced structure. Accordingly, in the design of a WMSN routing protocol, distributed image compression must be considered [17]. However, designing a distributed scheme that overcomes the limitations of the SN to prolong the network lifetime is challenging since there is always a trade-off between compression quality and energy (such as computing and transmission power).

Furthermore, long-distance data transmission requires more energy than short-distance transmission and causes source SNs to drain their energy quickly; therefore, direct data communication from each individual SN is not efficient in a WMSN; thus, multihop communication is recommended. However, selecting a relay sensor node among all sensor nodes for forwarding to optimally use the energy of the network is also a complicated task [18].

To overcome the abovementioned issues, we propose a novel distributed architecture of multihop image compression, namely, DICA, to extend the network lifetime and improve throughput using a combination of the fuzzy logic system (FLS) and a distribution-based computation approach. There are three main contributions of this paper: we apply FLS to determine the optimal camera cluster size; we design a distributed image compression technique that divides compression tasks among typical SNs (not camera nodes); and we implement a hierarchical multihop routing technique to partition the network into layers, and similarly, FLS is adopted for optimum relay node selection.

The remainder of this paper is organized as follows: Section 2 highlights some key related works on distributed architectures for image compression in WMSNs. Section 3 describes our system models in detail. Section 4 provides details on our proposed architecture (DICA). Section 5 provides details on the simulation configuration and then presents and discusses the results. The performance of our proposed architecture is evaluated with respect to various metrics, in comparison with an energy-efficient distributed image compression scheme in resource-constrained multihop wireless networks (EEDIC) [14], a two-hop clustered image transmission scheme for maximizing network lifetime in wireless multimedia sensor networks (2HCIT) [19], and a traditional and simplified routing protocol, namely, low-energy adaptive clustering (LEACH) [6]. Finally, the conclusions and the future research directions are discussed in Section 6.

Typically, a WSN requires a routing protocol to minimize the energy consumption of data transmission. As a clustering-based approach, low-energy adaptive clustering hierarchy (LEACH) is a well-known routing protocol in WSNs. This protocol is an adaptive and self-organizing clustering protocol that generates a random value to select a CH in rotation among SNs. It was originally designed as a single-hop routing protocol, through which SNs transmit data to their CH, which then forwarded the aggregated data toward the BS. In this way, LEACH can distribute energy among SNs in the network to achieve energy reduction, thereby prolonging the network lifetime [6, 20].

Unfortunately, when the scale of the network is increased, LEACH becomes inefficient since the distant CHs deplete their energies faster as they transmit the data to the BS; therefore, LEACH is unsuitable for a large-scale network. To mitigate this problem, multihop LEACH, which is an extension of LEACH, is introduced. In multihop LEACH, instead of sending data directly to the BS, the CH sends data through intermediate CHs, which are closer to the BS. This approach dramatically reduces the energy and extends the lifetime of the WSN [21]. Note that there are also several LEACH derivatives for the purpose of network lifetime optimization [22].

Many researchers have applied LEACH in WSNs. However, LEACH does not consider the effects of multimedia data in WMSNs, such as images with huge size and other considerations, such as computing power and space constraints. Fortunately, as previously stated, an image normally has a large amount of redundant information, which can be removed by using image compression techniques to reduce the image size so that image transmission over multi-hop WMSNs is improved. Over the past decades, many compression techniques have been proposed and can be divided into two categories: discrete cosine transform (DCT) methods and discrete wavelet transform (DWT) methods [21]. As an example of the former, JPEG is a well-known and widely used DCT-based image compression algorithm because it is very fast and energy efficient and requires less memory than other algorithms [23].

In contrast, the latter algorithms perform much better than those in the former algorithms in terms of compression ratio and image quality but with some trade-off as high computational complexity [21]. JPEG2000 is another well-known DWT-based algorithm with the key advantage of providing a better image compression ratio, better image quality, and higher resistance to data transmission error and decoding error; therefore, high-complexity image transmission is not required for prolonging the network lifetime in the context of a WSN or WMSN.

JPEG2000 has been adopted in WMSNs in some works; for example, Zuo et al. [19] presented a two-hop clustered image transmission scheme that was based on traditional LEACH. They divided the clusters into two categories: camera clusters and normal clusters. The camera cluster forms during the first round; a fixed camera radius is carefully considered to ensure that the camera cluster has an adequate number of nodes to receive the image from the CN and then compress the image before sending it to the BS via the CH. At the beginning, the fixed optimized camera cluster radius is determined based on transmission radius adjustment. If the camera radius is too small, there would not be an adequate number of sensor nodes for the camera cluster, whereas if the radius is too large, the image transmission may require more energy than the image compression. In addition, conflicts between camera clusters can occur.

After that, the camera-equipped node assigns the image compression tasks to the nodes that have maximum residual energy within its radius to balance the energies of the camera cluster node members. Then, the camera-equipped node formulates the TDMA schedule based on the compression time, the transmission time of the compressed image, and the transmission time of the original image. JPEG2000 has also been used to make the image size smaller. The experimental results show that this technique can prolong the network lifetime by balancing the energy. However, setting up the camera cluster only once during network initialization is not effective since the energies of the camera cluster member nodes keep changing over time due to many factors. In the worst case, the CN still has energy, but there are no live nodes in the cluster to process and transmit the image to the destination. Furthermore, JPEG2000 is complicated for a single node to compress an image and the network cannot be scaled using conventional LEACH.

The closest work to ours was presented by Wu et al. [14]. In this study, the wavelet-based image compression standard JPEG2000 is chosen as an image compression technique. The authors distributed the computational load of image compression tasks among SNs with the aim of prolonging the network lifetime. The main idea of the method that is presented in this paper is to distribute the wavelet transform tasks to numerous groups of SNs. To reduce the computational complexity and requirements, two methods were used. In the first method, the image is split into rows and columns with specific sizes, whereas in the second method, the image is cropped into a grid of the same size. Both methods send and distribute wavelet transform of these small images among SNs from source to destination. Nevertheless, in the first method, two round-trip wireless transceivers are required for the SNs who join in each level of the wavelet transform, which may lead to higher power consumption, while in the second method, there is no clear discussion about cluster formation for network load balancing.

To cope with the problems of [14], Tian et al. [15] suggested an algorithm for CH selection that is based on the distance and load factor for improving the centralized encoding algorithm of JPEG2000. First, after being captured by the CN, an image is divided into blocks of images. Each CN sends those blocks to the nodes with the highest remaining energy in the cluster to perform the first level of wavelet decomposition. As a result, four subbands are generated: low-low (LL), low-high (LH), high-low (HL), and high-high (HH). Then, the SNs that have participated in the wavelet transform transfer the data to the CH of the next cluster. After receiving the data, the CH forwards only one subband (LL) to a group of SNs for the next level of the wavelet transform, whereas the remaining subbands (LH, HL, and HH) are sent to three other SNs in the cluster for independent encoding. This process is repeated until the desired image compression ratio is achieved and the compressed image has arrived at the BS. This algorithm can decrease the energy consumption, offer load balancing of the network, and prolong the network lifetime. Unfortunately, the quality of the image is not satisfactory, comparing with the original JPEG2000.

Nasri et al. [24] proposed an effective JPEG2000 image compression method for multihop WSNs. This proposed method distributes the image compression tasks among SNs along the way to the BS, similar to the abovementioned studies. First, after receiving the query from the CN from the source SN, CH1 selects multiple sensor nodes SN1i  . The source SN divides the original images into many tiles and sends them to this group of SNs (SN11, SN12, SN13, and SN14) for 1D of DWT decomposition (vertical decomposition). This group of SNs sends the result to CH2 and then CH2 sends this result to other sets of SNs (SN21, SN22, SN23, and SN24) for the other 1D of DWT decomposition (horizontal decomposition). As a result, level 1 of the data is retrieved. Next, CH3 chooses LL1 and distributes it to a group of SNs (SN31, SN32, SN33, and SN34) for 1D wavelet transform.

After completing the 1D wavelet transform, the SNs in this group send the intermediate result back to CH3 for the other 1D wavelet transform. CH3 sends the level 2 data to CH4 for quantization. Then, CH4 sends the level 2 data to a single sensor node, namely, SN4i, for quantization, whereas the other SNs in this cluster are awakened. The number of levels depends on the compression target. After quantization, SN4i sends the data to CH5. Then, CH5 divides the quantized subbands into multiple smaller code blocks of equal size and sends them to a set of nodes, namely, SN5i (SN53, SN52, SN53, and SN54), for independent code block entropy encoding to produce compressed bitstreams. This procedure continues until the compressed image reaches the BS. This proposed scheme can reduce the memory consumption of SNs by dividing the original image into tiles and blocking quantized subbands into multiple smaller code blocks for entropy encoding. This scheme can also distribute the images to many nodes but needs to transmit uncompressed image along many clusters before the image is completely compressed; therefore, a large amount of energy is used during data transmission.

Another energy-efficient JPEG2000 image compression architecture is proposed by Lu et al. [25]. In this proposed method, there are also two types of clusters: camera clusters and normal clusters. A camera cluster has a CN as its CH. First, the CN captures the image and divides it into tiles. Then, the tiles are sent to the member nodes of the camera cluster to share the compression tasks to minimize the total energy consumption. After finishing the compression tasks, the SNs send the compressed image to the normal CH. Then, the CH forwards the compressed image to the BS. By comparing with the scheme in which the CN performs all compression tasks and sends the compressed image out, this proposed method can reduce the energy consumption of the CN and improve the lifetime of the network. Unfortunately, in the experiment, the network lifetime is improved only in the case of dense SN deployment.

Aside from the routing protocol and image compression, as one of the pioneering forms of computational intelligence (CI) [26], fuzzy logic system (FLS) can be used in many fields to optimize the system when there are uncertainties in the system without requiring the complete information. Many studies have adopted FLS in WSNs, in particular, for routing and clustering. For example, Brante et al. [27] developed a fuzzy-logic-based relay selection scheme for multihop WSNs. The instantaneous channel conditions and the residual energy were used as fuzzy input to select the relay node. Unfortunately, when the density of nodes in the network is increased and relay selection grows dramatically, the end-to-end performance is impacted.

In addition, as stated in [26], the authors determined that, during clustering, the CH should be selected based on the residual energy and rotated periodically to balance the energy consumption. As a result, CHs that are far away from the BS die sooner than those that are nearer to the BS. Here, FLS-based unequal clustering was proposed to partition the network into clusters of different sizes. The clusters that are near the BS have smaller sizes than the distant clusters. FLS with three variables, namely, the distance to the BS, the residual energy, and the node degree, is used to compute the competitive radius, whereas each SN in the competitive radius computes the fuzzy choice using FIS with two input variables, namely, the distance and the node degree of the CH, to decide whether to join the cluster or not. However, as the network size increases, the clusters in WSN become imbalanced, which can reduce the performance of network since the node degrees and the remaining energies of the CHs are taken into account when SNs are assigned to the cluster.

Bagci and Yazici [28] also proposed the fuzzy-based clustering method. In their paper, each SN generates a random number between 0 and 1. The SN whose random number is below the predefined threshold becomes a desired tentative CH. Each tentative CH computes the competitive radius using FLS with two input variables: the distance to the BS and the residual energy. A broadcasting message is sent by each tentative CH to compete with the other tentative CHs locally. If a tentative CH receives a broadcasting message from another tentative CH that has higher energy than its remaining energy within its competitive range, the tentative CH broadcasts the quit message; however, if the tentative CH receives broadcasting messages from tentative CHs whose energies are lower than its remaining energy, it becomes the CH. Compared to other unequal and equal clustering algorithms, this algorithm can perform better; unfortunately, it may cause imbalanced energy consumption of SNs in the WSN if the randomly selected CHs have lower remaining energy.

3. System Model

3.1. Network Model

In this paper, we make the following network assumptions:(i)All sensor nodes (SN) are deployed randomly and uniformly in a targeted area .(ii)The network is composed of two types of SNs: camera sensor nodes or camera nodes (CNs) and typical sensor nodes or normal nodes (NNs).(iii)The number of the CNs is far less than the number of NNs.(iv)All NNs are homogenous in each type; therefore, they have the same initial energy, computational power, memory, and so on.(v)All SNs are unaware of their location and become static after deployment.(vi)All SNs have the same communication range .(vii)Each SN can approximate its distances to other SNs based on the received signal strength index (RSSI) [29].(viii)A single BS is located at a specific position that is outside the sensor field and has sufficient hardware, software, and constant power supply.(ix)The operation is broken into rounds. The transmission of a full image from a CN to the BS is considered one round.

3.2. Energy Consumption Model

While transmitting and receiving data, that is, packets that are based on the IEEE 802.15c framework, in WSNs or WMSNs, each SN consumes energy. The energy consumption is based on the size of the packet and the distance between sender and receiver. This paper adapts a simplified model that is used in LEACH for the communication energy consumption model. The energy consumption for transmitting and receiving bits of data are given in (1) and (2), respectively [19]. where is the energy that is consumed by the circuit per bit; is the distance between sender and receiver. corresponds to free space, whereas corresponds to multipath fading; they are the energies that are depleted by the amplifier for short and long distances, respectively. is the reference distance between sender and receiver. If this distance is less than , then is used; otherwise, is applied.

The energy consumption of an SN when it receives a -bit packet is as follows:

After receiving data, the SN requires energy for data aggregation. The energy consumption of data aggregation is computed as follows:where is the number of messages and is the energy that is used for aggregating some data.

JPEG2000, which is a wavelet-based image compression scheme, is used in this study. The energy consumption is divided into two parts: discrete wavelet transform (DWT) energy consumption and encoding energy consumption. The image compression energy consumption per bit, which is denoted as , is calculated as follows [30]: where is the desired decomposition level of the wavelet transform.

In an implementation on a StrongARM SA-1100 206 MHz device, , , and are measured to be approximately 50 nj/bit, 10 pj/bit, and 0.0013 pj/bit/m4, respectively. , which denotes the discrete wavelet transform energy consumption, costs approximately 220 nj/bit, whereas consumes an energy of approximately 20 nj/bit [14, 19].

3.3. Definition and Notation

Before proceeding to the proposed algorithm, the following definitions and notations are presented.

Definition 1 (sensor nodes). The wireless sensor network consists of sensor nodes. We denote , where and represents the th sensor node.

Definition 2 (neighboring nodes). The neighbor set of sensor nodes is defined as , where is a set of sensor nodes that are deployed in the area , denotes the broadcasting range (communication radius) of the SNs, and is the Euclidean distance between and , which is approximated using RSSI.

Definition 3 (node degree). The node degree is the number of neighbors of an SN in the field within broadcasting radius . The degree of sensor node is denoted as . The higher the degree of a sensor node is, the more sensor nodes that surround and the better the coverage if is a cluster head.

Definition 4 (member nodes). Any SN can be a member of a cluster. After a cluster head is elected, any sensor node that is in the coverage area of cluster head or whose distance from is less than has a chance to be a member node of the cluster.

Definition 5 (competitive radius). The competitive radius of a camera node is determined by an appropriate camera cluster size. The competitive radius of camera node is defined as and should satisfy

Definition 6 (communication cluster). For energy efficiency, all SNs are grouped into sets, which are called clusters. A set of SNs consists of many SNs, of which only one is elected to be the cluster head (CH), while the rest are just member nodes. Member nodes send the data to their CH, which then forwards the data to the next destination.

Definition 7 (camera cluster). In a camera cluster, there is one camera node and its neighboring nodes . This cluster is formed to share the processing and transmission task of the camera node. The camera node acts as the cluster head of the camera cluster.

Definition 8 (image compression cluster). The image compression cluster is formed during data transmission. This cluster is used to compress the image before transmitting it to the BS. The highest-energy node in the camera cluster is selected to be the cluster head of image compression cluster . The neighboring nodes of image compression cluster head are members of the image compression cluster.

In our algorithm, we use nine different control messages:(i)CH-Msg (ID): this message is sent by the communication CH to its neighbors to announce itself as a CH and contains only the CH’s ID.(ii)CL-Join-Request-Msg (CH_ID, ID): this message is sent by neighboring nodes of the communication CH to request to join the communication cluster. The message includes the ID of the CH and the ID of the SN that wants to join the cluster.(iii)Level-Msg (ID, routing_level): the BS and communication CHs broadcast this message, which contains their IDs and routing level information, to their neighbors to build a hierarchical routing structure.(iv)Level-Request-Msg (ID): during a specific time, communication CHs, which do not receive any Level-Msg, broadcast this message to their neighboring SNs to request routing level information. The ID of the requesting CH is stored in this message.(v)Level-Reply-Msg (ID, routing_level): after receiving a Level-Request-Msg from the requesting communication CH, the SN replies with a Level-Request-Msg, which contains its ID and routing level information.(vi)Cam-Msg (ID, cam_energy, node_degree): the CN sends a Cam-Msg, which contains its ID, remaining energy, and node degree, to its neighboring nodes to form a camera cluster.(vii)Cam-Join-Request-Msg (ID, energy): this message is sent by a neighboring node of the CN to join the camera cluster. The message contains the ID and remaining energy of the neighboring node of the CN.(viii)Relay-Msg (ID): this message is sent by the source SN to its neighbors to find the relay node and contains the ID of the source node.(ix)Relay-Reply-Msg (ID, routing_level, energy): after receiving Relay-Msg, the neighboring nodes of the source node send this message back to source node. This message contains their IDs, routing level information, and remaining energies.

4. Distributed Image Compression Architecture over Multihop Wireless Multimedia Sensor Networks

In this section, our proposed distributed image compression architecture over multihop wireless multimedia sensor networks, namely, DICA, is described in detail. Our proposed architecture is divided into five phases per round: communication cluster setup, multihop hierarchical routing setup, camera cluster setup, image compression cluster setup, and image transmission (see Figure 2).

4.1. Communication Cluster Setup

In our proposed architecture, before proceeding to the other phases, the communication clusters are established. For the purpose of forwarding images to the BS, the WMSN is divided into many clusters, which are called communication clusters. Each communication cluster has its own CH and member nodes. Member nodes send data to their CHs and then forward the data to the destination. We applied LEACH, which is a pioneering cluster-based routing algorithm in terms of effective energy consumption in WMSNs, for our communication cluster setup. To preserve the energy of the CNs, CNs cannot function as the CH since the CH depletes more energy for data transmission and aggregation.

4.2. Multihop Hierarchical Routing Setup

After the communication cluster has been set up, the next step is the multihop hierarchical routing setup phase. Here, a level of the hierarchical routing information structure is constructed to offer better routing information for multihop communications. Each SN in the field has its own routing level. The routing level is a number that is used to identify how close the SN is to the BS. The routing level starts from 1 and a low routing level indicates that the SN is near the BS. This setup phase is conducted only in the first round of the network, after the communication cluster setup is completed. This algorithm relies on the communication of CHs to broadcast the routing level information, which is much more efficient than whole-network broadcasting. The details of the multihop hierarchical routing setup are described in Algorithm 1.

if  round  ==  1  then
BS  broadcasts  Level-Msg  containing  routing_level  =  1.
if  SN  receives  the  broadcasting  message  then
if  Message  is  Level-Msg  then
if  routing_level  of  node  !=  0  then
if  routing_level  of  node  >  routing_level  within  received  message  then
Update  routing_level  of  SN  
if  Node  is  CH  then
routing_level    routing_level  +  1
Broadcast  new  Level-Msg  (ID,  routing_level)  
end  if
end  if
Else
Update  routing_level  of  SN  with  routing_level  within  received  message
end  if
else  if  Message  is  Level-Request-Msg  then
if  routing_level  of  node  !=  0  then
Send  Reply-Request-Msg  (ID,  routing_level)  to  the  requested  SN
end  if
End
else  
Waiting  for  Level-Msg  when  T1  is  expired
if  Node  is  CH  then
Broadcast  Level-Request-Msg  (ID)
Waiting  for  Level-Reply-Msg  when  T2  is  expired
if  Node  receive  Level-Reply-Msg  then
if  Node  is  CH  then
Update  routing_level  of  SN  with  routing_level  within  received  message
routing_level    routing_level  +  1
Broadcast  new  Level-Msg  (ID,  routing_level)
end  if
Else
Waiting  for  Level-Reply-Msg  when  T3  is  expired
routing_level    100
end  if
Else
Waiting  for  Level-Msg  when    is  expired
routing_level    100
end  if
end  if
end  if

In this phase, initially, the routing levels of all SNs in the field are set to 0. The BS broadcasts Level-Msg with its ID and routing level =1 to all SNs that are within its communication radius. After receiving this broadcasting message from the BS, all SNs save the routing level information. In this case, the broadcasting message is received by the CH, and the CH not only saves the routing level information but also increases the routing level by 1 and finally rebroadcasts to its neighbors. This process is repeated until no more CHs receive the broadcasting message. If an SN receives more than one message, it checks the existing routing information that was saved previously against the new information. The lower routing level is accepted and the higher one is discarded, so the routing level of the node is updated with the lowest one.

CHs that do not receive any broadcasting messages for a specific time are considered far away from other CHs; however, it is possible that their neighbors have the routing level information. Therefore, these CHs broadcast Level-Request-Msg to their neighbors to request the routing level information. If there is a neighboring node that receives Level-Request-Msg and its routing level is not equal to 0, it replies with Level-Request-Reply-Msg, which contains its routing level information to the source CH. After receiving the replies from its neighbors, the CH saves the received routing level information for future use.

If more than one reply message is received, the CH chooses the lowest routing information level. Then, this CH increases the routing level information by 1 and broadcasts it to its neighbors. If the source CH does not receive any replies from its neighbors during a specific time , it waits for another specific time . If, in the worst case, there is still no any reply during time to the source CH, the source CH sets its routing level to the maximum value (here, 100). For the NNs, after waiting for a specific time and not receiving any routing level information, these nodes also set their routing levels to the maximum value.

4.3. Camera Cluster Setup

The camera cluster consists of one CN, which acts as the CH of this cluster and nearby member nodes. Once communication cluster setup and multihierarchical routing setup are completed, the camera cluster setup phase is conducted. Since the energies of the member nodes are changing all the time, this phase must be implemented in every round in the network to ensure that the camera cluster has enough member nodes for image processing and transmission.

The detailed algorithm of this phase is described in Algorithm 2. Here, the CN broadcasts the Cam-Msg to its neighbors within its competitive radius to form the camera cluster. The competitive radius computation will be discussed in the next subsection. Cam-Msg contains the ID, remaining energy, and node degree of the CN in the previous round.

if Node is CN then
if round = = 1 then
node_degree = 0;
competitve_radius =
else
node_degree calculate node degree
competitive_radius calculate competitive radius based on algorithm in Section 4.3.2
end
Broadcast Cam-Msg (ID, cam_energy, node_degree) within its competitive radius
Else
if Node receives Cam-Msg then
local_chance ← generate random value
fuzzy_cost ← calculate Fuzzy_Cost (cam_energy, RSSI, node_degree) based on
algorithm in Section 4.3.3
if local_chance fuzzy_cost then
Sends Cam-Join-Request-Msg (ID, energy) to CN
end if
end
end if

After receiving this message, the neighboring nodes of the CN calculate the camera cluster membership, which will be discussed later. In the camera cluster membership calculation, an FLS cost is calculated. After calculating this cost, whose value is between 0 and 1, the neighboring node generates a random number between 0 and 1, which is called the local chance. If the local chance is lower than the fuzzy cost, the neighboring node sends Cam-Join-Request-Msg, which contains the ID and remaining energy of this node, to the CN. Then, this node becomes a member of the camera cluster.

4.3.1. Fuzzy Logic System

Fuzzy logic or set, which was developed by Zadeh [31], is an effective technique for improving decision-making in resource-constrained networks such as WSNs because FLS can reduce the resource consumption while maintaining effective performance and offering good solutions for many control problems by imitating the human thought process. FLS consists of four key components: fuzzier, inference engine, fuzzy rules, and defuzzifier, as shown in Figure 3 [32].

The fuzzifier gets crisp inputs and converts them to a fuzzy set, which is represented by a linguistic term, such as “near,” “medium,” or “far,” using a membership function. This process is known as fuzzification. Used for quantifying linguistic terms, the membership function maps nonfuzzy input values onto fuzzy linguistic terms, and vice versa. There are different forms of membership functions, such as triangular, trapezoidal, Gaussian, piecewise linear, and singleton; however, there are a few membership functions that are commonly used, that is, triangular, trapezoidal, and Gaussian. The choice of membership functions depends on the experience of and assessment by the researcher. The membership function is applied in both fuzzification and defuzzification. After the fuzzification process, the inference is made by inference system based on a set of rules, which are stored in the rule base. Each of these rules is typically an IF-THEN rule with conditions and a conclusion. Lastly, the output of FLS is defuzzified using the membership function. Defuzzification transforms the fuzzy set back into a crisp output value [33].

4.3.2. Competitive Radius

The competitive radius is one of the most important factors for the camera cluster since it is used to limit the SNs that can be members of the camera cluster. If the competitive radius is too large, more energy may be required for the CN to communicate with its node members, whereas if it is too small, there may be an inadequate number of SNs to join the camera cluster as well as processing and transmiting the images to the BS. Based on RSSI, the competitive camera radius is computed using the following formula: where denotes the maximum RSSI of the SNs and is the weight of the camera radius, which is used to adjust the camera radius. This weight of the camera radius ranges between 0 and 1. In the first round, is equal to 1.

To determine the weight of the camera radius , FLS is applied. In FLS, three input variables are used. First, the CN energy is the remaining energy of the CN, as a percentage: . Second, the camera node degree is the number of other CNs that are within the competitive radius of the CN, divided by the total number of CNs in the network: . Finally, the node degree of the camera cluster is the number of SNs in the camera cluster in the previous round, divided by the total number of SNs: . Here, is set to 0 in the first round of the network.

As shown in Figure 4, all three variables have the same linguistic variables for the fuzzy set: low, medium, and high. Since trapezoidal and triangular membership functions are suitable for real-time operation and their computations are not complex [34], we applied them to our fuzzy input and output variables. All fuzzy input parameters of the membership function are formulated based on [32] and our experiment. Mamdani’s method is chosen as the fuzzy inference technique that is used to map the set of input linguistic variables to the output set [35]. A set of 27 fuzzy rules and output membership functions are shown in Table 1 and Figure 5, respectively.

4.3.3. Camera Cluster Membership

The camera cluster membership algorithm also adopts FLS to determine the size of the camera cluster. Not all SNs within the competitive radius can be members of the camera cluster; only the qualified ones are selected to join this cluster. As shown in Table 2, three fuzzy logic input variables are used for camera member node selection. Each of them has its own membership function. The first and second variables are camera node energy and node degree, respectively, which are the same as the input variables of FLS of competitive radius, as shown in Figure 4; therefore, we discuss only the third variable, namely, RSSI, which is a measurement of the power of the radio signal from the camera node (see also Figure 6). Weak, medium, and strong are the linguistic input variables for the fuzzy set. The triangular membership function is used for weak and strong, whereas the trapezoidal membership function is applied to medium [36].

Fuzzy inference relies on 27 rules, which are generated from three fuzzy input variables, as described in Table 2. The output, as depicted in Figure 7, is the fuzzy cost, which determines the possibility that nodes can be members of the camera cluster.

4.4. Image Compression Cluster Setup

The image compression cluster is formed to prepare the SNs for distributed image compression. In the image compression cluster setup phase, initially, the CN selects the highest-energy SN in the camera cluster. This highest-energy SN becomes the image compression cluster head (ICH). Not all neighbors of the ICH become members of the image compression cluster automatically. The ICH chooses a set of SNs that have the highest energies as its image compression cluster to participate in image compression. The number of SNs depends on the compression target; however, the ICH typically chooses the four highest-energy SNs within its communication radius to be members of the image compression cluster.

4.5. Image Transmission

The purpose of the image transmission phase is to ensure that the image has been captured, compressed, and sent hop by hop to the BS successfully. In this phase, there are two main subphases: distributed image compression and relay node selection.

4.5.1. Distributed Image Compression

In this paper, we distribute the discrete wavelet transform level and encoding to different sensor nodes within the image compression cluster. At the beginning, a camera node captures an image and then divides this image equally into several small images (here, 4).

(1) Discrete Wavelet Transform (DWT). As briefly discussed, the discrete wavelet transform is an effective technique for signal analysis and has been widely used in image processing, especially image compression. Here, JPEG2000 adopts DWT in its compression technique. DWT decomposes the image into a set of subbands and the level of decomposition produces four subbands: low-low or image approximate (LL), high-low or diagonal details (HL), low-high or horizontal details (LH), and high-high or vertical details (HH). LL is lower scale of the image, whereas the other subbands are the image details. LL can be decomposed further to produce another level of subbands. The higher the level of the decomposition, the smaller the image compression size is; however, the image compression size does not improve when the decomposition level reaches 5-6. An example of 3 levels of DWT decomposition is shown in Figure 8.

(2) JPEG2000. JPEG2000 can be either lossy or lossless, depending on the wavelet transform and quantization method that are applied. It utilizes the Embedded Block Coding with Optimized Truncation (EBCOT) image compression technique. The difference between JPEG2000 and JPEG is that JPEG2000 uses DWT, whereas JPEG exploits DCT. JPEG2000 is far superior to its ancestor since it can offer a higher compression ratio. Moreover, wavelet-based compression techniques such as JPEG2000 are more robust to transmission and decoding errors. Here, we select JPEG2000 for a resource-constrained network in WMSN [14, 37, 38], as shown in Figure 9. For encoding, JPEG2000 compression initially applies DWT and then quantizes and encodes the transform coefficients to generate the output codestream (compressed image). For decoding processes, the codestream is decoded and dequantized. Finally, the inverse DWT is used to reconstruct the image.

(3) Distributed JPEG2000 Compression. As shown in Figure 10, before sending each small image out, the CN forms the image compression cluster based on the algorithm that was discussed in Section 4.4. The detailed algorithm of distributed image compression is described in Algorithm 3. Once the image compression cluster setup is completed, the CN sends each small image to the ICH. After receiving the image from the CN, the ICH applies the first level of DWT on the image and obtains subbands LL, HL, HL, and HL. The process continues by encoding HL, HL, and HL and sends the compressed data to its communication CH, whereas the remaining LL is sent to the nearest SN in the image compression cluster for further processing.

 CN  selects  the  highest-energy  SN  in  the  camera  cluster  as  the  image  compression  cluster  head  (ICH)
if  Node  is  ICH  then
if  Node  receives  image  from  the  CN  then
 Select  a  specified  number  of  SNs  that  have  the  highest  energy  
 in  the  image  compression  cluster  as  the  members
if  Has  member  in  image  compression  cluster  and  the  shortcut  tasks  are  
greater  than  its  normal  tasks  then
 ICH  applies  one  level  of  DWT  on  the  image
 ICH  encodes  HH,  HL,  and  LH
 ICH  sends  the  LL  to  nearest  member  node  in  the  image  compression  cluster
Else
 ICH  performs  all  compression  tasks
 ICH  sends  the  compressed  data  to  the  ICH’s  communication  CH
end  if
end  if
if  Compression  tasks  are  finished  then
 ICH  combines  all  compressed  data  and  sends  them  to  the  ICH’s  communication  CH
end  if
else  if  Node  is  member  of  the  image  compression  cluster  then
if  Node  receives  LL  from  another  SN  in  the  image  compression  cluster  then
 Find  the  next-nearest  SN  in  the  image  compression  cluster
if  Has  the  next-nearest  node  in  image  compression  cluster  then
 Node  applies  one  level  of  DWT  on  LL  of  the  previous  level
 Node  encodes  HH,  HL,  and  LH  and  sends  the  compressed  data  to  the  ICH
 Node  sends  the  LL  of  this  level  to  the  nearest   member  node  in  the  image
compression  cluster
Else
 Node  performs  the  remaining  compression  tasks
 Node  sends  the  compressed  data  to  the  ICH
end  If
end  If
end  if

The nearest SN performs the same steps as in the previous process. After receiving the LL, the nearest SN implements another level of DWT; encodes the new HL, HL, and HL; and then sends the compressed data to its ICH, whereas the new LL is sent to the next-nearest SN in the image compression cluster. The processes are repeated until the target compression is achieved. If there are not enough SNs in the image compression cluster, the last SN in the image compression cluster performs the remaining image compression tasks. In this case, there is no member in the image compression cluster, and the ICH performs all image compression tasks. After distributed image compression, the ICH aggregates the compressed image and sends it to its communication CH. Then, the CH forwards the compressed image via other CHs hop by hop to the BS based on the relay node selection algorithm that is presented in Section 4.5.2, until the compressed image reaches the BS.

Since there is a trade-off between compression and transmission complexity, to preserve the energy consumption of the SNs that are participating in compression tasks before processing their normal compression tasks as mentioned above, each SN is required to perform the following preprocessing calculations:(i)If the node is the ICH, it is required to calculate the energy consumption of implementing an entire compression task and forwarding the compressed image to its CH.(ii)If the node is a member node in the image compression cluster and is selected to participate in image compression tasks, it needs to calculate the energy consumption of processing all remaining image compression tasks and forwarding the compressed data to the ICH.

The SNs in the image compression cluster choose to implement the preprocessing task if this task consumes less energy than their normal tasks; otherwise, the SNs perform their normal tasks.

4.5.2. Relay Node Selection

In this study, a relay node selection algorithm is used to select the next CHs to forward the compressed image hop by hop to the BS.

We describe the relay node algorithm, which is given in Algorithm 4, as follows: first, the source CH broadcasts a Relay-Msg, which contains its ID, to its neighboring CHs within its communication radius to find a relay CH. Once the neighboring CHs receive the broadcasting message, the CHs reply to the source CH by sending a Relay-Reply-Msg directly, which contains their IDs, remaining energies, and routing levels. After receiving the reply messages from the neighboring CHs, the source CH chooses the group of neighboring CHs that has lower routing level than itself to calculate the fuzzy cost using FIS, as described later. If there are no neighboring CHs that have lower routing levels, the source CH chooses those with the same routing level as itself. The selected neighboring CH who has the highest fuzzy cost is chosen as the relay CH to forward compressed image to the BS. This process is repeated until the compressed image reaches the BS.

while  Compressed  image  has  not  arrived  at  the  base  station
if  Node  is  CH  then
if  CH  has  a  neighboring  CH  then
Broadcast  Relay-Msg  (ID)  
Receive  Relay-Reply-Msg  (ID,  routing_level,  energy)  for  neighboring  CHs
Select  a  group  of  neighboring  CHs  that  have  lowest  routing_level
Fuzzy_cost    empty
For  each  Relay-Reply-Msg
Fuzzy_cost[]  calculate  Fuzzy  (Remaining_energy,  RSSI)
end  for
Next_CH  Select  the  CH  that  has  the  highest  fuzzy  cost
Source  CH  sends  the  compressed  image  to  Next_CHs.
Else
Source  CH  sends  the  compressed  image  directly  to  the  base  station.
end  if
if  Node  receives  Relay-Msg  then
CH  replies  to  the  source  CH  with  Relay-Reply-Msg  (ID,  routing_level,  energy).
end  if
end  if
end  while

This relay node algorithm also uses FLS as a decision system for choosing the relay CH. In this part, the procedure for obtaining the fuzzy cost of the relay node algorithm is explained in detail. There are two fuzzy input variables for each fuzzy set. The first fuzzy input variable is the remaining energy of the neighboring CHs, which has three linguistic input values: low, medium, and high. For evaluation, the triangular membership function is also applied for medium, whereas the trapezoidal membership function is used with low and high, as shown in Figure 4. The second variable is the RSSI of the neighboring CHs, which has three linguistic input values: strong, medium, and weak. All of them use the triangular membership function, as shown in Figure 6. We also use Mamdani’s method as a fuzzy inference technique. There are 9 fuzzy rules for relay node selection, as depicted in Table 3. The output fuzzy variable, as shown in Figure 11, is the fuzzy cost, which determines the next relay node. The highest-fuzzy-cost CH is selected to be the relay node.

A flowchart of the overall processes of DICA is shown in Figure 12.

5. Experimental Results and Discussion

5.1. Experimental Setting

Our algorithm is simulated using MATLAB. The SNs are randomly deployed in a topographical area of dimension 300 m × 300 m. To evaluate the efficiency of our methods, the experiments were conducted on both sparse and dense networks. The number of sensor nodes (including the NN and the CN) is varied from 100 up to 200. Here, the number of CNs is set to 1 for comparative purposes (randomly placed) [19]. The CN and NNs have initial energies of 15 J and 10 J, respectively. The communication radius of all sensor nodes is 75 m [39, 40]. The CN captures grayscale images of 512 × 512 pixels, each of which is divided equally into 4 blocks before transmission.

Here, there are 5 levels of DWT. The quantization value of image compression is set to 10 [16]. We compared our algorithm with a traditional WSN routing algorithm and the two state-of-the-art distributed image routing architectures, namely, LEACH, 2HCIT [19], and EEDIC [14]. In the LEACH approach, the CN compresses a whole image and sends the compressed image to its communication CH. Then, the compressed image is forwarded to the BS. In other words, the traditional LEACH approach is unaware of multimedia transmission. The simulation parameters are summarized in Table 4. In our simulation, there are two scenarios. The first scenario is conducted with 100 SNs, whereas the second scenario is implemented with 200 SNs. We performed ten trials and averaged the results.

5.2. Results and Discussions

In this section, we present and evaluate the results of simulations of our distributed image compression architecture over WMSNs. We compare the performance of our proposed method with those of EEIC, 2HCIT, and LEACH in terms of the energy consumption, network lifetime, and throughput in networks of different scales.

5.2.1. Hierarchical Routing Level Evaluation

First, examples of the hierarchical routing algorithm in both spare and dense networks are shown Figure 13. In these examples, the whole networks are divided into 4 layers, which correspond to 3 routing levels. The closest SNs to the BS have routing level 1 and the furthest have routing level 3. All of the SNs, whether in sparse or dense networks, have their own routing levels.

5.2.2. Network Remaining Energy Evaluation

The remaining energies of both the CN and NNs with respect to the number of rounds are shown in a set of subfigures (Figure 14). Our proposed method outperforms the LEACH, EEDIC, and 2HCIT approaches in terms of balancing the network energy consumption and prolonging the network lifetime. In Figure 14, as the number of rounds increases, our proposed method outperforms the other methods. The energies of both the CN and NNs were reduced slightly in our method, followed by those in the EEDIC and 2HCIT approaches, while in LEACH approach, the remaining energy of the SNs decreased dramatically, especially that of the CN.

These results indicate that our proposed method could distribute the compression and transmission tasks among the SNs and better balance the energy consumption of the SNs in the network compared to the other two approaches. Moreover, our multihop hierarchical routing algorithm performs well by reducing the transmission energies of the SNs. In both sparse and dense networks, our proposed method can yield SN energy savings of approximately 80%, 40%, and 10% compared to LEACH, EEDIC, and 2HCIT, respectively.

5.2.3. Network Lifetime Evaluation

In WMSNs, the entire network lifetime evaluation is important for proving energy-efficient performance. Figure 15 provides an insight into the network lifetime in terms of the number of rounds with respect to the percentage of energy that remains in the CN. The results indicate that our proposed method can enhance the network lifetime for both sparse and dense SNs. As the number of NNs increases, our algorithm still performs well. Our proposed method improves the network lifetime by approximately 80% over LEACH. Comparing to 2HCIT and EEDIC, our method improves the network lifetime by approximately 20%–40% in both networks.

5.2.4. Throughput Evaluation

In this subsection, we discuss the throughput of an overall network, which is one of the most important measures of network performance. Throughput is defined as the number of sequential packets that contain a full (complete) image that are sent to the BS successfully. As shown in Table 5, our proposed algorithm archives much better throughput than the other algorithms since our algorithm relies on minimizing the CN energy consumption by distributing the compression task and NN energy by (preferred) transmission over a short distance hop by hop to the BS. In both spare and dense networks, on average, our proposed method achieves 10%, 70%, and 80% higher throughput compared to 2HCIT, EDDIC, and LEACH, respectively.

6. Conclusions

A distributed image compression architecture (DICA) over WMSNs is proposed in this paper. Three main contributions have been discussed. First, the optimal camera cluster is determined by using FLS. Second, image compression tasks are distributed among SNs, which are close to each other within the image compression cluster to save energy. Lastly, multihop hierarchical routing has been developed to preserve and balance energy in the network. According to simulation experiments, our algorithm can improve the energy consumption efficiency, on average, by 10%, 40%, and 80% compared to 2HCIT, EEDIC, and LEACH, respectively, thereby prolonging the network lifetime and increasing the throughput compared to the above-discussed algorithms for both sparse and dense networks.

Even though DICA can achieve a high degree of energy efficiency and throughput, more investigations, assumptions, and constraints could be further explored, such as quality-of-service awareness mechanisms and sophisticated data compression and aggregation techniques. With respect to other factors that likely affect the high volume of data transmission, comprehensive simulation and analysis could be intensively investigated, such as a scalability consideration, that is, network density and diversity, network dimension, routing selection, mobility, irregular topology, various signal propagation models, and heterogeneous data traffic considering additional transmission protocol overheads. In future work, we will focus on the modification of the image compression technique to reduce its computational complexity, memory usage, and energy consumption so that image compression can be better performed in resource-constrained wireless sensor networks. Furthermore, we plan to extend our proposed scheme to video compression and transmission over WMSNs.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work was supported by grants from Khon Kaen University via ASEAN and GMS Countries’ Personnel Programs 2016–2019 and an Interdisciplinary Grant (CSKKU2559) from the Department of Computer Science, Khon Kaen University.