Life-Geek
態度決定高度 高度決定視野
網頁
2010年7月3日 星期六
2010年5月26日 星期三
Virtual File System (VFS)
File System Category
Disk-based file system
journal file system: provide backup file system, more security
FAT -> NTFS
Network file system
NFS, SMB(CIFS), Samba(Unix-based SMB), AFS...
Special file system
/proc, /dev, devfs...
File System Abstraction Layer
/tmp (in-memory file system - RAM disk)
Unix file system
Filesystem are mounted at a specific mount point in a global hierarchy known as a namespace.
mount point(nfs, \tmp)
Each component of a path is called a directory entry(dentry)
inode - file's metadata
superblock - filesystm metadata
Non-Unix filesystem still work in Linux(FAT, NTFS)
special processing done on the fly
superblock, inode, dentry, file
[ static ]
sync_fs() best effort
link() - create a inode
dentry cache (d-cache)
inode cache (i-cache)
fs_struct (Process decriptor's fs field)
Disk-based file system
journal file system: provide backup file system, more security
FAT -> NTFS
Network file system
NFS, SMB(CIFS), Samba(Unix-based SMB), AFS...
Special file system
/proc, /dev, devfs...
File System Abstraction Layer
/tmp (in-memory file system - RAM disk)
Unix file system
Filesystem are mounted at a specific mount point in a global hierarchy known as a namespace.
mount point(nfs, \tmp)
Each component of a path is called a directory entry(dentry)
inode - file's metadata
superblock - filesystm metadata
Non-Unix filesystem still work in Linux(FAT, NTFS)
special processing done on the fly
VFS Objects
superblock, inode, dentry, file
[ static ]
sync_fs() best effort
link() - create a inode
dentry cache (d-cache)
inode cache (i-cache)
fs_struct (Process decriptor's fs field)
Nothing is trivial
研究不是一件容易的事
比起coding 研究需要花費更多的心思
除了要設想每個可能被擊破論點
還要小心翼翼地花費時間闡述出來
只不過如果研究方向就是錯誤的話
研究出來的結果就是不可行
那要怎麼去扭轉這樣的結論
真的是不容易......
比起coding 研究需要花費更多的心思
除了要設想每個可能被擊破論點
還要小心翼翼地花費時間闡述出來
只不過如果研究方向就是錯誤的話
研究出來的結果就是不可行
那要怎麼去扭轉這樣的結論
真的是不容易......
2010年5月24日 星期一
[OpenCV] Camera Capture
Programmer can extract webcam image throuhg OpenCV easily.
Following is the example code.
[code]
CvCapture *capture;
IplImage *frame;
capture =cvCaptureFromCAM(0) ; //camera init
cvNamedWindow("Webcam",0); //highgui window init
while(TRUE)
{
frame = cvQueryFrame(capture); //extract from CvCapture struct
cvShowImage("Webcam",frame); //show frame
if(cvWaitKey(10)>=0) //wait for key in
{
break;
}
}
cvReleaseCapture(&capture);
cvDestroyWindow("Webcam");
Following is the example code.
[code]
CvCapture *capture;
IplImage *frame;
capture =cvCaptureFromCAM(0) ; //camera init
cvNamedWindow("Webcam",0); //highgui window init
while(TRUE)
{
frame = cvQueryFrame(capture); //extract from CvCapture struct
cvShowImage("Webcam",frame); //show frame
if(cvWaitKey(10)>=0) //wait for key in
{
break;
}
}
cvReleaseCapture(&capture);
cvDestroyWindow("Webcam");
pkg-config
pkg-config is a useful tool for compiling.
It helps to insert correct compiler options on the command line for gcc/g++ compiler.
example:
`pkg-config gtk+-2.0 --cflags` //include gtk+2.0 lib
`pkg-config opencv --libs --cflags opencv` //include opencv lib
[Reference]
pkg-config wiki - http://pkg-config.freedesktop.org/wiki/
It helps to insert correct compiler options on the command line for gcc/g++ compiler.
example:
`pkg-config gtk+-2.0 --cflags` //include gtk+2.0 lib
`pkg-config opencv --libs --cflags opencv` //include opencv lib
[Reference]
pkg-config wiki - http://pkg-config.freedesktop.org/wiki/
訂閱:
文章 (Atom)