Using the Image Warping Demo

1.

The demo exe name is MFCWarp.exe. To start this demo, double click the exe in the LEADTOOLS\BIN directory.

2.

Click the "Load Master" button to load a master image.

3.

Click the "Load Slave" button to load a slave image.

4.

Once the master is loaded, a red polygon appears. Select the polygon by moving the cursor over the polygon and clicking.

 

image\warp1.gif

5.

Move the polygon by selecting the polygon, and dragging.

 

image\warp2.gif

6.

The individual points can be moved by placing the cursor over a point and dragging the point.

 

image\warp3.gif

7.

The polygon can be rotated by SHIFT-CLICKING a point and dragging the mouse.

8.

Move and resize the red polygon over the destination image to specify where the slave will be transferred. If the image is large, click the "View Normal Size" radio button to see the entire image. Once you have the polygon in the approximate location, click the "Zoom In" button to accurately move the polygon points.

9.

Click the "Transfer Slave Into Master" to transfer the image.

10.

If you want to use bilinear interpolation, check the "Bilinear Interpolation" check box and then click the "Transfer Slave Into Master" button. The bilinear interpolation option usually gives a better result.

11.

After the transfer, you can uncheck the "Show Polygon Outline" button so see how the final image looks.

 

image\warp4.gif

Important:

Note that this demo uses the LEAD Annotation capabilities. There is a red polygon that is used to specify the shape and location of the image warp that will be placed in the master image. This polygon is implemented using LEAD’s Annotations feature, which is part of the Document Imaging toolkit and is not part of the regular Raster Imaging toolkit. The annotation capability is in no way a requirement for the CombineBitmapWarp feature to work.

The compiled version of the demo will work with your LEAD libraries. If you recompile the demo, you will need to use the "nag" LTKRN14n.dll (displays a message when loaded) that is included. The "nag" LTKRN14n.dll is for development only, and is not to be redistributed.