pixel_index function

Get the pixel indices for a given row of a binary image