﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-落霞与孤骛齐飞，秋水共长天一色。-文章分类-基于图像的建模</title><link>http://www.cppblog.com/wmgl/category/9216.html</link><description /><language>zh-cn</language><lastBuildDate>Tue, 24 Feb 2009 18:30:16 GMT</lastBuildDate><pubDate>Tue, 24 Feb 2009 18:30:16 GMT</pubDate><ttl>60</ttl><item><title>三维重建方面的资料</title><link>http://www.cppblog.com/wmgl/articles/70640.html</link><dc:creator>noBugnoGain</dc:creator><author>noBugnoGain</author><pubDate>Mon, 29 Dec 2008 03:08:00 GMT</pubDate><guid>http://www.cppblog.com/wmgl/articles/70640.html</guid><wfw:comment>http://www.cppblog.com/wmgl/comments/70640.html</wfw:comment><comments>http://www.cppblog.com/wmgl/articles/70640.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/wmgl/comments/commentRss/70640.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/wmgl/services/trackbacks/70640.html</trackback:ping><description><![CDATA[<a href="http://www.cadcaecam.com/forum/index.htm" target="_blank"><br></a><span style="background-color: #0a0000;">
<div id="blogContainer" style="font-size: 12px;"><wbr><br style="color: #f20000;"><span style="color: #f20000;">http://www.cs.unc.edu/~marc/research.html<br>http://research.microsoft.com/users/antcrim/<br>http://www.csse.uwa.edu.au/~cheng/3dmodel.html<br>http://research.microsoft.com/~hoppe/<br>http://www.koders.com/<br>http://www.cs.ubc.ca/~lowe/keypoints/<br>http://www.csie.ntu.edu.tw/~cyy/courses/vfx/05spring/lectures/<br>http://local.wasp.uwa.edu.au/~pbourke<br>http://grail.cs.washington.edu/software-data/<br>http://www.cs.jhu.edu/~misha/Code<br>http://grail.cs.washington.edu/projects/mview/<br>http://www.robots.ox.ac.uk/~vgg/data.html<br>http://cmp.felk.cvut.cz/<br>http://www.vision.caltech.edu/bouguetj/calib_doc/<br>http://cvlab.epfl.ch/~tola<br>http://www.cs.washington.edu/homes/furukawa/<br>http://vision.middlebury.edu/mview/<br>http://cobweb.ecn.purdue.edu/~kak/courses-i-teach/ECE661/index.html<br>http://www.simple3d.com/<br>http://www.cis.uab.edu/jj/structureFromMotion.htm<br>http://svr-www.eng.cam.ac.uk/research/vision/research.html<br>http://www.unchainedgeometry.com/jbloom/papers.html<br>http://people.csail.mit.edu/wojciech/<br>http://phototour.cs.washington.edu/bundler/<br><span>http://blog.sina.com.cn/s/blog_3e8707b40100cifo.html<br></span><a href="http://code.google.com/p/3dslam/source/"><span>http://code.google.com/p/3dslam/source/</span></a></span><br><br></div>
</span><img src ="http://www.cppblog.com/wmgl/aggbug/70640.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/wmgl/" target="_blank">noBugnoGain</a> 2008-12-29 11:08 <a href="http://www.cppblog.com/wmgl/articles/70640.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>旋转矩阵转换为四元数</title><link>http://www.cppblog.com/wmgl/articles/70638.html</link><dc:creator>noBugnoGain</dc:creator><author>noBugnoGain</author><pubDate>Mon, 29 Dec 2008 03:03:00 GMT</pubDate><guid>http://www.cppblog.com/wmgl/articles/70638.html</guid><wfw:comment>http://www.cppblog.com/wmgl/comments/70638.html</wfw:comment><comments>http://www.cppblog.com/wmgl/articles/70638.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/wmgl/comments/commentRss/70638.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/wmgl/services/trackbacks/70638.html</trackback:ping><description><![CDATA[#include &lt;math.h&gt;<br>#include &lt;iostream.h&gt;<br><br>struct Quaternion<br>{<br>&nbsp;&nbsp;&nbsp; float x;<br>&nbsp;&nbsp;&nbsp; float y;<br>&nbsp;&nbsp;&nbsp; float z;<br>&nbsp;&nbsp;&nbsp; float w;<br>};<br><br>struct rotMatrix<br>{<br>&nbsp;&nbsp;&nbsp; float m11, m12, m13;<br>&nbsp;&nbsp;&nbsp; float m21, m22, m23;<br>&nbsp;&nbsp;&nbsp; float m31, m32, m33;<br>};<br><br><br>//fuction:旋转矩阵到四元数的转换<br>void rotMatrixToQuternion(Quaternion &amp;q, rotMatrix &amp;r)<br>{<br>&nbsp;&nbsp;&nbsp; float tr = r.m11 + r.m22 +r.m33;<br>&nbsp;&nbsp;&nbsp; float temp = 0.0;<br>&nbsp;&nbsp;&nbsp; if(tr &gt; 0.0)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; temp = 0.5f / sqrtf(tr+1);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.w = 0.25f / temp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.x = (r.m23 - r.m32) * temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.y = (r.m31 - r.m13) * temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.z = (r.m12 - r.m21) * temp;<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(r.m11 &gt; r.m22 &amp;&amp; r.m11 &gt; r.m33)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; temp = 2.0f * sqrtf(1.0f + r.m11 - r.m22 - r.m33);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.w = (r.m32 - r.m23) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.x = 0.25f * temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.y = (r.m12 + r.m21) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.z = (r.m13 + r.m31) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else if( r.m22 &gt; r.m33)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; temp = 2.0f * sqrtf(1.0f + r.m22 - r.m11 - r.m33);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.w = (r.m13 - r.m31) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.x = (r.m12 + r.m21) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.y =&nbsp; 0.25f * temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.z = (r.m23 + r.m32) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; temp = 2.0f * sqrtf(1.0f + r.m33 - r.m11 - r.m22);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.w = (r.m21 - r.m12) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.x = (r.m13 + r.m31) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.y = (r.m23 + r.m32) / temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; q.z = 0.25f * temp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>void main()<br>{<br>&nbsp;&nbsp;&nbsp; float m1[9] = {0.01551372092999463200, 0.99884343581246959000, -0.04550950666890610900, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0.99922238739871228000 ,-0.01713749902859566800 ,-0.03550952897832390700, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -0.03624837905512174500, -0.04492323298011671700, -0.99833258894743582000};<br>&nbsp;&nbsp;&nbsp; rotMatrix rm1;<br>&nbsp;&nbsp;&nbsp; rm1.m11 = m1[0];<br>&nbsp;&nbsp;&nbsp; rm1.m12 = m1[1];<br>&nbsp;&nbsp;&nbsp; rm1.m13 = m1[2];<br>&nbsp;&nbsp;&nbsp; rm1.m21 = m1[3];<br>&nbsp;&nbsp;&nbsp; rm1.m22 = m1[4];<br>&nbsp;&nbsp;&nbsp; rm1.m23 = m1[5];<br>&nbsp;&nbsp;&nbsp; rm1.m31 = m1[6];<br>&nbsp;&nbsp;&nbsp; rm1.m32 = m1[7];<br>&nbsp;&nbsp;&nbsp; rm1.m33 = m1[8];<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Quaternion q1;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; rotMatrixToQuternion(q1, rm1);<br>&nbsp;&nbsp;&nbsp; cout&lt;&lt;q1.x&lt;&lt;" "&lt;&lt;q1.y&lt;&lt;" "&lt;&lt;q1.z&lt;&lt;" "&lt;&lt;q1.w&lt;&lt;endl;<br><br><br>&nbsp;&nbsp;&nbsp; float m2[9] = {0.01614490437974924100, 0.99884677638989772000, -0.04521569813768747100,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0.99856922398083869000, -0.01380176413826810800, 0.05166252244109931900, <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0.05097888759941932700, -0.04598509108593063600, -0.99764047853770654000};<br>&nbsp;&nbsp;&nbsp; rotMatrix rm2;<br>&nbsp;&nbsp;&nbsp; rm2.m11 = m2[0];<br>&nbsp;&nbsp;&nbsp; rm2.m12 = m2[1];<br>&nbsp;&nbsp;&nbsp; rm2.m13 = m2[2];<br>&nbsp;&nbsp;&nbsp; rm2.m21 = m2[3];<br>&nbsp;&nbsp;&nbsp; rm2.m22 = m2[4];<br>&nbsp;&nbsp;&nbsp; rm2.m23 = m2[5];<br>&nbsp;&nbsp;&nbsp; rm2.m31 = m2[6];<br>&nbsp;&nbsp;&nbsp; rm2.m32 = m2[7];<br>&nbsp;&nbsp;&nbsp; rm2.m33 = m2[8];<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; Quaternion q2;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; rotMatrixToQuternion(q2, rm2);<br>&nbsp;&nbsp;&nbsp; cout&lt;&lt;q2.x&lt;&lt;" "&lt;&lt;q2.y&lt;&lt;" "&lt;&lt;q2.z&lt;&lt;" "&lt;&lt;q2.w&lt;&lt;endl;<br>}<br><br><br><img src ="http://www.cppblog.com/wmgl/aggbug/70638.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/wmgl/" target="_blank">noBugnoGain</a> 2008-12-29 11:03 <a href="http://www.cppblog.com/wmgl/articles/70638.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>