Because the default setting of the template is one side document, so to enable the \markboth,
you have to add twoside to the documentclass options:
\documentclass[10pt,journal,letterpaper,compsoc,twoside]{IEEEtran}
Saturday, August 13, 2011
Friday, August 12, 2011
cvFloodFill: one example
In the OpenCv, the definition of cvFloodFill is:
void cvFloodFill( CvArr* img, CvPoint seed, double newVal,
double lo=0, double up=0, CvConnectedComp* comp=0,
int flags=4, CvArr* mask=0 );
#define CV_FLOODFILL_FIXED_RANGE (1 << 16)
#define CV_FLOODFILL_MASK_ONLY (1 << 17)
The trick is how to define the flags. One example is:
int flags = connectivity + (new_mask_val << 8 ) + CV_FLOODFILL_FIXED_MASK_ONLY;
where connectivity can be 4 or 8, new_mask_val is the gray value to be assigned to the mask, e.g., 255.
void cvFloodFill( CvArr* img, CvPoint seed, double newVal,
double lo=0, double up=0, CvConnectedComp* comp=0,
int flags=4, CvArr* mask=0 );
#define CV_FLOODFILL_FIXED_RANGE (1 << 16)
#define CV_FLOODFILL_MASK_ONLY (1 << 17)
The trick is how to define the flags. One example is:
int flags = connectivity + (new_mask_val << 8 ) + CV_FLOODFILL_FIXED_MASK_ONLY;
where connectivity can be 4 or 8, new_mask_val is the gray value to be assigned to the mask, e.g., 255.
Wednesday, August 10, 2011
JAVACV: no jniopencv_core in java.library.path
To solve it, adding following lines to ~/.bashrc:
#For JavaCv
export CLASSPATH=$CLASSPATH:~/Src/javacv/javacv-bin/javacpp.jar:~/Src/javacv/javacv-bin/javacv.jar:~/Src/javacv/javacv-bin/javacv-linux-x86.jar
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.
#For JavaCv
export CLASSPATH=$CLASSPATH:~/Src/javacv/javacv-bin/javacpp.jar:~/Src/javacv/javacv-bin/javacv.jar:~/Src/javacv/javacv-bin/javacv-linux-x86.jar
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.
Tuesday, August 9, 2011
Read temperature from sensors in GPU
The powerful tool is xsensors:
First install lm-sensors:
$ sudo apt-get install lm-sensors
Then run sensors-detect in root
$ sudo sensors-detect
Answer YES to all.
Then run sudo /etc/init.d/module-init-tools restart
Answer No.
Next install xsensors and run it by:
$ sudo apt-get install xsensors
$ sudo xsensors
First install lm-sensors:
$ sudo apt-get install lm-sensors
Then run sensors-detect in root
$ sudo sensors-detect
Answer YES to all.
Then run sudo /etc/init.d/module-init-tools restart
Answer No.
Next install xsensors and run it by:
$ sudo apt-get install xsensors
$ sudo xsensors
Labels:
GPU temperature,
sensors,
Ubuntu 11.04 Natty Narwhal
Sunday, July 31, 2011
High quality video from images by FFMPEG
Gary Steele described how to use ffmpeg to make a video from images by the command:
ffmpeg -r 10 -b 1800 -i %03d.jpg test1800.mp4
(see: http://electron.mit.edu/~gsteele/ffmpeg/)
This command only can output a very low quality video. To make the video better, you can try following command:
ffmpeg -f image2 -i %03d.jpg -r 10 -s w*h test1800.mp4
where w and h are the width and hight of the video image, such as 640*480.
ffmpeg -r 10 -b 1800 -i %03d.jpg test1800.mp4
(see: http://electron.mit.edu/~gsteele/ffmpeg/)
This command only can output a very low quality video. To make the video better, you can try following command:
ffmpeg -f image2 -i %03d.jpg -r 10 -s w*h test1800.mp4
where w and h are the width and hight of the video image, such as 640*480.
Tuesday, July 12, 2011
The vim-latexsuit in Ubuntu 11
I failed to install it by apt-get. The version of the vim-latexsuit might be very old in the package source of Ubuntu.
I decide to install the latest version from the vim-latex website. Finally successful following their manual.
I decide to install the latest version from the vim-latex website. Finally successful following their manual.
Subscribe to:
Posts (Atom)