Fire detection using opencv
I have read a comment here http://answers.opencv.org/question/83... to using cascade classifier but isn't cascade classifier only good for rigid objects?
I have read a comment here http://answers.opencv.org/question/83... to using cascade classifier but isn't cascade classifier only good for rigid objects?
I'm posting some images from a simple test. 2 webcams looks at same scene: a flame from a common lighter.
On the left, an image from a Webcam where the IR cut filter (piece of glass on the sensor) has been removed and a visible cut filter (a piece of enveloped photo negative in front of lens) has been installed. On the right, same scene from standard laptop webcam.
The result is same also if the flame is far from the cam.
I think this example is explicative :)
You can search the Internet by "remove IR cut filter webcam" or, if you like raspberrypi, to buy a pi-noir-camera
Solution isn't always only in the algorithms even if to modify the environment is not always feasible and sure isn't a machine learning approach.
enjoy with experiments ;)
I must say that I'm very surprise by this result.If "flame" is at 900K and wall at 3000K contrast enhancement is about 20 using band 800-1000nm instead of 400-800nm. You lost about 50% of light
I don't understand why the wall is at 3000K, south Italy is warm but not more 320K :) In your equation you take the wall as a black body but isn't. It emits energy due to reflection and transmission + a small part of emission because of it's temperature. Not only, emissivity changes with wavelength. Your nice equations should consider this too.
Objects reflects and transmits visible lights but we cut this with filter. In 800..1000nm the reflected light decrease close to zero and we start to see only energy from temperature. This case is similar to a black body. The temperature of the wall is really lower compared to the flame. Because the emitted energy is proportional to the temperature the flame looks brighter than the wall.
Maybe I'm wrong and sure Viper want to know about ML.
Yes wall is not 3000K but light temperature is about 3000k. Light comming from wall is not due black body but due to sun reflection and diffusion (I hope that transmitivity in visble light is 0). If you want to see light comming from wall you should use a thermal infrared camera which can see light ranging from 9 to 14um (wall temperature about 320K).
Now I vote for your post because you are right and even with your answer I had got a doubt about contrast enhancement that's why I have made some computation using equation. That's not my nice equation it's only planck equation and ccd spectral response is included in computation too
Based on comment from this question, and coments from the other related question (Fire/Flame Detection using OpenCV):
@StevenPuttemans: "Another way could be to use the fact that fire actually involves motion between frames in a video input"
@Guanta "You could train a cascade-classifier with LBPs since LBPs are also often used for texture detection/recognition this would be worth trying"
@red-viper
"is there any other way that uses machine learning?"
@pklab "The example shows that in the visible spectrum, the flame visibility depend on context. In the IR, the context is less relevant. After this you could use ML on IR image too."
I would like to complete the proposed hardware answer with a software one that i think could work together.
In this paper: "Early Fire Detection Using HEP and Space-time Analysis" [1] motion (as suggested by @stevenputtemans) and texture analysis (as suggested by @guanta) are involved.
You could also check "Video Fire Detection - Review" [2], Real-time Fire Detection for Video Surveillance Applications using a Combination of Experts based on Color, Shape and Motion [3], Automatic fire pixel detection using image processing: A comparative analysis of Rule-based and Machine Learning-based methods [4]
[1] http://arxiv.org/pdf/1310.1855.pdf
[2] http://signal.ee.bilkent.edu.tr/Publi...
Asked: 2016-01-26 05:39:57 -0600
Seen: 6,925 times
Last updated: Feb 09 '16
I would try a NIR enhanced camera (>800nm) with a NIR band pass filter on Lens.
so cascade classifier with NIR enhanced camera? no chance of detecting it using low cam like webcam?
I would do it in Steven's way. You should do a colour segmentation and try to interpret the information in those areas... You should keep in mind that flames may change colour depending on the burning materials or gases.
is there any other way that uses machine learning?
Maybe BoW can help to detect if there is fire in the interesting regions in the picture (applying it on the blobs from bg subtraction). But why it's necessary to use ml?
Its an assignment given to us and im confused what concept to apply
Ok, so I think this is a good start: bg subtraction is good for detecting the regions of interest and training and applying the BOW on them can predict if the ROIs contain fire or not
many webcams have sensor sensible over 800nm but have an embedded IR cut filter. You can find a lot of instruction on how to remove this filter from cheaper webcams. To enhance IR region you would install a visible light stop filter so you would see only flames as white :). As assignment it could works but it's just an idea
I don't understand why you need NIR enhanced camera. Can you explain or give a reference?
Yes, there is no remark about NIR in the question...