main/src/georegression/transform/homography/HomographyPointOps_F64.java
public static Point2D_F64 transform( Homography2D_F64 H, Point2D_F64 orig, Point2D_F64 result ) {

		if( result == null ) {
			result = new Point2D_F64();
		}

		// copy the values so that no errors happen if orig and result are the same instance
		double x = orig.x;
		double y = orig.y;

		double z = H.a31 * x + H.a32 * y + H.a33;

		result.x = (H.a11 * x + H.a12 * y + H.a13)/z;
		result.y = (H.a21 * x + H.a22 * y + H.a23)/z;

		return result;
	}
public static Point2D_F64 transform( Homography2D_F64 H, Point2D_F64 orig, Point2D_F64 result ) {

		if( result == null ) {
			result = new Point2D_F64();
		}

		// copy the values so that no errors happen if orig and result are the same instance
		double x = orig.x;
		double y = orig.y;

		double z = H.a31 * x + H.a32 * y + H.a33;

		result.x = (H.a11 * x + H.a12 * y + H.a13)/z;
		result.y = (H.a21 * x + H.a22 * y + H.a23)/z;

		return result;
	}
public static Point2D_F64 transform ( Homography2D_F64 H , Point2D_F64 orig , Point2D_F64 result ) { if ( result == null ) { result = new Point2D_F64 ( ) ; } // copy the values so that no errors happen if orig and result are the same instance double x = orig . x ; double y = orig . y ; double z = H . a31 * x + H . a32 * y + H . a33 ; result . x = ( H . a11 * x + H . a12 * y + H . a13 ) / z ; result . y = ( H . a21 * x + H . a22 * y + H . a23 ) / z ; return result ; }
Applies a 2D homography transform to the point and stores the results in another
variable. b = H*a, where 'a' is the input/orig point, 'b' is the output/result point, and 'H'
is a homography from a to b.

@param H Homography transform
@param orig   Original point being transformed. Not modified.
@param result Where the results are stored.  Can be the same as orig. If null a new
instance is created. Modified.
@return Transformed point.
Applies a 2D homography transform to the point and stores the results in another variable . b = H * a where a is the input / orig point b is the output / result point and H is a homography from a to b .