Unfortunately cannot understand C code

Just to be precise:
1. The angle
-transform.type.rotation.angle
in
otbcli_RigidTransformResample
is assumed to be at the center of the image
right?

2. Assuming the simpler case sx=sy
X' = s*cos(alpha)*X -   s*sin(alpha) *Y + xo
Y' = s* sin(alpha)*X +  s*cos(alpha)*Y + yo
fitted as
X' = aX - bY + xo
Y' = bX + aY + yo

I derive the angle alpha from the fitted coefficients as:
alpha = asin(sqrt(1/(1+k)))
where k= b/a

And you say that that alpha cannot be directly fed as
transform.type.rotation.angle
in otbcli_RigidTransformResample
because it must be translated to the center of the image.

right?

My current procedure is
1. Find homologous points (both with otbcli_HomologousPointsExtraction
and interactively, to compare)
2. Fit the model (in R)
3. Apply the model with otbcli_RigidTransformResample

Don't you have an otbcli that would calculate the fit and produce the
parameters for otbcli_RigidTransformResample ?
That would be a lot easier.

Agus


On Fri, Jun 26, 2015 at 9:31 AM, Mickael Savinaud
<[email protected]> wrote:
> Hi Augustin,
> The itk class used in the app are not able to do the first option as it.
> However I invite you to take a look to the app code because it is no so
> simple: we manage the scaling trough a modification of the spacing and we
> manage also the position of the rotation center (here the center of the
> image). When you do the affine formula that you indicated the center of the
> rotation is the left up corner.
>
> Best
> Mickaël
>
>
> Le 25/06/2015 14:23, Agustin Lobo a écrit :
>>
>> Found my way through option 2.
>> Still interested on knowing if option 1 is currently possible.
>> Agus
>>
>> On Thu, Jun 25, 2015 at 12:31 PM, Agustin Lobo <[email protected]>
>> wrote:
>>>
>>> Is there any(otbcli) way of applying a 6-parameters affine
>>> transformation?
>>>
>>> otbcli_RigidTransformResample allows for including sx, sy, angle, dx, dy
>>> thus in principle I should be able to apply:
>>>
>>> X' = sx X cos(alpha) - sy Y sin(alpha) + xo
>>> Y' = sx X sin(alpha) +  sy Y cos(alpha) + yo
>>>
>>> but my fit from homologous points results on:
>>> X' = aX - bY + xo
>>> Y' = cX + dY + yo
>>>
>>> so I would need either
>>> 1. An otbcli accepting the 6 parameters
>>> 2. A way to find sx, sy and angle alpha  from a, b, c and d.
>>>
>>> Any help appreciated,
>>>
>>> Agus
>
>
> --
> --
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> --- You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to