[Gdal-dev] Thin plate splines and GCPs - C++
poz at rocketmail.com
Thu Mar 8 15:23:27 EST 2007
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.
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?
Get your own web address.
Have a HUGE year through Yahoo! Small Business.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gdal-dev