Dividing the Image into 8 equal parts and calculate number of pixels under the line

I have lena image in Matlab. First I need to find the centroid C, then divide the image into 8 equal parts and then calculate the number of pixels under each line. 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.
Thanks

Asked:

on 18 Apr 2015

Answered:

on 18 Apr 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!