# BSE.zip

• zhjhappy
了解作者
• matlab
开发工具
• 3KB
文件大小
• zip
文件格式
• 0
收藏次数
• 1 积分
下载积分
• 0
下载次数
• 2021-03-28 22:38
上传日期

BSE.zip
• BSE
• DBSE.m
4.4KB
• shrinkage.m
346B
• remmean.m
460B
• vecsymm.m
399B
• mfileforrun1.m
1.1KB
• vecsymmx.m
403B

function [We]=DBSE(X,R,taoind) % % Using Joint Generalized Eigenvectors of a Set of Covariance Matrix Pencils for Deflationary Blind Source Extraction % with fixed step size % X .......... observation signals % R .......... number of source signals % taoind .......... a vector of time lags�� e.g., [1 2 3 4 5 6 7 8 9 10] % We............... estimated extraction matrix [J,Lsource]=size(X); for i = 1:J X(i,:) = X(i,:) - mean(X(i,:)); end Rx0 = (1/Lsource)*X(:,1:Lsource)*X(:,1:Lsource)'; Rx0 = (1/2)*(Rx0+Rx0'); [U,D] = eig(Rx0); [puiss,sd] = sort(abs(diag(D))) ; rangeW = J-R+1:J ; % indices to the R most significant directions scales = sqrt(puiss(rangeW)) ; % scales if R < J scales = sqrt( puiss(rangeW) - mean(puiss(1:J-R)) ); end WMatrix = diag(1./scales) * U(1:J,sd(rangeW))' ; % whitener XW = WMatrix*X; %% N=length(taoind); MatrixNum = N; Ht = []; for i = 1:N sti = taoind(i)+1; slen = Lsource - sti + 1; Rx = (1/slen)*XW(:,sti:Lsource)*XW(:,1:Lsource-sti+1)'; Rx = (1/2)*(Rx + Rx'); Ht = [Ht Rx]; end %% Hvec = []; cornum = 1; for i = 1:N-1 for j = i+1:N mrange = 1:R; mrange= mrange + (i-1)*R; H1 = Ht(:,mrange); mrange = 1:R; mrange= mrange + (j-1)*R; H2 = Ht(:,mrange); for s = 1:R-1 for t = s+1:R H12 = H1(s,:).'*H2(t,:) - H1(t,:).'*H2(s,:); H21 = H2(t,:).'*H1(s,:) - H2(s,:).'*H1(t,:); Hvec = [Hvec vecsymm(H12+H21)]; end end end end %% [a,NumH] = size(Hvec); C = Hvec*Hvec'; %--------------------------------------- iteNum = 1000; tao = 0.005; %the step size should be chosen according to the variance of observation signals threshold = 0.0005; epsilon = 1.0e-25; %the threshold should be chosen according to the variance of observation signals Ae=[]; %First extraction vector x = ones(R,1); x = x/sqrt(x'*x); X = x*x'; error=1; for ite = 1:iteNum vecX = vecsymmx(X); vecU = vecX; g = 2*C*vecX; vecX = vecX - tao*g; X = unvecsymmx(vecX,R); Y = X; Y = Y/sqrt(trace(Y*Y')); [X,u,S] = shrinkage(Y,threshold); if S(2,2) == 0 [X,u] = shrinkage_dominant(Y); %error=1-abs(x'*u)/(sqrt(x'*x)*sqrt(u'*u)); error=1-abs(vecX'*vecU)/(sqrt(vecX'*vecX)*sqrt(vecU'*vecU)); end x = u; if(error<=epsilon) break; end end Ae=[Ae x]; %%Extraction vectors 2...R-1 for num=1:R-2 [Vx,Dx] = eig(Ae*Ae'); [Yx,Ix] = sort(abs(diag(Dx))); Vx = Vx(:,Ix); a = ones(R-num,1); x = Vx(:,1:R-num)*a; x = x/sqrt(x'*x); X = x*x'; vecx1 = vecsymm(Ae*Ae'); C = C + vecx1*vecx1'; error=1; for ite = 1:iteNum vecX = vecsymmx(X); vecU = vecX; g = 2*C*vecX; vecX = vecX - tao*g; X = unvecsymmx(vecX,R); Y = X; Y = Y/sqrt(trace(Y*Y')); [X,u,S] = shrinkage(Y,threshold); if S(2,2) == 0 X = shrinkage_dominant(Y); %error=1-abs(x'*u)/(sqrt(x'*x)*sqrt(u'*u)); error=1-abs(vecX'*vecU)/(sqrt(vecX'*vecX)*sqrt(vecU'*vecU)); end x = u; if(error<=epsilon) break; end end Ae = [Ae x]; end %%The last extraction vector [Vx,Dx] = eig(Ae*Ae'); [Yx,Ix] = sort(abs(diag(Dx))); Vx = Vx(:,Ix); x = Vx(:,1:1); x = x/sqrt(x'*x); X = x*x'; vecx1 = vecsymm(Ae*Ae'); C = C + vecx1*vecx1'; error=1; for ite = 1:iteNum vecX = vecsymmx(X); vecU = vecX; g = 2*C*vecX; vecX = vecX - tao*g; X = unvecsymmx(vecX,R); Y = X; %Y = Y/sqrt(trace(Y*Y')); %[X,u,S] = shrinkage(Y,threshold); [X,u] = shrinkage_dominant(Y); %error=1-abs(x'*u)/(sqrt(x'*x)*sqrt(u'*u)); error=1-abs(vecX'*vecU)/(sqrt(vecX'*vecX)*sqrt(vecU'*vecU)); x = u; if(error<=epsilon) break; end end Ae = [ Ae x ]; We = Ae'*WMatrix; return

相关推荐
• 视频会议系统.rar
一套商用的视频会议程序(cool)。
• 视频捕获-mpeg4压缩-网络传送源码(VC 6.0).rar
视频捕获-mpeg4压缩-网络传送源码(VC 6.0).rar
• VOIP_SRC_ALL.rar
搞VOIP的一些原代码，包括MGCP,SIP,RTP/TRCP,SRTP(加密RTP)...等源码，参考价值无限！！这可是我所有的收藏阿，我都献给大家了:=)
• mpeg.zip
MPEG-2和MP3编解码
• live.2008.01.04.tar.rar
网络直播源代码，支持RTSP、RTP,支持的格式包括MPEG-1/2/4，MP3，H264等，功能强大，流媒体开发必须。
• handvu-beta3.tar.gz
结合摄像头使用，用于手部位置跟踪，精准度非常高，另可以识别六种手势。其手位跟踪模块可作为手势识别软件的一个组成部分，内含非常详细的说明文档。编译该代码，需要 OpenCV 0.97 或更高版本的支持。在Windows下的编译顺序为cubicles工程、handvu工程，之后根据视频数据来源要求编译其他代码。建议使用 Visual Studio 2003 ，如果需要编译 DirectX 相关模块，则请安装 DirectX SDK 9.0 或更高版本。
• encore50src.zip
mpeg4/divx编码程序，多谢qing_lee
• 语音识别.rar
老师布置的一个project，里面有题目和源程序，能够识别十个数字。
• rtsp-1.0.1.tar.gz
RTSP的实现代码，并附有RTSP、RTP、RTCP等协议的文档！
• mpge4.rar
一组关于流媒体、Mpeg4的技术文档，可供做流媒体的朋友参考。