Paper Title (use style: paper title) 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 23 Design of the Hotel Monitoring System for the Image and Video Collection Wang Pengfei School of Leisure Management Xi’an eurasia University Xi’an, China e-mail: wangpf135@126.com Abstract—With the more attention of the security of the hotels, an effective hotel monitoring system was required. Based on the Samsung S3C2440, the proposed system uses the Linux system to accomplish the intelligent video surveillance. Using the image acquisition process and the embedded BOA server, designed an intelligent video image acquisition system. The system capturing image by the USB camera and building an embedded Web server, which complete the image acquisition, image processing, and the image transmission function. It can see the acquire result on to the LAN at the PC via the webpage. It could complete the function of image acquisition, image processing, image transmission, the realization of ultimate in local area net PC through a Web view the result. Keywords-Video Sensor; Linux; USB Camera; V4L2; Web Server I. INTRODUCTION There are many products in the market for hotel monitoring, but these products are often expensive and cannot be widely applied to all kinds of hotels. Based on the above, this system using Linux operation system based on the ARM9 processor to construct the monitoring system, which can be widely used in the hotel lobby, stairs and building dead ends, so as to ensure the real-time monitoring of the hotel in all directions [1]. II. THE STRUCTURE OF THE SYSTEMYPE This system is based on the Linux embedded system, mainly composed of the software and the hardware [2]. It includes the image and video collection, the display module, the data processing and the transmission module. The network transmission environment is LAN. The structure of the system is shown in Figure 1. Data process module Video display module Local network D a ta tra n s m is s io n m o d u le Image acquisition module Figure 1. Overall structure diagram of the system The image acquisition module collects the image data through the USB camera [3]. The data processing module mainly deals with the user commands and the operation of the generated data. Data transmission module is currently popular browser /Web server mode, through the embedded Web server communicates the client PC browser between the HTTP data format. The image display module is the PC port under the LAN, which sends data requests to the Web server through the browser web pages [4]. III. THE MONITORING SYSTEM STRUCTURESTRUCTURE According to the functional requirements of this system, the following hardware devices are needed. The specific hardware structure is showed in Figure 2. ARM9 S3C2440 (Linux) PC (Win7) USB Camera DM9000 Net RS232 SDRAM/Flash Wireless Net Router Web video display WireTCP/IP TCP/IP Wireless Serial debug HTML5 CGI Serial debug Figure 2. The system hardware structure In Figure 2, ARM9 S3C2440 is the main chip of the system. The image data was collected by the USB camera; the collected images stored in SDRAM for transferred facilitate [5]. The video data stored in Flash. By the DM9000 card, the network module could communicate with the development board. At the same time, in order to realize the serial communication interface RS232 combined the monitoring system and PC. The wireless network connects the wireless LAN and the development board for the wireless communication. 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 24 IV. DESIGN AND IMPLEMENTATION OF 3 IMAGE ACQUISITION MODULE A. Design of software system Based on the Linux operation system, the image acquisition program, the Web server BOA and the CGI/HTML5 were combined together [6]. The software structure is shown in Figure 3. Image acquisition program Web server BOA Image display program CGI Web display program HTML5 Linux operation system Figure 3. The system software structure The operating system uses the management processors, the memory, the devices and the user interfaces. The Linux operation system could be reduced for the requirement function [7]. The application program could visit the device by the related API and then controls the hardware through the driver. B. Design and implementation of the image acquisition module V4L (Video4 Linux) is the driven structure of the video device in the Linux kernel. It provides a unified function interface for the upper-layer applications accessing to the underlying video devices. V4L2 could support the multiple hardware devices and the running framework of V4L2 in Linux is shown in Figure 4. Device/video X V4L2 device number (81, X) Character device driver core V4L2 driver core (V4L2-dev.c) V4L2 driver (struct video_device) Camera driver Camera System Core Application Hardware Figure 4. The structure of V4L2 From Figure 4, the frame structure mainly includes four parts. It is showed in Table 1. TABLE 1. THE FRAME STRUCTURE OF V4L2 Name Function Character device driver core V4L2 is the character device that has all the features of a character device to provide an interface to the user. V4L2 driver core Build a standard video device driver framework in the kernel and provide a uniform interface function for video operations. V4L2 driver device According to the platform characteristics, implements the V4L2 driver, including registration the video device. Camera device driver Power, working clock, video image cutting and the IO interface. Implement various device control methods for upper level calls and registration V4L2_subdev. C. Video image acquisition programs After the embedded processor gets the image information, the JPEG compress program is executed and the image acquisition is completed. Finally, the video coding is carried out by the MPEG-4 video coding standard. The process of video image acquisition is shown in Figure 5. Start Open the device document Acquire the driver device Memory mapping Single frame collection in video data End of collection Condense the video End Y N Figure 5. The image collection flow chart First, the system creates a file to save the collected image information. Next, open the USB camera's device. With opening the device file, gets the driver information of the device. After the image formatting is completed, the image buffer will be applied [8]. Then establish the mapping of the kernel space image buffer to the user space. Finally, using the camera to capture the image data, the collected data will be saved to the driver's buffer [9]. 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 25 D. Design and implementation of image transmission After the video image file collection is well done, the Web server should be established. Through the network protocol, the client can browse the Website and download the files. That is the mainstream browser/server mode [10]. With the characteristics of embedded Linux system and the requirement of the development board hardware resources (DM9000), the communication between the Web server and the client using the TCP/IP protocol. By the CGI program, realizes the video data transmission. The transferred diagram among the development board, server and the client is shown in Figure 6: Video Image Document Web Server Router TCP IP Client 1 Client 2 TCP/IP Figure 6. The net transmission based on the TCP/IP protocol DM9000 net chip sets the IP address and the physical address of the development board. When the development board works in the normal Linux system, connects the RJ45 interface to the router through the cable, the wired/wireless devices in the same local area net can achieve the network communication. V. TEST RESULT OF THE IMAGE TRANSMISSION A. Design of CGI andHTML5 netpage The system could browse and download the video files on the web page which collected by the development board [11]. So the server needs to respond to the request from the client web page and access the files in the server through the CGI common gateway interface program. The CGI program's model in the server is shown in the Figure 7. Client Web Browse BOA Server Common Netgate Interface CGI Program Collect Image File HTTP (HTML) W e b S e rv e r P la tfo rm Figure 7. The flow chart of the CGI The CGI program is running on the server and the client sends a CGI request through the HTML pages to the server. The server receives will be executed after the specified CGI application, then the CGI application sends the result to the client web browser. This result is formatted into HTML format and displayed by the browser. B. The test results In this paper, using our school hotel as an example to implement and test the function of the above system. The system ensures the overall stability and smooth operation of the system, and completes the image video acquisition and the client's web page display [12]. The monitoring result is showed in Figure 8. 2018 International Conference on Sensor Network and Computer Engineering (ICSNCE 2018) 26 Figure 8. The test result of the proposed monitoring system VI. CONCLUSIONS The all-around monitoring of the hotel has become a basic condition for safety. Video surveillance is not only small, stable and safety, but also does not appear the "dead angle" phenomenon than the artificial monitoring. Based on the characteristic, the proposed video acquisition and transmission system has a very good market prospect. ACKNOWLEDGMENT This work was partly supported by Shaanxi Province Social Science Fund Project (NO.2016R022) of China and the scientific research fund project of Shaanxi Provincial Department of Education (17JK1036). REFERENCES [1] D.Zhang, J.Han, and L.Jiang, et al. “Revealing Event Saliency in Unconstrained Video Collection”, IEEE Transactions on Image Processing, vol.26, Jan. 2017, pp.1746-1758, doi:10.1109/TIP.2017.2658957. [2] W H.Gross, Video circuits collection, Analog Circuit Design,2rd ed, vol.3. Elsevier Inc:2015, pp.703-704. [3] D.Hai, T.Hua, “A video processing system for automated traffic data collection of gap size for roundabouts”, Proc. IEEE Symp. Electrical and Computer Engineering, IEEE Press, Jun.2017, pp.1-4, doi:10.1109/CCECE.2017.7946597. [4] X.Zhang, X.Li, and L. K. “Remote video monitoring system based on ARM and Linux”, Microcomputer & Its AApplications, vol.24, Jul. 2012, pp.15-17, doi:10.1109/ICICIP.2012.6391516 [5] E.Aytac, H.Erem, and H.Remzi F, et al. “A novel data collection and monitoring system for health status measures in patients undergoing lateral internal sphincterotomy: The Knowledge Program (TKP)”, Asian Journal of Surgery, vol.38, May. 2015, pp.134-138, doi:10.1016/j.asjsur.2015.01.001. [6] A.Bhuiyan M Z, J.Wu, and G.Wang, et al. “Quality-Guaranteed Event-Sensitive Data Collection and Monitoring in Vibration Sensor Networks”, IEEE Transactions on Industrial Informatics, vol.13, Feb. 2017, pp.572-583, doi:10.1109/TII.2017.2665463. [7] Y.L.Hwang, Y.E. Shin. “Unrestrained Electrocardiograph Based on Textile Electrode and Smartphone Application for Assessment of Bicycle Exercise”, Journal of Biomedical Engineering Research, vol.35, May. 2014, pp.111-118, doi:10.9718/JBER.2014.35.5.111. [8] C.Habib, A. Makhoul, and Darazi R. “Self-Adaptive Data Collection and Fusion for Health Monitoring Based on Body Sensor Networks”, IEEE Transactions on Industrial Informatics, vol.12, Jun. 2016, pp.2342-2352, doi:10.1109/TII.2016.2575800. [9] H.Liang. “Application Function and Daily Management Decision of Hotel Data Center”, Talanta, vol.74, Apr. 2015, pp.977-85, doi:10.2991/icmii-15.2015.174. [10] A.Gunawan, H. C.Lau, and P.Vansteenwegen. “Orienteering Problem: A survey of recent variants, solution approaches and applications”, European Journal of Operational Research, vol.255, Feb. 2016, pp.315-332, doi:org/10.1016/j.ejor.2016.04.059. [11] G.Donatelli, R.Chiche, and Cereatti F, et al. “Endoscopic Drainage of Intra-Abdominal Collection after Bariatric Surgery”, Obesity Surgery, vol.27, Jun.2017, pp.1635-1637, doi:10.1007/s11695-017-2652-3. [12] F. E.Clark, S. L.Davies , and Madigan A W, et al. “Cognitive enrichment for bottlenose Dolphins (Tursiops truncatus): Evaluation of a novel underwater maze device”, Zoo Biology, vol.32, Jun. 2013, pp.608-619, doi:10.1002/zoo.21096. https://doi.org/10.1109/TIP.2017.2658957 https://doi.org/10.1109/CCECE.2017.7946597 https://doi.org/10.1109/ICICIP.2012.6391516 https://doi.org/10.1016/j.asjsur.2015.01.001 https://doi.org/10.1109/TII.2017.2665463 https://doi.org/10.1109/TII.2016.2575800 http://dx.doi.org/10.2991/icmii-15.2015.174 https://doi.org/10.1016/j.ejor.2016.04.059 https://doi.org/10.1007/s11695-017-2652-3 https://doi.org/10.1002/zoo.21096