# Modelling Electricity Consumption in Cambodia Based on Remote Sensing Night-Light Images
## 3 Methods
### Data Pre-Processing  
The VIIRS/DNB is a primary data product in a split format that requires extensive pre-processing, such as cropping, reprojection, and denoising, to obtain images of the desired areas. A total of 92 monthly nighttime images from April 2012 to December 2019 were masked using a vector of the Cambodian border to obtain VIIRS/DNB nighttime images of the Cambodian region. To ensure minimal areal distortion, the data were projected as Albers' cone of equivalence; the area of the region is proportional to the area of the same region on Earth, while the area of the Cambodian region is less distorted. Finally, the monthly night-light images were resampled to a 500 m spatial resolution. Since the acquired VIIRS/DNB night-light images had not yet been stripped of auroras, fires, other transient light sources, and background noise, a large number of negative and very high values existed in the night-light images. Theoretically, it is not possible for image elements to have negative DN values. Nevertheless, negative DN values were caused by background noise and outliers during data processing. The maximum light value in an image should not be greater than the highest light value in the most developed area of the image. DN values greater than the highest light value in the developed area are called extreme values, which mainly originate from fires and data outliers. To reduce the impact of noise on image elements, the images needed to be denoised. The three most widely used methods for denoising VIIRS/DNB luminous images are: (1) stable nighttimelights extracted from VIIRS/DNB data using non-zero DMSP/OLS data as a mask [35]; (2) selection of area-specific thresholds as maximum and minimum light thresholds as masks for rejecting background noise [36]; (3) denoising night-light images by enforcing the neighbourhood algorithm [32; 37]. All these methods can significantly enhance the quality of images by removing some of the noise and light from auroras, fires, and certain ephemeral light sources. Although the first denoising method can remove noise, it also removes much usable night-light information. This method is more suitable for studies of short time series and regions with little change in the size of the energised area. However, from 2012 to 2019, electricity consumption in Cambodia increased at a faster rate than before and a large number of unelectrified areas became connected to electricity. For this reason, we can draw the conclusion that this method is not suitable for denoising long time series of the Cambodian region. Furthermore, since Cambodia's night-light images are seriously affected by cloud, the neighbourhood algorithm is also unsuitable. Accordingly, the threshold method was selected for image denoising in the present study. Phnom Penh is the most developed region in Cambodia, so was used to establish a theoretical maximum value of the image element DN for the 2012-2019 night-light images. Image element DN values in the annual average images that were greater than the theoretical maximum were replaced by the maximum value, while negative values were replaced with zero-values. This completed the first denoising process for the 2012-2019 night-light images. The threshold denoising procedure removes both negative and extreme values from images; however, it is difficult to remove other sources of noise. The denoising method employed in this work is based on [PERSON] et al. 's continuity correction method for night-light images in different years [38]. (1) More specifically, when \(DN=0\) in an image of the subsequent year, then the \(DN\) at the same position in the previous year's image should also equal 0. (2) On the other hand, when the \(DN\) value of an image element in a later year's  
Figure 1: Flowchart of the research process used in the present study. image is not equal to 0, the \(DN\) in the previous year's image should be no greater than that. The formula for this denoising method is as follows:  
\[DN_{(n,i)}=\left\{