Class Histogram

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, ShallowCopySupporter<AbstractImageFeatureGenerator>, SizeOfHandler, Serializable, Comparable

    public class Histogram
    extends AbstractBufferedImageFeatureGenerator
    Turns an image into a histogram.
    In case of an 8-bit histogram, the image must already be converted to a gray image.
    The number of bins per channel can be chosen as well (1-256).

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -converter <adams.data.featureconverter.AbstractFeatureConverter> (property: converter)
        The feature converter to use to produce the output data.
        default: adams.data.featureconverter.SpreadSheet -data-row-type adams.data.spreadsheet.DenseDataRow -spreadsheet-type adams.data.spreadsheet.DefaultSpreadSheet
     
    -prefix <java.lang.String> (property: prefix)
        The (optional) prefix to use for the feature names.
        default: 
     
    -field <adams.data.report.Field> [-field ...] (property: fields)
        The fields to add to the output.
        default: 
     
    -notes <adams.core.base.BaseString> [-notes ...] (property: notes)
        The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION'
        .
        default: 
     
    -histo-type <GRAY|RGB|YUV|YIQ|HSV> (property: histogramType)
        The type of histogram to generate.
        default: RGB
     
    -num-bins <int> (property: numBins)
        The number of bins per channel (1-256).
        default: 256
        minimum: 1
        maximum: 256
     
    -group-channels <boolean> (property: groupChannels)
        If enabled, grouping is by channel rather than by bin.
        default: false
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_NumBins

        protected int m_NumBins
        the number of bins per channel.
      • m_GroupChannels

        protected boolean m_GroupChannels
        whether to group the channels.
    • Constructor Detail

      • Histogram

        public Histogram()
    • Method Detail

      • setHistogramType

        public void setHistogramType​(Histogram.HistogramType value)
        Sets the type of histogram to generate.
        Parameters:
        value - the type
      • getHistogramType

        public Histogram.HistogramType getHistogramType()
        Returns the type of histogram to generate.
        Returns:
        the type
      • histogramTypeTipText

        public String histogramTypeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setNumBins

        public void setNumBins​(int value)
        Sets the number of bins to use per channel.
        Parameters:
        value - the number of bins
      • getNumBins

        public int getNumBins()
        Returns the number of bins to use per channel.
        Returns:
        the number of bins
      • numBinsTipText

        public String numBinsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setGroupChannels

        public void setGroupChannels​(boolean value)
        Sets the whether to group by channels.
        Parameters:
        value - true if to group by channels
      • getGroupChannels

        public boolean getGroupChannels()
        Returns whether to group by channels.
        Returns:
        true if to group by channels
      • groupChannelsTipText

        public String groupChannelsTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getChannelSuffixes

        protected String[] getChannelSuffixes()
        Returns the channel suffixes to use.
        Returns:
        the suffixes