Rank: 3003 based on 39 downloads (last 30 days) and 4 files submitted
photo

sri hari bhupala haribhakta

E-mail
Company/University
IITMadras

Personal Profile:

 

Watch this Author's files

 

Files Posted by sri hari bhupala haribhakta View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
20 May 2008 convlution matrix in four lines This simple function generates the convolution matrix. Author: sri hari bhupala haribhakta dsp, convolution matrix, four lines, signal processing 6 1
  • 3.0
3.0 | 1 rating
27 Nov 2006 decimation matrix downsamples the given signal by an integer factor defined by the user Author: sri hari bhupala haribhakta dsp, decimation, down samples, signal, signal processing 15 1
  • 5.0
5.0 | 1 rating
27 Nov 2006 convolution explained in detail myconv Author: sri hari bhupala haribhakta dsp, myconv, convolution, explained, finite sequences, signal processing 7 0
04 Apr 2006 Screenshot elementary signals this is a zip file consisting of test functons used in demostrating the plotting of signals. Author: sri hari bhupala haribhakta dsp, test signals, elementary signals, signal processing 11 1
  • 4.5
4.5 | 2 ratings
Comments and Ratings by sri hari bhupala haribhakta
Updated File Comments Rating
24 Nov 2008 fdlibmex --- fast and simple face detection An efficient and easy-to-use mex library for detecting frontal faces in images Author: Wolf Kienzle

Dear Wolf,

is there any way to detect eyes, nose and lips using this code?

regards,
bhupala

Comments and Ratings on sri hari bhupala haribhakta's Files View all
Updated File Comment by Comments Rating
30 May 2008 convlution matrix in four lines This simple function generates the convolution matrix. Author: sri hari bhupala haribhakta

Without looking more deeply at this code, it produces a banded matrix. As such, it is best stored/returned in sparse form, especially important when the matrix may potentially be large. Since the sparse form of the matrix can be generated using a single call to sparse, I'd strongly recommend that alternative. The eventual matrix multiplications would of course be much more efficient too. The sparse code might look like this (please add the necessary additional code to make it friendly)

function M = convmtx(x,nh)
n = length(x);
M = sparse(bsxfun(@plus,(1:n)',0:(nh-1)), ...
repmat(1:nh,n,1),repmat(x,1,nh),n+nh-1,nh);

Note that it could have been done easily without bsxfun, for users of older Matlab releases. See how it does for efficiency on a large matrix.

x = (1:5)';
timeit(@() conv_mtx(x,500))
ans =
0.012447

timeit(@() convmtx(x,500))
ans =
0.0029383

Thus for large convolutions, generating the full matrix is too much work. Plus, simply storing it will be impossible for larger convolutions unless you use a sparse form.

Next, look at the memory storage required.

M0 = conv_mtx(x,2500);
M1 = convmtx(x,2500);
whos M*
Name Size Bytes Class Attributes
M0 2504x2500 50080000 double
M1 2504x2500 160004 double sparse

Had nh been much larger, the conv_mtx code would have overrun my available memory.

The final point to make is the time required for the final matrix*vector multiply when you might use the result.

timeit(@() M0*ones(2500,1))
ans =
0.13361

timeit(@() M1*ones(2500,1))
ans =
0.00088314

These are the reasons why we use sparse storage in Matlab for such banded matrices.

26 Mar 2008 decimation matrix downsamples the given signal by an integer factor defined by the user Author: sri hari bhupala haribhakta

good

16 Nov 2007 elementary signals this is a zip file consisting of test functons used in demostrating the plotting of signals. Author: sri hari bhupala haribhakta

16 Nov 2006 elementary signals this is a zip file consisting of test functons used in demostrating the plotting of signals. Author: sri hari bhupala haribhakta

Great work... Keep it up.

Contact us