Thursday, May 31, 2007

[Work] Inpainting

Inpainting software
Image Restoration

CImg : C++ Template Image Processing Library
GREYCSTORATION : A fast and efficient multi-valued image regularization algorithm
by David Tschumperlé

Image inpainting papers

[Ballester 01] Filling-In by Joint Interpolation of Vector Fields and Gray Levels
C. Ballester, M. Bertalmio, V. Caselles, and G. Sapiro Proc. IEEE Transactions on Image Processing, vol. 10, no. 8, August 2001

[Bertalmio 00] Image Inpainting
M. Bertalmio, G. Sapiro, V. Caselles, and C. Ballester, Proc. of Siggraph 2000, New Orleans, LA, July 2000.

[Bertalmio 01] Navier-Stokes, Fluid Dynamics, and Image and Video Inpainting
M. Bertalmio, A.L. Bertozi, and G. Sapiro Proc. Computer Vision and Pattern Recognition (CVPR), 2001

[Bertalmio 03] Simultaneous Structure and Texture Image Inpainting
M. Bertalmio, L. Vese, G. Sapiro, and S. Osher, Proc. Computer Vision and Pattern Recognition (CVPR), 2003

[Criminisi 04] Region filling and object removal by examplar-based image inpainting
A. Criminisi and P. Pérez and K. Toyama, IEEE Trans. on Image Processing. 13(9), 2004

[Sun 05] Image completion with structure propagation
Jian Sun, Lu Yuan, Jiaya Jia and H.-Y. Shum
SIGGRAPH 2005

[Work] Using vim

Three modes

[normal] Esc
[insert] i, I
[visual] v, C+v (visual block)

Basic commands

:w        write out
:q quit
:q! force quit
ZZ write the file and quit
dd delete one line
3dd delete three lines
D delete portion of current line to right of the cursor
p paste
u undo
C+r redo

w move cursor one word to right
b move cursor one word to left
0 move cursor to beginning of line
$ move cursor to end of line
nG move cursor to line n
C+f scroll forward one screen
C+b scroll backward one screen
a append to right of current cursor position (end with ESC)
dw delete current word (end with ESC)
ma mark currrent position
d`a delete everything from the marked position to here
`a go back to the marked position
/string search forward for string (end with Enter)
n repeat the last search (``next search'')
:s/s1/s2 replace (``substitute'') (the first) s1 in this line by s2
:%s/s1/s2 replace (``substitute'') (the first) s1 by s2 in filewide
% go to the "mate," if one exists, of this parenthesis
or brace or bracket (very useful for programmers!)

Advanced commands


:syntax on syntax coloring
move cursor to the defination of a function(variable): 1. ma 2. gD

visual block operations:
1. C+v -- swicth to visual block mode
2. select rectangular region
3. I -- switch to insert mode and do editing in the selected region, e.g. put "//" there
4. Esc -- back to the normal mode
5. you can also delete a rectangle region by hit "d"

Customize your vim

