Re: Rotating NxN matrix by arbitrary angle

From: <nguler_at_jlab.org>
Date: Wed, 15 Dec 2010 18:32:28 -0500


Thanks for the directions. I should describe what I am trying to do more. I have two images, I convert them into 2D matrices with intensity value in each pixel. The two images are different representations of the same thing with different intensities and rotated with respect to each other. So, I want to take one of the images, scale it, rotate it and compare to the other image pixel by pixel. During each comparison, I want to calculate chi2 and minimize it for the best angle and scale value, so the rotation angle and scaling value are parameters. I am having problem with rotating NxN matrix by an arbitrary angle with respect to the center of the matrix. I looked into TRotMatrix but from the constructor I did not exactly understand what it is doing. If it can be used for the purpose I described, could you give a small example of its usage.
Best regards, - Nevzat

> Hello Nevzat,
>
> There is the class 'TRotMatrix' which defines a rotation Matrix. Check
> up the constructor. Is this what you need ? I don't quite understand
> what you mean by <I am trying to compare two matrices by rotating one of
> them with some angle>. I guess you have an object in 3D which rotates,
> and some observable parametrized as a function of that angle is what you
> wanna fit ?
>
> cheers,
>
> John Idarraga
>
> On 12/15/2010 10:30 PM, nguler_at_jlab.org wrote:
>> Hello all,
>> Is there a tool in root to rotate NxN matrix (where N~4000) by an arbitrary
>> angle? I am trying to compare two matrices by rotating one of them with some
>> angle. Then I will make this angle a parameter and calculate chi2 and
>> minimize
>> it to determine best rotation angle. Thanks for your help.
>>
>> Good luck to Rene in his new GEANT project with great appreciations and
>> great
>> regards and congratulations to Fons for keeping the root going with the rest
>> of the root team.
>>
>> - Nevzat Guler
>>
>

Received on Thu Dec 16 2010 - 00:34:41 CET

This archive was generated by hypermail 2.2.0 : Thu Dec 16 2010 - 05:50:02 CET