No BSD License  

Highlights from
DTMF Encoder/Decoder with GUI using FFT,goertzel,Filter Banks

image thumbnail

DTMF Encoder/Decoder with GUI using FFT,goertzel,Filter Banks

by

 

A phone-like DTMF Encoding/Decoding tool

[num10decode]=sliceanddecode(num10signal),
function [num10decode]=sliceanddecode(num10signal),
%   Sliceanddecode: Slice the 10 DIGIT signal to subsignal and decode them.
%   [num10decode]=sliceanddecode(num10signal)
%   If k~={1,2,3,4,5,6,7,8,9,0,'*','#'} then ,
%   
%       
%       Input :
%       num10signal  : to shma gia 10 Digit to ena meta to allo.
%       
%

%       Output:
%       num10decode : Ena dianusma (string) to opoio periexei toys
%       xarakthres gia ka8e digit.
%   end
%   Copyright 2005 (R)
%   Author : Zouzias Anastasios
%   Email : zouzias@ceid.upatras.gr
%   $Date: 2005/08/31 18:03:00 $
num10decode=[];



if ~exist('filt1') || ~exist('filt2') || ~exist('filt3') || ~exist('filt4') || ~exist('filt5') || ~exist('filt6') || ~exist('filt7') ,
    load filter_bank.mat
end

for i=1:1:10,

    signal=num10signal( ((i-1)*408+1):1:(i*408));

    N=size(signal);
    rmain=2048*2;
    rmarg=1024*2;
    n=1:rmain;

    pad=['1' '2' '3' ; '4' '5' '6' ; '7' '8' '9'; '*' '0' '#'];



    %============================================
    %============================================


    % Loads the bank from disk...

  


    %============================================
    %============================================
    %      Pass the signal from The FILTER BANK.
    %============================================
    %============================================

    yfilt1=conv(filt1.tf.num,signal);
    yfilt2=conv(filt2.tf.num,signal);
    yfilt3=conv(filt3.tf.num,signal);
    yfilt4=conv(filt4.tf.num,signal);
    yfilt5=conv(filt5.tf.num,signal);
    yfilt6=conv(filt6.tf.num,signal);
    yfilt7=conv(filt7.tf.num,signal);






    %================================================================
    %================================================================
    %      Find the energy from every output and find the max
    %================================================================
    %================================================================

    energy=[norm(yfilt1) norm(yfilt2) norm(yfilt3) norm(yfilt4) norm(yfilt5) norm(yfilt6) norm(yfilt7)]';

    position=[find(energy==max(energy(1:4))) find(energy==max(energy(5:7)))-4]';


    digit=pad(position(1,1),position(2,1));

    num10decode(i,1)=digit;
end


num10decode=char(num10decode);

Contact us