Pink 0.9

pgm2GA.c File Reference

Computes an edge-weighted graph from an image. More...


Detailed Description

Computes an edge-weighted graph from an image.

Usage: pgm2GA im.pgm param [alpha] out.ga

Description:

Computes a GA (an edge-weighted graph) from an image. The values of an edge linking two pixels {x,y} is computed according to the parameter param.

If param = 0, the absolute difference of intensity between x and y is used.

If param = 1, the maximum between the intensities of x and y is used.

If param = 2, the minimum between the intensities of x and y is used.

If param = 3, a Deriche-like gradient is used, the optional parameter alpha specifies the spatial extention of the filter (by default alpha is set to 1]),

If im.pgm is a 2D (resp. 3D) image, then out.ga is a 2D (resp 3D GA), that is a 2D 4-connected edge-weighted graph (resp. a 2D 6-connected edge-weighted graph).

Types supported: GA byte 2D, GA byte 3D, GA float 2D

Category:

Author:
Jean Cousty