[OSM-dev] Geometry help

Richard Fairhurst richard at systemeD.net
Wed Oct 17 10:07:56 BST 2007

Hi all,

I'm doing a bit of rectification work on the New Popular Edition  
scans. The aim is to make them suitable for use as a Potlatch  
background without the user having to compensate much for warps/folds  
in the paper.

If I have a quadrilateral with corners

    x1,y1     x2,y2

    x3,y3     x4,y4

(not a perfect square, but x1 and x2<x3 and x4, y1 and y2<y3 and y4, etc.)

then what maths do I need to apply to warp it into a square?

I'm using the Perl Imager module (so much nicer than ImageMagick)

which has an programmable pixel remapping routine that works like this:

Any help greatly appreciated.


More information about the dev mailing list