二维Walsh矩阵变换

  • B7_417765
    了解作者
  • 1.1KB
    文件大小
  • rar
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-26 04:38
    上传日期
强大的Walsh变化,实现了矩阵之间的转换,有源程序,顶一个。
walsh2d.rar
  • walsh2d.m
    1.9KB
内容介绍
%The function implement the 2D Walash Transform which can be used in %signal processing,pattern recognition and Genetic algorithms. The Formula of %2D Walsh Transform is defined as : %% N-1 N-1 q-1 %% ---- ---- -- %% 1 \ \ | | b[i](m)*b[q-1-i](u)+b[i](n)*b[q-1-i](v) %% W(u,v) = --- / / f(m,n) | |(-1) %% N ---- ---- | | %% m=0 n=0 i=0 %% u,v = 0,...,N-1 %% where for instance ,A[i] is the ith indices of A. %The definition : %%% f(m,n) : Two dimentional Image(Sequence) ,m,n = 0,...,N-1; %% Input image can belong to UINT8 or DOUBLE class.Also %% it must be squre! % q %%% N = 2 : where N is the size of Image %%% W(u,v) : Walsh Transform; %% b[k](u): kth bit(from LSB) in the binary representation of u; %% For instance if u = 6 where in binary it becomes 110 then %% b[0](6) = 0,b[1](6) = 1 and b[2](6) = 1, %*** You must download 'walsh1d.m' to use this function***% %** Example : %% W = walsh2d(imread('myiage.jpg')); %% Author : Ahmad poursaberi %% e-mail : a.poursaberi@ece.ut.ac.ir %% Control and Intelligent Processing Center of Excellence %% Faulty of Engineering, Electrical&Computer Department, %% University of Tehran,Iran,August 2004 %% copyright 2004 function W = walsh2d(I) warning off if length(size(size(I)))~=2 I = im2bw(imread(input('Enter Image Name '))) ; end siz = max(size(I)); q = log2(siz); if sum(ismember(char(cellstr(num2str(q))),'.'))~=0 disp(' Warning!... '); disp('The size of Vector must be in the shape of 2^N ..'); return end if isa(I,'double')==1 I = im2uint8(I); end W = I; len = length(I); for i = 1:len W2(i,:) = walsh1d(double(W(i,:))); end W = zeros(len); for j = 1:len W(:,j) = walsh1d(double(W2(:,j)'))'; end
评论
    相关推荐
    • 矩阵
      矩阵
    • 矩阵
      矩阵
    • 矩阵函数
      矩阵函数 各种矩阵操作的功能:(乘法,行列式,转置,次要,辅因子,逆)
    • 矩阵计算器
      矩阵计算器
    • 矩阵
      矩阵
    • 矩阵计算器
      矩阵计算器 方便计算 伴随矩阵矩阵 转置矩阵
    • 矩阵计算器
      矩阵计算器,用于,矩阵的相乘求逆转置,实用性较强%
    • 描述矩阵
      描述矩阵不仅能给你参考与借鉴,还能够让学到许多成功方法与技巧,赶快来下载描述矩阵吧!PS:可下载全部...该文档为描述矩阵,是一份很不错的参考资料,具有较高参考价值,感兴趣的可以下载看看
    • 矩阵
      Ejercicios para aprender a usar矩阵
    • 矩阵计算器
      一个简单的矩阵计算程序,写作业遇到计算简单的矩阵运算时可以用得上.