title: Divide an image into 5x5 blocks in python and compute histogram for each block
body: <p>Using Python, I have to: </p>
  
  <ul>
  <li>Divide a <code>Test_Image</code> and <code>Reference_image</code> into 5x5 blocks,  </li>
  <li>Compute a histogram for each block, and compare it with the same block in the other image.<br>
  For Example: <code>image1(1,1)</code> with <code>image2(1,1)</code>.  </li>
  <li>Compare the similarity between two images (should be transform invariant).   </li>
  </ul>
  
  <p>So far, I have calculated the histogram of the whole image using <code>hist=numpy.histogram(image,bins=256)</code>  </p>
  
  <p>I want to divide an image, and later compute the histogram for all those blocks . I also want to use Bhattacharya's coefficient to measure the similarity.  </p>
  
  <p>Can anyone guide me with how to go through this one? Thanks in advance :)</p>