A REAL-TIME PHOTOGRAMMETRY SYSTEM BASED ON EMBEDDED ARCHITECTURE

: In order to meet the demand of real-time spatial data processing and improve the online processing capability of photogrammetric system, a kind of real-time photogrammetry method is proposed in this paper. According to the proposed method, system based on embedded architecture is then designed: using FPGA, ARM+DSP and other embedded computing technology to build specialized hardware operating environment, transplanting and optimizing the existing photogrammetric algorithm to the embedded system, and finally real-time photogrammetric data processing is realized. At last, aerial photogrammetric experiment shows that the method can achieve high-speed and stable on-line processing of photogrammetric data. And the experiment also verifies the feasibility of the proposed real-time photogrammetric system based on embedded architecture. It is the first time to realize real-time aerial photogrammetric system, which can improve the online processing efficiency of photogrammetry to a higher level and broaden the application field of photogrammetry.


INTRODUCTION
In recent years, with the development of computer technology, a new generation of digital photogrammetry based on cluster computer system has emerged, and the efficiency of photogrammetry has been greatly improved (ZHANG Jian-qing, KE Tao, etc., 2008).However, such systems are bulky and with high power consumption, it's difficult to equip them online.As a new technology, real-time photogrammetry has a broad development prospects in dealing with emergencies.When disasters and other unexpected events arise, accessing to spatial data in real time is necessary, i.e. while the aircraft is flying, the photogrammetric data of the area that the aircraft covered can be captured and processed in real time and the results can be submitted once the aircraft landed.However, up to now there is still no effective means to achieve it.Currently, the difficulties of ground systems for online data processing mainly lie in the following aspects: (a) space of aircraft is small (b) the load is restricted (c) power supply is limited and unstable (d) no manual interaction is acceptable.To overcome these difficulties, a system with low power consumption, small size and high integration based on embedded computing technology is essential for online processing.Therefore, combining embedded computer system with photogrammetry is one of the developing directions of real-time photogrammetry.
Although real-time photogrammetry has been proposed for some time (Gruen, Armin., 1988), relevant research is still in the early stage.(F.Kurz, V.Ebner, D.Rosenbaun, U.Thoma, P.Reinartz., 2008) came out a solution for near-real-time photogrammetric processing, with the processing of about 2-6 hours every square kilometre, which still far from the requirement of real-time processing.Adopting the general computer as processing platform, (Wu S S C, Hutton J, Kletzli B, et al., 2004) studied a real-time photogrammetric mapping system, which dealing with an area including 12 models (15 images) just took 42 minutes, but it still can't meet the requirement of real-time processing.Besides, (FÖRSTNER, 2005) discusses the development of real-time photogrammetry from feature extraction, object recognition and spatial-temporal process of images, and also many examples were described, but such applications were mainly concentrated in close-range photogrammetry, which doesn't involve large data processing.In general, most of current research work focus on the real-time processing of close-range photogrammetry for small-size data, and have achieved remarkable results (Clarke T., 1998;Horst A. Beyer., 1995;S.F. El-Hakim., 1986;Hefele, J., and Brenner, C., 2002;Georg Wiora, Pavel Babrou, Reinhard Manner., 2004).But there are few researches on aerial photogrammetry.
With the development of embedded computing technology, real-time image processing based on this kind of technology has now become a hot spot of research.A large number of research (Hu Junhong, Zhang Tianxu, et al., 2009;LUO Ge-liang, LU Xin-ping, LI Ji-cheng., 2010) results emerged in recent years, these studies are either for a specific algorithm (WANG Yu-xin, etc., 2009;Dillinger, P., etc., 2006) of image processing, or for various applications such as video surveillance, medical image (Martin, V., Dunand, G., etc., 2010) processing, etc.Although these are not about photogrammetric algorithms dealing with large-format aerial image, the research of embedded computing technology provides a good way to explore real-time processing method in aerial photogrammetry.This article mainly conducts research about establishing a real-time photogrammetric environment, and realizes online photogrammetric processing based on embedded computing technology.

