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
Param | Type | Description |
---|---|---|
source | Sampler2D | |
distanceField | Sampler2D | |
emptyValue | number | |
d1 | number | distance between two adjacent pixels in either x or y direction |
d2 | number | distance between two diagonally adjacent pixels |
maxD | number | highest value that distance field can hold |