[Gdal-dev] Thin plate splines and GCPs - C++

chris pozsgai poz at rocketmail.com
Thu Mar 8 15:23:27 EST 2007


Hello..
   
  I am trying to find a more accurate geo transform than the least squares used
  in the GDALGCPsToGeoTransform API.
   
  I would like to use the thin plate splines, but am having trouble getting good results.
   
  I am trying to use a reference image with 8 GCPs, and the image transformer with
  the nOrder = -1 argument.  Is this a feasible approach?
   
  I continually get a resulting geo transform with values on the order of 1e+70 (someone
  may have seen this?).
   
  Here's the procedure I used:
   
  1)  Load a JPEG raster (it will be the hSrcDS).
  2)  Set the dataset's projection (as generic WGS-84).
  3)  Set the dataset's GCPs.
  4)  Create the img transform object, using NULLs in the destination parameters.  (I wanted to go from pixel/line to georef).
  5)  Get the dest geo transform and warped image size with the GDALGetSuggestedWarpOutput API.
  6). Create the new vrt warped dataset with the image size and geo transform in 5) and
       the warp options object required to do the warping.
  7). Warp the image.
  8).  Cleanup/render.
   
  I am getting a strange image that contains the correct color data + black filler pixels but is curved in a semicircular pattern.  I assume that this is not the intent of the warper or
  I have not set it up correctly.  Can anyone help?
   
  Thanks,
   
  Chris Pozsgai



 
---------------------------------
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20070308/613ea262/attachment.html


More information about the Gdal-dev mailing list