<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Jeff,<br>
<br>
If your aerial photography is at a low altitude, earth curvature
won't play much of a part. 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>).
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. 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. However, in
hind-sight
I should have realized that I could only do an affine transform
with
four control points. <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.
Is this to be expected? 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. 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? 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"><warmerdam@pobox.com></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>
> Once that is complete I run gdal_warp with the following
arguments:<br>
><br>
> gdalwarp.exe -t_srs EPSG:4326 -wt Byte -r bilinear -of
GTiff -srcnodata "0 0 0<br>
> 0" -dstnodata "0 0 0 0"
"C:\Projects\example_test_4\test_image_referenced.tif"<br>
> "C:\Projects\example_test_4\test_image_rectified.tif"<br>
><br>
> I have tried different combinations of input params on both
commands with no<br>
> success so far, but the above are the current 'best guess'
at what I should be<br>
> specifying. I am suspicious that maybe I should be
specifying a -a_src param<br>
> for the translate call?<br>
><br>
> As I mentioned in my previous post, if I load
'test_image_referenced.tif' into<br>
> Global Mapper after the gdal_translate call it appears as
expected, so I don't<br>
> think it is as simple as my corner coords being wrong.
Also, the final warped<br>
> 'test_image_rectified.tif' seems to be rotated correctly,
just not bound within<br>
> the correct 'footprint' shape.<br>
...<br>
> I am attaching a teeny file comparing the final image
loaded into global mapper<br>
> 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/~warmerdam">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>
</body>
</html>