Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

4-point transform images

I need to transform bitmap images with their 4 corner points moved from one location to another.

Any code that can run on Windows, C#/VB.NET preferably, even help how to use scriptable programs like Paint.NET or Photoshop would be accepted. The Java Advanced Imaging API sounds hopeful.

I need it for a screenshot manipulation system, which allows you to get such effects:

alt text
(source: wholetomato.com)

like image 847
Robin Rodricks Avatar asked Mar 18 '09 22:03

Robin Rodricks


2 Answers

Check out the Perspective warping examples from ImageMagick. It is available for most mainstream platforms.

like image 197
unwind Avatar answered Oct 02 '22 16:10

unwind


The keyword here is homography. Manolis Lourakis has written a GPL'ed homography implementation in C that is available here; however, this will not be able to be ported very easily because it relies on some external libraries such as LAPACK.

like image 21
Adam Rosenfield Avatar answered Oct 02 '22 15:10

Adam Rosenfield