# Object-Based Approach for Adaptive Source Coding of Surveillance Video
## 4 Experimental Results  
We set up an outdoor surveillance camera to record all training and experimental videos by ourselves. These videos' resolution are 640 \(\times\) 480 and 30 frames per second. Their codecs are set to MPEG-4, the group of picture (GOP) size is 9 and quantization scale is 31. There are two B frames between the I and P frame or the P and P frame. We randomly recorded 24 videos and most of the people in the videos are our lab's members and students. We use an object tracking algorithm [32] to automatically mark moving objects. In addition, we used the IEEE 802.11 wireless environment. The NS-2 simulator was used in our simulation experiments. We referenced Enhancement of EvalVid (MyEvalVid) [33] to simulate video transmission in a wireless network environment. MyEvalVid is a set of tools consisting of EvalVid [34] and NS-2. EvalVid is a multimedia quality assessment tool. It provides an architecture that allows verifying the impact of the proposed network-related issues associated with the quality of multimedia streaming via physical or analog networks. Since the analog network model provided by EvalVid is too simple, it was necessary for MyEvalVid to add three agent programs, including MyTrafficTrace, MyUDP, MyUDPSink, to provide a more comprehensive multimedia quality assessment in conjunction with running NS-2. In the NS-2 simulation environment, the maximum transfer unit is set to 1 Mbps. For the packet lost and jitter conditions on the wireless network, the random uniform error model is used and the error rate is set to 0.01. The transmission of the network was done through multicasting. Figure 4 shows the experimental framework. To establish the linear regression model, we randomly recorded 24 videos (Figure 5a shows some of the training videos) and captured 43 video scenarios with a human as the moving object as training samples (Figure 5b shows some of the moving objects). The initial coding bitrate was 64 Kbps, which increased by 64 Kbps per unit until the coding bitrate reached 960 Kbps. Through that process, we could obtain video in which each frame had a different PSNR. Figure 4: The experimental framework of our system. Many studies have been conducted on video quality assessment [35; 36]. The PSNR is most commonly used as a measure of the quality of the reconstruction of lossy compression codecs [37]; thus, we used it as an evaluation standard in our experiments. It is most easily defined via the mean squared error, which is defined as follows:  
\[MSE=\frac{1}{m\cdot n}\sum_{i=0}^{i=m-1}\sum_{j=0}^{j=n-1}\left[I(i,j)-P(i,j) \right]^{2} \tag{12}\]  
Which for two \(m\cdot n\) images \(I\) (original image) and \(P\) (approximate image). The _PSNR_ is defined as follows:  
\[PSNR=10\cdot log_{10}\Bigg{(}\frac{\left(\textit{MP}\right)^{2}}{MSE}\Bigg{)}, \tag{13}\]  
where _MP_ is the maximum possible pixel value of the image. We recorded 17 videos (Figure 6a shows some of the experimental video scenes) and captured 57 scenarios in which the moving object has different area and speed as experimental samples (Figure 6b shows some of the moving objects). We calculated the area and speed of each moving object, using the framed and tracked software tool. Figure 5: Training videos scenes. (**a**) Training videos and (**b**) moving objects in training videos. The speed and area values were input to the linear regression model, and we generated the average PSNR value for each moving object at different bitrate coding values. By comparing the obtained values to the standard values, we can obtain an estimated coding bitrate for each moving object with the most similar PSNR. Then, we compared the estimated value to the real coding bitrate with the closest PSNR in the wireless transfer environment. Figure 7 shows an error distribution chart. There are 57 scenarios in our experiment. We used MPEG-4 as a codec that uses a standard baseline profile [38]. We set every 64 Kbps as a coding unit. The 57 scenarios were compared using the average PSNR of the 64 K wired network.