Splitting image into small batches

I think unfold should work. This post gives you an example.