2d/distance.hh File Reference
#include <vector>
#include <mia/2d/image.hh>
Include dependency graph for 2d/distance.hh:

Go to the source code of this file.

Functions

float EXPORT_2D distance_point_line (const C2DFVector &point, const C2DFVector &a, const C2DFVector &b)
 
C2DFImage EXPORT_2D distance_transform (const C2DImage &f)
 

Function Documentation

◆ distance_transform()

C2DFImage EXPORT_2D distance_transform ( const C2DImage f)

This function evaluates the 2D distance to a functions defined over a 2D grid If the input function is given as raw data that is not the result of another call to this distance transform function, then one should call distance_transform_prepare to properly prepare the data for the distance transform.

Parameters
[in]fthe squared values of the function to evaluate the distance to
Returns
distances to the function for each grid point