电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

HSV阴影消除及YUV阴影消除对比代码及使用说明VIP免费

HSV阴影消除及YUV阴影消除对比代码及使用说明_第1页
1/15
HSV阴影消除及YUV阴影消除对比代码及使用说明_第2页
2/15
HSV阴影消除及YUV阴影消除对比代码及使用说明_第3页
3/15
基于matlab的HSV阴影消除代码,毕设所用,用完贡献先给代码后有说明functionvarargout=untitled111111(varargin)%UNTITLED111111M-fileforuntitled111111.fig%UNTITLED111111,byitself,createsanewUNTITLED111111orraisestheexisting%singleton*.%%H=UNTITLED111111returnsthehandletoanewUNTITLED111111orthehandleto%theexistingsingleton*.%%UNTITLED111111('CALLBACK',hObject,eventData,handles,...)callsthelocal%functionnamedCALLBACKinUNTITLED111111.Mwiththegiveninputarguments.%%UNTITLED111111('Property','Value',...)createsanewUNTITLED111111orraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforeuntitled111111_OpeningFcngetscalled.An%unrecognizedpropertynameorinvalidvaluemakespropertyapplication%stop.Allinputsarepassedtountitled111111_OpeningFcnviavarargin.%%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone%instancetorun(singleton)".%%Seealso:GUIDE,GUIDATA,GUIHANDLES%Edittheabovetexttomodifytheresponsetohelpuntitled111111%LastModifiedbyGUIDEv2.531-Mar-201409:39:29%Begininitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_OpeningFcn',@untitled111111_OpeningFcn,...'gui_OutputFcn',@untitled111111_OutputFcn,...'gui_LayoutFcn',[],...'gui_Callback',[]);ifnargin&&ischar(varargin{1})gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,varargin{:});end%Endinitializationcode-DONOTEDIT%---Executesjustbeforeuntitled111111ismadevisible.functionuntitled111111_OpeningFcn(hObject,~,handles,varargin)%Thisfunctionhasnooutputargs,seeOutputFcn.%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%varargincommandlineargumentstountitled111111(seeVARARGIN)%Choosedefaultcommandlineoutputforuntitled111111handles.output=hObject;%Updatehandlesstructureguidata(hObject,handles);%UIWAITmakesuntitled111111waitforuserresponse(seeUIRESUME)%uiwait(handles.figure1);%---Outputsfromthisfunctionarereturnedtothecommandline.functionvarargout=untitled111111_OutputFcn(~,~,handles)%varargoutcellarrayforreturningoutputargs(seeVARARGOUT);%hObjecthandletofigure%eventdatareserved-tobedefinedinafutureversionofMATLAB%handlesstructurewithhandlesanduserdata(seeGUIDATA)%Getdefaultcommandlineoutputfromhandlesstructurevarargout{1}=handles.output;%---Executesonbuttonpressinpushbutton1.functionpushbutton1_Callback(~,~,~)handles=guihandles();globals;globale;globalfn;globalmov;fori=s:emov_gray(i).image=mov(i).cdata;%mov_gray(i).image为第i帧图像end[ih,iw,id]=size(mov_gray(1).image);%取得视频帧的大小%计算1到第n帧的各个像素的均值fori=s:eu=mov_gray(i).image;h=u(:)';%转置t(i,:)=h(:);%median(t)是对列进行取均值的end%close(figure(gcf))%%关闭初始化窗口%试试不用转置直接用u来进行median(t);tmp=median(t);%对t数组各列取均值globalmean;mean=reshape(tmp,ih,iw,id);%将n帧均值图像恢复成h*w*d的图像矩阵,得到背景subplot(2,2,1),imshow(uint8(mean));title('背景图像');%第一幅背景图%取第fn帧作为对象subplot(2,2,2),imshow(uint8(mov_gray(fn).image));title('目标图像');%第二幅完整图像globalok;ok=mean;%ok-背景%tmp(1:3)=0;di=15;th=ones(1,1,3)*di;%预设阀值diff=double(ok)-double(mov_gray(fn).image);%计算第fn帧图像与背景的差值diff1=abs(diff);count2=0;forai=1:ihforbi=1:iwifabs(diff(ai,bi,1:3))>=th(1,1,:)ok(ai,bi,1:3...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

HSV阴影消除及YUV阴影消除对比代码及使用说明

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部