How to trace boundary on ImageProcessor

I want to trace the boundary of a ImageProcessor of type BYTE (like to Matlab bwboundaries). I thought Wand autoOutline does it but the returned xpoints and ypoints of wand seem line outside the range. For example, my ImageProcessir is 256X256. The first point in the returned xpoints and ypoints of wans is (256,0). If I subtract 1, what about 0 (which will become -1)?

I am using Wand inside my java, not from UI.