put ~.vimrc
e.g.
set visualbell            " Silence the bell, use a flash instead
set cinoptions=:.5s,>1s,p0,t0,(0,g2 " :.5s = indent case statements 1/2 shiftwidth
" >1s = indent 1 shiftwidth
" p0 = indent function definitions 0 spaces
" t0 = indent function return type 0 spaces
" (0 = indent from unclosed parantheses
" g2 = indent C++ scope resolution 2 spaces
set cinwords=if,else,while,do,for,switch,case " Which keywords should indent
set formatoptions=tcqor " t=text, c=comments, q=format with "gq",
" o,r=autoinsert comment leader
set cindent " indent on cinwords
set shiftwidth=2 " set shiftwidth to 4 spaces
set tabstop=2 " set tab to 4 spaces
set showmatch " Show matching brackets/braces/parantheses.
"set background=dark " set background to dark
set showcmd " Show (partial) command in status line.
set autowrite " Automatically save before commands like :next and :make
set textwidth=98 " My terminal is 98 characters wide
colorscheme evening
syntax on

" Cleanup
function! Clean_up()
set visualbell&
set cinoptions&
set cinwords&
set formatoptions&
set cindent&
set shiftwidth&
set tabstop&
set showmatch&
"set background&
set showcmd&
set autowrite&
set textwidth&
"unmap
"unmap
"unmap
"unmap
"unmap
endfunction

Wednesday, May 30, 2007

[Work] HTML special characters

character entity reference
e.g. ©
numeric character reference
e.g. ©

-IDCode-Description
Á193Aacute1latin capital letter A with acute
á225aacute1latin small letter a with acute
â226acirc1latin small letter a with circumflex
Â194Acirc1latin capital letter A with circumflex
´180acute1acute accent
æ230aelig1latin small letter ae
Æ198AElig1latin capital letter AE
À192Agrave1latin capital letter A with grave
à224agrave1latin small letter a with grave
8501alefsymLalef symbol
Α913AlphaGgreek capital letter alpha
α945alphaGgreek small letter alpha
&38ampCampersand
8743andMlogical and
8736angMangle
å229aring1latin small letter a with ring above
Å197Aring1latin capital letter A with ring above
8776asympMalmost equal to
Ã195Atilde1latin capital letter A with tilde
ã227atilde1latin small letter a with tilde
Ä196Auml1latin capital letter A with diaeresis
ä228auml1latin small letter a with diaeresis
8222bdquoUdouble low-9 quotation mark
Β914BetaGgreek capital letter beta
β946betaGgreek small letter beta
¦166brvbar1broken bar
8226bullPbullet
8745capMintersection
Ç199Ccedil1latin capital letter C with cedilla
ç231ccedil1latin small letter c with cedilla
¸184cedil1cedilla
¢162cent1cent sign
χ967chiGgreek small letter chi
Χ935ChiGgreek capital letter chi
ˆ710circDmodifier letter circumflex accent
9827clubsSblack club suit
8773congMapproximately equal to
©169copy1copyright sign
8629crarrAdownwards arrow with corner leftwards
8746cupMunion
¤164curren1currency sign
8224daggerUdagger
8225DaggerUdouble dagger
8659dArrAdownwards double arrow
8595darrAdownwards arrow
°176deg1degree sign
Δ916DeltaGgreek capital letter delta
δ948deltaGgreek small letter delta
9830diamsSblack diamond suit
÷247divide1division sign
é233eacute1latin small letter e with acute
É201Eacute1latin capital letter E with acute
Ê202Ecirc1latin capital letter E with circumflex
ê234ecirc1latin small letter e with circumflex
è232egrave1latin small letter e with grave
È200Egrave1latin capital letter E with grave
8709emptyMempty set
8195emspUem space
8194enspUen space
ε949epsilonGgreek small letter epsilon
Ε917EpsilonGgreek capital letter epsilon
8801equivMidentical to
Η919EtaGgreek capital letter eta
η951etaGgreek small letter eta
ð240eth1latin small letter eth
Ð208ETH1latin capital letter ETH
ë235euml1latin small letter e with diaeresis
Ë203Euml1latin capital letter E with diaeresis
8364euroUeuro sign
8707existMthere exists
ƒ402fnofIlatin small f with hook
8704forallMfor all
½189frac121vulgar fraction one half
¼188frac141vulgar fraction one quarter
¾190frac341vulgar fraction three quarters
8260fraslPfraction slash
Γ915GammaGgreek capital letter gamma
γ947gammaGgreek small letter gamma
8805geMgreater-than or equal to
>62gtCgreater-than sign
8660hArrAleft right double arrow
8596harrAleft right arrow
9829heartsSblack heart suit
8230hellipPhorizontal ellipsis
í237iacute1latin small letter i with acute
Í205Iacute1latin capital letter I with acute
î238icirc1latin small letter i with circumflex
Î206Icirc1latin capital letter I with circumflex
¡161iexcl1inverted exclamation mark
Ì204Igrave1latin capital letter I with grave
ì236igrave1latin small letter i with grave
8465imageLblackletter capital I
8734infinMinfinity
8747intMintegral
Ι921IotaGgreek capital letter iota
ι953iotaGgreek small letter iota
¿191iquest1inverted question mark
8712isinMelement of
Ï207Iuml1latin capital letter I with diaeresis
ï239iuml1latin small letter i with diaeresis
Κ922KappaGgreek capital letter kappa
κ954kappaGgreek small letter kappa
λ955lambdaGgreek small letter lambda
Λ923LambdaGgreek capital letter lambda
9001langTleft-pointing angle bracket
«171laquo1left-pointing double angle quotation mark
8592larrAleftwards arrow
8656lArrAleftwards double arrow
8968lceilTleft ceiling
8220ldquoUleft double quotation mark
8804leMless-than or equal to
8970lfloorTleft floor
8727lowastMasterisk operator
9674lozElozenge

8206lrmUleft-to-right mark
8249lsaquoUsingle left-pointing angle quotation mark
8216lsquoUleft single quotation mark
<60ltCless-than sign
¯175macr1macron
8212mdashUem dash
µ181micro1micro sign
·183middot1middle dot
8722minusMminus sign
Μ924MuGgreek capital letter mu
μ956muGgreek small letter mu
8711nablaMnabla

160nbsp1no-break space
8211ndashUen dash
8800neMnot equal to
8715niMcontains as member
¬172not1not sign
8713notinMnot an element of
8836nsubMnot a subset of
ñ241ntilde1latin small letter n with tilde
Ñ209Ntilde1latin capital letter N with tilde
Ν925NuGgreek capital letter nu
ν957nuGgreek small letter nu
ó243oacute1latin small letter o with acute
Ó211Oacute1latin capital letter O with acute
Ô212Ocirc1latin capital letter O with circumflex
ô244ocirc1latin small letter o with circumflex
Œ338OEligOlatin capital ligature OE
œ339oeligOlatin small ligature oe
ò242ograve1latin small letter o with grave
Ò210Ograve1latin capital letter O with grave
8254olinePoverline
ω969omegaGgreek small letter omega
Ω937OmegaGgreek capital letter omega
Ο927OmicronGgreek capital letter omicron
ο959omicronGgreek small letter omicron
8853oplusMcircled plus
8744orMlogical or
ª170ordf1feminine ordinal indicator
º186ordm1masculine ordinal indicator
Ø216Oslash1latin capital letter O with stroke
ø248oslash1latin small letter o with stroke
Õ213Otilde1latin capital letter O with tilde
õ245otilde1latin small letter o with tilde
8855otimesMcircled times
Ö214Ouml1latin capital letter O with diaeresis
ö246ouml1latin small letter o with diaeresis
182para1pilcrow sign
8706partMpartial differential
8240permilUper mille sign
8869perpMup tack
φ966phiGgreek small letter phi
Φ934PhiGgreek capital letter phi
Π928PiGgreek capital letter pi
π960piGgreek small letter pi
ϖ982pivGgreek pi symbol
±177plusmn1plus-minus sign
£163pound1pound sign
8243PrimePdouble prime
8242primePprime
8719prodMn-ary product
8733propMproportional to
ψ968psiGgreek small letter psi
Ψ936PsiGgreek capital letter psi
"34quotCquotation mark
8730radicMsquare root
9002rangTright-pointing angle bracket
»187raquo1right-pointing double angle quotation mark
8658rArrArightwards double arrow
8594rarrArightwards arrow
8969rceilTright ceiling
8221rdquoUright double quotation mark
8476realLblackletter capital R
®174reg1registered sign
8971rfloorTright floor
Ρ929RhoGgreek capital letter rho
ρ961rhoGgreek small letter rho

8207rlmUright-to-left mark
8250rsaquoUsingle right-pointing angle quotation mark
8217rsquoUright single quotation mark
8218sbquoUsingle low-9 quotation mark
Š352ScaronOlatin capital letter S with caron
š353scaronOlatin small letter s with caron
8901sdotMdot operator
§167sect1section sign
­
173shy1soft hyphen
Σ931SigmaGgreek capital letter sigma
σ963sigmaGgreek small letter sigma
ς962sigmafGgreek small letter final sigma
8764simMtilde operator
9824spadesSblack spade suit
8834subMsubset of
8838subeMsubset of or equal to
8721sumMn-ary sumation
8835supMsuperset of
¹185sup11superscript one
²178sup21superscript two
³179sup31superscript three
8839supeMsuperset of or equal to
ß223szlig1latin small letter sharp s
Τ932TauGgreek capital letter tau
τ964tauGgreek small letter tau
8756there4Mtherefore
Θ920ThetaGgreek capital letter theta
θ952thetaGgreek small letter theta
ϑ977thetasymGgreek small letter theta symbol
8201thinspUthin space
Þ222THORN1latin capital letter THORN
þ254thorn1latin small letter thorn with
˜732tildeDsmall tilde
×215times1multiplication sign
8482tradeLtrade mark sign
ú250uacute1latin small letter u with acute
Ú218Uacute1latin capital letter U with acute
8657uArrAupwards double arrow
8593uarrAupwards arrow
û251ucirc1latin small letter u with circumflex
Û219Ucirc1latin capital letter U with circumflex
Ù217Ugrave1latin capital letter U with grave
ù249ugrave1latin small letter u with grave
¨168uml1diaeresis
ϒ978upsihGgreek upsilon with hook symbol
υ965upsilonGgreek small letter upsilon
Υ933UpsilonGgreek capital letter upsilon
ü252uuml1latin small letter u with diaeresis
Ü220Uuml1latin capital letter U with diaeresis
8472weierpLscript capital P
ξ958xiGgreek small letter xi
Ξ926XiGgreek capital letter xi
ý253yacute1latin small letter y with acute
Ý221Yacute1latin capital letter Y with acute
¥165yen1yen sign
ÿ255yuml1latin small letter y with diaeresis
Ÿ376YumlOlatin capital letter Y with diaeresis
Ζ918ZetaGgreek capital letter zeta
ζ950zetaGgreek small letter zeta

8205zwjUzero width joiner

8204zwnjUzero width non-joiner

[Work] using alias

create file pv:
#!/bin/sh
pfsin $1 | pfsview
do alias:
alias pv '~/bin/pv'
then you can us
pv 〈 HDR image 〉

[Work] awk basic examples

awk '{printf("%20.5f %20.5f\n", $1, $2)}' file
awk '{print $1, $2}' file

[Work] sed examples

sed example:

an example file: img.h
#ifndef _GAN_IMAGE_RGBA_UINT_H
#define _GAN_IMAGE_RGBA_UINT_H
#include
#include

task: replace with "image_colour_noc.h"

done with:
sed -e 's//"\1"/g' img.h

sed example: bash

for i in *.c; do sed -e 's//"..\/common\/\1"/g' -e 's//"..\/linalg\/\1"/g' -e 's//"\1"/g' $i > sedtest/$i; done

sed example:
change:
obj: allocate.c bit_array.c compare.c gan_err.c list_test.c misc_error.c
array.c common_test.c endian_io.c gan_err_trace.c memory_stack.c numerics.c
array_noc.c comp_noc.c file_io.c linked_list.c misc_defs.c

to:
obj: allocate.c bit_array.c compare.c gan_err.c list_test.c misc_error.c
array.c common_test.c endian_io.c gan_err_trace.c memory_stack.c numerics.c
array_noc.c comp_noc.c file_io.c linked_list.c misc_defs.c

by:
sed 's/\.c *\([a-z]\)/\.c \1/g' Makefile

[Work] Bash shell programming

shell script file: test.sh (chmod +x test.sh)
#!/bin/bash
...

//bash
for i in *.ppm; do if (test$i = "pic039.ppm"); then break; fi; echo $i; mv $i ./group00; done

#!/bin/bash
flag='0'
for i in *.ppm; do
if (test $i = "pic050.ppm")
then
flag='1'
fi
if (test $flag -gt '1')
then
echo $i
# mv $i ../
fi
done

//bash
flag="false"; for i in *.ppm; do if(test $i = "pic050.ppm"); then flag="true"; fi; if(test $flag = "true");then echo $i; fi; done

ls | wc -l
ls > ./tmp

//bash
//rename files
idx=0; for i in *.ppm; do filename=pic$(printf "%03d" $idx).ppm; let idx=idx+1; echo $filename; mv $i tmp/$filename; done

using renamer

#!/bin/sh
i=0
while [ $i -lt 1000 ]
do
i=$((i+1))
fname=$(printf "%05d" $i)
fname=horse01_${fname}_000.tif

if [ -f $fname ]
then
echo processing $fname
newname=edge_$(printf "%05d" $i)
echo newname: $newname
./linemax $fname $newname 1000
fi
done

[Work] Computational Geometry library

computational geometry algorithm library

[Work] Optimization

Systems Optimization Laboratory (SOL)
some powerful linear system solver
some useful links for optimization

30岁的生日

30岁了
还是个学生
还要很久才能毕业的学生
觉得很老
觉得生活很没盼头

30岁的那天
妻子做了一根生日面和一盒 生日巧克力




妻子总说我很老了
不再是和我一个时代的
因为我是P4 (喜欢谐音的我想起“奔死”, 但“甭死”)
而她是P3
其实人的年老不光是因为身体的自然老化
很大一部分是周围的人不再把你当成年轻人了
就像说多了谣言也会兑现
比如你老说两个人要分手
结果最后可能真分手

所以家长很少说自己的孩子长大以后会一无是处
虽然有的父母说自己的孩子活脱是个强盗魔鬼
但心里肯定向着所有的名人都有不安份的童年

看看每个下台以后首脑
你会发现顿时老了10几岁
比如克林顿
甚至连竞选失败的John Kerry
也瞬间变成了一个老人

还比如
你可以说一个小孩长得真快
你也可以说一个小孩长得真老
但你不可以说一个耄耋老人他/她真老
这好比说她/他怎么这么老了还活着

说到底
给人以自信
给自己以自信
活地乐观点
也就会年轻点

战斗着
工作着
运动着
思想着
人也会更年轻

多给旁边的人鼓励哦 !

[Work] Links

Bookmark


Frédo Durand's Computer Graphics Bookmarks
USC computer vision
Tim Rowley, SIGGRAPH papers
Ke-Sen Huang, links, conferences
Computer Vision Bibliography, Keith Price
USC, computer vision conference list
People in SIGGRAPH

Course

w3school, HTML tutorial
Level set introduction
Causes of color
Advice on Research and Writing
CS 348B Spring 2005 Rendering Competition
Appearance Models in Computer Graphics and Vision
CSE272: Advanced Appearance Modeling
Topices in computer graphics
SS06, Geometric Modeling, MPI informatik
CSE558, Special topics in computer graphics, University of Washington

Dictionary

Free translation
Kingsoft online, Chinese-EnglishGoogle language tools Leo, English-German
Systran
OneLook
Wikipedia
The Free Dictionary

Laboratory

computer vision lab, Weizmann Institute of science
computational vision lab, CalTech
UCLA vision lab
Caltech multi-Res Modeling group
USC computer vision
computer graphics, Bonn University
computer vision laboratory, Columbia University
UCSB four eyes lab
Multi-Res Modeling Group at Caltech
Systems Optimization Laboratory (SOL), Stanford
Max-Planck institute for Biological cybernetics
Kriegman Research Group
GRAIL, Unversity of Washington
Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology(MIT)

Miscellane

Studentwerk Saarland
English books
English books
Chinese books
Books by Yuhua
Euyou(chinese)
kaiyuan (chinese)
University of Washington, Seattle, ISO (International services office)
AG4 internal pages
AG4 Shared Projects Documentation
MPI Informatik computer graphics, D4
crack serial number

Model


3D total
The Stanford 3D Scanning Repository
Princeton Shape Benchmark
Polygonal Models Links
Large Geometric Models Archive
CyberWare Samples
Prism 3D data
3DValley.com

People

Amit Agrawal, computational photography
George Borshukov
Jean-Yves Bouguet
Paul Bourke, POV ray, texture library
Frédo Durand, MIT graphics
James Elder, vision, perception, edge, contour, shadow
Kayvon Fatahalian
Ronald Fedkiw, Stanford
Berthold K.P. Horn
Lee Kaifu
Kyros Kutulakos
Fabrice Neyret
Matt Pharr, PBRT
Ramesh Raskar, MERL
Yoav Yosef Schechner
Jos Stam
Szymon Rusinkiwicz
James T. Todd, Psychology, human vision

Radio

94.9FM, NPR, BBC world service, Olympia, Seattle
90.3FM, Seattle, where the music matters
WAMU 88.5FM, American University Radio
China Radio International, Frequencies
Deutsche Welle Frequency and Program Schedule
Shortwave radio information for beginners, by Luo Castino

Resource

flickr, photos
computer vision software
Image restoration, inpainting, solvers
Virtual terrian project
CPP reference (C++)
OpenGL
SDL
A great LOD book

Scientific Library

computational geometry algorithm library
Levenberg-Marquardt nonlinear least squares algorithms in C/C++
Open Optimization Library
Optimization: Frequently Asked Questions
Optimization packages
Optimization Center
QSopt Linear Programming Solver
Newmat C++ matrix library
Stanford Optimization Library
TAO: Toolkit for Advanced Optimization
Local and Global Optimization Library
Automatic Differentiation
GNU Science Library (GSL)
Intel Math Kernel Library
Automatically Tuned Linear Algebra Software (ATLAS)
Multivac Level set code

Search

Google
Baidu, Chinese
Yahoo search
MSN search
MathWorld
ScienceWorld
Google Scholar
ACM Digital Library
Annotated Computer Vision Bibliography
CiteSeer
Research Index
IEEE computer society digital library

Seattle

Metro online, Seattle
94.9FM, NPR, BBC world service, Olympia, Seattle
90.3FM, Seattle, where the music matters
WAMU 88.5FM, American University Radio
Chinese Students and Scholars Association, University of Washington
International Service Office(ISO), University of Washington
CSE support, University of Washington
Computer Science and Engineering, University of Washington
GRAIL, Unversity of Washington
Computing and networking, University of Washington
Colloquium and televised talk information, University of Washington
CSE558, Special topics in computer graphics, University of Washington

Software

Rendered Realities
The Object-Oriented Numerics Page
ZBrushCentral
Pointshop3D
gnuplot
xfig

Tex

The TeX Users Group web site
TeX Frequently Asked Questions
Math
latex tips, UK list of TeX faq

Travel

US weather
Germany weather
Saarbahn, Bus and train in Saarbruecken, transportation plan
Bahn.de, Train in Germany
Chambered Nautilus Bed and Breakfast Inn, Seattle, WA
Accor hotels
Scandinavian Airline
Metro online, Seattle
American Chinese online, Chinese information about U.S. life
Metropolitan Transportation Authority(MTA), New York, NY
Triangle Transit Authority(TTA), Raleigh, Chapel Hill, Durham
Macy's way to shop, stores, online information
Nordstrom, stores, online information

[Work] Using Emacs

Emacs manual
Emacs searching and replacement

Searching

C + s
search-forward
C + r
search-backward
C + M + s
search-forward-regexp

Replacement

M-x replace-string RET string RET newstring RET
M-% string RET newstring RET
M-x replace-regexp
M-x query-replace
M-x query-replace-regexp

Other search-and-loop commands
M-x count-matches RET regexp RET
Print the number of matches for regexp after point.
M-x flush-lines RET regexp RET
Delete each line that follows point and contains a match for regexp.
M-x keep-lines RET regexp RET
Delete each line that follows point and does not contain a match for regexp

Regular Expresion
special characters are '$','^', '.', '*', '+', '?', '[', ']' and '\'



[Work] notes

ImageMagick Convert

crop
convert -geometry 50% -crop 600x360+45+150 a.tif a_50.tif

differe/subtract
differe/subtract two images using ImageMagick convert
convert -compose difference

CVS

set CVS_ROOT in tcsh
setenv CVS_ROOT

check out, update, add/commit
checkout(co): cvs -d checkout
update(up): cvs -d update
add fold: cvs -d /HPS/projects/repository/ag4app add AutoDiff
add files: cvs -d /HPS/projects/repository/ add ag4app/AutoDiff/*.tex
commit: cvs -d /HPS/projects/repository/ commit ag4app/AutoDiff
create cvs repository

  1. cvs -d /usr/local/cvsroot init
  2. cd testproj
  3. cvs import -m "My initial project message" testproj username start

Emacs

reformat *.txt file

for each paragraph, first Esc, then q

select the whole buffer

Ctrl+x h

go the end of the buffer

Alt+shift+>(<) mark a region
use mouse;
Ctrl+space at the beginning of the region; move the cursor to the end of the region; the region between them are selected.

Copy/paster
use left mouse button to select; click middle mouse button to paste
mark the region; Ctrl+w to cut; Ctrl+y to paste

open/save/close a buffer
open: Ctrl+x Ctrl+f
save: Ctrl+x Ctrl+s
close: Ctrl+x Ctrl+c

kill a line
Ctrl+k

delete a word
Alt+d

search and replace
search: Ctrl+s
reverse search: Ctrl+r
replace: Alt+shift+% , Space to replace, Delete to continue

abort command
Ctrl+g

iproc

copy channels
iproc a.raw.gz -f copyChannels from = 8 to = 8 -o b RAW bz2

toAscii
iproc a.raw.gz -f toAscii format = 1 -o bla RAW

s412ToFloat
iproc file.tif -f s412ToFloat -o bla RAW

iproc test.tif -f toFloat -o a

multiply, jet256
iproc a.raw.gz -f copyChannels from = 1 to = 1 -f multiply factor = 0.5 -f toByte -f jet256 -o ch1_jet TIFF

Crop
iproc a.raw.gz -f Crop pos = 309 274 size = 68 68 -o b RAW

Normalize, Gamma, toByte
iproc a.raw.gz -f Normalize -f Gamma gamma = 0.45 -f toByte -o b TIFF

white balance
iproc a.raw.gz -f applyWB wb = 1 0.9 0.6 -o b TIFF

RAW to PIC
iproc -o PIC

Latex

Graphics in LaTeX
To use graphics in LaTeX, you must include the graphicx package using the declaration below. You should put it after the \documentclass declaration.
    \usepackage{graphicx}
If you need a graphic or tabular material to be part of the text, you can just put it inline. It will not have a caption or any fancy formatting.
    \includegraphics{subdivision}
If you need it to appear in the list of figures or tables, it should be placed in the floating environment.
    \begin{figure}[h]
\caption{A Figure}
\centering
% DO NOT ADD A FILENAME EXTENSION TO THE GRAPHIC FILE
\includegraphics{subdivision}
\label{subd}
\end{figure}
Positioning Graphics

You can control the position of the figure on the page or within the chapter by including letters between the brackets after the \begin{figure} declarations. The options are h = right here, t = top of the page, b = bottom of the page, and p = separate page of figures. You can also place the letters in order of your preference and you can add an exclamation mark to make it try hard. An example of this is: \begin{figure}[h!tbp]. With this example, LaTeX will try REALLY hard to place it at that exact point in the text. If that does not work, it will place it at the top of the next page. If that also does not work, it will attempt to place it at the bottom of the page. The last resort will be placing it on a separate page (even if it will not take up a whole page) right before the start of a new chapter or section. Rotating and Scaling Graphics

You can also do some minor editing to your figures in LaTeX. The following example shows how you can rotate and scale your graphic:

    \section{More Figure Stuff}
\begin{figure}[h!]
\caption{A Smaller Figure, Flipped Upside Down}
\centering
% DO NOT ADD A FILENAME EXTENSION TO THE GRAPHIC FILE
\includegraphics[scale=0.5,angle=180]{subdivision}
\label{subd2}
\end{figure}
\section{Even More Yet Figure Stuff}

Remember, the angle must be in degrees without any unit information. Scaling does not use percentages but decimals. If you divide the percentage you want by 100, you will get the decimal value to use. One will keep the image the original size. Cropping With some clever work you can crop a figure, which is handy if (for instance) your EPS or PDF is a little graphic on a whole sheet of paper. The viewport arguments are the lower-left and upper-right coordinates for the area you want to crop.

    \begin{figure}[h!]
\caption{A Cropped Figure}
\centering
% DO NOT ADD A FILENAME EXTENSION TO THE GRAPHIC FILE
\includegraphics[clip=true, viewport=.0in .0in 1in 1in]{subdivision}
\label{subd3}
\end{figure}
Ten Most Common Mistakes in Math Theses
  1. To typeset {a | a>0}, try $\{a\mid a>0\}$. The point is to use \mid instead of |. The latter has spacing problems.
  2. To typeset f: X -> Y, try $f\colon X\to Y$. Use \colon instead of : to get the correct spacing.
  3. Consider typing "there exists" instead of "\exists" and "for all" instead of "\forall". They take about the same amount of typing, and it's often easier on the reader.
  4. After a period, TeX adds space. To remove that space, include "\ ", a backslash followed by a blank space. For example: "Dr. No" should be written "Dr.\ No" and "i.e." should be written "i.e.\ ".
  5. To typeset the variable x, remember the dollar signs: $x$.
  6. To typeset cos, log, etc., use \cos, \log, etc. Use \operatorname to define your own "math operators". For example, \newcommand{\span}{\operatorname{span}} causes \span to act like \cos. Both the font and spacing are modified.
  7. Know the difference between - (hyphen, used to hyphenate words), -- (en dash, used for ranges, e.g., 1--10), and --- (em dash, used for parenthetical phrases).
  8. Use a ~ to avoid bad linebreaks. Example: Joe Shmoe~\cite{schmoe} or Theorem~\ref{myTheorem}. (Learn to use labels and refs, by the way.) You should also use ~ to avoid having a linebreak that causes the next line to begin with a number.
  9. $\int_0^1x\,dx$ is better than $\int_0^1x dx$. The \, adds a bit of space.
  10. Maybe nine is enough, for now.

Linux Commands

Change password
yppasswd

Copy from different machine
scp -r unnilpentium:/mnt/sdb/bssrdf/schwein ./

check the status of printer
lpq

check file size
du -h *

check free disk space
df

search the content by "less"
/

find a string using grep
grep -i 'abc' test.txt >> ./temp

count lines in a file
wc -l

animate images
animate *.tif
qiv *.tif

go to last directory
cd -

lookup a word
dict

switch among the shells
Shift + \u2192(\u2190)

switch the desktop
Ctrl+Shift+Tab

edit shell command line
Alt+d: delete a word

mount/unmount
mount cdrom
unmount cdrom

find a file
find -name "string"

chmod
chmod +x(wr) [filename]
chmod g0= [filename] : set group and other user no rights
chmod 777 [filename] :set all rights
chmod -R +x [directory name] : recursively change a fold's mode

glxinfo
check graphics card information

gkrellm
monitor the computer

dmesg
get device information

tiffinfo
get information of a tiff image

matlab
start matlab, locations: /opt/matlab/bin/matlab or /usr/local/bin/matlab

diff two files
vimdiff a b

wget download
wget -q -O /dev/null 'http://halma.mpi-sb.mpg.de//ExportOpenAgent'

mp3 player
xmms

OFF file viewer
geomview

iv viewer
ivview

SSH security
public keys lie in .ssh/authorized_keys

bash setting in .bashrc
e.g.,
export FILTER_PATH=/home/proj/IBR/filter/single/Debian3.1_max
alias ll="ls -l"

miscellane

Helpdesk

United States Coinage
Penny(1 cent), Nickle(5 cents), Dime(10 cents), Quarter(25 cents), Half-dollar, Dollar

rename a file in windows
click on a file, F2 the filename while be editable

IE/Firefox automatically close
why did IE/Firefox automatically close when we I browsing some webpage(e.g. the webpage with Bezier curve demo.)?
The solution:
The reason of that problem is the MS Java runtime is out of order. (probably because the counter in the virtual machine) So just go to Sun's Java webpage and download the newest Java Runtime Environment and replace the old one on my computer.
But I did it in a different way. I just went to Control panel and then Add/Remove programs. There is one item call J2SE Runtime Environment 5.0 Update 6.0. I clicked "change" and then follow the installation windows. After this update, my web browser can stably browse interactive web pages.

plot

sort
sort in gnuplot, also for: awk, sed, paste
pl [][1e-4:] '<>

video

images to DivX
mencoder mf://\*.png -mf w=152:h=172:fps=2:type=png -ovc lavc -oac lavc -ffourcc DX50 -o out.avi

vim

recording

  1. qq # start recording and use the register q
  2. i # enter insert mode
  3. ... # some editing
  4. Esc # back to the normal mode
  5. 10 # the time of repeating
  6. @q # q is the register used
basic commands
  • u # undo
  • dd # delete one line
  • :quit # quit
  • :wq #write and quite
  • :q! #forced quit

[Work] EDISON

EDISON

code for the edge detection and image segmentation system


Tuesday, May 29, 2007

一部一部的看韩剧

骨子里很喜欢一笔一划的中文字
内心里觉得说中国话很亲切

工作中的英语
和代码中的符号和数字
让我的神经变得麻木

人麻木了
有两种后果
一种是变傻了
一种是变累了

人累了有两种出路
休息和生病

累了的我
最简单的想法是
我要
看中文电视
听中文广播
读中文小说

最被动的方法是看电视
但身边中文电视很少
韩国电视到不少
很多中国朋友
或有韩国朋友的中国朋友
他们读喜欢看韩剧

所以借了很多的韩剧
《浪漫满屋》
《雏菊》
《冬季恋歌》
《恋爱时代》
《我的女孩》
《野蛮女友》
《真的真的喜欢你》
《嫂嫂19岁》
《宫》
《宫s》
《大长今》
......

我喜欢看长篇的连续剧
喜欢一口气看完一部电视
看到凌晨的时候
困了累了饿了
心理防线也弱了
剧情渐渐的推向高潮
情感的积累也越来越厚重

于是主人公的一句不经意的话
或者一个平凡的场景
可能触发我感情的爆发
经常夜深人静中的我
痛哭流涕
像个孩子

经常在这样的时候
我觉得我还活着
我还年轻
我还有情感
我还在感念生活

这也是人老了的重要标志
年轻人很少回忆
年轻人很少感触
年轻人会因为受欺负而哭泣
年轻人会因为失恋而痛不欲生

而老人不同
老人会因为吃到了儿时的一种特殊的东西而流泪
老人会想起几十年前牵着自己的小手走过田头的妈妈而浮现甜蜜的笑容
老人会因为想起初恋而老泪纵横

简单的生活故事,每一天的叙述

不知道什么叫blog
只是听别人说得很多
很多人花了很多时间在做我不知道的事情
很奇怪, 很不理解

我的妻子也每天在做这样的事情
我没看过也没关心过

学了12年的计算机专业
有点荒唐

今天工作累了
想休息一下
看中文听中文
对我来说就是最大的休息

看了看几部中文电影
觉得无趣

心不在焉的浏览着蚂蚁大小的新闻条目
看见了俞敏洪的一篇 “ 对生命的态度 ”
在他的说法里
生活的快乐来得很轻快,轻松快捷
途经很简单
乐观点
看好的地方

就是说娶了丑老婆
不要看脸上的疤
要看心里的德
如果两个都没得看
就看在给你生了个胖娃娃
即使你刨根究底说一个个都不行
我也不相信世界上有完缺的人

其实这生活观
所有人都知道
但现实生活中大多数人烦恼
大部分时间烦恼

但俞敏洪就是能把越是不敏感的人变得容易激动

我问妻子“弗哌酸”是什么药
妻子好奇问我为什么问
我说那是俞敏洪在夏威夷拉肚子吃得药

妻子知道我在看blog
很好奇也很兴奋

当场要我开个账号
我说再等等
今天就算了

继续看俞老师的blog
看起来很遥远
10年前看这些东西会激动
会做梦
往前做梦,或叫憧憬

现在看这些东西
多少有点麻木
但也会觉得好笑
也会做梦
往后做梦, 这叫追忆

追忆逝水的年华
会染上一些水彩
朦朦胧胧
却又能激起内心的涟漪
清清的荡漾
暂时忘却现实的刻薄

心,情
都是飘摇不定的
捉摸不透的
在一瞬间
你可能会爱上一个人
而且这个爱可能被你一辈子不能忘记
这叫一见钟情

忽然间想起什么
不是褪色的爱
而是儿时的爱好
我很喜欢写
描绘我的生活
勾画我的情感

所以决定今天上路