ImageDev

LogicalNot

Computes the bitwise logical negation of an image.

Access to parameter description

LogicalNot replaces each bit of each image point by its complement as described by the truth table and the following figure. $$ \begin{array}{|c|c|} \hline I & I^{c}=\bar{I}\\ \hline 1 & 0\\ 0 & 1\\ \hline \end{array} $$
<b> Figure 1.</b> The logical NOT operation
Figure 1. The logical NOT operation
See also

Function Syntax

This function returns the outputImage output parameter.
// Function prototype.
std::shared_ptr< iolink::ImageView >
logicalNot( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > outputImage = NULL );
This function returns the outputImage output parameter.
// Function prototype.
logical_not( input_image, output_image = None )
This function returns the outputImage output parameter.
// Function prototype.
public static IOLink.ImageView
LogicalNot( IOLink.ImageView inputImage, IOLink.ImageView outputImage = null );

Class Syntax

Parameters

Class Name LogicalNot

Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral nullptr
output
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" );

LogicalNot logicalNotAlgo;
logicalNotAlgo.setInputImage( foam );
logicalNotAlgo.execute();

std::cout << "outputImage:" << logicalNotAlgo.outputImage()->toString();
foam = imagedev.read_vip_image(imagedev_data.get_image_path("foam.vip"))

logical_not_algo = imagedev.LogicalNot()
logical_not_algo.input_image = foam
logical_not_algo.execute()

print( "output_image:", str( logical_not_algo.output_image ) )
ImageView foam = Data.ReadVipImage( @"Data/images/foam.vip" );

LogicalNot logicalNotAlgo = new LogicalNot
{
    inputImage = foam
};
logicalNotAlgo.Execute();

Console.WriteLine( "outputImage:" + logicalNotAlgo.outputImage.ToString() );

Function Examples

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

auto result = logicalNot( foam );

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

result = imagedev.logical_not( foam )

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

IOLink.ImageView result = Processing.LogicalNot( foam );

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