<font face="arial" size="2">Hi Brent,<br><br>That's a really good suggestion, especially as the perspective angle gets more extreme.&nbsp;&nbsp; <br><br>I dont think I can assume low altitude, so I think I will still need to attempt to correct for curvature of the earth, but I'm wonder if I can get away with doing an initial perspective transformation (ie warp it to a 'top down' perspective), then follow up with a second order polynomial gdalwarp for curvature?&nbsp; <br><br>Cheers!<br><br>-----Original Message-----<br>From: "Brent Fraser" &lt;bfraser@geoanalytic.com&gt;<br>Sent: Thursday, December 16, 2010 11:47am<br>To: jkenneally@cartenav.com<br>Cc: "Frank Warmerdam" &lt;warmerdam@pobox.com&gt;, fwtools@lists.maptools.org<br>Subject: Re: [FWTools] gdalwarp issue?<br><br>

  
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  
    Jeff,<br>
    <br>
    &nbsp; If your aerial photography is at a low altitude, earth curvature
    won't play much of a part.&nbsp; Then a better transformation might be a
    projective transformation
    (<a class="moz-txt-link-freetext" href="http://www.leptonica.com/affine.html#RELATED-TRANSFORMS">http://www.leptonica.com/affine.html#RELATED-TRANSFORMS</a>).&nbsp;
    Unfortunately GDAL doesn't support the projective transformation...<br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 12/16/2010 8:03 AM, <a class="moz-txt-link-abbreviated" href="mailto:jkenneally@cartenav.com">jkenneally@cartenav.com</a> wrote:
    <blockquote cite="mid:1292511804.800714399@192.168.2.227" type="cite"><font face="arial" size="2">Thanks a lot, Frank...that
        definitely seemed to help.&nbsp;&nbsp; I've never
        really encountered 'thin plate splines' before, and I'm going to
        have
        to do a bit of reading regarding how they work.&nbsp; However, in
        hind-sight
        I should have realized that I could only do an affine transform
        with
        four control points.&nbsp; <br>
        <br>
        I do have just a few more questions about this if you don't mind
        though...<br>
        <br>
        Regarding the thin plate spline transformation, I do get the
        general
        transformed shape I was expecting, but the sides are a little
        more
        'curved' than I was expecting, and I'm not sure how accurate
        they are.&nbsp;
        Is this to be expected?&nbsp; I am attaching another tiny image to
        demonstrate the result of my earlier warp with the '-tps'.<br>
        <br>
        Lastly, based on further reading I get the impression that a
        second
        order polynomial warp will at least incorporate a better model
        of
        earths curvature into the transformation, and that a third order
        would
        also help account for the 'perspective' of the camera when the
        source
        imagery is not taken from a 'straight down' vantage point.&nbsp;&nbsp; If
        this is
        correct, is it enough to literally just specify a few more gcp's
        (6
        total) for a second order, or 10 for the 3rd order?&nbsp;&nbsp; I assume
        it would
        be best to distribute these gcp's fairly evenly over the source
        image?<br>
        <br>
        Thanks again for your help!<br>
        Jeff<br>
        <br>
        -----Original Message-----<br>
        From: "Frank Warmerdam" <a class="moz-txt-link-rfc2396E" href="mailto:warmerdam@pobox.com">&lt;warmerdam@pobox.com&gt;</a><br>
        Sent: Wednesday, December 15, 2010 6:55pm<br>
        To: <a class="moz-txt-link-abbreviated" href="mailto:jkenneally@cartenav.com">jkenneally@cartenav.com</a><br>
        Cc: <a class="moz-txt-link-abbreviated" href="mailto:fwtools@lists.maptools.org">fwtools@lists.maptools.org</a><br>
        Subject: Re: [FWTools] gdalwarp issue?<br>
        <br>
        On 10-12-15 01:49 PM, <a class="moz-txt-link-abbreviated" href="mailto:jkenneally@cartenav.com">jkenneally@cartenav.com</a> wrote:<br>
        &gt; Once that is complete I run gdal_warp with the following
        arguments:<br>
        &gt;<br>
        &gt; gdalwarp.exe -t_srs EPSG:4326 -wt Byte -r bilinear -of
        GTiff -srcnodata "0 0 0<br>
        &gt; 0" -dstnodata "0 0 0 0"
        "C:\Projects\example_test_4\test_image_referenced.tif"<br>
        &gt; "C:\Projects\example_test_4\test_image_rectified.tif"<br>
        &gt;<br>
        &gt; I have tried different combinations of input params on both
        commands with no<br>
        &gt; success so far, but the above are the current 'best guess'
        at what I should be<br>
        &gt; specifying. I am suspicious that maybe I should be
        specifying a -a_src param<br>
        &gt; for the translate call?<br>
        &gt;<br>
        &gt; As I mentioned in my previous post, if I load
        'test_image_referenced.tif' into<br>
        &gt; Global Mapper after the gdal_translate call it appears as
        expected, so I don't<br>
        &gt; think it is as simple as my corner coords being wrong.
        Also, the final warped<br>
        &gt; 'test_image_rectified.tif' seems to be rotated correctly,
        just not bound within<br>
        &gt; the correct 'footprint' shape.<br>
        ...<br>
        &gt; I am attaching a teeny file comparing the final image
        loaded into global mapper<br>
        &gt; and OpenEv to show more clearly what I am seeing with the
        results.<br>
        <br>
        Jeff,<br>
        <br>
        Based on the image you attached I think you want more than a
        first order<br>
        polynomial transformation. You want, essentially, piecewise
        warping.<br>
        Four GCPs are only enough to give rotation and shear in a first
        order<br>
        polynomial. But if you use thin plate splines instead with the
        GCPs you<br>
        should get a more general transformation.<br>
        <br>
        Try adding "-tps" to the gdalwarp commandline arguments.<br>
        <br>
        Best regards,<br>
        -- <br>
---------------------------------------+--------------------------------------<br>
        I set the clouds in motion - turn up | Frank Warmerdam,
        <a class="moz-txt-link-abbreviated" href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a><br>
        light and sound - activate the windows |
        <a class="moz-txt-link-freetext" href="http://pobox.com/%7Ewarmerdam">http://pobox.com/~warmerdam</a><br>
        and watch the world go round - Rush | Geospatial Programmer for
        Rent<br>
        <br>
      </font>
      <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
FWTools mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FWTools@lists.maptools.org">FWTools@lists.maptools.org</a>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/fwtools">http://lists.maptools.org/mailman/listinfo/fwtools</a>
<a class="moz-txt-link-freetext" href="http://fwtools.maptools.org/">http://fwtools.maptools.org/</a>
</pre>
    </blockquote>
  </font>