I follow the guidance of website "http://ubuntuforums.org/showthread.php?p=124214".
1. Install libraries:
* scim
* scim-chinese
* scim-config-socket
* scim-frontend-socket
* scim-gtk2-immodule
* scim-server-socket
* scim-tables-zh (option)
* xfonts-intl-chinese
* xfonts-intl-chinese-big
* ttf-arphic-gbsn00lp
* ttf-arphic-gkai00mp
* ttf-arphic-bkai00mp
* ttf-arphic-bsmi00lp
2, Open a terminal,
$gvim .xsession
Type
"
scim -d
export XMODIFIERS=@im=scim
export GTK_IM_MODULE=scim
gnome-session
"
Then save .xsession under your home direcotry.
$chomd +x .xsession
Restart X server by CTRL+ALT+BACKSPACE
Activate the chinese input by CTRL+SPACE.
Finally I got it. Very cool, just feel a little strange.
现在可以用中文咯。。。。。嘻嘻。。。
This method is dead in June, 2010.
But I find a solution:
$sudo apt-get install scim-qtimm im-switch scim-pinyin
$im-switch -z en_US -s scim
It works again......你看到了吧。。。死掉的SCIM又活回来了。。
Tuesday, July 21, 2009
Thursday, July 16, 2009
Take your work seriously
As,,,,
1. You are living on it.
2. Your boss pay for your work.
3. The only way to get successful feeling.
Don't let noise to let your work down.
Make clear to work and to life.
1. You are living on it.
2. Your boss pay for your work.
3. The only way to get successful feeling.
Don't let noise to let your work down.
Make clear to work and to life.
Friday, June 26, 2009
EKF or UKF?
For non linear system, the most important way to solve it is make it linear. The well known method is using Taylor formula. EKF is using Taylor formula to linear state equation and measure equation. And assuming the noise obey Gaussian.
But Taylor linear method is not the only way, the other way is using uncented transform to linearize the state equation and/or measure equation. It also assumes Gaussian noise.
But Taylor linear method is not the only way, the other way is using uncented transform to linearize the state equation and/or measure equation. It also assumes Gaussian noise.
Friday, June 19, 2009
get real disparity map from OpenCV function cvFindStereoCorrespondenceBM()
The function cvFindStereoCorrespondenceBM() can give you a disparity map, but it's not real disparity map which we used to reconstruct real 3D world.
I have checked the source code and find this function uses Bitwise operator to shift the real disparity value. For false matching points, it give a certain value which is left shifted version of 'mindisp-1', here mindisp is the minimum disparity value. In this function, it shift 4 bits, which means if mindisp=-64, then after shifted , it become -1040; Shifting 4 bits equal the value*2^4; Here -1040=(-64-1)*2^4;
As I don't exactly sure if it's same shift way for right matching points, so leave this question to the authors. But If I unshift all datas, I find all disparity value go to the right range, it seems for all the disparity, the author left shift 4 bits. If it's true, then we can get real disparity map by
disp_real=(disp_shifted/2^4)+1
I have checked the source code and find this function uses Bitwise operator to shift the real disparity value. For false matching points, it give a certain value which is left shifted version of 'mindisp-1', here mindisp is the minimum disparity value. In this function, it shift 4 bits, which means if mindisp=-64, then after shifted , it become -1040; Shifting 4 bits equal the value*2^4; Here -1040=(-64-1)*2^4;
As I don't exactly sure if it's same shift way for right matching points, so leave this question to the authors. But If I unshift all datas, I find all disparity value go to the right range, it seems for all the disparity, the author left shift 4 bits. If it's true, then we can get real disparity map by
disp_real=(disp_shifted/2^4)+1
Visit the Multi-channel data for Opencv Image and Matrix data
According the data structure of IplImage and CvMat, assuming we have a matrix M[m*n*c], which m is row's number, n is column number, c is channel' number. If the data type is float, then we can get the value of M(i,j,k):
M(i,j)=M.data.fl[i*n*c+j*c+k];
for double, short or uchar data:
M(i,j)=M.data.db[i*n*c+j*c+k];
M(i,j)=M.data.s[i*n*c+j*c+k];
M(i,j)=M.data.ptr[i*n*c+j*c+k];
If M is a IplImage data type, then we have:
M(i,j)=M->imagedata[i*n*c+j*c+k];
M(i,j)=M.data.fl[i*n*c+j*c+k];
for double, short or uchar data:
M(i,j)=M.data.db[i*n*c+j*c+k];
M(i,j)=M.data.s[i*n*c+j*c+k];
M(i,j)=M.data.ptr[i*n*c+j*c+k];
If M is a IplImage data type, then we have:
M(i,j)=M->imagedata[i*n*c+j*c+k];
Thursday, June 11, 2009
Check disk Usage by "du"
For example:
$ du -s -m *
Here -s means dont show children folder. -m means show in MB
$ du -s -m *
Here -s means dont show children folder. -m means show in MB
Dual IP on one internet card
For Ubuntu do :
$ cd /etc/network/
$ sudo vi interfaces
Then add follow line in:
If your 1st ip config is:
iface eth0 inet static
address 172.xxx.xxx.xxx
netmask 255.255.xxx.xxx
...
auto eth0
Now add 2th ip :
iface eth0:1 inet static
address 192.xxx.xxx.xxx
netmask 255.255.xxx.xxx
auto eth0:1
do:
#sudo /etc/init.d/networking restart
$ cd /etc/network/
$ sudo vi interfaces
Then add follow line in:
If your 1st ip config is:
iface eth0 inet static
address 172.xxx.xxx.xxx
netmask 255.255.xxx.xxx
...
auto eth0
Now add 2th ip :
iface eth0:1 inet static
address 192.xxx.xxx.xxx
netmask 255.255.xxx.xxx
auto eth0:1
do:
#sudo /etc/init.d/networking restart
Subscribe to:
Posts (Atom)