The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: blockproc & dct function
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

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] =

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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.