High-efficiency Distributed Image Compression Algorithm Based on Soft Threshold Iteration for Wildlife Images with Wireless Image Sensor Networks

experimental results on our own wildlife dataset show improvements of 7.47 and 9.06% for the peak signal-to-noise ratio and 16.98 and 19.50% for the structural similarity index on the reconstructed image compared with those of the discrete cosine transform and embedded zerotree wavelets algorithms, respectively. Compared with the multihop and single-hop transmission methods, the power consumption is reduced by 29.96 and 40.84%, respectively. The results of this study indicate that the WISN technique can provide feasible solutions for the intelligent monitoring of forest biological resources.


Introduction
Wildlife resources are abundant in China, with 97 species falling under China's animal protection at the national level and more than 320 species being designated second-class protected animals.Wildlife monitoring and protection are crucial for the balance and stability of the whole ecosystem. (1)The images and video materials can provide intuitive information about species quantity and habitat status.(4)(5)(6) However, these methods have their own limitations, such as limited monitoring range, data acquisition lag, and low resolution.Recently, wireless image sensor networks (WISNs) have been applied in wildlife image collection, as they present better performance for remote, real-time monitoring, and deployment abilities. (7)Thanks to the development of image acquisition equipment technology, the wildlife monitoring images captured in the field have the characteristics of high resolution and complex background, but these pose a challenge for WISNs with the limitations of low processing capability, power consumption restrictions, and narrow transmission bandwidth. (8)This will cause problems such as shorter lifetime of the monitoring system, longer transmission time of a single image, and susceptibility to signal interference.
For efficient transmission through resource-constrained WISNs, we can obtain information about wildlife without the need for high-resolution images on the background server end.Meanwhile, the original captured images are saved in a secure digital memory card (SD card) embedded in the monitoring devices.Therefore, image compression coding is utilized to reduce the transmission workload. (9)(12)(13)(14)(15) These algorithms can achieve the effect of image compression, but only for the entire image, which cannot reflect the importance of the wildlife region.Traditional algorithms may also have a considerable influence on the image reconstruction quality because of the lack of partial coefficients in the transmission process, and the transmission result is susceptible to external interference, such as transmission interruption and signal disturbance.In recent research, saliency object detection methods are utilized to extract the wildlife region and generate the mask image, which is used to separate the object and background information. (16)(22) In addition, compressed sensing has better robustness, which is suitable for WISNs.However, owing to the limitations of low computing power and long transmission time for a single node, the lifetime of WISNs is too short since the energy consumption of the entire network is not balanced.(25) One scenario is when nodes have extremely constrained computation power.Hence, any single node may not have sufficient computation power to completely compress a large raw image.In this case, a distributed method to share the processing task is necessary.The other scenario is that even if nodes are not extremely constrained by computation power but are battery operated, distributing the computation load among otherwise idle processors of other nodes will extend the overall lifetime of the network.However, the inherent shortcomings of traditional image compression algorithms make this method unsuitable for wireless image sensor networks.
In this paper, we propose a distributed image transmission method based on soft threshold iteration and quantitative perception for monitoring wildlife images through WISNs.The aim of this new method is to ensure the transmission quality and efficiency of the wildlife region in the monitoring images, thus providing a WISN image transmission scheme for remote wildlife monitoring and protection.This will promote the application of WISNs in the wildlife monitoring field.

Experimental Materials
WISNs are widely used in wildlife monitoring systems to capture wildlife images using industrial-grade cameras.WISNs consist of WISN terminal nodes, coordination nodes, gateway nodes, and a data storage center (back-end server).The monitoring node devices are deployed in active wildlife areas in accordance with practical needs, and the WISN is established in a selforganizing manner using ZigBee network protocols.After the infrared sensor at the terminal node senses the entry of wildlife into the monitoring field, the camera is triggered to capture images and data are saved in the SD card.Then the coordination node receives the monitoring image data from the terminal node and transmits the image data to the back-end server in a multihop manner.The wildlife monitoring system developed by our laboratory is acknowledged to present remote, realtime, all-weather, and friendly monitoring merits. (26)he WISN wildlife monitoring system was deployed in the Saihan Ula National Nature Reserve of Inner Mongolia Province, China.Wildlife species collected within the experimental site include red deer (Cervus elaphus), Chinese goral (Naemorhedus), roe deer (Capreolus pygargus), lynx (Felis lynx), wild boar (Sus scrofa), and raccoon dog (Nyctereutes procyonoides), which are shown in Fig. 1 and Table 1.Red deer and lynx are national second-class protected species.In this experiment, over 10700 images of the above six wildlife species were acquired for the subsequent scientific research.

