ImageDev

TimeMap

Computes the shortest travel time in the objects of a binary image considering the weights given by an intensity image.

Access to parameter description

The travel time for a given path is the sum of the intensities of the intensity image along this path. This algorithm considers diagonal directions using the Chamfer metric.

Reference:
P. Soille, Morphological Image Analysis. Principles and Applications, Second Edition, Springer-Verlag, Berlin, pp.231-232, 2003.

See also

Function Syntax

This function returns the outputIntensityImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
timeMap( std::shared_ptr< iolink::ImageView > inputBinaryImage,
         std::shared_ptr< iolink::ImageView > inputIntensityImage,
         std::shared_ptr< iolink::ImageView > outputIntensityImage = NULL );
This function returns the outputIntensityImage output parameter.
// Function prototype.
time_map( input_binary_image, input_intensity_image, output_intensity_image = None )
This function returns the outputIntensityImage output parameter.
// Function prototype.
public static IOLink.ImageView
TimeMap( IOLink.ImageView inputBinaryImage,
         IOLink.ImageView inputIntensityImage,
         IOLink.ImageView outputIntensityImage = null );

Class Syntax

Parameters

Class Name TimeMap

Parameter Name Description Type Supported Values Default Value
input
inputBinaryImage
The binary input image. Image Binary nullptr
input
inputIntensityImage
The weight input image. It must have same dimensions as the input image. Image Binary, Label, Grayscale or Multispectral nullptr
output
outputIntensityImage
The output image. Its dimensions are forced to the same values as the input. Its data type is 32-bit floating point. Image nullptr

Object Examples

auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

TimeMap timeMapAlgo;
timeMapAlgo.setInputBinaryImage( foam_sep );
timeMapAlgo.setInputIntensityImage( foam );
timeMapAlgo.execute();

std::cout << "outputIntensityImage:" << timeMapAlgo.outputIntensityImage()->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

time_map_algo = imagedev.TimeMap()
time_map_algo.input_binary_image = foam_sep
time_map_algo.input_intensity_image = foam
time_map_algo.execute()

print( "output_intensity_image:", str( time_map_algo.output_intensity_image ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

TimeMap timeMapAlgo = new TimeMap
{
    inputBinaryImage = foam_sep,
    inputIntensityImage = foam
};
timeMapAlgo.Execute();

Console.WriteLine( "outputIntensityImage:" + timeMapAlgo.outputIntensityImage.ToString() );

Function Examples

auto foam_sep = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam_sep.vip" );
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" );

auto result = timeMap( foam_sep, foam );

std::cout << "outputIntensityImage:" << result->toString();
foam_sep = imagedev.read_vip_image(imagedev_data.get_image_path("foam_sep.vip"))
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

result = imagedev.time_map( foam_sep, foam )

print( "output_intensity_image:", str( result ) )
ImageView foam_sep = Data.ReadVipImage( @"Data/images/foam_sep.vip" );
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

IOLink.ImageView result = Processing.TimeMap( foam_sep, foam );

Console.WriteLine( "outputIntensityImage:" + result.ToString() );