Skip to main content

computeUnsignedDistanceField_Chamfer

computeUnsignedDistanceField_Chamfer(source, distanceField, emptyValue, d1, d2, maxD)

algorithm proposed by Borgefors, Chamfer distance [J. ACM 15 (1968) 600, Comput. Vis. Graph. Image Process. 34 (1986) 344], h

Kind: global function

ParamTypeDescription
sourceSampler2D
distanceFieldSampler2D
emptyValuenumber
d1numberdistance between two adjacent pixels in either x or y direction
d2numberdistance between two diagonally adjacent pixels
maxDnumberhighest value that distance field can hold