Binary Image Library
Functions
C:/Users/Malcolm/Documents/temp/binaryimagelibrary/medialaxistransform.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

Functions

void thin (unsigned char *binary, int width, int height)
 
float * medialaxistransformf (unsigned char *binary, int width, int height)
 
unsigned char * medialaxistransform (unsigned char *binary, int width, int height)
 

Detailed Description

Medial axis transform and thin function.

Used for skeltonisation of images.

Function Documentation

unsigned char* medialaxistransform ( unsigned char *  binary,
int  width,
int  height 
)

Binary raster-based medial axis transform.

Parameters
[in]binary- the binary image
width- image width
height- image height
Returns
The medial axis transform.
float* medialaxistransformf ( unsigned char *  binary,
int  width,
int  height 
)

Medial axis transform, retainign distance to perimater

Parameters
[in]binary- the binary image.
width- image width
height- image height
Returns
Transformed iamge as floats (malloced).
void thin ( unsigned char *  image,
int  xsize,
int  ysize 
)

Thin a binary image using Rosenfeld's parallel thinning algorithm.

Parameters
[in,out]binary- the bianry image
xsize- image width
ysize- image height
Note
Thinning is a different operation to medial axis transform, but similarly skeletonises the binary image.