Using the example from ImageData_x_y_z_Coordinates.nb
{yRange, xRange} = imData // Dimensions
Table[{x, y, imData[[y, x]]}, {x, xRange}, {y, yRange}] // Flatten[#, 1] &
evaluates to a list of {x, y, z} where z is the pixel value corresponding to coordinates x, y and 1, 1 is the top left of the image and 27, 51 is the bottom right of the image.