First time here? Check out the FAQ!
Each rectangle has only 1 centroid, the coordinates which you are already obtaining. The number of rectangles inside the