For each gray level i of the input image, the number of pixels with intensity i is computed.
This number of points per level is given in an histogram array. The histogram size depends on the
intensity range. As an example, for an 8-bit integer image, the histogram H is an array with 256 entries.
H(i) is the number of pixels at level i, for i∈[0,255].
Notice: This algorithm can be used only on integer input images. The
IntensityBinHistogram algorithm must be used to compute a histogram on floating point images.
// Function prototype.publicstaticIntensityHistogramMsrIntensityHistogram(IOLink.ImageView inputImage,IntensityHistogram.RangeMode rangeMode =ImageDev.IntensityHistogram.RangeMode.MIN_MAX,int[] intensityInputRange =null,IntensityHistogramMsr outputMeasurement =null);
Class Syntax
// Command constructor.IntensityHistogram();/// Gets the inputImage parameter./// The input gray scale image. Float images are not supported
std::shared_ptr< iolink::ImageView> inputImage()const;/// Sets the inputImage parameter./// The input gray scale image. Float images are not supportedvoid setInputImage( std::shared_ptr< iolink::ImageView> inputImage );/// Gets the rangeMode parameter./// The way to determine the input intensity range within which the histogram is computed.IntensityHistogram::RangeMode rangeMode()const;/// Sets the rangeMode parameter./// The way to determine the input intensity range within which the histogram is computed.void setRangeMode(constIntensityHistogram::RangeMode& rangeMode );/// Gets the intensityInputRange parameter./// The input intensity range [a,b] within which the histogram is computed. This parameter is ignored if the range mode is set to MIN_MAX.
iolink::Vector2i32 intensityInputRange()const;/// Sets the intensityInputRange parameter./// The input intensity range [a,b] within which the histogram is computed. This parameter is ignored if the range mode is set to MIN_MAX.void setIntensityInputRange(const iolink::Vector2i32& intensityInputRange );/// Gets the outputMeasurement parameter./// The output histogram.IntensityHistogramMsr::Ptr outputMeasurement()const;// Method to launch the command.void execute();
# Property of the inputImage parameter.IntensityHistogram.input_image
# Property of the rangeMode parameter.IntensityHistogram.range_mode
# Property of the intensityInputRange parameter.IntensityHistogram.intensity_input_range
# Property of the outputMeasurement parameter.IntensityHistogram.output_measurement
// Method to launch the command.
execute()
// Command constructor.IntensityHistogram()// Property of the inputImage parameter.IntensityHistogram.inputImage
// Property of the rangeMode parameter.IntensityHistogram.rangeMode
// Property of the intensityInputRange parameter.IntensityHistogram.intensityInputRange
// Property of the outputMeasurement parameter.IntensityHistogram.outputMeasurement
// Method to launch the command.Execute()
Parameters
Parameter Name
Description
Type
Supported Values
Default Value
inputImage
The input gray scale image. Float images are not supported
Image
Binary, Label, Grayscale or Multispectral
nullptr
rangeMode
The way to determine the input intensity range within which the histogram is computed.
MIN_MAX
This histogram is computed between the minimum and the maximum of the image.
OTHER
This histogram is computed between user-defined bounds [a,b].
Enumeration
MIN_MAX
intensityInputRange
The input intensity range [a,b] within which the histogram is computed. This parameter is ignored if the range mode is set to MIN_MAX.