Class Resize

  • All Implemented Interfaces:
    CleanUpHandler, Destroyable, GlobalInfoSupporter, LoggingLevelHandler, LoggingSupporter, OptionHandler, QuickInfoSupporter, SizeOfHandler, ImageTransformer<OpenCVImageContainer>, FlowContextHandler, Serializable, Comparable

    public class Resize
    extends AbstractOpenCVTransformer
    Resizes the image, either using absolute width/height or factors for x/y.

    -logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel)
        The logging level for outputting errors and debugging output.
        default: WARNING
     
    -type <ABSOLUTE|FACTORS> (property: type)
        The resize type.
        default: FACTORS
     
    -width <int> (property: width)
        The absolute width to use, -1 uses input width.
        default: -1
        minimum: -1
     
    -height <int> (property: height)
        The absolute height to use, -1 uses input height.
        default: -1
        minimum: -1
     
    -factor-x <double> (property: factorX)
        The factor to apply to the width.
        default: 1.0
        minimum: 0.0
     
    -factor-y <double> (property: factorY)
        The factor to apply to the height.
        default: 1.0
        minimum: 0.0
     
    -interpolation <CV_INTER_NN|CV_INTER_LINEAR|CV_INTER_CUBIC|CV_INTER_AREA|CV_INTER_LANCZOS4> (property: interpolation)
        The interpolation type.
        default: CV_INTER_LINEAR
     
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Width

        protected int m_Width
        the absolute width.
      • m_Height

        protected int m_Height
        the absolute height.
      • m_FactorX

        protected double m_FactorX
        the x factor.
      • m_FactorY

        protected double m_FactorY
        the y factor.
      • m_Interpolation

        protected InterpolationType m_Interpolation
        the interpolation type.
    • Constructor Detail

      • Resize

        public Resize()
    • Method Detail

      • setType

        public void setType​(Resize.ResizeType value)
        Sets the resize type.
        Parameters:
        value - the type
      • getType

        public Resize.ResizeType getType()
        Returns the resize type.
        Returns:
        the type
      • typeTipText

        public String typeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setWidth

        public void setWidth​(int value)
        Sets the absolute width.
        Parameters:
        value - the width (-1 to use input width)
      • getWidth

        public int getWidth()
        Returns the absolute width.
        Returns:
        the width (-1 to use input width)
      • widthTipText

        public String widthTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setHeight

        public void setHeight​(int value)
        Sets the absolute height.
        Parameters:
        value - the height (-1 to use input height)
      • getHeight

        public int getHeight()
        Returns the absolute height.
        Returns:
        the height (-1 to use input height)
      • heightTipText

        public String heightTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setFactorX

        public void setFactorX​(double value)
        Sets the X factor.
        Parameters:
        value - the factor
      • getFactorX

        public double getFactorX()
        Returns the X factor.
        Returns:
        the factor
      • factorXTipText

        public String factorXTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setFactorY

        public void setFactorY​(double value)
        Sets the Y factor.
        Parameters:
        value - the factor
      • getFactorY

        public double getFactorY()
        Returns the Y factor.
        Returns:
        the factor
      • factorYTipText

        public String factorYTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui
      • setInterpolation

        public void setInterpolation​(InterpolationType value)
        Sets the interpolation type.
        Parameters:
        value - the type
      • getInterpolation

        public InterpolationType getInterpolation()
        Returns the interpolation type.
        Returns:
        the type
      • interpolationTipText

        public String interpolationTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the gui