## Re: [Vxl-users] Problem about Rotation Matrix Representation

 Re: [Vxl-users] Problem about Rotation Matrix Representation From: Roger - 2006-09-21 02:29:38 ```SGkgZXZlcnlvbmUsDQoNCglUaGFua3MgZm9yIHlvdXIgaGVscC4NCglJIHRoaW5rIEkgaGF2ZSBm b3VuZCB0aGUgYW5zd2VyIHRvIG15IHF1ZXN0aW9uLiBJdCdzICBpbmV2aXRhYmxlIHRvIG9wdGlt aXplIHRoZSByb3RhdGlvbiBtYXRyaXggaW4gY2FtZXJhIGNhbGlicmF0aW9uLiBIb3dldmVyLCBy b3RhdGlvbiBtYXRyaXggaGFzIDMgZGVncmVlcyBvZiBmcmVlZG9tIGFuZCBpdCBpcyBpbmFwcHJv cHJpYXRlIHRvIG9wdGltaXplIGl0cyBldmVyeSBlbGVtZW50ICx3aGljaCBpcyB0aGUgcmVhc29u IHdoeSB3ZSBtdXN0IGZpbmQgYW5vdGhlciByZXByZXNlbnRhdGlvbiBmb3IgdGhlIHJvdGF0aW9u IG1hdHJpeC4gUm9kcmlndWVzIHZlY3RvciBvciBxdWFydGVybmlvbiBpcyBnb29kIGNob2ljZS4g SGVuY2UsIHdlIG5lZWQgY29udmVydCBiZXR3ZWVuIHJvdGF0aW9uIG1hdHJpeCBhbmQgUm9kcmln dWVzIHZlY3RvciBvciBxdWFydGVybmlvbi4NCg0KCUlmIHlvdSB3YW50IHRoZSBxdWFydGVybmlv biByZXByZXNlbnRhdGlvbiwgeW91IGNhbiByZWZlciB0byB2bmxfcXVhdGVybmlvbi5oLg0KDQoJ QWJvdXQgdGhlIFJvZHJpZ3VlcywgaSB0aGluayAgdGhlIGZ1bmN0aW9ucyBpbiB2bmxfcXVhdGVy bmlvbi5oIGFyZSB1c2VmdWwgZm9yIGNvbnZlcnRpbmcgdGhlIHJvZHJpZ3VlcyB2ZWN0b3IgdG8g cm90YXRpb24gbWF0cml4LiBNYXliZSB5b3UgbmVlZCB0aGUgcm9kcmlndWVzIHJlcHJlc2VudGF0 aW9uIG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Jkcy4NClJvZ2VyDQo= ```

 Re: [Vxl-users] Problem about Rotation Matrix Representation From: Matt Leotta - 2006-09-20 13:26:03 ```Roger, While I can't tell you which rotation representation is best for you, I can explain the mysterious vpgl/vgl_rotation_3d. As you point out, there are various representations for a 3-d rotation -- most notably a 3x3 matrix, a Rodrigues vector, a quaternion, or Euler angles. Each representation has it's advantages and disadvantages. For example, the 3x3 matrix is more efficient for transforming a large set of points, but Rodrigues or quaternion tend to be better in optimization. Hence, it is important to be able to convert between these representations. You will find some of this machinery in vnl (see vnl_rotation_matrix.h and vnl_quaternion.h). Now about vpgl/vgl_rotation_3d.h. vpgl is a new library for photogrametry built on top of vgl and using vnl as needed. It adds the concepts of cameras that project 3-d vgl objects into 2-d vgl objects. After designing this library we felt that we were really missing a 3-d rotation object (in the style of vgl) that would apply itself to vgl objects and also make conversions to and from other representations easily. A header file was created, but we have not yet found time to implement it. Also, the idea was that this object ultimately belongs in vgl or vgl_algo, hence the unusual naming for a vpgl file. Hopefully I will find time to implement vgl_rotation_3d soon. Then vpgl will be modified to use it. As a side note, vpgl_algo would be a good place to put code for camera calibration methods such as Zhang's. I don't know of anyone working on this, so if you'd like to contribute your work let us know! --Matt Leotta On 9/19/06, Roger wrote: > Hi,everyone! > > I got a problem when calibrating a camera with zhang's method! This method consist of two steps,that is,I must refine the internal and external parameters with nolinear estimate method after having calculate the intial estimate with linear method. That problem is about the rotation matrix R that has 3 degrees of freedom,so it is not appropriate to optimize every element of its. I have found some information in vxl documentation about the representation of rotation matrix(contrib/gel/mrc/vpgl/vgl_rotation_3d.h). Maybe Rodriques or quaternion is a good choice. But i don't find source file of the class. I don't know if it's a bug! > > I hope someone can tell me if there is another solution in vxl for the problem,if not,maybe you can tell me how you resolve this problem! > > Any hint and comment will be appreciated! > > Thanks. > > Roger > 2006-09-20 > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Vxl-users mailing list > Vxl-users@... > https://lists.sourceforge.net/lists/listinfo/vxl-users > > > ```
 Re: [Vxl-users] Problem about Rotation Matrix Representation From: Roger - 2006-09-21 02:29:38 ```SGkgZXZlcnlvbmUsDQoNCglUaGFua3MgZm9yIHlvdXIgaGVscC4NCglJIHRoaW5rIEkgaGF2ZSBm b3VuZCB0aGUgYW5zd2VyIHRvIG15IHF1ZXN0aW9uLiBJdCdzICBpbmV2aXRhYmxlIHRvIG9wdGlt aXplIHRoZSByb3RhdGlvbiBtYXRyaXggaW4gY2FtZXJhIGNhbGlicmF0aW9uLiBIb3dldmVyLCBy b3RhdGlvbiBtYXRyaXggaGFzIDMgZGVncmVlcyBvZiBmcmVlZG9tIGFuZCBpdCBpcyBpbmFwcHJv cHJpYXRlIHRvIG9wdGltaXplIGl0cyBldmVyeSBlbGVtZW50ICx3aGljaCBpcyB0aGUgcmVhc29u IHdoeSB3ZSBtdXN0IGZpbmQgYW5vdGhlciByZXByZXNlbnRhdGlvbiBmb3IgdGhlIHJvdGF0aW9u IG1hdHJpeC4gUm9kcmlndWVzIHZlY3RvciBvciBxdWFydGVybmlvbiBpcyBnb29kIGNob2ljZS4g SGVuY2UsIHdlIG5lZWQgY29udmVydCBiZXR3ZWVuIHJvdGF0aW9uIG1hdHJpeCBhbmQgUm9kcmln dWVzIHZlY3RvciBvciBxdWFydGVybmlvbi4NCg0KCUlmIHlvdSB3YW50IHRoZSBxdWFydGVybmlv biByZXByZXNlbnRhdGlvbiwgeW91IGNhbiByZWZlciB0byB2bmxfcXVhdGVybmlvbi5oLg0KDQoJ QWJvdXQgdGhlIFJvZHJpZ3VlcywgaSB0aGluayAgdGhlIGZ1bmN0aW9ucyBpbiB2bmxfcXVhdGVy bmlvbi5oIGFyZSB1c2VmdWwgZm9yIGNvbnZlcnRpbmcgdGhlIHJvZHJpZ3VlcyB2ZWN0b3Ig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A9ID0gPSA9ID0gPSA9ID0gPSA9ID0NCgkJCQ0KDQqh oaGhoaGhoaGhoaGhoaGhDQoNCkJlc3QgUmVnYXJkcy4NClJvZ2VyDQo= ```
 Re: [Vxl-users] Problem about Rotation Matrix Representation From: Chang Yuan - 2006-09-20 17:22:00 ```OpenCV has code on camera calibration and converting rotation matrices to vectors (cvRodrigues2). Anyone who wants to have this module may learn from their source code and write a vpgl version. - Chang On 9/20/06, Matt Leotta wrote: > Roger, > > While I can't tell you which rotation representation is best for > you, I can explain the mysterious vpgl/vgl_rotation_3d. As you point > out, there are various representations for a 3-d rotation -- most > notably a 3x3 matrix, a Rodrigues vector, a quaternion, or Euler > angles. Each representation has it's advantages and disadvantages. > For example, the 3x3 matrix is more efficient for transforming a large > set of points, but Rodrigues or quaternion tend to be better in > optimization. Hence, it is important to be able to convert between > these representations. You will find some of this machinery in vnl > (see vnl_rotation_matrix.h and vnl_quaternion.h). > > Now about vpgl/vgl_rotation_3d.h. vpgl is a new library for > photogrametry built on top of vgl and using vnl as needed. It adds > the concepts of cameras that project 3-d vgl objects into 2-d vgl > objects. After designing this library we felt that we were really > missing a 3-d rotation object (in the style of vgl) that would apply > itself to vgl objects and also make conversions to and from other > representations easily. A header file was created, but we have not > yet found time to implement it. Also, the idea was that this object > ultimately belongs in vgl or vgl_algo, hence the unusual naming for a > vpgl file. > > Hopefully I will find time to implement vgl_rotation_3d soon. Then > vpgl will be modified to use it. As a side note, vpgl_algo would be a > good place to put code for camera calibration methods such as Zhang's. > I don't know of anyone working on this, so if you'd like to > contribute your work let us know! > > --Matt Leotta > > On 9/19/06, Roger wrote: > > Hi,everyone! > > > > I got a problem when calibrating a camera with zhang's method! This method consist of two steps,that is,I must refine the internal and external parameters with nolinear estimate method after having calculate the intial estimate with linear method. That problem is about the rotation matrix R that has 3 degrees of freedom,so it is not appropriate to optimize every element of its. I have found some information in vxl documentation about the representation of rotation matrix(contrib/gel/mrc/vpgl/vgl_rotation_3d.h). Maybe Rodriques or quaternion is a good choice. But i don't find source file of the class. I don't know if it's a bug! > > > > I hope someone can tell me if there is another solution in vxl for the problem,if not,maybe you can tell me how you resolve this problem! > > > > Any hint and comment will be appreciated! > > > > Thanks. > > > > Roger > > 2006-09-20 > > > > > > > > > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share your > > opinions on IT & business topics through brief surveys -- and earn cash > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > > > _______________________________________________ > > Vxl-users mailing list > > Vxl-users@... > > https://lists.sourceforge.net/lists/listinfo/vxl-users > > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Vxl-users mailing list > Vxl-users@... > https://lists.sourceforge.net/lists/listinfo/vxl-users > ```