Thursday, January 14, 2010

Linux Matlab and German keyboard

The new linux version matlab (e.g. R2008, R2009) can not work with german keyboard, it works following the english keyboard map.
I have tried a lot method and it still can not work until today (great day)!
When I run matlab, it show me a error message:
"
********************************libjvm.so
[0xb31ab8ec]
Locking assertion failure. Backtrace:"

It can not lock the java. The reason is it find the wrong one. The solution is run a command shell and type:
"export MATLAB_JAVA=/usr/lib/jvm/java-6-sun-1.6.0.17/jre
"

Now it correctly show the character of the german keyboard. Of course, you may have different version of JAVA and install directory that you must figure out, and use yours instead mine. You also can add this command to your "~/.bashrc" file, so that every time you login, you donot have to run this command manually.


But the symbols "^" and "~" still can not work in this Linux. I test this method on Windows Vista, both symbols can work.
On Vista, open a command prompt, then use command setx to set the variable MATLAB_JAVA:
"setx "MATLAB_JAVA" "C:\*************""

Tuesday, January 5, 2010

Gradient of image and hough transform

直线参数表达式:rho=x*cos(theta)+y*sin(theta);

rho 是 从原点到直线的法线垂直距离。theta 是该法线和X轴正向夹角。所以利用HOUGH TRANSFORM的时候,要注意,theta不是直线的倾斜角或者它的正切不是切向量,而是法向量。设直线斜率是K=-1/tan(theta);