Feature Transform

From the Binary Image Library homepage

The feature transform is a bit like the distance transform, but instead of storing the distance of each pixel from the nearest background pixel, it stores to co-ordinates of the nearest background pixel.


/**
   feature transform - like distance transform except gets 
      the co-ordinates of the nearest background pixel
 
    Returns: feature transfrom [2][height][width] with rows
       in the first half of the buffer and columns in the second.
 
 */
int *featuretransform(unsigned char *binary, int width, int height)