Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing > Discrete Cosine Tranform Matrix generation

Discrete Cosine Tranform Matrix generation

Language: Scilab

Processor: Not Relevant

Submitted by Senthilkumar R on Feb 6 2011

Licensed under a Creative Commons Attribution 3.0 Unported License

Discrete Cosine Tranform Matrix generation


 

This function used to generate Discrete Cosine Transform kernel for 2D operations

 
function[DCT] = dct_mtx(n)
[cc,rr] = meshgrid(0:n-1);
//disp(cc)
//disp(rr)
DCT = sqrt(2 / n) * cos(%pi * (2*cc + 1) .* rr / (2 * n));
DCT(1,:) = DCT(1,:) / sqrt(2);
endfunction
 
Rate this code snippet:
0
Rating: 0 | Votes: 0
 
   
 
posted by Senthilkumar R



Comments


No comments yet for this code


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )