# Image Transmission over Cognitive Radio Networks for Smart Grid Applications
## 3 Proposed MAC Layer for Image Streaming over CRSNs
### Performance Evaluation Metric for the Proposed Image Transmission Model  
There are a lot of image processing approaches to enhance quality of images and videos [32, 86, 87, 88, 89, 90] but at the first, its metric should be defined. Now, well-known metrics for assessing the quality of images and videos are VQM (Video quality measurement), PVQM (Perceptual video quality measure), MPQM (Moving picture quality metrics), SSIM (Structural Similarity Index), MSSIM (Mean SSIM), FSIM (feature-similarity), PSNR (Maximum signal to noise ratio), and HVS (human visual system) [85, 91, 92, 93]. Human Visual System (HVS) based techniques for IQ assessments (IQA) take benefit of some known characteristics of Human Visual System in order to incorporate perceptual image quality metrics (IQM). In [94], [PERSON] et al. developed a Distortion Measure (DM) and a Noise Quality Measure(NQM) for quantifying the effect of frequency distortion and noise injection on the HVS. Universal Quality Index (UQI) was introduced also to perform image similarity measurement successfully across distortion types. The main problem for these methods is that these are time consuming methods that strongly depend on human expert expertise and may vary from one to another.  
Quality of image (IQ) is usually assessed using image quality metrics such as SSIM, HVS, MSSIM and FSIM along with PSNR and MSE but unfortunately, most of used metrics cannot describe the visual quality of the enhanced digital image adequately. Even though a number of image enhancement techniques are available, development of a quantitative enhancement measure suitable for all types of images, is still a challenging area and newer metrics are being thought of every day [93, 95]. In fact, there is no universal measure, which specifies both the objective and subjective validity of the enhancement for all types of images [93].  
In compression and transmission of digital images, sometimes very least changes may be desired and some famous metrics such as PSNR, MSE, and etc. are deployed widely as quantitative and public metrics for evaluating the amount of image signal distortion with respect to the given (original) image. Despite the multiplicity of quality measurements of images, the PSNR method is still used as the dominant method due to the ease of implementation and the frequency of deployment in other works [84, 85]. Therefore, similarly, PSNR has been used mainly in our paper to measure the performance of the proposed system for transmitting images via cognitive radio networks but some others are also evaluated.  
To calculate the PSNR, the average squared error must first be calculated. For this purpose, with the image stored in the transmitter buffer, \(I_{Sender}(x,y)\), as well as the final received image at the receiver, \(I_{Receiver}(x,y)\), we can calculate the mean squared error (MSE) using the Equation (25):  
\[MSE=\frac{1}{r\times c}\Sigma_{j=1}^{c}\Sigma_{i=1}^{r}|I_{Sender}(i,j)-I_{ Receiver}(i,j)|^{2} \tag{25}\]  
Now, with the calculated MSE, the maximum signal-to-noise ratio (PSNR) is obtained from the Equation (26):\[PSNR =10 Log_{10}\frac{(2^{n}-1)^{2}}{MSE} \tag{26}\] \[=10 Log_{10}(2^{n}-1)^{2}-10 Log_{10}MSE\] \[=6N-10 Log_{10}MSE\]  
where in the last equation, n is the depth of the bit. In this work, along with the PSNR, we also used the visual Error Energy (EE) criterion. The error energy is actually an image whose pixels are absolute difference between the pixels in corresponding channels in the transmitted and received images. This criterion provides an appropriate visual presentation of the quality of received images.