Image Processing and Data Storage for Fire Alarm

: This paper explains the algorithm for fire alarm for the purpose of safety from any loss and property damage. Here, the designed algorithm is for the comparison of captured pictures. The purpose of comparison is to validate our results. In captured pictures, there may exist fire colour in pictures, which is the indication of fire in that specific area. Captured pictures are stored in folder and its path is stored in excel. We observed the indication of fired picture through fire alarm. When the fire is diminished, we used to reset button to stop the buzzer and to monitor the system again. The path of those pictures as well as the time and date of captured pictures will remain store in excel for later study of the failure of the system and also for the record purposes.


Introduction
Nowadays, conventional smoke detectors are widely used, however they take charge of a limited area.In large buildings, it may take time for the detection of smoke particles.Image-based smoke and fire detection is a latest technique, which can serve the requirement of fire detection in large buildings and outdoor environment.
Few researchers have done work on this latest technique.However, most of methods of fire detection are based on blurriness of image and geometry.Early studies about fire detection began with video based fire detection using colour indication.Yamagishi [1] described algorithm of fire detection based on the temporal fluctuation of data of fire and used colour information.Another method, that was utilized in this paper, was the colour histogram to create a colour lookup table of flame pixels and thereafter took advantage of variation of pixels to predict whether it was a fire pixel or not.Wang [2] defined the process to detect the fire flame, however this algorithm used pixel information that cannot indicate fire pixels in appropriate way when there exist objects of same colour distribution as flame.W. Zhao [3] elaborated the technique of face recognition technique that employs the available databases of two different datasets in face recognition literature.Eigen faces and Fisher faces are applied to extract the relevant information from the images that are relevant for fire recognition in image processing.T.X.Truong [4] used the multi stage pattern recognition techniques to detect fire flame in video sequences.In the detailed description of visual analysis for the detection of fire flames in surveillance video, fire region is determined by colour ratio and motion of fire flame [5].In [6], detailed explanation of the image processing technique to determine availability of free space for parking in a wireless device grid area, is provided.Cui [7] was not considered real time detection and combined tree-structured transform and occurrence of gray level matrices to predict the texture feature of flame and smoke.Yuan [8] provided the model of block motion and orientation to analyze real time smoke detection, and model can eliminate the disturbance created by artificial lights and moving objects.Research on smoke and flames were both show irregular motion of particles, create complex and turbulent phenomena that might be characterized by a dimensionless edge or surface measure [9].Y.Habiboglu [10] employed the colour dynamic video sequences, which obtained from stationary camera to detect smoke and flame in sensitive areas.Fire safety journal S. G. Kong [11] used the logistic regression and temporal smoothing for fire flame detection in inspection video.
The tool that is being used in this research work, is image processing.Using this, an algorithm is designed to detect the fire flame.When flame is detected through captured image, it is stored in Excel sheet, which will help the workers for further manipulation.A reset button is used, which help to reactivate the system after the fire flame detection but if problem is not terminated properly due to which the sparks occurs then it stops whenever it detects the spark and the image in which fire or spark is detected is stored in the computer for the use of the operator or master of the machine to detect the error with in no time and it remained the part of the history until operator delete it.In this the time whenever fire is detected the time is also noted and stored if any component detects repeatedly then operator has to inform its supervisor to replace that component [12][13][14][15][16][17].
In this algorithm, we are working on online Arduino to operate and reset the buzzer.According to our knowledge, this work is not done in all open literature.This algorithm may applicable in industries, to monitor fire sensitive devices and domestic purposes.Main advantage of our project is security of sensitive areas, where fire flame may occur and there is a danger for the lives of the worker as well [18].In it you not need to check each element or component, you have to check only that region which is detected by the camera.So, it is also time saving as well as cost saving.

Methodology
In MATLAB, one cannot write code for arduino and use camera until libraries of arduino and USB camera are not added.
First of all, add the arduino library and USB camera library to MATLAB to use arduino and camera.
• Connect the Buzzer and the reset button to arduino as shown in the Figure 1.• In this algorithm, when the program runs, camera captures the images of that specific area where we want to detect the fire, instantly and repeatedly [19].
• The colour detection method is used to detect the fire image, we use the RGB ratio to detect the flame of the fire (if you have different flame just change the value of RGB and detect the fire) the ratio we use is as follows: Flame = Red(100%) + Green(95.7%)-Blue(100%) • When the fire in the image detected, it creates a folder "fired_data_pics" in PC at specified location as shown in the Figure 2.   • Sheets of the different days are also generated in it as similar as the subfolders are created earlier as shown in the Figure 6.• As the fire detected, the buzzer will on as an indicator of fire alarm.• Detected image then stored in created folder for the user to detect the origin of the fire and hence, the monitoring system is stopped.• When the user clears the defects, then he has to press the reset button.• When buzzer is alarmed after troubleshooting, a reset button is pressed to reactivate the system and the system starts monitoring and the buzzer is stopped.• Our method is real time processing method and uses simple algorithm based on fire colour detection.

