Student Seminar Report & Project Report With Presentation (PPT,PDF,DOC,ZIP)

Full Version: fire detection from video matlab code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Guest

hi I'm looking for matlab code for fire detection in video So if anybody can have mail me to this id vishwamsruas14[at]gmail.com
Thanks and Regards in advance
Vishwanath G R
fire detection from video matlab code

Abstract:

Conventional fire detection systems use physical sensors to detect fire. Chemical properties of particles in the air are acquired by sensors and are used by conventional fire detection systems to raise an alarm. However, this can also cause false alarms; for example, a person smoking in a room may trigger a typical fire alarm system. In order to manage false alarms of conventional fire detection systems, therefore a computer vision-based fire detection algorithm is needed. The algorithm can be used in parallel with conventional fire detection systems to reduce false alarms. It can also be deployed as a stand-alone system to detect fire by using video frames acquired through a video acquisition device. A novel fire color model is developed in CIE L*a*b* color space to identify fire pixels.

% Put image fire in the same folder where this code is put.

i=imread('fire.jpg');
C = makecform('srgb2Lab');
i_Lab = applycform(i,C);
x=i_Lab(:,:,1);
y=i_Lab(:,:,2);
z=i_Lab(:,:,3);
L=sum(x);
L=sum(L');
a=sum(y);
a=sum(a');
b=sum(z);
b=sum(b');
d=zeros(150,200);
L=L/(150*200);
a=a/(150*200);
b=b/(150*200);
for p=1:1:150
for q=1:1:200
if (x(p,q)>L)
d(p,q)=1;
else d(p,q)=0;
end;
end;
end;
e=zeros(150,200);
for p=1:1:150
for q=1:1:200
if (y(p,q)>a)
e(p,q)=1;
else e(p,q)=0;
end;
end;
end;
f=zeros(150,200);
for p=1:1:150
for q=1:1:200
if (z(p,q)>b)
f(p,q)=1;
else f(p,q)=0;
end;
end;
end;
g=zeros(150,200);
for p=1:1:150
for q=1:1:200
if (y(p,q)>z(p,q))
g(p,q)=1;
else g(p,q)=0;
end;
end;
end;
h=zeros(150,200);
for p=1:1:150
for q=1:1:200
if (d(p,q)&&e(p,q)&&f(p,q)&&g(p,q)==1)
h(p,q)=1;
else h(p,q)=0;
end;
end;
end;
h=sum(h);
h=sum(h');
if (h >10 )
fprintf('FIRE DETECTED\n');
else
fprintf('FIRE NOT DETECTED\n');
end;