fixed a bug that causes chamfer distance map to sometimes forget the lower-left pixel...
fix potential bugs in computation of geodesic distances
update several javadoc comments