Class ImplInterpolatePixelConvolution_F32

  • All Implemented Interfaces:
    InterpolatePixel<GrayF32>, InterpolatePixelS<GrayF32>

    public class ImplInterpolatePixelConvolution_F32
    extends java.lang.Object
    implements InterpolatePixelS<GrayF32>

    Performs interpolation by convolving a continuous-discrete function across the image. Borders are handled by re-normalizing. It is assumed that the kernel will sum up to one. This is particularly important for the unsafe_get() function which does not re-normalize.

    DO NOT MODIFY. This code was automatically generated by GenerateImplInterpolatePixelConvolution.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      InterpolatePixelS<GrayF32> copy()
      Creates a new instance of this interpolation method
      float get​(float x, float y)
      Returns the interpolated pixel value at the specified location while checking to see if border conditions apply.
      float get_border​(float x, float y)  
      float get_fast​(float x, float y)
      Returns the interpolated pixel value at the specified location while assuming it is inside the image far away from the border.
      ImageBorder<GrayF32> getBorder()
      Returns the class which handles the image border
      int getFastBorderX()
      Border around the image that fast interpolation cannot be called.
      int getFastBorderY()
      Border around the image that fast interpolation cannot be called.
      GrayF32 getImage()
      Returns the image which is being interpolated.
      ImageType<GrayF32> getImageType()
      Type of image it can process
      boolean isInFastBounds​(float x, float y)
      Is the requested pixel inside the image boundary for which fast unsafe interpolation can be performed.
      void setBorder​(ImageBorder<GrayF32> border)
      Set's the class used to "read" pixels outside the image border.
      void setImage​(GrayF32 image)
      Change the image that is being interpolated.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImplInterpolatePixelConvolution_F32

        public ImplInterpolatePixelConvolution_F32​(KernelContinuous1D_F32 kernel,
                                                   float min,
                                                   float max)
    • Method Detail

      • get

        public float get​(float x,
                         float y)
        Description copied from interface: InterpolatePixelS
        Returns the interpolated pixel value at the specified location while checking to see if border conditions apply. If the requested pixel is outside the image border it will attempt to process it using or throw a null pointer exception of a border handler has not been specified.
        Specified by:
        get in interface InterpolatePixelS<GrayF32>
        Parameters:
        x - Point's x-coordinate. x ≥ 0 && x < image.width or all values if border specified
        y - Point's y-coordinate. y ≥ 0 && y < image.height or all values if border specified
        Returns:
        Interpolated intensity value or NaN if it can't be interpolated.
      • get_border

        public float get_border​(float x,
                                float y)
      • get_fast

        public float get_fast​(float x,
                              float y)
        Description copied from interface: InterpolatePixelS
        Returns the interpolated pixel value at the specified location while assuming it is inside the image far away from the border. For any input point InterpolatePixel.isInFastBounds(float, float) should return true.
        Specified by:
        get_fast in interface InterpolatePixelS<GrayF32>
        Parameters:
        x - Point's x-coordinate.
        y - Point's y-coordinate.
        Returns:
        Interpolated intensity value.
      • isInFastBounds

        public boolean isInFastBounds​(float x,
                                      float y)
        Description copied from interface: InterpolatePixel
        Is the requested pixel inside the image boundary for which fast unsafe interpolation can be performed.
        Specified by:
        isInFastBounds in interface InterpolatePixel<GrayF32>
        Parameters:
        x - Point's x-coordinate.
        y - Point's y-coordinate.
        Returns:
        true if get_fast() can be called.
      • getFastBorderX

        public int getFastBorderX()
        Description copied from interface: InterpolatePixel
        Border around the image that fast interpolation cannot be called.
        Specified by:
        getFastBorderX in interface InterpolatePixel<GrayF32>
        Returns:
        Border size in pixels
      • getFastBorderY

        public int getFastBorderY()
        Description copied from interface: InterpolatePixel
        Border around the image that fast interpolation cannot be called.
        Specified by:
        getFastBorderY in interface InterpolatePixel<GrayF32>
        Returns:
        Border size in pixels