Source: Deep Learning on Medium
Application of fire detection as tool has increase to due to the frequent occurrence of extended fire with consequences on human health and security. This current detection methods which are based on electronic sensors are usually depend on heat and pressure sensors. However those methods has a fatal flaw where they will only work when a certain condition has been reach. In the worst case scenario is the sensors are damaged or not being configure properly can cause heavy casualty in case of real fire. To solve these problems in electronics surveillance cameras being installed. Due to this there is an increase of need for fire detection based on computer vision for such devices. Such devices include a wide range of CCTV, wireless camera even to UAVS.
These type of systems offer several distinguish advantages over those traditional detection methods. For example the cost of using this type of detection is cheaper and the implementation of this type system is greatly simpler compare to those traditional methods. Secondly the response time of fire detection system is faster compare to any other traditional detection methods since a vision sensor based fire detection system does not required any type conditions to trigger the sensors and it has the ability to monitor a large area depends on the camera used. The most benefit of these type of system is the fire source can be saved in a form of image or video which can used for promoting the diversification of the fire detection method greatly.
In this paper, we proposed an algorithm which combines color information of the fire with the edge of the fire information. Then with the combined results from both this techniques, a parameter is created to segment out the necessary details from the images to detect and identify the fire.
The first step in our method is to detect the color of the fire which is mostly red in color. Then we used the sobel edge detection on the original image to detect the edge of the fire while removing threshold which is less than 100. Then we applied the segmentation technique which used the combine the result from the first technique and second technique to separate the ROI of the fire from the background.
RGB Colour Model
A fire image can be described by using its color properties. There are three different element of color pixel: R, G and B. The color pixel can be extracted into these three individual elements R, G and B, which is used for color detection.
RGB color model is used to detect red color information in image. In terms of RGB values, the corresponding inter-relation between R, G and B color channels: R>G and G>B. The combined condition for the captured image can be written as: R>G>B. In fire color detection R should be more stressed then the other component, and hence R becomes the domination color channel in an RGB image for fire.
This imposes the condition for R as to be over some pre-determined threshold value RTH.
Condition1: R > RTH Condition2: R > G > B.
Then the result, is need to convert to HSI color model where H represent hue, S represent saturation and I represents intensity.
Sobel Edge Detection
The next step will be to use the sobel edge detector to detect the growth of fire within the images. This can be done by applying 3×3 mask to the images. Convolution is both commutative and associative
The final technique used in this algorithm is segmentation technique which was used to segmented fire from the non-fire background. The first step done by this technique is to specific the colour range for segmented process in the ROI. However in this algorithm that we proposed, this has been done in the first technique. Based on that parameter the following formula is used;
The distance is compare with the threshold value. If D(x,m) ≤ threshold value, the point belong to ROI of the fire. Otherwise they are not part of the ROI of can be consider as background. The region which separates the ROI and non-ROI is detected using the 2nd technique which is the sobel edge detection.
Result and Analysis
Finally validation was carried out to evaluate the algorithm based on the 50 images. This validation process uses a truth model, with which the results was compared. The true positive (TP) and true negatives (TN) are correct classification. A false positive (FP) is when the outcome of the algorithm is incorrectly predicted, when the in reality it is actually present in the image.
The accuracy of the algorithm specify the ability of the algorithm in detecting the ROI. Accuracy = TP/ (TP+TN)*100%
The efficiency test is given as
Efficiency = (TN+TP/TN+TP+FN+FP)*100%
We proposed a fire detection algorithm based on Machine learning (image processing techniques). The algorithm uses RGB colour model to detect the colour of the fire which is mainly comprehended by the intensity of the component R which is red colour. The growth of fire is detected using sobel edge detection. Finally a colour based segmentation technique was applied based on the results from the first technique and second technique to identify the region of interest (ROI) of the fire. The algorithm works very well when there is a fire outbreak. The overall accuracy of the algorithm is greater than 90%, indicating the effectiveness and usefulness of the algorithm. In future work, a real-time based algorithm could be consider as it might increase the efficiency of the algorithm which is currently 80.64%.