title: How to partition an image to overlapping blocks
body: <p>I want to partition a PGM image into overlapping blocks and do a DCT transformation to every block. Then I want to take the first column of each DCT matrix and put them all to a new matrix.</p>
  
  <p>I have read the answer to the post: <em><a href="https://stackoverflow.com/questions/5207960/how-to-partition-an-image-to-64-block-in-matlab">How to partition an image to 64 block in matlab</a></em>, but I am not sure it's working properly. Can I use <code>blockproc</code> function to make overlapping block and if I can how am I supposed to use it?</p>
  
  <p>I would prefer an answer with for loops. </p>