2013年5月21日 星期二

C/C++ - float and double

float x = 1.3f; double y = 1.3;

2013年5月16日 星期四

OpenCV - imagedata的加減

IplImage *img = cvCreateImage(cvSize(5,3), 8, 1);

img->imageData[1*img->widthStep] = 178;
img->imageData[1*img->widthStep+1] = 177;

img->imageData[1*img->widthStep]+=img->imageData[1*img->widthStep+1];
cout << "img[1,0] = " << (double)(uchar)img->imageData[1*img->widthStep];
經過上面程式碼後,會print:
99

2013年5月9日 星期四

下括號,行距兩倍,插入bibliography

ex:
\underbrace{被括起來的內容,括號在下面}_{註解在下方}
\underbrace{被括起來的內容,括號在下面}^{註解在上方}
\overbrace{被括起來的內容,括號在上面}_{註解在下方}
\overbrace{被括起來的內容,括號在上面}^{註解在上方}
========
行距變兩倍
/begin{spacing}{2}
% 要變兩倍的內容
/end{spacing}
========
ref:http://greenhandtobe.blogspot.tw/2012/07/latexreference.html