题目:MATLAB运动目标防摔检测
- 应用背景
运动目标的定位跟踪,检测识别,运动分析在公共安全、运动分析、交通检测,智能监控等方面有主要的应用。关于公共安全方面,如高速路,教室,校园,火车站等,如果发生打架等肢体冲突,可以实时预警报警;关于运动分析和智能监控方面,随着我国经济的发展,老龄化问题日益突出,其中“空巢老人”现象尤其引人关注,预测未来三十年,中国的老龄人口总量将占总人口数的30%以上,虽然解决老龄化问题势在必行,但是目前智能养老体系如生活照料、心理抚慰、应急救助、健康保健、法律援助等方面尚未建立完善。本文研究的基于视频的人体行为算法与实现是在摄像头固定的情况下对家庭中老人的日常行为起居进行检测,实现动态场景中运动目标的定位跟踪,检测识别,运动分析。防止老人因摔倒、突发疾病而导致的不能及时抢救,同时检测老人疾走状态,预警突发事件,推断出运动目标异常行为,减少可疑情况发生几率,对事故进行及时的处理。因此,智能视频监控在未来的援助救助系统中占据不可或缺的一部分,同时也是应对我国未来信息服务的发展趋势。
- 研究内容
本设计是一款人体行为异常监控系统,主要适用人群是老年人,在摄像头固定的情况下,自动检测人体运动轨迹,并与提前设定好的行为库进行匹配,分析判断是否具有异常行为。在数字图像预处理部分采用了图像二值化,腐蚀与膨胀等几种方法为人体目标的跟踪和检测做准备。为了克服在实际操作中遇到的问题,采用了帧差法和ViBe算法,帧差法即利用帧间变化与当前帧、背景算法来判断它是否大于阈值,并分析视频中序列的运动特性,ViBe算法则是一种背景建模的方法,背景模型是由邻域像素来创建,并对比背景模型、当前输入像素值检测出前景,确定视频中的目标跟踪。在人体行为识别中,运动目标最小长宽比以及连续帧间的加速度来判断人体行为是否异常,如果检测到异常的行为比如说摔倒、快跑等行为,在识别的过程这种实时监测。
- 识别流程算法流程图

- 运行示意图

- 核心代码
function varargout = mubiao(varargin)
% MUBIAO MATLAB code for mubiao.fig
% MUBIAO, by itself, creates a new MUBIAO or raises the existing
% singleton*.
%
% H = MUBIAO returns the handle to a new MUBIAO or the handle to
% the existing singleton*.
%
% MUBIAO('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MUBIAO.M with the given input arguments.
%
% MUBIAO('Property','Value',...) creates a new MUBIAO or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before mubiao_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to mubiao_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help mubiao
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @mubiao_OpeningFcn, ...
'gui_OutputFcn', @mubiao_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 mubiao is made visible.
function mubiao_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 mubiao (see VARARGIN)
% Choose default command line output for mubiao
handles.output = hObject;
Unt;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes mubiao wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = mubiao_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 pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
[filename, pathname] = uigetfile({'*.avi'; '*.mp4'},'打开视频');
str = [pathname filename];
set(handles.edit1, 'String', str);
% obj是一个对象
obj = VideoReader(filename);
video = vision.VideoFileReader(filename, 'ImageColorSpace', 'RGB');
global video
% 视频的第一帧预览显示在界面
% 获取obj
% 获取视频参数
%numFrames = obj.NumberOfFrames;
%set(handles.edit2,'string',numFrames);
Show_Frames=read(obj,1);
axes(handles.axes1)
imshow(Show_Frames);
title('预览图');
本文介绍了一种基于MATLAB的运动目标防摔检测系统,应用于智能监控,特别是针对老年人的安全防护。系统通过图像预处理、帧差法和ViBe算法进行目标跟踪,结合行为库分析判断异常行为,如摔倒、快跑等,以实现实时预警。

7157

被折叠的 条评论
为什么被折叠?



