tag:blogger.com,1999:blog-14339823688478643802024-02-20T01:41:47.510-08:00My Question LibraryEnjoy 2012.....Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.comBlogger205125tag:blogger.com,1999:blog-1433982368847864380.post-47520544665180190302012-06-30T09:43:00.003-07:002012-06-30T09:43:43.669-07:00This blog is closed from now onSince I went to Germany in 2008, I start to write something that I have learned during my PhD study in Uni. Goettingen. Just two months ago (Marz, 20), I got my PhD degree and then came back to my homeland, China.<br />
<span style="background-color: white;">Unfortunately</span>, I can not visit some Google services, e.g., Blogger, Document, Google Plus. They are just stopped in front of "Great wall".<br />
That is something that I have nothing to do with. Therefore, I start a new Blogger: http://blog.sina.com.cn/robotdream<br />
<br />
I have great time here. It is time to move on!Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com3tag:blogger.com,1999:blog-1433982368847864380.post-73451809775660917832012-04-25T14:58:00.001-07:002012-04-25T15:14:05.468-07:00To access multiple dimensional array in Java from C using JNI<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;">It is a little bit tricky to use jni to access matrix in java from c/c++ code. Here is my example:</span></div>
<br />
<br />I really hate the blogger. I can past my source code. Anyway, you can send me email about how to do it. <br />
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;"><code>
<script class=""brush:" csharp"="" type=""syntaxhighlighter"">
<![CDATA[
// Comment
public class Testing {
public Testing() {
}
public void Method() {
/* Another Comment
on multiple lines */
int x = 9;
}
}
]]>
</script>
</code></span></div>
<div style="font-family: "Courier New",Courier,monospace;">
<span style="font-size: small;"><code></code></span></div>
<code><span style="font-family: "Courier New",Courier,monospace; font-size: small;"><br />
Here the "tags" is a two dimensional array in java. I would like to access its data and save them to a matrix "tagPos" in c/c++;</span><br />
</code>Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-67019541126074657622012-04-25T13:02:00.000-07:002012-04-25T13:03:11.703-07:00jni getobjectclass function error "SIGSEGV"Here is my code :<br />
<br />
midMain = env->GetStaticMethodID( clsMTT, "TagCalculation", "()LReturnTags;");<br />
tagInfo = env->CallStaticObjectMethod(clsMTT, midMain, NULL);<br />
clsR = env->GetObjectClass(tagInfo);<br />
<br />
<br />
<br />
<br />
<br />
When I run this program, I get the following the "SIGSEGV" error caused by GetObjectClass function. <br />
<br />
The reason is the function "TagCalculation" returned a empty object "tagInfo" when I run "CallStaticObjectMethod".<br />
Therefore, the GetObjectClass tries to find a class from an empty object. This will be wrong.<br />
The solution is very simple: I change the function "TagCalculation" to always return a real object, which is not empty.<br />
Then, the error gone.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-56242463156669299072012-04-13T12:11:00.002-07:002012-04-13T12:14:41.179-07:00Install PTAM on Ubuntu 11.10The PTAM is a nice augmented reality software, which is developed by Dr. Klein in 2008. It requires three dependencies: TooN, libcvd and gvars3. Since the ubuntu has upgraded to the 11.10 and libcvd also has its new version. When I try to install PTAM with new versions of ubuntu and dependencies, I have encountered some problems, such as " undefined reference to `typeinfo for CVD::V4L::RawV4LBuffer<br />
" and “undefined reference to `dgesvd_’”.<br />
<br />
The solution I found is from the website:<br />
<a href="http://blog.icewu.tk/93/install-ptam-on-ubuntu-11-04.html">http://blog.icewu.tk/93/install-ptam-on-ubuntu-11-04.html</a><br />
<br />
1. Edit the source file "cvd_src/v4l2buffer.cc:<br />
<pre> </pre>
<pre style="color: red;"> // #error "Can't do v4l2 for this kernel version"
#define K26(X) X
#define K24(X)</pre>
<br />
2. Edit "cvd/v4l1frame.h" :<br />
<div style="color: red;">
<br /></div>
<pre style="color: red;"> #include <linux videodev.h="">
#include <libv4l1-videodev.h></libv4l1-videodev.h></linux></pre>
<pre style="color: red;"> </pre>
<div style="color: white;">
3. Edit "Makefile" in libcvd: </div>
<div style="color: red;">
<br /></div>
<pre style="color: red;"> add cvd_src/Linux/v4lbuffer.o to CVD_OBJS</pre>
<pre style="color: red;"> </pre>
<div style="color: red;">
<span style="color: black;">4. Install libcvd without the configuration (configure will change the makefile).</span></div>
<div style="color: red;">
<br /></div>
<div style="color: black;">
5. Edit "Makefile" in PTAM to include " -llapack -lblas": </div>
<div style="color: red;">
<br /></div>
<div style="color: red;">
LINKFLAGS = -L MY_CUSTOM_LINK_PATH -lGVars3 -lcvd -llapack -lblas</div>
<div style="color: red;">
<br /></div>
<div style="color: red;">
<span style="color: black;">6. Install PTAM</span></div>Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com1tag:blogger.com,1999:blog-1433982368847864380.post-76169892871457268292012-04-13T05:34:00.001-07:002012-04-13T12:12:36.415-07:00Latex souce code of my presentation for the PhD defenseI thought it might be useful for someone who wants to use the latex for their presentations. In my case, I have used the latex graphical package TIKZ/PGF a lot. This package is very powerful and handy for drawing nice pictures, e.g., mind maps, arrows, coordinates, math plot, node chains. <br />
Here I would like to publish my source code and share some magics (-:. You can download my thesis, presentation and its source code by clicking following links:<br />
<br />
<br />
<span style="font-size: small;">Guoliang Liu. "Bayes Filters with Improved Measurements
For Visual Object Tracking", PhD Dissertation, University of Goettingen,
Mar 2012. (<a href="https://docs.google.com/open?id=0B67P0h48EQcwTlUxUVEwallGVGc" target="_blank">PDF</a>, <a href="https://docs.google.com/open?id=0B67P0h48EQcwNm5lOEdSaWszMHc" target="_blank">PPT</a>, <a href="https://docs.google.com/open?id=0B67P0h48EQcwcHY2X0JmOVFfdjA" target="_blank">LATEX CODE</a> )</span> <br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com8tag:blogger.com,1999:blog-1433982368847864380.post-12701813074250347782012-04-11T06:39:00.002-07:002012-04-13T12:12:53.754-07:00API mismatch: nvidiaI upgrade my ubuntu, but the camera applications give me an error message: API mismatch: nvidia....<br />
I find two versions of the nvidia in my system: one is from the ubuntu repository, i.e., nvidia-current. The other one was installed by myself long time ago by nvidia-installer.<br />
The solution for this issue uses the following command:<br />
<br />
sudo nvidia-installer --uninstall<br />
<br />
Of course, you also can remove the nvidia-current and run nvidia-installer again. For me, the previous one is simpler.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-81535450915032957112012-04-11T02:28:00.003-07:002012-04-13T12:13:32.072-07:00New paper: Square Root Sigma Point Information Filtering<div style="text-align: left;">
Recently I have a paper accepted in IEEE Trans. on Automatic Control, which is a great journal. The paper is titled as "Square-Root Sigma-Point Information Filtering". The preprint version of this paper is available <a href="https://sites.google.com/site/guoliangliu2010/">HERE</a>. The abstract of this paper is following: </div>
<br />
<div style="text-align: justify;">
Abstract—The sigma-point information filters employ a number of<br />
deterministic sigma-points to calculate the mean and covariance of a<br />
random variable which undergoes a nonlinear transformation. These<br />
sigma-points can be generated by the unscented transform or Stirling’s<br />
interpolation, which corresponds to the unscented information filter (UIF)<br />
and the central difference information filter (CDIF) respectively. In this<br />
technical note, we develop the square-root extensions of UIF and CDIF,<br />
which have better numerical properties than the original versions, e.g.,<br />
improved numerical accuracy, double order precision and preservation of<br />
symmetry. We also show that the square-root unscented information filter<br />
(SRUIF) might lose the positive-definiteness due to the negative Cholesky<br />
update, whereas the square-root central difference information filter<br />
(SRCDIF) has only positive Cholesky update. Therefore, the SRCDIF<br />
is preferable to the SRUIF concerning the numerical stability. </div>Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-24470775063970823472012-02-22T04:24:00.002-08:002012-02-22T04:24:44.385-08:00Very nice idea for presenting the GPA of studentIt is not good to show the name of student on the manuscripts, an option to solve such a problem is to show the hash value of student name (plus some random number) using MD5 algorithm. However, the student needs to know his random number. An alternative is to use the <b>matriculation number, so the student has to keep it as secrete, otherwise others may know your scores. </b>Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-83686854491588843312012-02-20T09:15:00.001-08:002012-02-20T09:17:28.097-08:00My public key on keyserver: http://keyserver.pgp.comMy public key (key ID: B92C8E6F) on keyserver: http://keyserver.pgp.com<br />
<br />Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-3519060483305398992012-02-20T08:04:00.000-08:002012-02-20T09:30:07.518-08:00gpg usage noteThe gpg has a new version: 1.4.12. When I used gpg --gen-key, it outputted two pairs of keys: main keys for signing and verifying (pub), sub keys for encryption and decryption (sub). However, to encrypt something, it is not necessary to use sub key ID, you can use pub key ID instead.<br />
<br />
A good explanation on this topic is here:<br />
<br />
http://wlug.org.nz/GPG/PGPNotes<br />
<br />
http://ubuntuforums.org/showthread.php?t=680292Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-35399095494548636352012-02-15T04:47:00.001-08:002012-02-15T04:49:43.882-08:00A nice book binding shop in Goettingen (for publications,哥廷根书籍装订店)Today is a big day for me, because I am going to submit my PhD thesis. Since the PCS program in University of Goettingen requires a binded thesis as a book, I have to find a binding shop. My colleague recommends a shop near the city center, which is Dieter Fischbach Buchbinderei. I brought the printed pages to there, and waited for about one hour. The final binded thesis is perfect, which is only cost 4.8 Euro for soft cover pages. Here is the location: <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-bwgEXRi5hAU/TzupPl9ZLtI/AAAAAAAABTM/l6uJp7rRzpw/s1600/buchbinderei" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="http://2.bp.blogspot.com/-bwgEXRi5hAU/TzupPl9ZLtI/AAAAAAAABTM/l6uJp7rRzpw/s320/buchbinderei" width="320" /></a></div>Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-28187522715182015652012-01-09T07:51:00.001-08:002012-01-09T07:51:35.286-08:00A very nice tutorial of paper writting for TOEFL<b><span>Welcome to the TOEFL-Prep Writing Practice Site</span></b><br />
<br />
<b><span>http://lrs.ed.uiuc.edu/students/fwalters/toeflwrite.html </span></b>Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-46753297322973236362011-12-16T09:09:00.001-08:002011-12-16T09:09:41.038-08:00ssh refused to visitIf you got this problem ,first check if both computers have installed ssh.<br />
This stupid problem wasted me few hours.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-66817296264400242052011-12-16T09:07:00.000-08:002011-12-16T09:07:18.637-08:00vncviewer: keyboard mapping problemIf you encounter a problem of keyboard mapping when you use the vncviewer,<br />
the solution is to add "export XKL_XMODMAP_DISABLE=1" to the file "~/.vnc/xstartup" on the server which looks like:<br />
<br />
" <br />
#!/bin/sh<br /><br />export XKL_XMODMAP_DISABLE=1<br /><br />xrdb $HOME/.Xresources<br />xsetroot -solid grey<br />#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &<br />#x-window-manager &<br />/etc/X11/Xsession<br />
"<br />
<br />
Of course, you have to restart xserver to implement the changes.<br />
<br />
<br /><br />
<br />Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-53354376099389807472011-12-16T09:03:00.000-08:002011-12-16T09:03:17.308-08:00Opencv 2.3 on Ubuntu 9.10The ubuntu 9.10 is not supported by ubuntu community any more. To use apt-get,<br />
you have to manually edit "/etc/source.list" file and replace "archive" with "old-release". <br />
<br />
The Opencv 2.3 need a cmake 2.8, buth ubuntu 9.10 only has cmake 2.6, so when you compile the opencv 2.3 the cmake gives you errors and warnings such as "incompletely configuration".<br />
<br />
What you need to do is downlad cmake 2.8 and install it.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-52122693774201223282011-12-14T05:53:00.000-08:002011-12-14T05:56:59.117-08:00URG-04LX-UG01 problems and solutionsRecently our group got a urg laser which has a usb connector. It took me about two days to figure following problems out:<br />
<br />
1. Power. The laser comes with a dual usb connector. From the urg website, it says the urg needs two usb port to get enough power (>500mA). I have tried every pairs of usb port. Neither of them work. The possible reasons are: the laser is damaged, the cable doesn't work, or the power from pc usb is not enough. I simply use a single usb connector from my mp3 to replace the dual usb port, then the laser is surprisingly working!! What can I say. Dual port don't work, single port works fine! If you have similar problem, then you can try this solution.<br />
<br />
2. Library. Now the laser can work well with XP system after installing the driver. However, the library got some problems when I compile them, such as can no reference to 'floor'. I google the solutions and find one nice patched urg library which works fine for Ubuntu oneiric:
http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/oneiric/urg/oneiric/revision/4?start_revid=4
You can download the tarball of the urg library and compile it. That works great on my ubuntu machine.<br />
<br />
3. Urg program samples. The sample programs also get some problems, such as "undefined reference to" blabla. The solution is very simple: rewriting the Make file (for C++ urg_sample) as :
CXXFLAGS = -g `urg-config --cflags` `sdl-config --cflags`
LDFLAGS = `urg-config --libs` `sdl-config --libs`
LDLIBS = -lc
gdScanSample: gdScanSample.cpp
g++ -o gdScanSample gdScanSample.cpp $(CXXFLAGS) $(LDFLAGS) $(LDLIBS)
clean :
$(RM) *.o $(TARGET)
.PHONY : all clean<br />
<br />
<br />
Now, everything works perfectly. Enjoy!Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-82696291128457936182011-09-21T06:05:00.000-07:002011-09-21T06:05:59.126-07:00Google, what are you going to do with the blogger?Now the google has the google+. How about the Blogger?
It's even harder to access the Blogger from the homepage of the Google.
I couldn't find it. The only thing about the blog is the blog search which is useless for me, because I don't want to search my blogger which is ridiculous.
The only way left is to type the www.blogger.com instead of the www.google.com. Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com1tag:blogger.com,1999:blog-1433982368847864380.post-80690437731088850022011-08-19T06:59:00.001-07:002011-08-19T06:59:27.355-07:00such that vs. so thatso that focuses on a purpose.
<br />
<br />such that focuses on a consequence.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-14981224103203628782011-08-13T10:26:00.001-07:002011-08-13T10:27:53.244-07:00IEEE LATEX TEMPLATE \markboth doesn't workBecause the default setting of the template is one side document, so to enable the \markboth,
<br />you have to add twoside to the documentclass options:
<br />\documentclass[10pt,journal,letterpaper,compsoc,twoside]{IEEEtran}Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-16437459854554709752011-08-12T02:10:00.000-07:002011-08-12T02:14:13.432-07:00cvFloodFill: one exampleIn the OpenCv, the definition of cvFloodFill is:
<br />
<br />void cvFloodFill( CvArr* img, CvPoint seed, double newVal,
<br /> double lo=0, double up=0, CvConnectedComp* comp=0,
<br /> int flags=4, CvArr* mask=0 );
<br />#define CV_FLOODFILL_FIXED_RANGE (1 << 16)
<br />#define CV_FLOODFILL_MASK_ONLY (1 << 17)
<br />
<br />The trick is how to define the flags. One example is:
<br />int flags = connectivity + (new_mask_val << 8 ) + CV_FLOODFILL_FIXED_MASK_ONLY;
<br />
<br />where connectivity can be 4 or 8, new_mask_val is the gray value to be assigned to the mask, e.g., 255.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-40627504851269901202011-08-10T08:38:00.001-07:002011-08-10T08:40:18.448-07:00JAVACV: no jniopencv_core in java.library.pathTo solve it, adding following lines to ~/.bashrc:
<br />#For JavaCv
<br />export CLASSPATH=$CLASSPATH:~/Src/javacv/javacv-bin/javacpp.jar:~/Src/javacv/javacv-bin/javacv.jar:~/Src/javacv/javacv-bin/javacv-linux-x86.jar
<br />
<br />The key solution is the javacv-linux-x86.jar. If you are using 64bits windows, then you have to choose javacv-windows-x86_64.jar.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com1tag:blogger.com,1999:blog-1433982368847864380.post-5958880861291228642011-08-09T07:06:00.000-07:002011-08-09T08:02:55.034-07:00Read temperature from sensors in GPUThe powerful tool is xsensors:
<br />First install lm-sensors:
<br />$ sudo apt-get install lm-sensors
<br />Then run sensors-detect in root
<br />$ sudo sensors-detect
<br />Answer YES to all.
<br />Then run sudo /etc/init.d/module-init-tools restart
<br />Answer No.
<br />Next install xsensors and run it by:
<br />$ sudo apt-get install xsensors
<br />$ sudo xsensors
<br />Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-73649068694708714262011-08-09T07:04:00.000-07:002011-08-09T07:05:57.889-07:00Recover the default nvidia driverJust do:
<br />$ sudo apt-get install nvidia-current
<br />That's it.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-8943189599927753922011-07-31T05:50:00.000-07:002011-07-31T06:00:51.956-07:00High quality video from images by FFMPEGGary Steele described how to use ffmpeg to make a video from images by the command:<br />ffmpeg -r 10 -b 1800 -i %03d.jpg test1800.mp4<br />(see: http://electron.mit.edu/~gsteele/ffmpeg/)<br /><br />This command only can output a very low quality video. To make the video better, you can try following command:<br /> ffmpeg -f image2 -i %03d.jpg -r 10 -s w*h test1800.mp4 <br />where w and h are the width and hight of the video image, such as 640*480.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0tag:blogger.com,1999:blog-1433982368847864380.post-26026073720144689622011-07-12T07:29:00.001-07:002011-07-12T07:31:53.218-07:00The vim-latexsuit in Ubuntu 11I failed to install it by apt-get. The version of the vim-latexsuit might be very old in the package source of Ubuntu. <br />I decide to install the latest version from the vim-latex website. Finally successful following their manual.Anonymoushttp://www.blogger.com/profile/09258887453719514369noreply@blogger.com0