A Thermal Performance Detection Method for Building Envelope Based on 3D Model Generated by UAV Thermal Imagery

: The evaluation and renovation of existing building envelope has important practical signiﬁcance for energy conservation and emission reduction in the ﬁeld of architecture. With the development of digital cities, 3D models with rich temperature information can realize the comprehensive and accurate detection and evaluation of the existing building envelope. However, the 3D model reconstructed from thermal infrared images has only relative temperature distribution and no temperature value of each location, so it is impossible to quantify the extent of the defect from it. To solve this issue, this paper develops a method to establish a 3D point cloud model with temperature information at selected points. The proposed 3D model is generated based on the thermal infrared images acquired by an unmanned aerial vehicle (UAV) equipped with an infrared camera. In the generated 3D thermal infrared model, we can not only get the relative temperature distribution of the building’s full envelope structure, but also obtain the exact temperature value of any selected point. This method has been veriﬁed by ﬁeld measurements and the result shows that the deviation is within 5 ◦ C. In addition to temperature information, the generated 3D model also has spatial and depth information, which can reﬂect the appearance information and 3D structure of the monitoring target more realistically. Thus, by using this method, it is possible to achieve a comprehensive, accurate, and e ﬃ cient on-site assessment of the building envelope in the urban area.


Introduction
Buildings account for about one third of the global primary energy consumption and one third of the total energy-related greenhouse gas emissions [1], and the thermal performance of building envelopes plays an important role in the overall energy consumption of buildings [2]. At present, in view of the global warming, energy crisis, and environmental pollution, it is of great practical significance to establish a comprehensive system for monitoring and evaluating the thermal performance of existing building envelopes in urban areas in order to reduce the energy consumption of buildings effectively.
High-resolution infrared cameras can provide detailed information about temperature distribution, which can be used to capture thermal anomalies caused by local defects or damage of the buildings and the defect location [3][4][5][6]. In recent years, with the development of infrared equipment, a handheld thermal infrared (TIR) method has been widely used in the field of architecture [7][8][9]. However, due to the narrow parallax of 2D infrared images and the fact that hand-held infrared thermography can only be used in indoor or outdoor lower levels, the TIR method is only applicable to local detection of building envelopes at present. With the help of the existing detection methods, whether TIR method or thermocouple and hot box method, it is difficult to realize the comprehensive detection of the whole enclosure structure of a single building, especially for buildings with a large volume and high number of floors.
With the development of unmanned aerial vehicle (UAV) technology, 3D reconstruction based on UAV data computer vision has gradually become a hot field, and has been widely used in digital cities, robot vision, automatic navigation and obstacle avoidance, equipment detection, and monitoring [10][11][12][13][14]. In the field of architecture, a UAV system equipped with a TIR camera can conveniently check each facade of buildings, which effectively solves the problem of limited data collection in traditional TIR methods. In addition, the establishment of a 3D model with a rich temperature field based on the TIR image obtained by the UAV can reflect the appearance information and 3D structure of the detection target more realistically, which can detect and evaluate the existing building envelope more comprehensively and accurately.
The 3D model is the product of 3D reconstruction from 2D images. At present, the development of 3D reconstruction based on visual images is relatively mature. 3D reconstruction software, including Pix4Dmapper, 3DF Zephyr, and Context Capture, etc., are commonly used. However, there are fewer researches on 3D reconstruction of TIR images. The main difficulties are explained in the following section.
First of all, the TIR image has only one thermal infrared band, and it shows lower spectral resolution, poor contrast, blurred visual effects, and various forms of noise [14]. Therefore, the process of feature points extraction and matching becomes more difficult on TIR images than with visual images. The most commonly used 3D reconstruction is based on the Structure from Motion algorithm (SFM), which calculates 3D information from the time series of 2D images [15,16]. The main process of the SFM algorithm includes feature extraction and matching (SIFT feature detection, SURF feature detection, ORB feature detection, AKAZE feature detection), sparse point cloud reconstruction, dense point cloud reconstruction, and surface reconstruction. The 3D reconstruction algorithm based on TIR images is mainly derived from visible images. In 2013, Pech proposed a method to generate a multi-temporal thermal orthograph from UAV data, which can be used for spatial analysis of temperature distribution. The results showed that SIFT was also suitable for feature detection of low-resolution TIR images [17]. In 2014, Lagüela extracted and generated building geometric models automatically based on thermal infrared oblique photographic images. It was proven that SFM was able to simultaneously deal with visible light images and TIR images to generate 3D building models [18]. In 2015, Behshid Khodaei verified that the digital surface model (DSM) of 3D models generated from TIR images had comparable accuracy to that of visible images, but the DSM generated from TIR images was smoother and had lower-level textures [19]. Therefore, 3D reconstruction based on TIR images has similarities to the algorithm based on visible light images.
Secondly, the purpose of 3D reconstruction based on TIR images is to generate the model reflecting temperature range of buildings, so as to locate and quantify the defective areas. However, different from 2D images, the temperature information of TIR images is lost during the process of 3D modeling. Although Pix4Dmapper software has a process template specially for TIR image modeling, the established 3D model only has the relative temperature information and cannot obtain the temperature value of each pixel. In 2017, E. Maset studied the 3D building reconstruction using TIR images with 3DF Zephyr, and proved that 3DF Zephyr could automatically locate the TIR image sequence taken by a UAV and generate 3D models without any data on image position or camera calibration parameters. However, as the temperature information is represented by the color information before the TIR images were input with 3DF Zephyr, the reconstructed 3D pseudo-color model cannot provide the exact temperature value of each location [20]. In the past two years, Yishuo Huang conducted a number of experiments about 3D building reconstruction based on TIR images. In 2018, he used an infrared thermograph to determine the location of thermal defects.
Ground laser scanners (GLS) were used to collect point cloud data of buildings, after that these point clouds were used to reconstruct 3D models of buildings. A mapping model was constructed such that the segmented TIR images can be projected onto the 2D image of the specified 3D building. It was obvious that this method was a combination of a 2D image and a 3D model, but the temperature of the building enclosure can only be read in the 2D image. In another study in 2020, the established 3D model did not have specific temperature information either [21,22]. In 2018, Chen Yingying captured the image of the building by carrying two cameras (a TIR camera and an optical camera) in the UAV simultaneously, and then combined TIR images and optical images to reconstruct the 3D building model efficiently and accurately. Finally, the 3D point cloud model and 3D line segment model of the building were proposed, but it was still unable to read the temperature of each pixel on the model [23].
In order to solve the problem that the temperature of each pixel cannot be read in the 3D model reconstructed from TIR images, this paper aims to develop a method of evaluating the thermal performance of building envelope. The main contribution is to obtain the TIR images of the building envelope by the UAV equipped with an infrared camera, and then establish a 3D point cloud model providing temperature information of any selected points. In addition to temperature information, the generated 3D model also has spatial and depth information, which can reflect the appearance information and 3D structure of the monitoring target more realistically. Thus, by using this method, it is possible to achieve a comprehensive, accurate, and efficient on-site assessment of the building envelope in the urban area.
This paper is outlined as follows. In Section 2, the field experiment and the modeling process of a 3D TIR model with temperature information of each pixel is described. In Section 3, the measurement deviation of the UAV TIR method and the accuracy of the temperature of a selected point on the 3D TIR model are analyzed separately, from which the method proposed in this paper is validated. The results are discussed in Section 4, and some conclusions are introduced in Section 5.

