Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: blockproc & dct function
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
maryam

Posts: 1
Registered: 1/2/13
blockproc & dct function
Posted: Jan 2, 2013 8:32 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

hello there. I'm a newbie to Matlab & trying to divide an image into an 8x8 pixel blocks using the blockproc function & I wanna get the DCT of each block so this is what I've done:

I = rgb2gray(image_1.png);
myfun= @dct2;
B = blockproc(I,[8 8],myfun);

these are the errs I get:
Error using double
Conversion to double from struct is not possible.
Error in dct (line 28)
a = double(a);
Error in dct2 (line 68)
b = dct(a, mpad);
Error in blockprocFunDispatcher (line 14)
output_block = fun(block_struct);
Error in blockprocInMemory (line 81)
[ul_output fun_nargout] =
blockprocFunDispatcher(fun,block_struct,...

Error in blockproc (line 237)
result_image = blockprocInMemory(source,fun,options);

can someone explain why these errors??
I've read many examples & looked into the documentation of the blockproc but I can't figure out what's wrong with using dct2 as a function handle. even if I can't use this function what other function handle can I use in away that won't alter my image, I only want to break it , calculate the DCT I don't wanna have any effect on it, any help??



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.