This is a .NET version of a program from my book Visual Basic Graphics Programming. It lets you define a grid of quadrilaterals on source and destination images. It then defines frames morphing between the two. For each frame, the code moves the positions of the quadrilaterals' vertices closer to the final image.
Then for each point in the output image, the program determines the output quadrilateral that contains the point, finds the corresponding point in the corresponding quadrilateral in the input image, and uses interpolation to determine the point the result should have. If you match the quadrilaterals nicely between the two images, the results can be pretty interesting.
The program includes a bunch of other features such as allowing you to save the load grids. See the code and my book for more information.
|