A good website for thinkpad user.
http://www.thinkwiki.org/wiki/ThinkWiki
Author Archives: fli10
Levenberg-Marquardt algorithm
http://en.wikipedia.org/wiki/Levenberg-Marquardt_algorithm
In mathematics and computing, the Levenberg-Marquardt algorithm (or LMA) provides a numerical solution to the problem of minimizing a function, generally nonlinear, over a space of parameters of the function. These minimization problems arise especially in least squares curve fitting and nonlinear programming.
The LMA interpolates between the Gauss-Newton algorithm (GNA) and the method of gradient descent. The LMA is more robust than the GNA, which means that in many cases it finds a solution even if it starts very far off the final minimum. On the other hand, for well-behaved functions and reasonable starting parameters, the LMA tends to be a bit slower than the GNA.
The LMA is a very popular curve-fitting algorithm; most software with generic curve-fitting capabilities provides an implementation of it.
那个sba就是使用LMA算法求解的。
structure from motion
查了一下资料,发现SfM这个问题已经在Multiple view geometry这本书中讲的比较清楚了。SfM的最后一步,bundle adjustment网上也有现成的程序,
http://www.ics.forth.gr/~lourakis/sba/#Download。剩下得就是好好研究这些资料了。
今天在查SfM的时候想起来了Photo tourism这篇paper,就又看了一下。发现这个paper已经被微软做成产品了,photosynth,很cool。
http://labs.live.com/photosynth/default.html
Structure and Motion的matlab code
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=4576&objectType=File
http://homepages.inf.ed.ac.uk/s0346435/projects/sfm/sfm_sift.html
Call system command from C/C++ program
Basically there 2 methods to do this, i think. The first is to use function “system(“dir”)”, and it is defined in the file stdlib.h.
The second method is use exec… family functions, that is, function exec with e, l, v, p suffix. See http://msdn2.microsoft.com/en-us/library/431x4c1w(VS.80).aspx for more information.
Detail Image
今天yu在讲”Fast Bilateral Filtering for the Display of High-Dynamic-Range Images“的时候,发现这里用的detail image跟jian sun的07 siggraph deblur paper里的detail image一摸一样。都是现在把detail image保护起来,对原始image处理完后,再把detail image 加回来,这样就可以保持fine detail了。这种分解操作很值得学习。
Matlab的dos command line使用
以前在看别人写的Multi-Camera Calibration的matlab code时,发现他配了一个cluster,通过ssh在每台电脑上都运行相同的matlab程序来处理获得的图片。其中matlab是这样调用的
>matlab -nosplash -nojvm func
-nojvm是unix下机子专用的,设置了该参数matlab的窗口就不会打开,感觉很爽。
在windows下,matlab的窗口是一定会打开的,但是也可以设置-minimize让其最小化,然后在.m文件最后加上exit,这样效果也还可以。
>matlab -nosplash -nodesktop -minimize -r myfunc -logfile C:\log.txt
Matlab Startup Options
http://www.mathworks.com/support/solutions/data/1-16B8X.html?solution=1-16B8X
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_env/f8-4994.html
Image Deconvolution
花了一天的时间,到目前为止觉得Intel IPP只实现了1d的lucy richardson deconvolution,还没有发现怎么使用2d的psf。现在只好使用matlab的code,matlab的code是现成的,应该很容易使用。最多就是在c程序里调用一下matlab函数,程序看起来应该不算太ugly。
在这一天中,又重新认识了一下vxl,发现其功能还是很强大的。主要是它实现了多个版本的structure from motion,这正是我需要的。看来这一天还是挺值的。
Vonoroi Tessellation
最近求motion deblur的psf function,用到了1D vonoroi tessellation, 或者它的duality形式,delaunay triangulation. 看OpenCV的document,根本没有一点sense,就上网google了一下。发现opencv用到了quad-edge这个数据结构,在这个数据结构中edge包含了整个graph的topology information;vertices包含了graph的geometry information。这种数据结构比obj文件对应的数据结构要有效的很多,确实很cool。
Quad-Edge Data Structure and Library
http://www.cs.cmu.edu/afs/andrew/scs/cs/15-463/2001/pub/src/a2/quadedge.html

Lucas Kanade Optical flow
Opencv里已经实现了LK optical flow算法,但是我要求的是affine optical flow,而且是整个object的global flow,跟原始的of算法有些差异,所以就自己也实现了一下。写到最后发现自己的结果跟ground truth差的很多,感觉无法理解。因而耽误了将近一个星期的时间。
昨天晚上在找问题的原因,搜到了一篇讲OpenCV的LK of实现的方法,“Jean-Yves Bouguet. Pyramidal Implementation of the Lucas Kanade Feature Tracker”。看到了有些细节自己没有注意到,可能是因为这些细节自己的结果才很差吧,希望今天能有些发现。原以为自己这方面应该还可以了,没想到还是漏考虑了一些细节。
……………
中午又修改了一下code,基本上work了,但是正如Bouguet said,使用LK估计更多的参数(affine 6个参数),效果不如只估计2个参数(displacement of x,y)accurate, robust。做到现在,看来是被motion deblur那篇paper给忽悠了,他列了一个affine的式子,最后只求了x和y的偏移量,即:用了经典的LK算法。
Light Field Viewer
因为可能要做unstructured lumigraph之类的东西,最近又把light field看了一下,顺便也搜了一下相关的code,发现还真有,奇怪当时自己写light field的程序时为什么不先搜一下。
LightPack
http://graphics.stanford.edu/software/lightpack/
Light Field Viewer Software
http://msw3.stanford.edu/~pramanat/Software/LFViewerWeb/lfviewer.html