Proposed system architecture
The fire was detected at the start and a folder is created to store the image that was captured instantly by the system at the time of detection [20][21][22][23].The date and time of fire detection, was stored in an excel file to see when the last event occurred.Buzzer was turned on from the start when the fire was detected and will remain in that state till the reset button was pressed and the system was reactivated [24].

Results
When the algorithm runs camera, it continuously monitor the specific area by capturing the images regularly [25] but it seemed like that a video of the specific area is formed.Following Figure 9 is taken, when no fire is detected.As the fire detected, the Figure 10 displays and the program stopped monitoring and the buzzer started as an indication of the fire alarm until the reset button is not pressed.The system starts working again after pressing the resetting button.Hence, it once again starts monitoring and the buzzer is 'OFF' if the fire is not terminate then it again stops and buzzer become 'ON'.So, you have to completely repair the system before resetting the system.Similarly, the same procedure can be used to detect the fire in some real scenarios such as in the room to any appliance such as computers, refrigerators, [26][27][28][29][30] circuit breakers and different electrical circuits.Burning of computer is shown in the Figure 11.Therefore, in this method, we can detect fire in its starting period and we can save ourselves from such extensive fire.In this way we will able to overcome the fire and save most of the part of the appliance.Another example where we can use this type of fire detector is in the mines or tunnels.This can be very helpful in saving the lives of the laborers working in the mines.Whenever there exists some unfortunate event such as fire due to short circuits and no one examined it but camera caught that fire and alerts the workers to be attentive and active with the help of buzzer and showing the image of sparking area, so you the repair the damaged area and origin of the fire properly.This type of method can also be use useful in industries or firms to detect the fire in the machinery.Suppose [31], in a cloth factory the first step is to remove pilling from cloth this can be done through fire we can use this there as well, if the intensity of the fire increases from the set value then burner will stop [32][33].In this way we can save a lot of cloth and lives of the workers.In the mill or factory there are many machines through which many functions are performed to run the factory or to build the products.There is a lot of chances that any machine or any component of the machine is overloaded and it burns then there is a chance that this spark may harm the machine and product as well [34][35][36][37][38][39].If we use this method then sparks of the components are being noticed and form data and picture collection necessary steps are easy to be taken with in the right time.In the Figure 13 the same agenda is shown as I described.

Conclusions
Keeping in view the importance of time nowadays, this method could be considered the most helpful and affordable technique for fire detection as it takes less time [40][41][42] to detect the fire and takes images instantly.Additionally, it is the most convenient and useful method in the sense that it stores the detected image for the user to troubleshoot the defected area in no time and replace or manage the load for the specific part or component of the machine.Information like the path of detected image and time at which fire was detected is stored in an excel file which is helpful to check the history of the machine for workers and managers.This system is economical, simple, and easy to introduce in industry and a public area with the end goal of safety [43][44][45][46].It is obvious that our results are better than previously introduced techniques.Every system in the world has some pros and cons [47].The limitation associated with this working phenomenon includes that it cannot be utilized in an open-air environment, as it uses a color detection method to detect fire.Consequently, it is relevant just for some particular monitoring such as monitoring process of the machinery, fire monitoring in the mines, and for the monitoring of appliances [48] [49].We can additionally work on this system by attaching a fire extinguisher with it so that it can diminish the fire whenever fire is detected [50].This is exceptionally useful in making the lives of individuals safe.Hence, the designed algorithm is unique and very simple for controlling.

Figure 1 :
Figure 1: Apparatus or Experimental setup

Figure 4 :
Figure 4: Fired pictures captured in a day at different time • Similarly, an excel sheet is created for record as shown in the Figure 5.The command used to create excel file is as follows: M-File: header='NO.','Firedimage','Time'; xlswrite('firealarm_data',header,day,'B2')

Figure 5 :
Figure 5: Excel sheet for record

Figure 6 :
Figure 6: Excel sheets with respect to days • Time of fire indication is then noted and stored in created excel sheet as shown in Figure 7.

Figure 9 :
Figure 9: Monitoring during the system running

Figure 11 :
Figure 11: Fire detected from appliances

Figure 12 :
Figure 12: Fire detected in the mines

Figure 13 :
Figure 13: Fire detected from processing machines