wijuk pruksuriya <[email protected]> wrote:
> 
> Thank Jordi
>
> If I use Similarity2DTransform. What class I need to use estimate 
> transformation from tie point (like a LeastSquareAffineTransformEstimator). 
>

There isn't one as far as I know. You have at least 2 possibilities:

1. create a similar class to LeastSquareAffineTransformEstimator but for
Similarity2DTransform

2. use LeastSquareAffineTransformEstimator and try to estimate scale and
rotation from the AffineTransform matrix. For pure rotation and pure
scaling, you can get the formulas here:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/affine.htm

Jordi

> เมื่อ วันอังคารที่ 18 กุมภาพันธ์ ค.ศ. 2014, 20 นาฬิกา 19 นาที 35 วินาที 
> UTC+7, Jordi Inglada เขียนว่า:
>
>     wijuk pruksuriya <[email protected]> 
> wrote:
>     >
>     > I use LeastSquareAffineTransformEstimator to calculate transformation, 
> but I can't get scale and rotate form itk::AffineTransform.
>     >
>     > Help me !! How can I get it form itk::AffineTransform.
>     >
>    
>     I think you can use the GetParameters() method to get the 6 parameters of 
> the transform. Quoting the documentation:
>    
>     "This class provides several methods for setting the matrix and vector
>     defining the transform. To support the registration framework, the
>     transform parameters can also be set as an Array<double> of size
>     (NDimension + 1) * NDimension using method SetParameters(). The first
>     (NDimension x NDimension) parameters defines the matrix in row-major
>     order (where the column index varies the fastest). The last NDimension
>     parameters defines the translation in each dimensions."
>    
>     However, you will not get a direct access to rotation and scale, since 
> the affine transform is more general than that. See 
> https://en.wikipedia.org/wiki/Affine_transformation#Affine_transformation_of_the_plane.
>    
>     If you just want rotation, scale and translation, you may want to use the 
> Similarity2DTransform: 
> http://www.orfeo-toolbox.org/doxygen-current/classitk_1_1Similarity2DTransform.html
>    
>     Jordi
>    
>     > Thank you.
>     >
>     > --
>     > --
>     > 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 
> otb-users-/[email protected]
>     > To unsubscribe from this group, send email to
>     > 
> otb-users+unsubscribe-/[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 
> otb-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
>     > For more options, visit https://groups.google.com/groups/opt_out.
>
> --
> --
> 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 
> otb-users-/[email protected]
> To unsubscribe from this group, send email to
> otb-users+unsubscribe-/[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 
> otb-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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/groups/opt_out.

Reply via email to