Embedded Computing Technology
Embedded computing technologies, such as FPGA, ARM and DSP, are now developing in a high speed and they have been widely applied to many fields in our society, such as real-time image processing, smart phone, and robot navigation, etc.The advantages of these embedded computing technologies are as follows.
(1) As a kind of programmable chip, FPGA (Field Programmable Gate Array) has rich internal resources, i.e. designers can connect the internal logic modules of FPGA to customize a new special-purpose chip according to their needs, as if making a circuit board in a chip.Compared to other specific processor, the programmable functions of FPGA provide more flexibility, which enable users to modify circuit connection according to their specific requirements.Besides, FPGA can implement parallel processing and pipelined processing of algorithm at hardware level, so it has powerful ability in data processing.
(2) As a general purpose processor, ARM (Advanced RISC Machine) is good at system management and data processing, and has rich external interface, which is suitable for tasks such as communicating, data transmission, etc.For example, ARM has been widely used on smartphones, tablets, and servers, and also other equipment, in which it has similar function with general computer CPU.
(3) What is more, DSP (Digital Signal Processor) has powerful ability of digital signal processing and good digital computing performance.It usually runs with little cache, little system overhead, and a stable operation cycle, so it's suitable for fast digital image processing.
Compared with general computer CPU, the above three kinds of chips share the following common features: light weight, low consumption, low cost, and few hardware resource requiring.These features make them more suitable for miniaturization and embedded equipment than other processors.In general, FPGA and DSP are usually used as coprocessor for special processing, while ARM is suitable for data management and peripherals interaction.

Combination of Embedded Computing Technology and Photogrammetry
Combining the advantages of the above three kinds of embedded technology, we design a real-time photogrammetric processing system in this paper according to the following basic ideas: (1) Using FPGA as core chip for data transmission and control module to connect various external sensors to capture image and POS data.Taking advantage of FPGA's reprogrammable function, the module can get good compatibility in connecting with different external devices.Besides, some algorithms can be programmed into FPGA at hardware level, which can accelerate data pre-processing and reduce the pressure of backend data processing if necessary.
(2) Using ARM+DSP as the core for data management and photogrammetry algorithm processing, the ARM core is used to control the data flow and run the main program.With powerful ability of digital signal processing, DSP can be used to accelerate algorithm together with ARM.

REAL-TIME PHOTOGRAMMETRY SYSTEM BASED ON EMBEDDED ARCHITECTURE
Considering the generality, flexibility and scalability of the realtime processing system, a data transmission module based on FPGA and a data processing module based on ARM+DSP are designed in this paper.The functions and interfaces of these modules are oriented toward photogrammetry, which is different from the general purpose embedded system.Raw data from external sensors will be transferred and pre-processed by data transmission module, and it can be copied to various data processing modules to realize parallel processing at the same time.

Design of Hardware Module
As is shown in Figure 1, the data transmission module is based on FPGA, adopting CameraLink as the interface to connect with aerial camera to receive image and making use of RS485 interface to connect with the POS system to receive the position and pose information.Raw data (image with POS data) transferred to FPGA kernel through the two interfaces can be integrated and pre-processed if necessary.Memory module is designed for data caching while processing.In order to solve the problem of IO bottleneck when application in FPGA read and write simultaneously, two memory modules are designed for "Ping-Pong" read and write operation respectively.After being processed by FPGA, the data will be sent to PCIe interfaces, and then the data processing modules can get and process the data in parallel.The data processing module based on ARM+DSP is shown in Figure 2. The ARM core and DSP core are integrated into one chip, where DSP core acts as a coprocessor to accelerate algorithms.Using high-speed PCIe interface to connect with external devices, PCIe can guarantee the correctness and stability of high data rate transmission.The processed data and results can be sent to storage device through SATA interface and displayed on screen through HDMI interface.For the convenience of connecting with other external systems, the module is also equipped with a Gigabit Ethernet port.Besides, interfaces of flash storage devices such as SD card and NAND are also provided.Since the boot loader file of the system and the relevant executable files can be copied to these devices directly, it will be more convenient to change applications for the board online than connect the whole circuit board to PC on ground.The data transmission module is mainly for connecting with relevant photogrammetric devices, while the data processing module is used to carry out the algorithms to process the data and get the results for display and store.Considering that many functions are usually required for parallel processing, it can be realized by designing more PCIe interfaces in data transmission module and customizing different algorithms for data processing modules accordingly.Modules can be connected to each other through the PCIe interfaces (Figure 3).Moreover, the number of data processing module can be changed according to the actual demand so as to obtain the best process efficiency.

