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

Home » Public Forums » archive » Applying matrices from polywarp to coordinates
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Applying matrices from polywarp to coordinates [message #92712] Fri, 12 February 2016 07:00
lefsky@gmail.com is currently offline  lefsky@gmail.com
Messages: 13
Registered: June 2010
Junior Member
I have a series of ground control points that I need to transform with first and second degree polynomials so I can relate them (the input) to a manually digitized reference (the target)

I am using polywarp to create the transformation matrices, and that part of the task returns a zero status using either first or second order polynomial degree


polywarp,target_x,target_y,input_x,input_y,degree,kx,ky,stat us=status
print,'status:',status


I use the following code to apply the transform matrices to the input data.

est_x=fltarr(n_elements(in))
est_y=fltarr(n_elements(in))

for i=0.0,degree do begin
for j=0.0,degree do begin
est_x=est_x+(kx[i,j]*(input_x^j)*(input_y^i))
est_y=est_y+(ky[i,j]*(input_x^j)*(input_y^i))
endfor
endfor


This works fine for first order equations (2 x 2 output matrices) and fails for the second degree equations (3 x 3 matrices)

I've look these over but can't find the error in the code. Does anyone else see it? Or is there a better way to do this?

M
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Hiding structs and enums
Next Topic: Cghistoplot

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

Current Time: Wed Oct 08 15:07:04 PDT 2025

Total time taken to generate the page: 0.00414 seconds