Class ImageWarp


  • public final class ImageWarp
    extends java.lang.Object
    Image warping algorithm.

    Deforms an image geometrically according to a given transformation formula.

    Since:
    11858
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ImageWarp()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static int getColor​(int x, int y, java.awt.image.BufferedImage img, java.lang.Object sharedArray)  
      private static java.lang.Object getSharedArray​(java.awt.image.BufferedImage srcImg)  
      static java.awt.image.BufferedImage warp​(java.awt.image.BufferedImage srcImg, java.awt.Dimension targetDim, ImageWarp.PointTransform invTransform, ImageWarp.Interpolation interpolation)
      Warp an image.
      • Methods inherited from class java.lang.Object

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

      • warp

        public static java.awt.image.BufferedImage warp​(java.awt.image.BufferedImage srcImg,
                                                        java.awt.Dimension targetDim,
                                                        ImageWarp.PointTransform invTransform,
                                                        ImageWarp.Interpolation interpolation)
        Warp an image.
        Parameters:
        srcImg - the original image
        targetDim - dimension of the target image
        invTransform - inverse transformation (translates pixel coordinates of the target image to pixel coordinates of the original image)
        interpolation - the interpolation method
        Returns:
        the warped image
      • getSharedArray

        private static java.lang.Object getSharedArray​(java.awt.image.BufferedImage srcImg)
      • getColor

        private static int getColor​(int x,
                                    int y,
                                    java.awt.image.BufferedImage img,
                                    java.lang.Object sharedArray)