Design of Software Module
We use hardware description language (Verilog or VHDL) to develop software for data transmission module with FPGA as its core chip.Through simple synthesis and layout, the designed program can be burned to FPGA for testing, which is also the mainstream technology for verification of modern IC design.Furthermore, ARM+DSP based software is generally designed as similarly as that of general PC.For this reason, an algorithm is usually realized by C/C++ language on general PC at first, and then transplanted to the embedded operating system environment to verify its effectiveness.In this paper, Embedded Linux operating system is used in the data processing module, which is customizable and scalable.Users can choose to reserve the necessary functions and remove the needless functions according to their own needs, thus produce a minimal system kernel (e.g., in this study the kernel file is only 2.3MB).Such a customized kernel will occupy only small amount of hardware resources after being loaded to the board, so it can leave enough resources for other applications.
Our data processing module is based on ARM+DSP architecture, and it involves the collaboration between processors, i.e. the ARM acts as the master for running the embedded Linux operating system and the main applications, and the DSP acts as the slave to accelerate the algorithm.In order to realize a fast data processing module, the ARM and the DSP processors share their data by a mechanism of memory share, which avoids the complexity and time-consuming process of copying data.The application communicates with peripherals through the external interfaces of ARM and it uses DSP to accelerate algorithms at the same time.What is more, our program can invoke the Linux function library to realize communication with the peripherals, such as data reading, data storing and data displaying, etc. Correspondingly, it can also call the real-time function library of DSP to increase the processing speed.In general, data reception and data processing is a serial course, and the time it takes is the sum of the two.In order to speed up the processing, a mechanism of Three-level buffer method is adopted in this paper.In this way, a parallel process of data reception and data processing can be realized, so the total consumed time can be reduced to the maximum of these processes.

Method of Photogrammetry in Prototype System
This study designed a prototype system according to the above method, in which we choose some algorithms that are more urgent for online real-time processing to transplant them to the boards.The designed functions are used for image mosaicking, geometry quality evaluation, and cloud and shadow detection.Image mosaic is designed based on the traditional digital differential rectification and improved according to the features of embedded computing technology.Equation (1) shows the principle of the image mosaic method, where H is the average elevation of the flight area, detailed description of the method can be found in (ZHENG Shunyi, MA Dian, GUI Li, et al., 2014).
Geometry quality evaluation aims mainly at checking whether the forward overlap and the side overlap is good enough, whether any image is missing, whether the strip deformation is too large, and whether the image rotation angle exceed the standard, etc.More specific of the geometry quality evaluation algorithm can refer to the literature (Qiao Ruiting, 2008).
Cloud and shadow detection is for detecting whether there are lots of clouds and shadows in the image.In this paper, feature combination is chosen to effectively identify cloud (Abraham, L., 2013;Li, B., 2012) and shadow (GAO Xianjun, 2012).The algorithm involves the process of Otsu threshold calculation, HIS color space transformation and condition judgment, etc.
As is shown in Figure 4, in our prototype system, aerial camera and POS are connected with the system through CameraLink and RS485 interfaces.The image and POS data are sent to FPGA, and copied to the three data processing modules for real-time processing with relevant algorithms.The results can be obtained as the plane lands.

