title: Dividing the image into equal number of parts in Matlab
body: <p>I have lena image in Matlab. First I need to find the centroid <strong>C</strong>, and then divide the image into equal number of parts. I can calculate the centroid of the image but from that how can I divide the image into equal number of parts as shown below. Please anyone help me.</p>
  
  <p>Thanks</p>
  
  <p><img src="https://i.stack.imgur.com/4f0da.jpg" alt="Image"></p>