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??