comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Image warping in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Image warping in IDL [message #51269 is a reply to message #51188] Fri, 10 November 2006 08:38 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
Wox wrote:
> On Fri, 10 Nov 2006 10:05:25 +0100, Wox <nomail@hotmail.com> wrote:
>
>> 2. Is there a "magic operation" for converting CP's and uvec/vvec so
>> that xmap and ymap describe distortion of output pixels?
>
> Maybe some simple analog example to make this clear:
>
> Take a 1D polynomial for which you know the coeff. and degree:
> y(t)=a+b.t+c.t^2+d.t^3
>
> Is there a "magic operation" that can estimate/calculate a',b',c' and
> d' in the following :
> t(y)=a'+b'.y+c'.y^2+d'.y^3
>
> The 2D splines are a little bit more complicated, but they are just
> piecewise polynomial surfaces.

The solution is straightforward, in one dimension. Choose a set of t
values that is sufficiently large, and use your splines for the forward
transformation to calculate corresponding y values. Then fit a spline
in y to your t values. This will provide a spline approximation to the
inverse of your first spline. It will be exactly correct at the points
you chose, and less accurate as you move away from those points.

However, this approach doesn't generalize to 2-D data very well. I hope
someone else can help you, but the only efficient algorithms I know of
for fitting 2-D splines require that the function being fitted, z(x,y),
is tabulated on the outer product of a set of x values and a set of y
values. When the only way to determine the x and y values is by
evaluating a spline interpolant, I don't see any easy way to arrange
that they form an outer-product set.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Making movies
Next Topic: Re: Pair Counts in an Annulus, for large data sets

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:32:35 PDT 2025

Total time taken to generate the page: 0.00400 seconds