i executed the code for blockproc given in mathworks.com it gets executed but when i used the same code for my own image that is stored in bin folder of MATLAB i get an error. why is that so.
myfun = @(block_struct) ... uint8(mean2(block_struct.data)*... ones(size(block_struct.data)));I2 = blockproc('FP.png',[32 32],myfun);figure;imshow('FP.png');figure;imshow(I2,[]);??? Error using ==> blockproc>parse_inputs at 841Invalid input image. The input image to BLOCKPROC should be either a numeric matrix, astring filename, or an ImageAdapter object. See the documentation for BLOCKPROC for alist of readable file formats and their extensions. See the documentation forImageAdapter for information on making ImageAdapter objects.
Error in ==> blockproc at 215 input_args = parse_inputs(input_args,Input,block_size,fun,varargin{:});
Best Answer