BlendWithValue
Produces a linear combination between an image and a constant value.
Access to parameter description
The formula applied between the input image I and the constant C is: O(n,m)=[λI(n,m)+(100−λ)C]/100 See also
Access to parameter description
The formula applied between the input image I and the constant C is: O(n,m)=[λI(n,m)+(100−λ)C]/100 See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > blendWithValue( std::shared_ptr< iolink::ImageView > inputImage, int32_t value, double weight, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Binary, Label, Grayscale or Multispectral | nullptr |
![]() |
value |
The constant value. | Int32 | Any value | 4 |
![]() |
weight |
The percentage of the input image intensity. | Float64 | Any value | 60 |
![]() |
outputImage |
The output image. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); BlendWithValue blendWithValueAlgo; blendWithValueAlgo.setInputImage( foam ); blendWithValueAlgo.setValue( 4 ); blendWithValueAlgo.setWeight( 60.0 ); blendWithValueAlgo.execute(); std::cout << "outputImage:" << blendWithValueAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = blendWithValue( foam, 4, 60.0 ); std::cout << "outputImage:" << result->toString();