Novel Distributed Image Compression Coding Method
A novel distributed image compression coding method is proposed to process the wildlife monitoring images with high resolution and large amount of information data, as shown in Fig. 2.This method separates the information of the saliency object region and the background region, which not only ensures the importance of the wildlife region, but also allocates the power resources in a reasonable manner to prolong the network lifetime.The region of interest (ROI) that contains the wildlife is the major object of study, while background regions only provide comparatively irrelevant reference information. (27)he steps of the algorithm are as follows.
(1) The saliency object region is extracted using the histogram contrast algorithm and is utilized to generate the mask image of the wildlife region.(2) The pixels in the saliency and background regions are labeled through the mask image; in other words, the wildlife region is directly transmitted by the cluster head, and the background region is assigned to the other monitoring nodes at the same level for simultaneous processing and transmission.(3) To guarantee efficient transmission, the soft threshold iteration and quantitative perception algorithm are utilized to encode the wildlife monitoring image data.

Mask image generation
In the process of wildlife monitoring, the saliency object region (wildlife region) can provide an intuitive understanding and judgment of wildlife while the background region is merely supplementary information to the saliency region.Therefore, saliency object detection and extraction are utilized in this study to generate the mask image for the distributed transmission strategy.In our proposed algorithm, the input images are quantified in accordance with the number of quantify channels CN and the main color is arranged into a color matrix on the basis of histogram statistics.First, we defined the saliency of a pixel in an image by comparing the color of a single pixel with the color of other pixels, as ( ) ( ) where I is the input image, S(I k ) is the saliency value of pixel I k , and D(I k , I i ) is the color distance metric between pixels I k and I i in the L*a*b* space.Then, Eq. ( 1) can be expanded by pixel order to the following form: , , , where N is the number of pixels in image I.It is easy to see that pixels with the same color value have the same saliency value under this definition, since the measure is oblivious to spatial relations.After that, the image pixels are recorded by color value and the terms with the same color value are grouped together.The saliency value S(c i ) between different colors is calculated and expressed as where c i denotes the color value of pixel p i in the input image and D(c i , c j ) denotes the color distance metric between the pixels c i and c j in L*a*b space.n denotes the total number of colors of the input image and f j represents the ratio of the number of pixels whose color value is c i to the total number of pixels in the image.
Color quantification greatly simplifies the calculation procedure, but similar colors may be quantized to different values during the process.To reduce the noisy saliency results caused by such randomness, we replace the saliency value of each color by the weighted average of the saliency value of similar colors (measured by L*a*b* distance).We use a linearly varying smoothing weight (T − D(c i , c j )) to assign larger weights to colors closer to c in the color feature space.In our experiments, we found that similar histogram bins are closer to each other after such smoothing, indicating that similar colors have a higher likelihood of being assigned similar saliency values, thus reducing quantization artifacts.
Here, the equation denotes the distance between the color c and its nearest colors.Typically, m is one-quarter of the number of colors n in the images after quantification. (5) To reduce the number of colors that must be considered, we first quantize each color channel to have 12 different values, which reduces the number of colors to 123 = 1728.Considering that color in a natural image typically covers only a small portion of the full color space, we further reduce the number of colors by ignoring less frequently occurring colors. (28)By choosing more frequently occurring colors and ensuring that these colors cover the colors of more than 95% of the image pixels, the colors of the remaining pixels, which comprise fewer than 5% of the image pixels, are replaced by the closest colors in the histogram.
On the basis of the characteristics of the saliency detection results, we select the threshold method to divide the image into saliency regions and background regions.Pixels with color values less than the threshold are set as background regions, and pixels with color values greater than the threshold are set as saliency regions.Through experiments, it is known that the threshold is set to 20, and then the color value of the background area is set to 0 to generate a binary image of the salient area, as shown in the Fig. 3.
In terms of saliency object detection and extraction, the corresponding coefficients in the saliency and background regions are set to 1 and 0, respectively, to obtain the binary mask image, as shown in Fig. 3, and are used to label the coefficients of the wildlife region from the original image.