Materials and Methods
This section introduces the method of establishing the 3D TIR model based on UAV TIR images, and it mainly includes the image acquisition based on UAV equipped with TIR camera, 3D reconstruction based on TIR images, and 3D model post-processing. The specific modeling process is shown in Figure 1.

TIR Images Acquired Based on UAV
The main purpose of this section is to obtain the TIR image of the building (take the D2 Conference Center of Guangzhou International Campus of South China University of Technology as

TIR Images Acquired Based on UAV
The main purpose of this section is to obtain the TIR image of the building (take the D2 Conference Center of Guangzhou International Campus of South China University of Technology as an example) through the UAV equipped with TIR camera, which can be used for 3D modeling.

Materials
In the experiment, the UAV, DJI MATRICE 210 RTK V2 with a built-in high-performance RTK module, is used. Under the premise of a smooth network, the UAV can be connected to a 4G network card to achieve high-precision positioning, and there is no need to assume a base station to receive signals on the ground (Figure 2a). The maximum load capacity of the aircraft is 1.23 kg when fully loaded with two batteries, and the maximum cruising range is about 30 min. The TIR camera uses Zenmuse XT (DJI, Shenzhen, China, powered by FLIR, Figure 2b), which is compatible with M210 RTK V2 (DJI, Shenzhen, China). The specific parameters of the camera are shown in Table 1.

TIR Images Acquired Based on UAV
The main purpose of this section is to obtain the TIR image of the building (take the D2 Conference Center of Guangzhou International Campus of South China University of Technology as an example) through the UAV equipped with TIR camera, which can be used for 3D modeling.

Materials
In the experiment, the UAV, DJI MATRICE 210 RTK V2 with a built-in high-performance RTK module, is used. Under the premise of a smooth network, the UAV can be connected to a 4G network card to achieve high-precision positioning, and there is no need to assume a base station to receive signals on the ground (Figure 2a). The maximum load capacity of the aircraft is 1.23 kg when fully loaded with two batteries, and the maximum cruising range is about 30 min. The TIR camera uses Zenmuse XT (DJI, Shenzhen, China, powered by FLIR, Figure 2b), which is compatible with M210 RTK V2 (DJI, Shenzhen, China). The specific parameters of the camera are shown in Table 1.   Based on the radiation temperature measurement method(the surface temperature is measured by measuring the intensity of the infrared signal arriving at the camera), the TIR camera allows the absolute temperature measurement in a complete image array [25]. The measurement principle is shown in Figure 3, and the measured radiation amount is calculated in Equation (1). According to Equation (1), it can be found that many factors affect the measurement accuracy of the real scene, mainly including the reflectivity of the object, emissivity, radiation background temperature, air temperature and humidity, and the distance between the camera and the measured object.

of 18
where S is the value of the 14-bit digital number in counts, ε is the emissivity of the scene, τ win is the transmission coefficient of the window, T win indicates the window temperature, r win is the reflection of the window, T re f l indicates the temperature reflected in the window, τ atm is the transmission coefficient of the atmosphere between the scene and the camera, T atm indicates the atmospheric temperature, T Bkg indicates the background temperature (reflected by the scene), T scene indicates the temperature of the scene, W(t) indicates the radiated flux (in units of counts) as function of the temperature of the radiating object. Based on the radiation temperature measurement method(the surface temperature is measured by measuring the intensity of the infrared signal arriving at the camera), the TIR camera allows the absolute temperature measurement in a complete image array [25]. The measurement principle is shown in Figure 3, and the measured radiation amount is calculated in Equation (1). According to Equation (1), it can be found that many factors affect the measurement accuracy of the real scene, mainly including the reflectivity of the object, emissivity, radiation background temperature, air temperature and humidity, and the distance between the camera and the measured object.
where S is the value of the 14-bit digital number in counts,  is the emissivity of the scene, The TIR cameras compensate for changes of the camera temperature and outputs stable, as well as the normalized 14-bit digital number (DN). It means that a scene with a given temperature will always correspond to a certain digital number in the image. There are two types of 14-bit temperature stable digital numbers: Flux-linear and T-linear. The Zenmuse XT cameras belong to T-linear [27].
The T-linear output data can be configured into one of two different resolution modes by the user: High resolution (0.04 K/digital count) or low resolution (0.4 K/digital count) mode. In this test, The TIR cameras compensate for changes of the camera temperature and outputs stable, as well as the normalized 14-bit digital number (DN). It means that a scene with a given temperature will always correspond to a certain digital number in the image. There are two types of 14-bit temperature stable digital numbers: Flux-linear and T-linear. The Zenmuse XT cameras belong to T-linear [27].
The T-linear output data can be configured into one of two different resolution modes by the user: High resolution (0.04 K/digital count) or low resolution (0.4 K/digital count) mode. In this test, high resolution (640 × 512) is used, and the temperature is shown in Equation (2). The measurement accuracy of the advanced temperature measuring plate is up to ±5 • C in an ideal environment.
where S is the value of the 14-bit digital number in counts, T scene indicates the temperature of the scene in centigrade.

TIR Images Acquisition
To assess the applicability of the proposed method, the D2 Conference Center of Guangzhou International Campus of South China University of Technology ( Figure 4a) is taken as an example in the field experiment carried out on 29 September 2020. The camera adopts 45 • elevation tilt photography with a flight speed of 2 m/s and a shooting interval of 3 s. The flight is planned for the images to have a forward and a side overlap of 90%, and an average Ground Sampling Distance (GSD) is 30 m. The flight lasts 40 min and a total of 743 images in TIFF format are acquired, as shown in Figure 5.
where S is the value of the 14-bit digital number in counts, scene T indicates the temperature of the scene in centigrade.

TIR Images Acquisition
To assess the applicability of the proposed method, the D2 Conference Center of Guangzhou International Campus of South China University of Technology ( Figure 4a) is taken as an example in the field experiment carried out on 29 September 2020. The camera adopts 45° elevation tilt photography with a flight speed of 2 m/s and a shooting interval of 3 s. The flight is planned for the images to have a forward and a side overlap of 90%, and an average Ground Sampling Distance (GSD) is 30 m. The flight lasts 40 min and a total of 743 images in TIFF format are acquired, as shown in Figure 5.

3D Reconstruction Based on TIR Images
This section processes the obtained TIR images preliminarily to obtain a 3D texture model in gray, a digital orthophoto map (DOM), and the map texture.
Pix4Dmapper is a professional photogrammetry software (Pix4D, Switzerland). Based on the SFM algorithm, it can obtain centimeter-level precision 2D maps and 3D models from the ground, a light UAV, or aerial image processing. Since some scholars have verified the feasibility of using Pix4Dmapper for thermal infrared 3D reconstruction [22], this paper uses it for 3D reconstruction directly. As shown in Figure 6, the 743 images collected above are imported into Pix4Dmapper. The thermal camera template is selected to quickly check the images, and a total of 680 valid images are identified. After processing 680 effective images, the DOM ( Figure 6c) and a 3D texture model in gray (Figure 7a) are obtained.
In Pix4Dmapper, we can use the color library that comes with the software to perform preliminary rendering of the gray model. However, the model obtained only has a relative temperature distribution with poor visual effects, and cannot provide the temperature value information of each pixel, as shown in Figure 7b.

3D Reconstruction Based on TIR Images
This section processes the obtained TIR images preliminarily to obtain a 3D texture model in gray, a digital orthophoto map (DOM), and the map texture.
Pix4Dmapper is a professional photogrammetry software (Pix4D, Switzerland). Based on the SFM algorithm, it can obtain centimeter-level precision 2D maps and 3D models from the ground, a light UAV, or aerial image processing. Since some scholars have verified the feasibility of using Pix4Dmapper for thermal infrared 3D reconstruction [22], this paper uses it for 3D reconstruction directly. As shown in Figure 6, the 743 images collected above are imported into Pix4Dmapper. The thermal camera template is selected to quickly check the images, and a total of 680 valid images are identified. After processing 680 effective images, the DOM ( Figure 6c) and a 3D texture model in gray (Figure 7a) are obtained. In Pix4Dmapper, we can use the color library that comes with the software to perform preliminary rendering of the gray model. However, the model obtained only has a relative temperature distribution with poor visual effects, and cannot provide the temperature value information of each pixel, as shown in Figure 7b.  In Pix4Dmapper, we can use the color library that comes with the software to perform preliminary rendering of the gray model. However, the model obtained only has a relative temperature distribution with poor visual effects, and cannot provide the temperature value information of each pixel, as shown in Figure 7b.

Establish the Functional Relationship between Temperature and Gray Value Based on the DOM
This section establishes the functional relationship between temperature and gray value based on the obtained DOM, which can provide a theoretical basis for the establishment of a 3D model with temperature attributes.
In the 3D gray model generated above, there is only the gray value of the color attribute, and the temperature-related DN value in the original data cannot be read. How to use the gray value to retrieve the DN value of each pixel in the gray model is the key issue to establish a 3D model with

Establish the Functional Relationship between Temperature and Gray Value Based on the DOM
This section establishes the functional relationship between temperature and gray value based on the obtained DOM, which can provide a theoretical basis for the establishment of a 3D model with temperature attributes.
In the 3D gray model generated above, there is only the gray value of the color attribute, and the temperature-related DN value in the original data cannot be read. How to use the gray value to retrieve the DN value of each pixel in the gray model is the key issue to establish a 3D model with temperature information at selected points. The DOM is data in .tiff format, and each pixel point in the DOM has a gray value and a DN value at the same time. The texture gives the grayscale interval (0-255) of the gray model. The corresponding relationship between the gray value and DN value of each pixel in the DOM is the same as the relationship between the gray value and DN value of each pixel in the 3D gray model. Therefore, the relationship between temperature and gray value in the 3D model can be established by fitting the functional relationship between DN value and gray value in DOM.
As shown in Figure 8, the DN value of each pixel in the DOM is extracted by ArcGIS (Esri, America) and its distribution statistics is analyzed. The result shows that it is mainly located between 7600 and 8000. temperature information at selected points. The DOM is data in .tiff format, and each pixel point in the DOM has a gray value and a DN value at the same time. The texture gives the grayscale interval (0-255) of the gray model. The corresponding relationship between the gray value and DN value of each pixel in the DOM is the same as the relationship between the gray value and DN value of each pixel in the 3D gray model. Therefore, the relationship between temperature and gray value in the 3D model can be established by fitting the functional relationship between DN value and gray value in DOM. As shown in Figure 8, the DN value of each pixel in the DOM is extracted by ArcGIS (Esri, America) and its distribution statistics is analyzed. The result shows that it is mainly located between 7600 and 8000. Read 188 gray values (256 values in total) and their corresponding DN values in the above DN value interval, and use the MATLAB fitting tool to perform functional relationship fitting on the relationship between DN value (S) and gray value (g). It shows that the accuracy of linear fitting is the highest, and Equation (3) is obtained: The accuracy of Equation (3) is further analyzed as shown in Figure 9 and the accuracy is relationship between DN value (S) and gray value (g). It shows that the accuracy of linear fitting is the highest, and Equation (3) is obtained: The accuracy of Equation (3) is further analyzed as shown in Figure 9 and the accuracy is higher than 99.5%.
Energies 2020, 13, x FOR PEER REVIEW 9 of 19 Figure 9. The accuracy of the fitting function.

Post-Processing of 3D Model Based on FME
A 3D color model with temperature attributes based on the obtained gray model is built in this section, which can not only display the relative temperature distribution of the building envelope in pseudo-color form, but also provide the absolute temperature information at any selected point.
The core purpose of the 3D reconstruction of buildings based on TIR is to show the temperature distribution on the surface of the envelope, so as to quickly locate the defect location and quantify the degree of heat leakage of the defect. The 3D reconstruction based on TIR has been initially realized above, but only the gray-scale model is obtained. As human eyes have an extremely low resolution of grayscale, it is difficult to distinguish the difference in temperature distribution through the gray model. Therefore, it is necessary to perform pseudo-colorization on the gray model for qualitative research. At the same time, it is necessary to retrieve the temperature information in the color model for quantitative evaluation.

3D Pseudo-Color Texture Model Based on FME
There is no absolute correspondence between temperature and color, and there is no uniform requirement that a fixed color must be used in infrared images to represent a certain temperature. Such correspondence is completely decided by the designer. The color of the 3D model depends on the texture file, so the pseudo-color processing of the gray model requires pseudo-color processing of the map file firstly.
The gray map shown in Figure 10a is stretched by ArcGIS to generate a new color map (as shown in Figure 10b). The new map can be selected randomly in the ArcGIS ribbon library according to user preference. This paper chooses the red-green-blue (R-G-B) rainbow color system commonly used to express temperature. The qualitative relationship between the R-G-B value of the red-green-blue rainbow color system and the temperature is described as follows. When the temperature is lower, the B value is higher, while the R value is smaller, and the color is blue. Furthermore, when the temperature increases, the G value gradually increases and the color is yellowish green. When the temperature continues to rise, the R value is larger and the B value is smaller, and the color is red.  (2) and (3), the relationship between temperature (Celsius temperature) and gray value is obtained as follows:

Post-Processing of 3D Model Based on FME
A 3D color model with temperature attributes based on the obtained gray model is built in this section, which can not only display the relative temperature distribution of the building envelope in pseudo-color form, but also provide the absolute temperature information at any selected point.
The core purpose of the 3D reconstruction of buildings based on TIR is to show the temperature distribution on the surface of the envelope, so as to quickly locate the defect location and quantify the degree of heat leakage of the defect. The 3D reconstruction based on TIR has been initially realized above, but only the gray-scale model is obtained. As human eyes have an extremely low resolution of grayscale, it is difficult to distinguish the difference in temperature distribution through the gray model. Therefore, it is necessary to perform pseudo-colorization on the gray model for qualitative research. At the same time, it is necessary to retrieve the temperature information in the color model for quantitative evaluation.

3D Pseudo-Color Texture Model Based on FME
There is no absolute correspondence between temperature and color, and there is no uniform requirement that a fixed color must be used in infrared images to represent a certain temperature. Such correspondence is completely decided by the designer. The color of the 3D model depends on the texture file, so the pseudo-color processing of the gray model requires pseudo-color processing of the map file firstly. The gray map shown in Figure 10a is stretched by ArcGIS to generate a new color map (as shown in Figure 10b). The new map can be selected randomly in the ArcGIS ribbon library according to user preference. This paper chooses the red-green-blue (R-G-B) rainbow color system commonly used to express temperature. The qualitative relationship between the R-G-B value of the red-green-blue rainbow color system and the temperature is described as follows. When the temperature is lower, the B value is higher, while the R value is smaller, and the color is blue. Furthermore, when the temperature increases, the G value gradually increases and the color is yellowish green. When the temperature continues to rise, the R value is larger and the B value is smaller, and the color is red. The original gray model is color mapped by FME (Feature Manipulate Engine, Safe Software, Canada) data conversion software, and a 3D texture model is obtained, as shown in Figure 10c. It shows the relative temperature distribution on the outer surface of the building. Compared with Figure 7a,b, the color expression of this model is richer and the temperature information is more intuitive. This model can qualitatively determine the parts with abnormal temperature of the enclosure structure, but the specific temperature values of each part cannot be read, so further processing is still needed.

3D Pseudo-Color Point Cloud Model Based on FME
Since the minimum unit of the 3D texture model is a surface composed of lines, there are no point elements, while the point cloud model is a 3D model composed of dense points where the attribute information of each pixel can be read. Therefore, in order to read the temperature information of the enclosure surface in the 3D model, it is necessary to establish a 3D dense point cloud model with temperature properties.
As there is no fixed correspondence between temperature and color level, we can directionally adjust a certain channel value of the R-G-B map in Figure 10b and write the temperature value into it. In this way, we can get the temperature value of the selected point by reading its color value of a certain channel. Red-green (R-G) is also a commonly used color system to describe temperature distribution. As shown in Figure 11 in FME, a Raster Expression Evaluator is used to input the Equation (4) into blue channel while keeping red and green unchanged, so that the R-G-B map (Figure 12a) is converted into an R-G map (Figure 12b). Then use FME to map the original gray model with R-G map and convert it to a dense point cloud, as shown in Figure 12c, and a 3D point cloud model is established. The original gray model is color mapped by FME (Feature Manipulate Engine, Safe Software, Canada) data conversion software, and a 3D texture model is obtained, as shown in Figure 10c. It shows the relative temperature distribution on the outer surface of the building. Compared with Figure 7a,b, the color expression of this model is richer and the temperature information is more intuitive. This model can qualitatively determine the parts with abnormal temperature of the enclosure structure, but the specific temperature values of each part cannot be read, so further processing is still needed.

3D Pseudo-Color Point Cloud Model Based on FME
Since the minimum unit of the 3D texture model is a surface composed of lines, there are no point elements, while the point cloud model is a 3D model composed of dense points where the attribute information of each pixel can be read. Therefore, in order to read the temperature information of the enclosure surface in the 3D model, it is necessary to establish a 3D dense point cloud model with temperature properties.
As there is no fixed correspondence between temperature and color level, we can directionally adjust a certain channel value of the R-G-B map in Figure 10b and write the temperature value into it. In this way, we can get the temperature value of the selected point by reading its color value of a certain channel. Red-green (R-G) is also a commonly used color system to describe temperature distribution. As shown in Figure 11 in FME, a Raster Expression Evaluator is used to input the Equation (4) into blue channel while keeping red and green unchanged, so that the R-G-B map (Figure 12a) is converted into an R-G map (Figure 12b). Then use FME to map the original gray model with R-G map and convert it to a dense point cloud, as shown in Figure 12c, and a 3D point cloud model is established.
As shown in Figure 13, the R, G, and B values of each pixel can be read out from the generated 3D TIR model, where the "color blue" value is the corresponding temperature value. In this way, we can obtain the exact temperature at any selected point. As its attribute value is still an 8-bit color level value, it can only be an integer from 0 to 255.  As shown in Figure 13, the R, G, and B values of each pixel can be read out from the generated 3D TIR model, where the "color blue" value is the corresponding temperature value. In this way, we can obtain the exact temperature at any selected point. As its attribute value is still an 8-bit color level value, it can only be an integer from 0 to 255.  As shown in Figure 13, the R, G, and B values of each pixel can be read out from the generated 3D TIR model, where the "color blue" value is the corresponding temperature value. In this way, we can obtain the exact temperature at any selected point. As its attribute value is still an 8-bit color level value, it can only be an integer from 0 to 255.

Validation
To validate the accuracy of the temperature measured by the TIR camera and the point-read temperature of the 3D TIR model, while the UAV is flying to acquire the data, contact measuring

Validation
To validate the accuracy of the temperature measured by the TIR camera and the point-read temperature of the 3D TIR model, while the UAV is flying to acquire the data, contact measuring points based on thermocouple method are selected on the external surface to record the wall surface temperature, as shown in Figure 14.

Validation
To validate the accuracy of the temperature measured by the TIR camera and the point-read temperature of the 3D TIR model, while the UAV is flying to acquire the data, contact measuring points based on thermocouple method are selected on the external surface to record the wall surface temperature, as shown in Figure 14. There are two measuring points on the exterior window and wall of each orientation, and an aluminum foil measuring point is added on the south facade (the spatial resolution of the thermal infrared image is 3.92 cm, and the size of the aluminum foil plate is 50 × 50 cm, while its location can be accurately found on the image). Due to the low emissivity of aluminum foil (strong alumina 0.2), its own radiation amount is far less than the reflection amount of radiation to the surrounding environment, so aluminum foil is often used to determine the environmental emission temperature in many experiments [16,28,29]. In this paper, the aluminum foil is not only used as a mark point, There are two measuring points on the exterior window and wall of each orientation, and an aluminum foil measuring point is added on the south facade (the spatial resolution of the thermal infrared image is 3.92 cm, and the size of the aluminum foil plate is 50 × 50 cm, while its location can be accurately found on the image). Due to the low emissivity of aluminum foil (strong alumina 0.2), its own radiation amount is far less than the reflection amount of radiation to the surrounding environment, so aluminum foil is often used to determine the environmental emission temperature in many experiments [16,28,29]. In this paper, the aluminum foil is not only used as a mark point, more significantly, the direction between the TIR temperature and the thermocouple temperature of aluminum foil is taken as the correction value of experimental temperature direction.
Hobo UX120-006m thermocouple recorder (Onset Computer Corporation, USA) and TMC6-HE probe (the measuring range is from 40 • C to 100 • C, and accuracy is ±0.21 • C, Onset Computer Corporation, USA) are used for external surface measuring, and the data recording interval is set as 10 s. To ensure that the recorded temperature data is stable after the wall reaches thermal equilibrium, the counting of the surface measurement points starts at 10 am. The UAV flies at about 12:20. By analyzing the time of the 743 thermal infrared images obtained, it is found that the centralized shooting time of the west, south, east, and north facades are 12:28-12:30, 12:34-12:36, 12:41-12:43, and 12:55-12:57, respectively. The recorded data is drawn as shown in Figure 15, in which the average Hobo measured temperature corresponding to each orientation at the time of UAV shooting is read out. thermal equilibrium, the counting of the surface measurement points starts at 10 am. The UAV flies at about 12:20. By analyzing the time of the 743 thermal infrared images obtained, it is found that the centralized shooting time of the west, south, east, and north facades are 12:28-12:30, 12:34-12:36, 12:41-12:43, and 12:55-12:57, respectively. The recorded data is drawn as shown in Figure 15, in which the average Hobo measured temperature corresponding to each orientation at the time of UAV shooting is read out. The verification data consists of two parts. Firstly, to verify the temperature obtained from the UAV equipped with a TIR camera at a distance of 30 m from the measuring point (TIR). Secondly, to verify the pixel temperature value of each measuring point obtained in the 3D TIR model (3D model).
As for the acquisition of TIR temperature, three TIR images are selected in each direction, and the TIR temperature of the corresponding measuring points are read respectively, as shown in Figure 16. The verification data consists of two parts. Firstly, to verify the temperature obtained from the UAV equipped with a TIR camera at a distance of 30 m from the measuring point (TIR). Secondly, to verify the pixel temperature value of each measuring point obtained in the 3D TIR model (3D model).
As for the acquisition of TIR temperature, three TIR images are selected in each direction, and the TIR temperature of the corresponding measuring points are read respectively, as shown in Figure 16.
As for the acquisition of 3D TIR model temperature, each measuring point is read in the generated 3D dense point cloud model, as shown in Figure 13. Taking the measured value of Hobo as the real temperature value of the surface, the TIR value and 3D model value are compared with the measured value of Hobo, and Figure 17 is drawn.
It can be seen from Figure 17 that the experimental data have the following rules: 1.
TIR temperature values of all orientations are higher than Hobo temperature, and the deviation is within 5 • C, which conforms to the allowable deviation range of thermal infrared equipment.

2.
The deviation between the 3D Model value and TIR temperature value is within 1 • C. Since the color scale channel value can only be an integer from 0 to 255, the 3D Model value is the value after the TIR value is rounded. The deviation between them is basically within 0.5 • C, and only 3 of the 16 points are more than 0.5 • C, but also less than 1 • C.

3.
The TIR temperature on the west facade is about 4-5 • C higher than the Hobo temperature, which is the largest deviation among the four orientations. The TIR temperature on the south facade is about 2-3 • C higher than the Hobo temperature, and the deviation is the second. The TIR temperatures on the east and north facade are about 0-1 • C higher than the Hobo temperature, and the deviation is the smallest. The largest deviation occurs in the west elevation because the time from camera start-up is the shortest. The longer the stable time of the thermal infrared camera in the environment to be tested (usually 10-20 min), the smaller the deviation is. After the thermal infrared camera is preheated, the first detection facade is the west, so the temperature measurement error is the largest. The shooting order of other directions is south elevation, east elevation, and north elevation, and the error is gradually decreasing.

4.
The deviation between the 3D Model value and Hobo temperature basically follows the change rule of the deviation between the TIR temperature and Hobo temperature value. As can be seen from the figure, the deviation of the 3D Model value is even smaller than the deviation of TIR temperature at some points. It means that the generated 3D Model has enough accuracy to provide the temperature of each point for the existing building envelope.
Energies 2020, 13, x FOR PEER REVIEW 14 of 19 Figure 16. TIR temperature of the wall surface.
As for the acquisition of 3D TIR model temperature, each measuring point is read in the generated 3D dense point cloud model, as shown in Figure 13. Taking the measured value of Hobo as the real temperature value of the surface, the TIR value and 3D model value are compared with the measured value of Hobo, and Figure 17 is drawn. It can be seen from Figure 17 that the experimental data have the following rules: 1. TIR temperature values of all orientations are higher than Hobo temperature, and the deviation is within 5 °C , which conforms to the allowable deviation range of thermal infrared equipment. 2. The deviation between the 3D Model value and TIR temperature value is within 1 °C . Since the color scale channel value can only be an integer from 0 to 255, the 3D Model value is the value after the TIR value is rounded. The deviation between them is basically within 0.5 °C , and only 3 of the 16 points are more than 0.5 °C , but also less than 1 °C . 3. The TIR temperature on the west facade is about 4-5 °C higher than the Hobo temperature, which is the largest deviation among the four orientations. The TIR temperature on the south facade is about 2-3 °C higher than the Hobo temperature, and the deviation is the second. The TIR temperatures on the east and north facade are about 0-1 °C higher than the Hobo temperature, and the deviation is the smallest. The largest deviation occurs in the west elevation because the time from camera start-up is the shortest. The longer the stable time of the thermal infrared camera in the environment to be tested (usually 10-20 min), the smaller the deviation is. After the thermal infrared camera is preheated, the first detection facade is the west, so the temperature measurement error is the largest. The shooting order of other directions is south elevation, east elevation, and north elevation, and the error is gradually decreasing. 4. The deviation between the 3D Model value and Hobo temperature basically follows the change rule of the deviation between the TIR temperature and Hobo temperature value. As can be seen from the figure, the deviation of the 3D Model value is even smaller than the deviation of TIR temperature at some points. It means that the generated 3D Model has enough accuracy to provide the temperature of each point for the existing building envelope.

Correction
According to the above rules, the accuracy of the 3D model proposed in this paper can be verified. The overall deviation within 5 • C is allowable for thermal infrared method, but it is necessary to further correct this deviation for the quantitative study of the degree of heat leakage of the envelope structure and the grading study of defects.
Since the temperature value of the 3D TIR model is converted from a value corresponding to the TIR temperature, so the deviation of the 3D model mainly depends on the deviation of TIR temperature. Therefore, to correct the temperature value in the 3D TIR model, only the TIR temperature value needs to be corrected. Further analysis of the temperature deviation of each direction is put forward. The deviation of the TIR temperature value of each direction is named ∆t , and the average error of all directions is ∆t, as shown in the Figure 18 below. Figure 18 shows that the average deviation of all directions (∆t) is 1.8 • C, and the deviation of aluminum foil is 1.5 • C. It can be seen that the average temperature deviation of all directions is close to the deviation of aluminum foil. In addition, considering the relative stability of aluminum foil with low emissivity, this paper suggests that the temperature deviation of aluminum foil can be used to correct the temperature of the 3D model in the direction with larger deviation in subsequent studies.
Since the temperature value of the 3D TIR model is converted from a value corresponding to the TIR temperature, so the deviation of the 3D model mainly depends on the deviation of TIR temperature. Therefore, to correct the temperature value in the 3D TIR model, only the TIR temperature value needs to be corrected. Further analysis of the temperature deviation of each direction is put forward. The deviation of the TIR temperature value of each direction is named Δt′, and the average error of all directions is Δt, as shown in the Figure 18 below.  Figure 18 shows that the average deviation of all directions (Δt) is 1.8 °C , and the deviation of aluminum foil is 1.5 °C . It can be seen that the average temperature deviation of all directions is close to the deviation of aluminum foil. In addition, considering the relative stability of aluminum foil with low emissivity, this paper suggests that the temperature deviation of aluminum foil can be used to correct the temperature of the 3D model in the direction with larger deviation in subsequent studies.

Results and Discussion
In the generated 3D TIR model (Figure 19), we cannot only get the relative temperature distribution of the building's full envelope structure, but also obtain the exact temperature value of any selected point. Thus, by using this method, it is possible to achieve a comprehensive, accurate, and efficient on-site assessment of the building envelope.
The result shows that the external walls and windows have a uniform temperature distribution, and the temperature of exterior wall is about 2-3 °C higher than that of window. The roof has the highest temperature. This is because the indoor air conditioning is running at the time of the test and the indoor temperature is much lower than that of outdoor. As the heat transfer coefficient of external windows is higher than that of exterior walls, plus the effect of solar radiation, the temperature of the exterior wall is higher than that of the window. The temperature of the roof is much high than that of the wall because the roof receives more solar radiation.

Results and Discussion
In the generated 3D TIR model (Figure 19), we cannot only get the relative temperature distribution of the building's full envelope structure, but also obtain the exact temperature value of any selected point. Thus, by using this method, it is possible to achieve a comprehensive, accurate, and efficient on-site assessment of the building envelope. Figure 19. Images of (a) west in the 3D TIR model, (b) south in the 3D TIR model. The result shows that the external walls and windows have a uniform temperature distribution, and the temperature of exterior wall is about 2-3 • C higher than that of window. The roof has the highest temperature. This is because the indoor air conditioning is running at the time of the test and the indoor temperature is much lower than that of outdoor. As the heat transfer coefficient of external windows is higher than that of exterior walls, plus the effect of solar radiation, the temperature of the exterior wall is higher than that of the window. The temperature of the roof is much high than that of the wall because the roof receives more solar radiation.
The generated 3D TIR model really reflects the temperature distribution of the envelope. However, due to the influence of solar radiation heat, thermal defects cannot be accurately judged. In the further study, it should be detected at night to exclude the influence of solar radiation.
Limited by the influence of infrared cameras, the temperature measurement error of the thermal infrared method is large. The measurement accuracy of the advanced temperature measuring plate is up to ±5 • C in an ideal environment. According to the above analysis, only 3 of the 16 measuring points have an error greater than 4 • C, and 13 of the 16 measuring points have an error within 3 • C. It means 81.25% of the measuring points are within 3 • C. In order to improve the accuracy of this method, we should follow the following rules in the further study:

1.
After the infrared camera is started, it is stable in the actual measurement environment for 20 min before collecting data; 2.
arrange the aluminum foil on the surface of the wall and measure the average surface temperature with the thermocouple method. Use the deviation between the thermal infrared temperature and the thermocouple temperature of the aluminum foil to correct the absolute temperature value in the final 3D TIR model.

Conclusions
This study proposes a TIR external evaluation method for the thermal performance of the building's full envelope structure. We develop a method to establish a 3D point cloud model with temperature information at selected points. The proposed 3D model is generated based on the thermal infrared images acquired by the UAV equipped with an infrared camera, and the temperature value of each point is recovered based on the relationship between color value and temperature value. Thus, in the generated 3D TIR model, we can not only get the relative temperature distribution of the building's full envelope structure, but also obtain the exact temperature value of any selected point.
The temperature accuracy of the generated 3D TIR model is within 5 • C, and 81.25% of the measuring points are within 3 • C, which is allowable for the thermal infrared method. In the further research, this method should be verified and corrected by a large number of field measurements at night to exclude the influence of solar radiation. To improve the results of this new method, we will control camera stabilization time the distance between the UAV and buildings. Furthermore, we will arrange the aluminum foil on the surface of the wall and measure its average surface temperature with the thermocouple method to correct the temperature of the 3D TIR model.