ImageDev

AdaptiveHistogramEqualization

Performs a local histogram equalization.

Access to parameter description

This algorithm performs a local histogram equalization of image $I$ onto $O$. The definition is the same as for HistogramEqualization, except that the image is divided in squared windows of a user-defined size, and the equalization is performed in each window. The window size is specified as the number of pixels it contains. The maximum size is 64 (that is, an $8\times8$ square window).

See also

Function Syntax

This function returns outputImage.
// Function prototype
std::shared_ptr< iolink::ImageView > adaptiveHistogramEqualization( std::shared_ptr< iolink::ImageView > inputImage, int32_t neighborhoodSize, std::shared_ptr< iolink::ImageView > outputImage = nullptr );
This function returns outputImage.
// Function prototype.
adaptive_histogram_equalization(input_image: idt.ImageType,
                                neighborhood_size: int = 16,
                                output_image: idt.ImageType = None) -> idt.ImageType
This function returns outputImage.
// Function prototype.
public static IOLink.ImageView
AdaptiveHistogramEqualization( IOLink.ImageView inputImage,
                               Int32 neighborhoodSize = 16,
                               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
input
neighborhoodSize
The number of pixels of the square window. A size of 16 amounts to a square of 4-pixels per side. Int32 [4, 64] 16
output
outputImage
The output image. Its dimensions are forced to the same values as the input. Its type is automatically changed. Image nullptr
Parameter Name Description Type Supported Values Default Value
input
input_image
The input image. image Binary, Label, Grayscale or Multispectral None
input
neighborhood_size
The number of pixels of the square window. A size of 16 amounts to a square of 4-pixels per side. int32 [4, 64] 16
output
output_image
The output image. Its dimensions are forced to the same values as the input. Its type is automatically changed. image None
Parameter Name Description Type Supported Values Default Value
input
inputImage
The input image. Image Binary, Label, Grayscale or Multispectral null
input
neighborhoodSize
The number of pixels of the square window. A size of 16 amounts to a square of 4-pixels per side. Int32 [4, 64] 16
output
outputImage
The output image. Its dimensions are forced to the same values as the input. Its type is automatically changed. Image null

Object Examples

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

AdaptiveHistogramEqualization adaptiveHistogramEqualizationAlgo;
adaptiveHistogramEqualizationAlgo.setInputImage( foam );
adaptiveHistogramEqualizationAlgo.setNeighborhoodSize( 16 );
adaptiveHistogramEqualizationAlgo.execute();

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

adaptive_histogram_equalization_algo = imagedev.AdaptiveHistogramEqualization()
adaptive_histogram_equalization_algo.input_image = foam
adaptive_histogram_equalization_algo.neighborhood_size = 16
adaptive_histogram_equalization_algo.execute()

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

AdaptiveHistogramEqualization adaptiveHistogramEqualizationAlgo = new AdaptiveHistogramEqualization
{
    inputImage = foam,
    neighborhoodSize = 16
};
adaptiveHistogramEqualizationAlgo.Execute();

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

Function Examples

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

auto result = adaptiveHistogramEqualization( foam, 16 );

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

result = imagedev.adaptive_histogram_equalization(foam, 16)

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

IOLink.ImageView result = Processing.AdaptiveHistogramEqualization( foam, 16 );

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