Code samples for perspectiveTransform (Automatically generated by the Every Method demo).
// Automated test of perspectiveTransform - Typical Values
// TIEVisionImage.perspectiveTransform - 26 points. Point 200,200 on original is 200,150 on transformed
// Transform points through a 3x3 matrix (e.g. from findHomography)
hmat := IEVisionLib().createMath().findHomography( srcPoints, dstPoints, ievREGULAR );
// Points are stored as a 1 row, 2 channel float image of x,y pairs
ptsIn := IEVisionLib().createImage( 26, 1, ievFLOAT32, 2 );
pIn := ptsIn.getScanline( 0 );
pIn[0] := 200; pIn[1] := 200; // etc
ptsOut := IEVisionLib().createImage();
ptsIn.perspectiveTransform( ptsOut, hmat );
pOut := ptsOut.getScanline( 0 );
ShowMessage( Format( '%d,%d => %.1f,%.1f', [ 200, 200, pOut[0], pOut[1] ])); // 200,150

// Automated test of perspectiveTransform - Alpha Channel - Typical Values
// TIEVisionImage.perspectiveTransform - 26 points. Point 200,200 on original is 200,150 on transformed
// Transform points through a 3x3 matrix (e.g. from findHomography)
hmat := IEVisionLib().createMath().findHomography( srcPoints, dstPoints, ievREGULAR );
// Points are stored as a 1 row, 2 channel float image of x,y pairs
ptsIn := IEVisionLib().createImage( 26, 1, ievFLOAT32, 2 );
pIn := ptsIn.getScanline( 0 );
pIn[0] := 200; pIn[1] := 200; // etc
ptsOut := IEVisionLib().createImage();
ptsIn.perspectiveTransform( ptsOut, hmat );
pOut := ptsOut.getScanline( 0 );
ShowMessage( Format( '%d,%d => %.1f,%.1f', [ 200, 200, pOut[0], pOut[1] ])); // 200,150

// Automated test of perspectiveTransform - 32-Bit RGBA - Typical Values
// TIEVisionImage.perspectiveTransform - 26 points. Point 200,200 on original is 200,150 on transformed
// Transform points through a 3x3 matrix (e.g. from findHomography)
hmat := IEVisionLib().createMath().findHomography( srcPoints, dstPoints, ievREGULAR );
// Points are stored as a 1 row, 2 channel float image of x,y pairs
ptsIn := IEVisionLib().createImage( 26, 1, ievFLOAT32, 2 );
pIn := ptsIn.getScanline( 0 );
pIn[0] := 200; pIn[1] := 200; // etc
ptsOut := IEVisionLib().createImage();
ptsIn.perspectiveTransform( ptsOut, hmat );
pOut := ptsOut.getScanline( 0 );
ShowMessage( Format( '%d,%d => %.1f,%.1f', [ 200, 200, pOut[0], pOut[1] ])); // 200,150

// Automated test of perspectiveTransform - Random Values
// TIEVisionImage.perspectiveTransform - 101 points. Point 200,200 on original is 200,55 on transformed
// Transform points through a 3x3 matrix (e.g. from findHomography)
hmat := IEVisionLib().createMath().findHomography( srcPoints, dstPoints, ievREGULAR );
// Points are stored as a 1 row, 2 channel float image of x,y pairs
ptsIn := IEVisionLib().createImage( 101, 1, ievFLOAT32, 2 );
pIn := ptsIn.getScanline( 0 );
pIn[0] := 200; pIn[1] := 200; // etc
ptsOut := IEVisionLib().createImage();
ptsIn.perspectiveTransform( ptsOut, hmat );
pOut := ptsOut.getScanline( 0 );
ShowMessage( Format( '%d,%d => %.1f,%.1f', [ 200, 200, pOut[0], pOut[1] ])); // 200,55

// Automated test of perspectiveTransform - Alpha Channel - Random Values
// TIEVisionImage.perspectiveTransform - 101 points. Point 200,200 on original is 200,55 on transformed
// Transform points through a 3x3 matrix (e.g. from findHomography)
hmat := IEVisionLib().createMath().findHomography( srcPoints, dstPoints, ievREGULAR );
// Points are stored as a 1 row, 2 channel float image of x,y pairs
ptsIn := IEVisionLib().createImage( 101, 1, ievFLOAT32, 2 );
pIn := ptsIn.getScanline( 0 );
pIn[0] := 200; pIn[1] := 200; // etc
ptsOut := IEVisionLib().createImage();
ptsIn.perspectiveTransform( ptsOut, hmat );
pOut := ptsOut.getScanline( 0 );
ShowMessage( Format( '%d,%d => %.1f,%.1f', [ 200, 200, pOut[0], pOut[1] ])); // 200,55

// Automated test of perspectiveTransform - 32-Bit RGBA - Random Values
// TIEVisionImage.perspectiveTransform - 101 points. Point 200,200 on original is 200,55 on transformed
// Transform points through a 3x3 matrix (e.g. from findHomography)
hmat := IEVisionLib().createMath().findHomography( srcPoints, dstPoints, ievREGULAR );
// Points are stored as a 1 row, 2 channel float image of x,y pairs
ptsIn := IEVisionLib().createImage( 101, 1, ievFLOAT32, 2 );
pIn := ptsIn.getScanline( 0 );
pIn[0] := 200; pIn[1] := 200; // etc
ptsOut := IEVisionLib().createImage();
ptsIn.perspectiveTransform( ptsOut, hmat );
pOut := ptsOut.getScanline( 0 );
ShowMessage( Format( '%d,%d => %.1f,%.1f', [ 200, 200, pOut[0], pOut[1] ])); // 200,55
