当前位置:网站首页>[Fire Detection] forest fire detection system based on Matlab GUI (with panel) [including Matlab source code phase 1921]
[Fire Detection] forest fire detection system based on Matlab GUI (with panel) [including Matlab source code phase 1921]
2022-06-29 01:07:00 【Poseidon light】
One 、 Introduction to fire detection
1 introduction
At present, forest fire is one of the most important disasters that destroy forests , Great influence . The forest is home to all kinds of rare birds and animals , After the forest fire , It will destroy the environment on which wild animals live . Serious forest fires can not only cause soil erosion , It will also cause flash floods 、 Debris flow and other natural disasters . therefore , Early identification and early warning of forest fires , Can minimize the loss . This forest fire detection method is based on the study of the general characteristics of fireworks by using image processing technology , Combine the color of the flame in the pyrotechnic area 、 area 、 Irregularity, color and dynamic characteristics of smoke . Basically eliminate other adverse effects , Effectively improve the accuracy of forest fire image recognition . besides , We use the method of multi-layer detection , Reduce the time of system processing and analysis , It improves the recognition speed .
chart 1 Fire identification process
2 Forest fire detection system process
In order to achieve the purpose of fire detection , We use smoke and flame to detect , A multi-layer extended recognition process is designed , The combination of static features and dynamic features . The overall process of the specific operation of the scheme is shown in the figure 1. The overall design idea of the fire detection system is : The first step is to acquire the real-time image taken by the camera ; Then the real-time background difference of the video image is used to dynamically judge whether there is any abnormality , If several consecutive frames of images have changed greatly , That is, it is judged that there is an abnormal situation ; Next, we use our detection algorithm to recognize the flame and smoke respectively , If there is a flame in the image ( smoke ) , The system will output “1”, Otherwise output “0”; Finally, we use our multi feature fusion to comprehensively judge whether it is a fire , If yes, output “1” Give fire warning , So as to complete the whole forest fire detection system .
3 Flame detection
The flow chart of the flame detection part of the forest fire risk detection system is shown in the figure 2 ( Left ) Shown :
chart 2 Flame detection ( Left ) And smoke detection ( Right ) flow chart
After the image to be detected is input , Initial image processing is required . The image preprocessing process generally includes enhancement 、 wave filtering 、 Refine several aspects . Next, the enhancement and filtering of flame image are briefly described .
Image enhancement mainly refers to enhancing a part of an image according to the idea of the developer , It can be a specific area , It can also be part of the area that meets the relevant restrictions , And the processing method of diluting or eliminating some unimportant and disordered information . Image enhancement mainly includes histogram modification 、 Image smoothing 、 Common processing methods such as image sharpening and color image processing . We use several methods to synchronize the system , The purpose is to achieve the desired enhancement effect of the flame image .
After the flame image is preprocessed , The next step is to split the flame . In sufficient natural light , We adopt the method of color feature extraction , Divide the suspected flame area from the figure . In general , Although the flame may have many different colors , But mainly concentrated in dark red 、 Red 、 Orange 、 yellow 、 white 、 Blue is one of these colors . Even in different environments, the flame will show different colors , But it often goes through the combustion process from red to yellow . At this time, the RGB The value corresponds to R≥G≥B The relationship between . meanwhile , We take the switch to HSI Space , Carry out multi feature acquisition . stay HSI In the space , Chromaticity value of flame H Usually in 0~60 Between degrees , Besides , S Satisfy 100, I Satisfy 255. The pixels in the image that meet the above four conditions are regarded as candidate regions for flame .
There may be noise in the image after extracting the color of the flame , We use median filter to remove noise .
stay (Y, Cr, Cb) In the space , There are obvious differences between flame and other related objects . In 2D (Cr, Cb) In space , The distribution of flame pixels is close to normal distribution , Other objects do not have this property . So we take the flame image to (Y, Cr, Cb) Space , Analyze pixels , Extract the regions close to the normal distribution .
in other words , When the detection image is in the two-dimensional (Cr, Cb) When the space satisfies the normal distribution , Can be roughly judged as flame image .
After rough judgment of flame color characteristics , The next step is to determine the dynamic characteristics of the flame , The final decision is whether it is flame . For humans , Shape is an important feature for us to judge an object . So the computer is also very useful for analyzing the shape of the object in the image . According to the relevant theories of graphics and images , We get the dynamic features of the flame image , Take this as the basis for judgment for further processing . We use two characteristics related to the shape of the object as the basis for judging the flame image .
A. Irregularity
Considering the irregularity of forest fire flame shape and the image light source that may interfere with our system ( Like a flashlight , Searchlights, etc ) The shape feature of has the characteristics of high regularity , We use the degree of irregularity as the basis for judging whether it is a flame . The degree of irregularity represents the degree of irregularity of the shape of an object , Its expression is as follows :
We define the perimeter as the boundary length of the object , It can be obtained by the number of pixels on the boundary of the candidate region of the flame image . The area is obtained by counting the number of pixels in all possible smoke areas . The more complex the shape of the candidate image , The larger the irregularity value is .
The specific steps of obtaining the irregularity of the flame candidate image :
(1) The edge of the flame candidate image obtained by color segmentation is extracted , Calculate the number of pixels on the edge to get L.
(2) Calculate the area of the suspected flame area in the flame image , That is, calculate the total number of pixels set to black in the previous color segmentation S.
(3) Find the irregularity , And calculate the continuous n Average value of frame image .
B. Diffusivity
Usually after a fire , The fire area will show a growing trend , The burned area will continue to expand , The fire area detected by the corresponding camera will also gradually increase . That is to say, the highlighted areas in the images we get will continue to grow . therefore , We can define “k” It represents the ratio of the area of the subsequent suspected flame area to the area of the previous suspected flame area to characterize the diffusion characteristics of the fire . Within the reference time we set , k The bigger the value is. , The stronger the diffusion characteristic of fire .
In the flame detection section , First, the image is pre processed , The candidate images of flame region are screened based on color features , Then, according to the irregularity and diffusivity of these images, the final judgment of whether it is a flame area is made , Then input the decision result to the next step .
Two 、 Partial source code
function varargout = MainGUI(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @MainGUI_OpeningFcn, ...
'gui_OutputFcn', @MainGUI_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{
1})
gui_State.gui_Callback = str2func(varargin{
1});
end
if nargout
[varargout{
1:nargout}] = gui_mainfcn(gui_State, varargin{
:});
else
gui_mainfcn(gui_State, varargin{
:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before MainGUI is made visible.
function MainGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to MainGUI (see VARARGIN)
% Choose default command line output for MainGUI
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes MainGUI wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% Hide some controls when running the main interface
% set(handles.axes1,'visible','off');
% set(handles.text1,'visible','off');
% --- Outputs from this function are returned to the commandline.
function varargout = MainGUI_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{
1} = handles.output;
% --- Executes on button press in openvideo_button.
function openvideo_button_Callback
% hObject handle to openvideo_button (see GCBO)(hObject, eventdata, handles)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Read video path
[filename,pathname,filter] = uigetfile({
'*.mp4;*.flv;*.avi;*.rmvb;*.f4v;*.mpeg;*.mkv'},' Choose video ');
if filter == 0
return
end
str = fullfile(pathname,filename);
% Read video
filename = str;
% obj It's an object
obj = VideoReader(filename);
% The preview of the first frame of the video is displayed on the interface
Show_Frames=read(obj,1);
axes(handles.axes1);
imshow(Show_Frames);
set(handles.axes1,'visible','on');
axis off
3、 ... and 、 Running results

Four 、matlab Edition and references
1 matlab edition
2014a
2 reference
[1] Cai Limei .MATLAB The image processing —— theory 、 Algorithm and example analysis [M]. tsinghua university press ,2020.
[2] Yang Dan , Zhao Haibin , Long Zhe .MATLAB Detailed explanation of image processing examples [M]. tsinghua university press ,2013.
[3] Zhou pin .MATLAB Image processing and graphical user interface design [M]. tsinghua university press ,2013.
[4] Liu Chenglong . Master MATLAB The image processing [M]. tsinghua university press ,2015.
[5] Yangyuzhuo . Forest fire detection system based on image processing [J]. Electronic world . 2018,(16)
3 remarks
This part of the introduction is taken from the Internet , For reference only , If infringement , Contact deletion
边栏推荐
- 【RRT三维路径规划】基于matlab快速扩展随机树无人机三维路径规划【含Matlab源码 1914期】
- Hello i am back
- After easycvr creates a new user, the video access page cannot be clicked. Fix the problem
- 立创eda学习笔记:铺铜死区?孤岛?死铜?
- How to solve the problem of Caton screen when easycvr plays video?
- Xuetong denies that the theft of QQ number is related to it: it has been reported; IPhone 14 is ready for mass production: four models are launched simultaneously; Simple and elegant software has long
- The latest justnews theme source code 6.0.1 happy version + social Q & a plug-in 2.3.1+ tutorial
- cocoscreator动态切换SkeletonData实现骨骼更新
- 光纤滑环价格过高的原因
- [Architect (Part 38)] locally install the latest version of MySQL database developed by the server
猜你喜欢

【图像处理】基于matlab实现图像曲线调整系统
![用户登录(记住用户)&用户注册(验证码) [运用Cookie Session技术]](/img/31/c84c1e15aa1c73814c4ad643e3dd36.png)
用户登录(记住用户)&用户注册(验证码) [运用Cookie Session技术]
![[staff] pedal mark (step on pedal ped mark | release pedal * mark | corresponding pedal command in MIDI | continuous control signal | switch control signal)](/img/2b/e358b22d62ce6d683ed93418ff39fe.jpg)
[staff] pedal mark (step on pedal ped mark | release pedal * mark | corresponding pedal command in MIDI | continuous control signal | switch control signal)

674. longest continuous increasing sequence
![[image enhancement] manual multiple exposure fusion amef image defogging based on MATLAB [including Matlab source code 1916]](/img/e9/e5a7163c949db9e649829fcdcf76f5.jpg)
[image enhancement] manual multiple exposure fusion amef image defogging based on MATLAB [including Matlab source code 1916]

Nodejs安装和下载
![[leetcode] 522. 最长特殊序列 II 暴力 + 双指针](/img/88/3ddeefaab7e29b8eeb412bb5c3e9b8.png)
[leetcode] 522. 最长特殊序列 II 暴力 + 双指针

狼人杀休闲游戏微信小程序模板源码/微信小游戏源码

卷绕工艺与叠片工艺的对比

What is the reason for the service crash caused by replacing the easycvr cluster version with the old database?
随机推荐
大型网站架构基础之笔记
Streaming media cluster application and configuration: how to deploy multiple easycvr on one server?
最大路径和问题(摘樱桃问题)
Blazor University (34) forms - get form status
[MCU club] design of blind water cup based on MCU [simulation design]
Is it safe to open an account on great wisdom
be based on. NETCORE development blog project starblog - (13) add friendship link function
EasyCVR服务private.pem文件被清空,导致无法正常启动该如何处理?
成功解决(机器学习分割数据问题):ModuleNotFoundError: No module named ‘sklearn.cross_validation‘
戴口罩人臉數據集和戴口罩人臉生成方法
免疫组化和免疫组学之间的区别是啥?
Oracle uses sqlloader to prompt sql*loader-406 Import failed but no error was reported
Large-scale case applications to developing post-click conversion rate estimation with MTL
立创eda学习笔记:铺铜死区?孤岛?死铜?
How to handle a SIGTERM - how to handle a SIGTERM
【图像增强】基于matlab人工多重曝光融合AMEF图像去雾【含Matlab源码 1916期】
Browser cache library design summary (localstorage/indexeddb)
[MCU club] design of classroom number detection based on MCU [simulation design]
Is l1-031 too fat (10 points)
【leetcode】153. Find the lowest value in the rotation sort array