PerspectiveTransform (ZXing 3.5.0 API)

com.google.zxing.common

## Class PerspectiveTransform

- java.lang.Object
- - com.google.zxing.common.PerspectiveTransform

-     public final class PerspectiveTransform
      extends Object

  This class implements a perspective transform in two dimensions. Given four source and four destination points, it will compute the transformation implied between them. The code is based directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

  Author:
    Sean Owen

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PerspectiveTransform` | `quadrilateralToQuadrilateral(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float x0p, float y0p, float x1p, float y1p, float x2p, float y2p, float x3p, float y3p)`
    `static PerspectiveTransform` | `quadrilateralToSquare(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)`
    `static PerspectiveTransform` | `squareToQuadrilateral(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3)`
    `void` | `transformPoints(float[] points)`
    `void` | `transformPoints(float[] xValues, float[] yValues)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### quadrilateralToQuadrilateral

          public static PerspectiveTransform quadrilateralToQuadrilateral(float x0,
                                                                          float y0,
                                                                          float x1,
                                                                          float y1,
                                                                          float x2,
                                                                          float y2,
                                                                          float x3,
                                                                          float y3,
                                                                          float x0p,
                                                                          float y0p,
                                                                          float x1p,
                                                                          float y1p,
                                                                          float x2p,
                                                                          float y2p,
                                                                          float x3p,
                                                                          float y3p)

    - #### transformPoints

          public void transformPoints(float[] points)

    - #### transformPoints

          public void transformPoints(float[] xValues,
                                      float[] yValues)

    - #### squareToQuadrilateral

          public static PerspectiveTransform squareToQuadrilateral(float x0,
                                                                   float y0,
                                                                   float x1,
                                                                   float y1,
                                                                   float x2,
                                                                   float y2,
                                                                   float x3,
                                                                   float y3)

    - #### quadrilateralToSquare

          public static PerspectiveTransform quadrilateralToSquare(float x0,
                                                                   float y0,
                                                                   float x1,
                                                                   float y1,
                                                                   float x2,
                                                                   float y2,
                                                                   float x3,
                                                                   float y3)

Copyright © 2007–2022. All rights reserved.