Distributed image transmission strategy
To achieve the efficient transmission of wildlife monitoring images under limited processing capacity and power consumption, the distributed image transmission method is utilized, where the saliency object region is directly transmitted by the cluster head nodes, and the background region is assigned to other nodes.This method not only relieves the transmission pressure of the cluster head node, but also reasonably allocates power consumption, prolonging the lifetime of the network.We first transmit the saliency region information to the destination node through cluster head C i , and the transmission route is S → C2 → C3 → C4 → D. The background region information is then transmitted when the transmission of the saliency object region is completed: After receiving a query from the source node S, cluster head C1 selects a set of nodes P1 (including the nodes P 11 , P 12 , P 13 , P 14 expressed as in Fig. 4), which takes part in the distributed wavelet transform process, then informs the image to node S. S divides the raw background image information into four tiles and transmits them to nodes P1, which are responsible for running two-dimensional wavelet transform on their received image data and sending the results (Level 1 data) individually to the next cluster head C2.Since the LH, HH, and HL band data do not need further decomposition in the wavelet transform, node C2 combines these data and sends the result directly to the next cluster head C3.The remaining data are sent to processing nodes P2 (P 21 , P 22 , P 23 , P 24 ) until the final compressed image is transmitted to the destination node.

Novel iterative soft threshold compressed coding
The traditional method of compressed sensing (CS) usually solves the following optimization problems to reconstruct the original image X, expressed as , where X is the original image, y is the output value of the linear system, and λ is a coefficient that controls sparsity.However, the traditional CS algorithm has high computational complexity and limited reconstruction accuracy, which limits its practical application.Therefore, a novel iterative soft threshold algorithm was adopted to achieve image compression and model quantization, and the network architecture is expressed as in Fig. 5 In response to the problems above, soft threshold iteration was used to solve the reconstruction problem in Eq. ( 4), as follows: where k represents the number of iteration rounds and ρ is the step size.
During the iteration process, a neural network was used to approximate each step, where the update of r remained unchanged, and the linear transformation Ψx was replaced by the nonlinear transformation F(x) = BReLU(Ax).
Because , the update iteration step [Eq.( 6)] of x becomes where θ = λα.To make it easier to understand the iterative soft threshold coding, the inference process from Eqs. ( 9) to ( 14) is added in this article.The optimization problem of Eq. ( 9) is .According to the definition of norm, the objective function of the optimization problem can be decomposed as (11)   This is to say, the problem of Eq. ( 1) can be solved by solving the optimization problems of Consider b as a variable and λ/2 as a threshold in the above equation; then the soft threshold function can be calculated.

(13)
The optimization problem of Eq. ( 9) can be solved using a soft threshold function.Since multiplying by a constant coefficient does not affect the acquisition of extreme points in the objective function, Eq. ( 9) can be equivalently expressed as an optimization problem Additionally, the inverse transformation F  of F is introduced in this algorithm, i.e., F  F = I.Then we can get the following equation.(15)  Considering the limitations of neural network deployment, there may be a loss of accuracy after the quantization process.Therefore, pseudo-quantization nodes are added to the network structure and iteratively trained to ensure good accuracy and appropriate memory size in the final model quantization deployment.
We used a two-layer convolutional network to replace the linear transformation matrix, and then the pseudo-quantization nodes were added to achieve the adaptation to quantization loss and reduced accuracy.First, the initial value x was required to calculate and achieve network iteration, as shown in the following equation.(16)   Subsequently, the QuantStub and DeQuantStub modules were added to the network, and the errors that occur during data quantization and inverse quantization were introduced into the network for iterative training, which enabled the network to better adapt to the final model quantization.(Note: the QuantStub module can convert the input to a quantized data type, and the DeQuantStub module performs the inverse operation of the QuantStub module).
The loss function was used in the following equation to calculate the deviation between the predicted network value and the actual value.

Comparison and Discussion
To verify the adaptability and effectiveness of the proposed algorithm, the transmission quality and power consumption analysis of field-captured wildlife monitoring images is presented.The result is evaluated using several evaluation criteria and compared with the results of other conventional algorithms of wildlife monitoring image transmission.

Analysis of reconstruction quality
Both the peak signal-to-noise ratio (PSNR) and structural similarity index (SSIM) are utilized as objective criteria to evaluate the quality of image reconstruction. (29)PSNR is the ratio of the maximum possible signal power to the destructive noise power based on the mean square error (MSE), which affects representation accuracy. (30)8) (19)   Here, MN is the total number of pixels in the sample image.g(x, y) is the reconstruction image and f(x, y) is the original image.
SSIM is another measure of the similarity between reconstructed and original images.It is obtained by calculating the degree of image distortion from the change of image structure information.(20)   We applied our algorithm to the field-captured wildlife monitoring images with high resolution, high noise interference, and complex background selected from our image dataset.All experiments were performed using MATLAB [2023a] in a workstation with Intel (R) Core (TM) i5-4570 and 4GB RAM.
In the proposed method, we can first obtain the saliency object region in the initial stage of the transmission to recognize the species of wildlife, as shown in Fig. 6.Compared with the other algorithms, the reconstruction quality of the proposed algorithm regarding texture detail information is better.
To verify the transmission effectiveness of the proposed algorithm, we selected PSNR and SSIM of the full reconstructed image for comparison with those obtained using embedded zerotree wavelets (EZW) and discrete cosine transform (DCT) algorithms in this paper. (31)The experimental results are shown in Table 2 and Fig. 7.The average reconstructed results of PSNR and SSIM by our algorithm are 36.9343and 0.9350, which are increased by 7.47, 9.06 and 16.98, 19.50%, respectively, compared with those of the DCT and EZW algorithms.

