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 );
This function returns outputImage.
// Function prototype. invert_image( input_image, significant_bit_number = 8, output_image = None )
This function returns outputImage.
// Function prototype. public static IOLink.ImageView InvertImage( IOLink.ImageView inputImage, Int32 significantBitNumber = 8, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Class Name | InvertImage |
---|
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();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) invert_image_algo = imagedev.InvertImage() invert_image_algo.input_image = foam invert_image_algo.significant_bit_number = 8 invert_image_algo.execute() print( "output_image:", str( invert_image_algo.output_image ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); InvertImage invertImageAlgo = new InvertImage { inputImage = foam, significantBitNumber = 8 }; invertImageAlgo.Execute(); Console.WriteLine( "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();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip")) result = imagedev.invert_image( foam, 8 ) print( "output_image:", str( result ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" ); IOLink.ImageView result = Processing.InvertImage( foam, 8 ); Console.WriteLine( "outputImage:" + result.ToString() );