MATLAB: Dividing RGB image into overlaping blocks

overlappingStatistics and Machine Learning Toolbox

I have a RGB image,please can anyone tell how to divide the image into OVERLAPPING BLOCKS OF SIZE 64 64.then i want to perform some operation on each block
Kindly assist

Best Answer

Change your
@(block_struct)kmeans(block_struct.data,4)
to
@(block_struct)kmeans(double(block_struct.data),4)