Analysis of power consumption
Since the communication area of each monitoring node is much smaller than the entire network coverage area, multihop transmission is utilized to transmit the monitoring data. (32)For a sensor network with M layers and a communication radius of R, the circular area of network coverage is divided into concentric rings of thickness R. The monitoring data at the nth layer node needs to be forwarded to the destination node through the (n − 1)th layer node.The power consumption of the entire wireless sensor network in time T is (21)    where E net(M, M) denotes the power consumed by the Mth node to send data, and E net(M, M−1) is that for the layer (M − 1)th node to forward the data sent by the Mth layer. (33)ecause the monitoring nodes are uniformly distributed throughout the network coverage area, as shown in Eq. ( 17), the power consumption model in this study is expressed as where E elec denotes the power consumption per unit bit of transmitting or receiving by the transmit and receive electronics.ε amp is the power consumed per square meter per bit of transmission by the transmit amplifier.k is the propagation attenuation index.The experiment parameters in this study were set as follows: communication radius R of 50 m, power consumption E elec of 50 nJ/bit, and ε amp of 100 pJ/(bit•m −2 ).The propagation attenuation index k equals 2 in the monitoring area, which includes 12 nodes.The experimental result (shown in Fig. 8) of power consumption by the distributed transmission model is 51.427 μJ, which is reduced by 29.96 and 40.84%, respectively, compared with those of the multihop and single-hop transmission methods.The performance evaluation shows that this distributed scheme can have a significantly longer system lifetime, ensuring the transmission efficiency of wildlife monitoring images.

Discussion
In this study, we evaluated the proposed algorithm from two aspects: the image reconstruction quality and the power consumption of the WISN system.In terms of the image reconstruction quality, we adopted the EZW and DCT compression algorithms for comparison with our proposed algorithm.The experimental results showed that the average reconstructed results of PSNR and SSIM using our algorithm were 36.9343 and 0.9350, which were increased by 7.47%, 9.06% and 16.98%, 19.50%, respectively, compared with those of the DCT and EZW algorithms.How to further reduce the complexity of the algorithm under the condition of ensuring image quality is still a problem to be examined in the follow-up research.
Furthermore, we established a power dissipation model in this study to compare the power consumptions of the distributed transmission model and the multihop and single-hop transmission methods.The experimental results showed that the power consumption of the distributed transmission model was 51.427 μJ, which was reduced by 29.96 and 40.84% compared with those of the multihop and single-hop transmission methods, respectively, in the case of transmitting the same amount of image data.In the future, to prove the effectiveness of the algorithm proposed in this paper, we need to evaluate the performance of the algorithm in a practical application.

Conclusions
In this paper, for wildlife monitoring images, we proposed a novel distributed image transmission method based on soft threshold iteration and quantitative perception, which can achieve distributed transmission of the saliency object region and background separately.We first utilized the histogram contrast to detect the saliency object region in a wildlife image with a complex background.After we obtained the mask image of the wildlife region, a distributed transmission strategy was proposed to allocate transmission tasks and power consumption reasonably, with the aim of transmitting the saliency object region preferentially through the cluster nodes.Then, the background information was assigned to other nodes on the same layer.To demonstrate the efficiency and validation of the proposed method, image quality and power consumption were evaluated on the images from the field-captured wildlife monitoring database.The results of comparisons showed that the proposed algorithm has a better performance than those of existing classical algorithms, that is, the average PSNR and SSIM were increased by 7.47%, 9.06% and 16.98%, 19.50% compared with those of DCT and EZW algorithms, and the power consumption was reduced by 29.96 and 40.84% compared with the multihop and singlehop transmission methods, respectively.In the future, we will focus on the intelligent monitoring of the forest biomass resources using wireless sensor network technology.

Fig. 4 .
Fig. 4. (Color online) Distributed image transmission method.Illustration of data exchange method of distributed wavelet-based image compression in a wireless multihop network.This is the three-level structure of wavelet decomposition.S is the source node and D is the destination node.C i denotes the cluster head of cluster i.
the derivative of the function can be calculated as

Table 1
Wildlife image sample database.

Table 2
Results for reconstructed images using various algorithms.