Click here to Skip to main content
15,916,693 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi guys I'm in a really rush of time , My project requires me to do fire and smoke from any video on the Aforge.net Videosourceplayer .
I already did my fire detection which is still not 100% accurate but now my main concern is how do I detect smoke?

Seems like all the filter in Aforge.NET will be able to help me to a certain extend only. To detect smoke just itself is a chore, now my only plan is to
-update pixel value of certain area in the video to detect for falling contrast.

if the pixel's contrast value is declining then smoke is detected.

I know it's a pretty half hearted way to complete this project but I need to do something that may at least work.

I've been doing research on smoke for 10 weeks and it's just beyond me .

Help will be greatly greatly appreciated!!!

anyone knows what method is good for selecting a pixel area for detecting contrast or sample code? pls help! Thanks!! :confused:
Posted

1 solution

I already advised you to detect smoke by the level of contrast. Also, you should use just one frame for detection; motion detection should not help you. So, you should use static method, or, even better, quasi-static which I recommended in response to you first Question.

Now I'm thinking about some detail of it. You can try to measure general contrast of the picture directly. This method, however, depends on the scene and lighting too much much, may require thorough calibration and can turn unsuitable if the lighting changes.

Instead, you can try the following plan:

1) Normalize the frame.

2) Perform edge detection http://en.wikipedia.org/wiki/Edge_detection[^] transformation. As you're are not interested in edges themselves you may find the simplest algorithm the best. Most likely, you can perform simple convolution; the code is available in AForge.net. The samples of the second function in the convolution (the mask of filter matrix) can be found in the library and/or sample code from the article by Andrew Kirillov: Image Processing Lab in C#[^], or, for example, here: http://www.pages.drexel.edu/~weg22/edge.html[^]. The final selection of the function depends on scale comparison: the pixel dimensions of your camera and the characteristic scale of detail on the picture.

3) The resulting picture should be contrasted.

4) The analysis should be done to detect the blobs of image with no or low level of distinct edges. The idea is that smoke covers the sharp detail of the picture, which makes the edged weak or disappear. In this way, you could spot some smoke before it totally fills the picture. The comparison with the smoke-free sample can be very useful. I think in all cases your algorithm will need the teaching stage.

This method can tell no-smoke from smoke situation only if you have a scene rich of small sharp detail. If it does not have sharp detail is should be highly contrast, so you could use direct contrast measurements. Is none of these condition is the case, I think, smoke detection will be very difficult or impossible.

From my past experience advising you I remember you had some preoccupation with motion detection. In no case you can use motion detection for smoke: the smoke will slowly fill the scene, so for any given time slice the picture will look almost static.

By the way, what method you apply for fire detection? Still motion detection?..

—SA
 
Share this answer
 
v4
Comments
Justuskun 14-Feb-11 1:02am    
Hi SA, for fire detection I've used color filtering for a few colors simultaneously. colors includes fire pixels values i extracted from a few different videos. I used a 2 sec looping timer to check the status of the video , if there is detection of those fire pixels within that 2 seconds the fire alarm will be triggered. Also since its a static video for a corridor i noticed that if there is a fire burning, the surrounding will have a high level of activity from the glow of the fire and the smoke.
Motion detection is not used already , because of the deferment of speed of fire spreading.

I will be working on trying out your solution for the this 2 days , because my project presentation is either this week or the next .

And I really really do appreciate your help all the time! :D
Thank you very much
Sergey Alexandrovich Kryukov 14-Feb-11 1:17am    
Thank you for accepting my answer.
Yes, you're getting to this difficult part quite late, considering that you already spent 10 weeks.
You still have some time, but you have to work real hard.
Good luck, call again.
--SA
Justuskun 14-Feb-11 1:19am    
Hi I know , i was stuck with getting simultaneous color filter for awhile haha.
then research on the smoke was not getting me anywhere so I posted a forum question here.
Thank for the answer its really giving me a direction for my work.
Sergey Alexandrovich Kryukov 14-Feb-11 3:37am    
I hope it helps you, because, you know, I never tried, just use some experience in different field and intuition. So, you may use some luck :-)
--SA
Justuskun 14-Feb-11 4:32am    
I got the contrasting picture using sobel edge detection, I understand that you meant when smoke covers the edges , the contrast ( or the edges) difference will be gone or less visible.

So now I have to
first: get the background frame(sobel edge filtered) before the fire
Second : declare feeding frames( sobel edge filtered) as overlay frames and compare background frame and overlay frame for any differences in the edges.

and to detect no or less visible edges, i went throught the filters from the imaging namespace in AForge. Nothing seems to be able to identify a missing edge, do you think difference filter may work in this case??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900