Implementation of Prototype System
To verify the validity of the proposed method, a prototype system including data transmission and data processing module is developed, and the corresponding circuit board is also made.
The circuit diagrams and physical boards of the two modules are represented by Figure 5 and Figure 6 respectively.The FPGA board uses CycloneII (Cyclone II Device Handbook) series of Altera as core processor, while C6A8168 chip (TI Texas Instruments Inc., DM816x, C6A816x, and AM389x Overview) of TI Company is used to make data processing boards.For the convenience of hardware debugging and functional verification, this paper makes the two circuit boards separately.As shown in Figure 7, three data processing board and one data transmission board are integrated inside a case.It can be found that power consumption of FPGA board and ARM+DSP board are 8.12W and 10.8W respectively when the two boards energized, and both are far below general purpose computer.Obviously such technology is well suited for applications of strict power consumption restrictions.As for the computing performance, an ARM+DSP module has two compute nodes, and a FPGA module has at least one compute nodes (more computer nodes can be achieved by using the hardware programmable characteristic of FPGA if necessary), i.e. the whole hardware system can provide more than seven computer nodes and they can work parallel in our prototype system.
Figure 7. Integration of prototype system

Aerial Photogrammetry Experiment Results
To verify the validity of the system in the actual flight environment, this article carried out an airborne flight experiment.The resolution of our aerial camera is 4032×4032.
In this experiment, the system can process data synchronously and output the result during aerial photography.So the panorama has mosaicked (Figure 8) when the flight completed.
The result of geometry quality evaluation is shown in Figure 9.As shown in Figure 9(a), though one image is leaked in the 7th air strip, it was completed after the 8th air strip by the prompt instruction of the flight, and the result is shown in Figure 9(b).
In addition, the flight is in good weather and at an altitude of 800 meters, so there is no cloud and heavy shadows in the image.
On average, the aerial camera takes an image every 5 seconds in a strip during the flight.The consuming time of the three algorithmic modules is shown in Figure 10.As can be seen, the panoramic image mosaic and geometry quality evaluation takes no more than 0.3s, the computations of the two algorithms is only related to the size of the data to be processed, and the elapsed time is relatively uniform if each image is the same size.Cloud and shadow detection takes no more than 0.5s, and elapsed time of the algorithm is related to specific content of image, so the consuming time is volatile within a range, which meets the characteristics of the algorithm.Overall, the elapsed time of above three algorithms is no more than 0.5s, which can meet the requirement of real-time processing.
In addition, this system is designed mainly aimed at real-time processing for emergency needs, so it does not take into account of unifier ray and color of the image, as can be seen from Figure 8, the color is not uniform and seam-line exist after the mosaic, which will be improved in the further research.This contribution has been peer-reviewed.doi:10.5194/isprsarchives-XL-5-633-2014

CONCLUSIONS
In this paper, a kind of real-time photogrammetry method based on embedded architecture is proposed for the first time, and the corresponding hardware/software system is designed and completed, which could realize on-line and real-time processing of photogrammetric data.The designed system is of small volume, low power consumption, good extensibility and flexibility, which has definitive value when improving the miniaturization and real-time of photogrammetric system.In practical application, some modules of the system can be cut, integrated or even added more process unit according to the actual need.Furthermore, different modules can also be integrated on one board to increase the integration and makes it better to be used in UAV and space borne which have strict limits on weight, volume and consumption.
As a new attempt, this paper applied the embedded technology to the field of real-time photogrammetry and explored a way for real-time photogrammetry developing towards embedded direction.Based on the current design, more work is still needed for further improvement on system integration and performance.Meanwhile, more photogrammetry algorithm will be transplanted and optimized to the system to meet other diverse application demands.

Figure 1 .
Figure 1.Diagram of data transmission module

Figure 2 .
Figure 2. Diagram of data processing module

Figure 3 .
Figure 3. Diagram of module connection Figure 4. Prototype system architecture of real-time photogrammetry 4. EXPERIMENTS AND DISCUSSION

Figure 5 .
Figure 5. Data processing board based on ARM+DSP