Monthly Archives: September 2007

正交函数基

最近做image warping,把image从一个camera warp到另外一个camera。最开始用了homography的方法,不好用;又试了一下使用depth map和camera calibration,但是因为depth map不精确,加上estimated的focal length也不精确,所以这种方法也不行;也试了使用函数warping的方法,使用1, x, x^2, x^3, …函数基,也不行。现在准备试一试正交的函数基。

http://en.wikipedia.org/wiki/Basis_function

Polynomial bases

The collection of quadratic polynomials with real coefficients has {1, t, t²} as a basis. Every quadratic can be written as a1+bt+ct², that is, as a linear combination of the basis functions 1, t, and t². The set {(1/2)(t-1)(t-2), –t(t-2), (1/2)t(t-1)} is another basis for quadratic polynomials, called the Lagrange basis.

http://en.wikipedia.org/wiki/Lagrange_polynomial

Orthogonal polynomials

http://en.wikipedia.org/wiki/Orthogonal_polynomials

Legendre polynomials

http://en.wikipedia.org/wiki/Legendre_polynomials

Advertisement

将文件打印成ps格式

对MS的应用程序来说,先安装MS Publisher Imagesetter virtual printer。
To install the MS Publisher Imagesetter virtual printer, open the `Printers` settings folder, and click `Add Printer`. Select a local printer; since it is virtual, select the FILE: port. Specify `Generic` as manufacturer, and then you can choose the MS Publisher Imagesetter.
Then change the file extension to *.ps

如果想将pdf转成ps格式,下载postscript printer。
PostScript printer drivers for Windows
http://www.adobe.com/support/downloads/product.jsp?product=44&platform=Windows
如果是adobe acrobat professional的话,可以直接save as成ps格式。

在smith hall打印的命令为
qpr -q smips *.ps

an inefficient 3D point viewer

Given a disparity map and a color image, want to view the 3D scene created by these 2 images:

clear;
% load images
Index=imread(‘disparity.bmp’);
C=double(imread(‘fly_1.jpg’))/255;

s = size(C);
m = s(1,1); % row
n = s(1,2); % columm

figure;
for x=1:1:m
for y=1:1:n
plot3(x, y, Index(x,y,1), ‘color’, [C(x,y,1), C(x,y,2), C(x,y,3)]), hold on;
end
end

执行的时候效率非常低,当还有1G free memory的时候就抱错说out of memory,估计是这种做法让Matlab觉得太恶心了。使用figure的3d旋转按钮多按了几次,结果连Matlab就直接退出了。
(用plot来画大量的点的时候效率就低,加上每个点都指定不同的color,估计就更不行了。)

tex4ht

The Translation Process
http://www.cse.ohio-state.edu/~gurari/TeX4ht/mn37.html

The system can be activated with a sequence of commands of the following form, typically embedded within a script.
latex x (or ‘tex x’)
latex x
latex x
tex4ht x
t4ht x
The three compilations with La(TeX) are needed to ensure proper links.

在使用tex4ht的时候,要导入tex4ht.sty and *.4ht style files。如果要显示数学公式,还要安装imagemagick供t4ht使用。产生页面效果很好。