Devise an efficient algorithm to compute the distance transform. The algorithm should take a binary image and return at each pixel the city block distance to the nearest nonzero element of theoriginalimage.Thecityblockdistancedbetweenpixels(x1,y1)andpixel(x2,y2)isdefinedas
d=|x1−x2|+|y1−y2|.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here