InvertImage
Calculates the reverse intensities of an image on a given number of significant bits.
Access to parameter description
InvertImage calculates the reverse of an image. The algorithm works in two steps:
See also
Access to parameter description
InvertImage calculates the reverse of an image. The algorithm works in two steps:
- All bits of the input image are inverted.
- The significant bits are masked, others are turned to 0. By default, the 8 least significant bits are masked.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > invertImage( std::shared_ptr< iolink::ImageView > inputImage, int32_t significantBitNumber, 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 |
![]() |
significantBitNumber |
The number of significant bits. | Int32 | [1, 32] | 8 |
![]() |
outputImage |
The output image, size, and type are forced to the same values as the input. | Image | nullptr |
Object Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); InvertImage invertImageAlgo; invertImageAlgo.setInputImage( foam ); invertImageAlgo.setSignificantBitNumber( 8 ); invertImageAlgo.execute(); std::cout << "outputImage:" << invertImageAlgo.outputImage()->toString();
Function Examples
auto foam = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "foam.vip" ); auto result = invertImage( foam, 8 ); std::cout << "outputImage:" << result->toString();