MATLAB: Hi, i have pk=1×6 cell,each cell contains 192×192 data, i need to divide each 192×192 data into 3×3,then perfrom “AND”,i.e result=64x64x6

digital image processing

plz check whether my code is correct
fun=@(block_struct) sum(block_struct.data);
for ol=1:length(pk)
result(:,:,ol)=blockproc(pk{ol},[3 3],fun)
end

Best Answer

fun=@(block_struct) sum(block_struct.data(:));
Related Question