I don't understand why this is the correct definition of mid_index (center pixel of a projection). Can anyone else help me out?