The 1D calculation in MORPH_DISTANCE seems off, in that it automatically sets the borders to background, even if not told to. For example: print, Morph_Distance([1,1,1,0,0,0]) returns 0 1 1 0 0 0 when the two reasonable answers would seem to be 1 2 1 0 0 0 or 3 2 1 0 0 0 depending on how the edge is treated. But, the second number should be 2 either way. The documentation says "If the BACKGROUND keyword is set, elements of Result that are on an edge are set to 0," but the keyword is not set here. Thanks for any guidance you can provide. Rich Ketcham
|