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 outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > logicalNot( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > outputImage = nullptr );
This function returns outputImage.
// Function prototype.
logical_not(input_image: idt.ImageType,
            output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
LogicalNot( IOLink.ImageView inputImage, IOLink.ImageView outputImage = null );

Class Syntax

Parameters

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
Parameter Name Description Type Supported Values Default Value
input
input_image
The input image. image Binary, Label, Grayscale or Multispectral None
output
output_image
The output image, size and type are forced to the same values as the input. image None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral null
output
outputImage
The output image, size and type are forced to the same values as the input. Image null

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() );