Square
Calculates the square value of each pixel in a floating point image.
Access to parameter description
This algorithm applies a pointwise operator that calculates the square value of each pixel: $$ O(i,j)=I(i,j)^2 $$ It works only with a floating point input image, and generates another floating point image.
See also
Access to parameter description
This algorithm applies a pointwise operator that calculates the square value of each pixel: $$ O(i,j)=I(i,j)^2 $$ It works only with a floating point input image, and generates another floating point image.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > square( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > outputImage = nullptr );
This function returns outputImage.
// Function prototype. square(input_image: idt.ImageType, output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype. public static IOLink.ImageView Square( IOLink.ImageView inputImage, IOLink.ImageView outputImage = null );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input floating point image. | Image | Grayscale or Multispectral | nullptr | |
outputImage |
The output floating point image. Its dimensions are forced to the same values as the input. | Image | nullptr |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
input_image |
The input floating point image. | image | Grayscale or Multispectral | None | |
output_image |
The output floating point image. Its dimensions are forced to the same values as the input. | image | None |
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
inputImage |
The input floating point image. | Image | Grayscale or Multispectral | null | |
outputImage |
The output floating point image. Its dimensions are forced to the same values as the input. | Image | null |
Object Examples
auto polystyrene_float = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_float.vip" ); Square squareAlgo; squareAlgo.setInputImage( polystyrene_float ); squareAlgo.execute(); std::cout << "outputImage:" << squareAlgo.outputImage()->toString();
polystyrene_float = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_float.vip")) square_algo = imagedev.Square() square_algo.input_image = polystyrene_float square_algo.execute() print("output_image:", str(square_algo.output_image))
ImageView polystyrene_float = Data.ReadVipImage( @"Data/images/polystyrene_float.vip" ); Square squareAlgo = new Square { inputImage = polystyrene_float }; squareAlgo.Execute(); Console.WriteLine( "outputImage:" + squareAlgo.outputImage.ToString() );
Function Examples
auto polystyrene_float = readVipImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene_float.vip" ); auto result = square( polystyrene_float ); std::cout << "outputImage:" << result->toString();
polystyrene_float = imagedev.read_vip_image(imagedev_data.get_image_path("polystyrene_float.vip")) result = imagedev.square(polystyrene_float) print("output_image:", str(result))
ImageView polystyrene_float = Data.ReadVipImage( @"Data/images/polystyrene_float.vip" ); IOLink.ImageView result = Processing.Square( polystyrene_float ); Console.WriteLine( "outputImage:" + result.ToString() );