1 简介
运动目标的检测是数字图像处理和模式识别以及计算机视觉领域研究的主要内容之一,也是计算机视觉研究的一个重要领域.对基于背景差分法的视频目标检测的算法进行了研究.以Matlab为主体研究工具,对视频中的运动目标进行检测.对背景差分法的原理和算法进行了研究,并对其进行了详细的讨论和分析.利用中值滤波背景模型来提取背景,并对目标的阴影进行检测与抑制.实验结果表明,采用该算法对运动目标进行检测具有良好的准确性和稳定性.
2 部分代码
function varargout = EasyTrack(varargin)% EASYTRACK MATLAB code for EasyTrack.fig% EASYTRACK, by itself, creates a new EASYTRACK or raises the existing% singleton*.%% H = EASYTRACK returns the handle to a new EASYTRACK or the handle to% the existing singleton*.%% EASYTRACK('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in EASYTRACK.M with the given input arguments., handles)% hObject handle to timeLimit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of timeLimit as text% str2double(get(hObject,'String')) returns contents of timeLimit as a double% --- Executes during object creation, after setting all properties.function timeLimit_CreateFcn(hObject, eventdata, handles)% hObject handle to timeLimit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end% --- Executes during object creation, after setting all properties.function uibuttongroup4_CreateFcn(hObject, eventdata, handles)% hObject handle to uibuttongroup4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns calledhandles.f=[];%对figure的handles进行初始化guidata(hObject,handles);% --- Executes during object creation, after setting all properties.function radiobutton9_CreateFcn(hObject, eventdata, handles)% hObject handle to radiobutton9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns calledhandles.saveSwitch=0;guidata(hObject,handles);function unitH_Callback(hObject, eventdata, handles)% hObject handle to unitH (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of unitH as text% str2double(get(hObject,'String')) returns contents of unitH as a double% --- Executes during object creation, after setting all properties.function unitH_CreateFcn(hObject, eventdata, handles)% hObject handle to unitH (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))set(hObject,'BackgroundColor','white');end
3 仿真结果

4 参考文献
[1]汪国强, 盖琪琳, 于怀勇,等. 基于背景差分法的视频目标检测算法研究[J]. 黑龙江大学工程学报, 2014, 5(4):5.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
本文探讨了视频目标检测中的背景差分法,利用Matlab进行实现和实验。通过中值滤波背景模型提取背景并抑制阴影,提高了运动目标检测的准确性和稳定性。实验结果显示该算法在检测运动目标时表现出良好的效果。
872

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



