Processing math: 100%
ImageDev

BlendWithImage

Produces a linear combination between two images.

Access to parameter description

The formula applied between both input images I1 and I2 is: O(n,m)=[λI1(n,m)+(100λ)I2(n,m)]/100 See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > blendWithImage( std::shared_ptr< iolink::ImageView > inputImage1, std::shared_ptr< iolink::ImageView > inputImage2, double weight, std::shared_ptr< iolink::ImageView > outputImage = NULL );

Class Syntax

Parameters

Parameter Name Description Type Supported Values Default Value
input
inputImage1
The first input image. Image Binary, Label, Grayscale or Multispectral nullptr
input
inputImage2
The second input image (must have the same dimensions as the first input). Image Binary, Label, Grayscale or Multispectral nullptr
input
weight
The percentage of the first image intensity. Float64 Any value 60
output
outputImage
The output image. Image nullptr

Object Examples

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

BlendWithImage blendWithImageAlgo;
blendWithImageAlgo.setInputImage1( foam );
blendWithImageAlgo.setInputImage2( foam );
blendWithImageAlgo.setWeight( 60.0 );
blendWithImageAlgo.execute();

std::cout << "outputImage:" << blendWithImageAlgo.outputImage()->toString();

Function Examples

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

auto result = blendWithImage( foam, foam, 60.0 );

std::cout << "outputImage:" << result->toString();