 Proceedings of Engineering and Technology Innovation , vol. 4, 2016, pp. 37 - 39 37 Nostril in RGB Imaginary by Using NI Vision LabVIEW Hendrick 1,2,* , Aripriharta 1,3 , Siang-Kai Chen 1 , Meng-Hsiung Tung 1 , Ta-Chi Chiang 1 , Gwo-Jia Jong 1 1 Department of Electrical Engineering, National Kaohsiung University of Applied Sciences, Kaohsiung, Taiwan. 2 State Polytechnic of Padang (PNP), Padang 21562, Indonesia. 3 State University of Malang (UM), Malang 65145, Indonesia. Received 01 April 2016; received in revised form 27 April 2016; accept ed 10 May 2016 Abstract Monitoring of breath function is needed for med ical science to evaluate condition of patient for some diseases. The patient will be observed continuously on face (nostril). Face recognition is the most important stage to localize the measure ment. Because of that need, therma l image is used to record changing temperature on patient face. Therma l image has two type image, gray and RGB image. In this paper, we used RGB image as the raw data and trying to find face, eye and, nostril as breathing indicator. We divided the nostril recognition in three ma in steps: eyes detection, calculate the center of mass between two eyes, measured the center of mass distance to nose, get nostril location. We applied image processing algorithm such as gray image, b inary image and template matching . All those algorith m are progra mmed in NI Vision Lab VIEW. The distance between subject and came ra is fixed in 1 meter. The e xpe rimental result showed that nostril a lways detected even though the subjects have some move ments du r- ing measurement. Ke ywor ds : breath function, therma l image, face detection, nostril 1. Introduction Nowadays , Vital signs monitoring of patient become important in modern medical observation. Vital sign of human such as ECG, PPG, EM G etc, are usually used wired device that placed on pa- tient body. In other case of disease, patient should be in rela x position or feeling scared with all device that placed on their body. Non-contact device is the solution to handle that problem, and use thermal image device to capture some of that. Facial detection is the most important part in this field, because it contains eye, nose (nostril) and mouth of the patient [1]. First stage of facial recognition usually is focused of eye detection. Eyes detection in thermal image is a little differ- ent from common eyes image captured from usb camera [2]. After eyes detected, the stage con- tinues to nose detection by using center location between two eyes. Detecting nose in facial d e- tection some time uses prediction to localize nose location [3]. In this research, our focus is on nostril of nose as our goal to monitoring some of human vital signs (breathing function) [4]. We devided into three stages until nostril detected: face detection, eyes detection, nose detection and nostril detec- tion. FLIR thermal image is our device to capture human face and save into AVI files. We also use above algorithm so that nostrils can be detected automatically. All stage is programmed in NI Vision LabVIEW. 2. Method 2.1. FLIR Thermal Camera and Subject Setup In this research, we used FLIR therma l came ra P384-20 that has resolution 384 x 288 pixe ls with 50 fra mes per second (fps) in co lor mode. Fig. 1(a) shows our came ra FLIR therma l Image Camera. The distance between subjects and FLIR Thermal Ca mera is 1 meter with manual calibra- tion on camera resolution. Fig. 1(b) shows our experimental setup between camera and subject. The video of subject will be captured using FLIR thermal ca mera in 5 minutes with minor mov e- ment of their head and the files are converted to AVI files. During video recording, the subjects will breathe normally. * Corresponding aut hor. Email: hendrickpnp77@gmail.com Proceedings of Engineering and Technology Innovation , vol. 4, 2016, pp. 37 - 39 38 Copyright © TAETI (a) (b) Fig. 1 (a) FLIR Therma l Ca mera , (b) Expe ri- mental Setup 2.2. Nostril Track ing Algorithm In order to detect nostril location, we p ro- posed 4 ma in steps such as: face detection, eyes detection, nose detection and nostril detection. All a lgorith ms are progra mmed with NI Vision Lab Vie w 2015 by using Virtual Instrument (VI) in NI Vision. The nostril t racking algorithm is e xp lained below: (a) (b) Fig. 2 (a) Gray Image, (b) Eyes Template  Step 1 – eyes detection: Detecting eyes on this step through a few process to do, such as convert image to gray, set Region of Interest of eyes location and make eyes templete. The eyes template shows on Fig. 2(b). In this re- search, we focus on the highest temperature in the corner of the eyes to make the eyes d e- tection faster to find. The ne xt step is to cal- culate the Centre Of Mass (COF) between to eyes that will be used as the centre point to get the nose location.  Step 2 – nose detection: The COF then is used as centre point to find nose location by using ratio 1/3 fro m chin of face[]. By applying that, we can set the ROI of nose location.  Step 3 – nostril detection: Nostril is easly found on nose ROI because nostril is ind i- cated as the highest temperature in ROI loca- tion. 3. Results and Discussion Fig. 3 shows block d iagra m of nostril detec- tion in Therma l image wh ich consist of load AVI files, Eyes -nose detection and nostril de- tection. Fig. 3 Lab VIEW b lock Diagra m of Nostril De - tection Fig. 4 (a) gray image, (b) nostril not detected, (c) nostril, (d) nostril waveform cycle Fig. 4 shows our results in nostril detection and location in therma l video. Fig . 4(a) shows the center mass of eyes with blue rectangle and nostril location with green rectangle. Fig 4 (b), (c) and (d) show nostril location and visualize nostril activity with graph. Proceedings of Engineering and Technology Innovation , vol. 4, 2016, pp. 37 - 39 39 Copyright © TAETI 4. Conclusions The ma in objective of this research was to determine the location of the nostril on RGB therma l v ideo. The e xperimental result showed that nostril always detected even though the subjects have some move ments during meas- urement. Acknowledgement This work was supported by DIKTI funded by Ministry of Research and Technology and Higher Education, Indonesia under contract number: 138.7/E4.4/ 2015. References [1] Y. W. Wu, H. Liu, and H. B. Zha, “Mod- eling fac ial e xpression space for recogn i- tion,” IEEE/ RSJ International Conference on Intelligent Robots and Systems , pp. 1968-1973, 2005. [2] Mehrube and L. M. Pha m, “Real-time eye tracking using a smart ca mera ,” Proc. Ap- plied Imagery Pattern Recognition Work- shop, November, 2014. [3] C. B. Pere ira , X. Yu, V. Bla zek , and S. Leonhardt, “Robust remote monitoring of breathing function by using infrared ther- mography,” The 37th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EM BC ’15), pp. 4250-4253, 2015. [4] A. K. Abbas, K. Heimann, K. Jergus, T. Orlikowsky, and S. Leonhardt, “Neonatal non-contact respiratory monitoring based on real-time infra red thermography,” Bi- omedica l Engineering OnLine, vol. 10, no. 93, pp. 1-17, 2011.