## 4 The Proposed Selective Retransmission Mechanism
### Image Quality  
The simplest way to measure the quality of the reconstructed image is the success ratio. We initially used the same parameters of the experiments of Figure 6 to compute the success ratios, as depicted in Figure 11. As expected, more packets are lost on average when the current used path is composed of more hops. Figure 10: Energy consumption for a path with different mean packet error rates. We can also relate the success ratio with the mean packet error rate, as presented in Figure 12, where a path composed of 10 intermediate nodes is considered. Note that success ratio is severely affected by higher PER. An interesting consideration is that the 2-level 2D DWT based retransmission approach consumes less energy, but results in higher mean packet loss, especially for values of DR closer to the sink. The success ratio presents the expected mean packet loss, but does not provide a direct value for the image quality, since packets have different relevancies for the reconstruction of the image at the receiver side. In order to have a better feeling of the resulted image quality, we estimated some packet loss and computed the PSNR of the reconstructed image. Figure 11: Success ratios for different mean packet error rates. Figure 12: Success ratio _versus_ PER. Figure 13 presents the image quality after transmission considering the 1-level 2D DWT based approach, where packets with DR = 255 may be lost. In that figure, we simulated different percentage of packet loss, including the worst case when all packets with DR = 255 are lost. A total of 140 packets with DR = 255 are transmitted for the original image of Figure 5.  
Analyzing the reconstructed images it can be seen that, even in the worst case, the visual quality seems to be very acceptable for many types of wireless image sensor networks applications. And if so, we noted that the energy saving is highly significant when the retransmission approach based on 1-level 2D DWT is applied, strongly benefiting such applications. We also analyzed the impact of loss of packets with DR = 255 when some packets with DR \(>\) 0 and DR \(<\) 255 are also lost. Figure 14 presents the resulted images considering 20% of loss of packets carrying the HL(2), LH(2) and HH(2) subbands (totalizing 7 packets), considering that 35 packets of such packets are transmitted. Figure 13: Visual quality and Peak Signal-to-Noise Ratio (PSNR) after loss of packets with DR = 255 and 1-level 2D DWT. After a 2-level 2D DWT, the \(\mathrm{HL_{(2)}}\), \(\mathrm{LH_{(2)}}\) and \(\mathrm{HH_{(2)}}\) subbands are more significant for the reconstruction of the image than the \(\mathrm{HL_{(1)}}\), \(\mathrm{LH_{(1)}}\) and \(\mathrm{HH_{(1)}}\) subbands. We can note in Figure 14 that the loss of only 20% of packets with DR \(>\) 0 and DR \(<\) 255 negatively impact the image quality, as can be seen by the computed PSNR. Such a negative impact is more severe for \(\sim\)50% of loss of such packets (totaling 17 packets), as presented in the images in Figure 15.  
Figure 14: Visual quality and PSNR after loss of packets with DR = 255 and 2-level 2D DWT. It is assumed that 20% of packets with 0 \(<\) DR \(<\) 255 are lost. Figure 15: Visual quality and PSNR after loss of packets with DR = 255 and 2-level 2D DWT. Almost 50% of packets with 0 \(<\) DR \(<\) 255 are lost. In this last case, we can note the lower quality of the reconstructed images, which may harm the visual monitoring capability of the application. One should notice, however, that images that look better may have a lower PSNR, since it is a way to measure the quality of the reconstructed images when compared with the original image, and thus it is useless to make comparisons between reconstructed images. The impact when packets with 0 \(<\) DR \(<\) 255 are lost are very severe for the quality of the reconstructed image, but the energy saving when compared with the 1-level 2D DWT retransmission approach is not as significant as the loss of the image quality.