Shade2d
Provides a shadowing effect on a grayscale image.
Access to parameter description
For an introduction to image filters: see section Images Filtering.
This filter is actually a combination of the search of maxima and mean values.
The proposed algorithm is from S. Steinberg, and enhances some object edges in the image. It makes the assumption that:
Note: Because the resulting image is forced to a signed type (containing positive and negative values), it must be visualized by adjusting the data range settings.
See also
Access to parameter description
For an introduction to image filters: see section Images Filtering.
This filter is actually a combination of the search of maxima and mean values.
The proposed algorithm is from S. Steinberg, and enhances some object edges in the image. It makes the assumption that:
- The light is coming on the object from the South-West, South, South-East and East sides of the image,
- The gray levels correspond to the height of the objects.
Note: Because the resulting image is forced to a signed type (containing positive and negative values), it must be visualized by adjusting the data range settings.
See also
Function Syntax
This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > shade2d( std::shared_ptr< iolink::ImageView > inputImage, std::shared_ptr< iolink::ImageView > outputImage = NULL );
Class Syntax
Parameters
Parameter Name | Description | Type | Supported Values | Default Value | |
---|---|---|---|---|---|
![]() |
inputImage |
The input image. | Image | Grayscale or Multispectral | nullptr |
![]() |
outputImage |
The output image. Its dimensions are forced to the same values as the input. If the input data type is unsigned, it is switched to its signed counterpart. | Image | nullptr |
Object Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); Shade2d shade2dAlgo; shade2dAlgo.setInputImage( polystyrene ); shade2dAlgo.execute(); std::cout << "outputImage:" << shade2dAlgo.outputImage()->toString();
Function Examples
std::shared_ptr< iolink::ImageView > polystyrene = ioformat::readImage( std::string( IMAGEDEVDATA_IMAGES_FOLDER ) + "polystyrene.tif" ); auto result = shade2d( polystyrene ); std::cout << "outputImage:" << result->toString();