how can i use dct2 function in blockproc to avoid the following error 'cant convert struct from double'?
Show older comments
> I = rgb2gray(image1.png);
> myfun= @dct2;
> B = blockproc(I,[8 8],myfun);
These are the errors 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??
Accepted Answer
More Answers (0)
Categories
Find more on Neighborhood and Block Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!