這套軟體雖是open-source 其要求如下
OS :indows XP with Service Pack 2
.NET Framework 3.5 SP1
A webcam or videocamera with nightvision and infrared illumination (check supported hardware)
A fairly decent computer
http://www.gazegroup.org/downloads/23-gazetracker/
ITU Gaze Tracker Forun 論壇
http://www.gazegroup.org/forum/
2010年7月6日 星期二
2010年6月16日 星期三
如何利用Video4Linux抓取WebCam數據-資料
Video4Linux是Linux下用於獲取視頻和 音頻數據的API接口,在這篇文章中,著重闡述如何利用Video4Linux獲取攝像頭數據,以實現連續影像的播放。
1. 攝像頭的安裝 在Linux下常用的攝像頭驅動是spca5xx, 這是一個通用驅動,讀者可以在以下網站下到這個驅動http://mxhaard.free.fr/download.html。
這個網站還給出了這款驅動支持的攝像頭的種類。另外,ov511芯片直接就支持Linux,使用者款 芯片的攝像頭有網眼V2000。我使用的是網眼V2000的攝像頭,和Z-Star 301p+現代7131R芯片的攝像頭。後一種需要spca5xx的驅動。關於spca5xx的安裝方法,網上有很多介紹,這裡 就不說了。
2. 攝像頭的調試 安裝好攝像頭後,為了測試攝像頭能否正常工作,可以用 一下軟件。比較著名的是xawtv,在網上搜以下可以下載到。安裝好後,打開xawtv則可以調試攝像頭。
3. Video4Linux 編程獲取數據 現有的video4linux有兩個版本,v4l和 v4l2。
本文主要是關於v4l的編程。利用v4l API獲取視頻圖像一般有以下幾步:
a> 打開設備
b> 設置設備的屬性,比如圖像的亮度,對比度等等
c> 設定傳輸格式和傳輸方式
d> 開始傳輸數據,一般是一個循環,用以連續的傳輸數據
e> 關閉設備
下面具體介紹v4l編程的過程。首先指出,在video4linux編程時要包含頭文 件,其中包含了video4linux的數據結構和函數定義。
1)v4l的數據結構 在video4linux API中定義瞭如下數據結構,詳細的數據結構定義可以參考v4l API的文檔,這裡就編程中經常使用的數據結構作出說明。
1. 攝像頭的安裝 在Linux下常用的攝像頭驅動是spca5xx, 這是一個通用驅動,讀者可以在以下網站下到這個驅動http://mxhaard.free.fr/download.html。
這個網站還給出了這款驅動支持的攝像頭的種類。另外,ov511芯片直接就支持Linux,使用者款 芯片的攝像頭有網眼V2000。我使用的是網眼V2000的攝像頭,和Z-Star 301p+現代7131R芯片的攝像頭。後一種需要spca5xx的驅動。關於spca5xx的安裝方法,網上有很多介紹,這裡 就不說了。
2. 攝像頭的調試 安裝好攝像頭後,為了測試攝像頭能否正常工作,可以用 一下軟件。比較著名的是xawtv,在網上搜以下可以下載到。安裝好後,打開xawtv則可以調試攝像頭。
3. Video4Linux 編程獲取數據 現有的video4linux有兩個版本,v4l和 v4l2。
本文主要是關於v4l的編程。利用v4l API獲取視頻圖像一般有以下幾步:
a> 打開設備
b> 設置設備的屬性,比如圖像的亮度,對比度等等
c> 設定傳輸格式和傳輸方式
d> 開始傳輸數據,一般是一個循環,用以連續的傳輸數據
e> 關閉設備
下面具體介紹v4l編程的過程。首先指出,在video4linux編程時要包含頭文 件,其中包含了video4linux的數據結構和函數定義。
1)v4l的數據結構 在video4linux API中定義瞭如下數據結構,詳細的數據結構定義可以參考v4l API的文檔,這裡就編程中經常使用的數據結構作出說明。
2010年6月7日 星期一
Windows Snort (自由軟體IDS)系統建立程序-3
14.安裝Pear
Setp1. cmd->cd c:\php
*pear config-set http_proxy xxx.xxx.xxx.xxx:8080*有proxy需設 (xxx.xxx.xxx.xxx=proxy ip)
Setp3.pear install Image_Color
Setp4.pear install Log
Setp5.pear install Numbers_Roman
Setp6.pear install http://pear.php.net/get/Image_Canvas
Setp7.pear install http://pear.php.net/get/Numbers_Words-0.15.0
Setp8.pear install http://download.pear.php.net/package/Image_Graph-0.7.2.tgz
15.安裝 ADODB
Setp1.Download ADODB http://adodb.sourceforge.net/#download
Setp2.解壓縮至C:\
16.安裝BASE
Setp1.http://base.secureideas.net/
Setp2.解壓縮至C:\Apache\htdocs\ 安裝目錄改成Base
Setp3.設定base_conf.php C:\Apache\htdocs\base\base_conf.php.dist 更名base_conf.php
$BASE_urlpath = '';改$BASE_urlpath = 'http://localhost/base';
$DBlib_path = "";改$DBlib_path = "c:\adodb";
$alert_dbname = 'snort_log';
$alert_host = 'localhost';
$alert_port = '';
$alert_user = 'snort';
$alert_password = 'mypassword';
改
$alert_dbname = 'snort_log';
$alert_host = 'localhost';
$alert_port = '3306';
$alert_user = 'root';
$alert_password = 'mysql密碼';
$archive_exists = 0; # Set this to 1 if you have an archive DB
$archive_dbname = 'snort_archive';
$archive_host = 'localhost';
$archive_port = '';
$archive_user = 'snort';
$archive_password = 'mypassword';
修改成
$archive_exists = 1; # Set this to 1 if you have an archive DB
$archive_dbname = 'snort_archive';
$archive_host = 'localhost';
$archive_port = '3306';
$archive_user = 'root';
$archive_password = 'mysql密碼';
$portscan_file = ''; 改 $portscan_file = 'c:\snort\log\portscan.log'; 存檔關閉
C:\snort\doc\signatures Copy to C:\Apache\htdocs\base #Alert 可以查詢 文字說明
17.建立BASE 資料庫欄位
開始 >執行 cmd
cd C:\apache\htdocs\base\sql\
c:\mysql\bin\mysql -D snort_log -u root -p密碼 < create_base_tbls_mysql.sql
c:\mysql\bin\mysql -D snort_archive -u root -p密碼 < create_base_tbls_mysql.sql
http://hocalhost/BASE/index.php "大功告成"
(之後設定增加管理與安全性 )
18 建立PphpMyadmin 管理
http://www/phpmyadmin.net/home_page/index.php 下載 解壓縮至 c:\Apache\htdocs\
目錄改名稱phpMyadmin
修改目錄檔案config.inc.php
$cfg['PmaAbsoluteUri'] = ''; 改$cfg['PmaAbsoluteUri'] =http://localhost/phpMyAdmin/;
$cfg['Servers'][$i]['password'] = ''; 改$cfg['Servers'][$i]['password'] = '密碼';
http://hocalhost/phpmyadmin/index.php 可以正常登入表示安裝OK
19 網頁安全性登入
命令模式 cd \apache\bin
c:\apache\bin> htpasswd -c c:\apache\pwd\pwd 帳號
請輸入兩次密碼
c:\apache\conf\httpd.conf
#增加以下設定#
AuthType Basic
AuthName "BASE"
AuthUserFile c:\apache\pwd\pwd
Require user base
AuthType Basic
AuthName "phpMyAdmin"
AuthUserFile c:\apache\pwd\pwd
Require user base
增加以下設定
DirectoryIndex index.php
DirectoryIndex base_main.php
找到Options Indexes FollowSymLinks 改 Options -Indexes FollowSymLinks
Setp1. cmd->cd c:\php
*pear config-set http_proxy xxx.xxx.xxx.xxx:8080*有proxy需設 (xxx.xxx.xxx.xxx=proxy ip)
Setp3.pear install Image_Color
Setp4.pear install Log
Setp5.pear install Numbers_Roman
Setp6.pear install http://pear.php.net/get/Image_Canvas
Setp7.pear install http://pear.php.net/get/Numbers_Words-0.15.0
Setp8.pear install http://download.pear.php.net/package/Image_Graph-0.7.2.tgz
15.安裝 ADODB
Setp1.Download ADODB http://adodb.sourceforge.net/#download
Setp2.解壓縮至C:\
16.安裝BASE
Setp1.http://base.secureideas.net/
Setp2.解壓縮至C:\Apache\htdocs\ 安裝目錄改成Base
Setp3.設定base_conf.php C:\Apache\htdocs\base\base_conf.php.dist 更名base_conf.php
$BASE_urlpath = '';改$BASE_urlpath = 'http://localhost/base';
$DBlib_path = "";改$DBlib_path = "c:\adodb";
$alert_dbname = 'snort_log';
$alert_host = 'localhost';
$alert_port = '';
$alert_user = 'snort';
$alert_password = 'mypassword';
改
$alert_dbname = 'snort_log';
$alert_host = 'localhost';
$alert_port = '3306';
$alert_user = 'root';
$alert_password = 'mysql密碼';
$archive_exists = 0; # Set this to 1 if you have an archive DB
$archive_dbname = 'snort_archive';
$archive_host = 'localhost';
$archive_port = '';
$archive_user = 'snort';
$archive_password = 'mypassword';
修改成
$archive_exists = 1; # Set this to 1 if you have an archive DB
$archive_dbname = 'snort_archive';
$archive_host = 'localhost';
$archive_port = '3306';
$archive_user = 'root';
$archive_password = 'mysql密碼';
$portscan_file = ''; 改 $portscan_file = 'c:\snort\log\portscan.log'; 存檔關閉
C:\snort\doc\signatures Copy to C:\Apache\htdocs\base #Alert 可以查詢 文字說明
17.建立BASE 資料庫欄位
開始 >執行 cmd
cd C:\apache\htdocs\base\sql\
c:\mysql\bin\mysql -D snort_log -u root -p密碼 < create_base_tbls_mysql.sql
c:\mysql\bin\mysql -D snort_archive -u root -p密碼 < create_base_tbls_mysql.sql
http://hocalhost/BASE/index.php "大功告成"
(之後設定增加管理與安全性 )
18 建立PphpMyadmin 管理
http://www/phpmyadmin.net/home_page/index.php 下載 解壓縮至 c:\Apache\htdocs\
目錄改名稱phpMyadmin
修改目錄檔案config.inc.php
$cfg['PmaAbsoluteUri'] = ''; 改$cfg['PmaAbsoluteUri'] =http://localhost/phpMyAdmin/;
$cfg['Servers'][$i]['password'] = ''; 改$cfg['Servers'][$i]['password'] = '密碼';
http://hocalhost/phpmyadmin/index.php 可以正常登入表示安裝OK
19 網頁安全性登入
命令模式 cd \apache\bin
c:\apache\bin> htpasswd -c c:\apache\pwd\pwd 帳號
請輸入兩次密碼
c:\apache\conf\httpd.conf
#增加以下設定#
AuthType Basic
AuthName "BASE"
AuthUserFile c:\apache\pwd\pwd
Require user base
AuthType Basic
AuthName "phpMyAdmin"
AuthUserFile c:\apache\pwd\pwd
Require user base
DirectoryIndex index.php
DirectoryIndex base_main.php
找到Options Indexes FollowSymLinks 改 Options -Indexes FollowSymLinks
2010年6月2日 星期三
freeware目光追蹤器
Open source gaze tracking, freeware and low cost eye tracking
This list contains low-cost, free and open source eye tracking systems and research prototypes, and information that should help in building your own eye tracker. Some of them are targeted at people with disabilities (eye-control systems), some for more general eye tracking and research.
ITU Gaze Tracker, works with a webcam or videocamera with nightvision and infrared illumination.
openEyes, open-source open-hardware toolkit for low-cost real-time eye tracking
See also the Windows version by Joel Clemens.
Opengazer, open-source gaze tracker for ordinary webcams.
TrackEye: Real-Time Tracking Of Human Eyes Using a Webcam. Implemented in C++ using the OpenCV library.
myEye, eye-tracking software to allow people with severe motor disabilities to use gaze as an input device for interacting with a computer. Beta version of the prototype software available for download.
This list contains low-cost, free and open source eye tracking systems and research prototypes, and information that should help in building your own eye tracker. Some of them are targeted at people with disabilities (eye-control systems), some for more general eye tracking and research.
ITU Gaze Tracker, works with a webcam or videocamera with nightvision and infrared illumination.
openEyes, open-source open-hardware toolkit for low-cost real-time eye tracking
See also the Windows version by Joel Clemens.
Opengazer, open-source gaze tracker for ordinary webcams.
TrackEye: Real-Time Tracking Of Human Eyes Using a Webcam. Implemented in C++ using the OpenCV library.
myEye, eye-tracking software to allow people with severe motor disabilities to use gaze as an input device for interacting with a computer. Beta version of the prototype software available for download.
2010年5月31日 星期一
Windows Snort (自由軟體IDS)系統建立程序-2
7. 檢查以上指令有無成功 查看權限
mysql>show grants for base@localhost;
mysql>show grants for snort@localhost;
8.設Mysql root 密碼
mysql>set password for root@localhost = password ("******"); #(內為密碼)為密碼
mysql>quit
9.開始->執行>cmd
c:\mysql \bin>mysql -u root -p密碼snort_log < c:\snort\schemas\create_mysql
c:\mysql \bin>mysql -u root -p密碼 snort_archive < c:\snort\schemas\create_mysql
再次登入看看資料欄位有無成功建立
c:\mysql\bin>mysql -u root -p
輸入密碼
mysql>use snort_log;
mysql>show tables; 查看一下
mysql>use snort_archive; mysql>show tables; 查看一下
10.設定MySQL安全性
mysql>drop database test;
mysql>use mysql;
mysql>delete from user where user='';
mysql>delete from user where user='%';
mysql>flush privileges;
11.安裝Apache Server
將安裝目錄設為c: 定選擇全部安裝 過程中出現防火牆請按解除封鎖
12.設定httpd.conf c:\Apache\conf\httpd.conf
增加這三行
LoadModule php5_module c:\php\php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir c:\php 存檔離開
13.安裝設定PHP
下載 http://www.php.net/downloads.php zip檔解壓縮至c:\php
設定php.ini 將C:\php\php.ini-dist 變更成php.ini
max_execution_time = 30改max_execution_time = 900
display_errors = On改display_errors = Off
extension_dir = "./"改extension_dir = "c:\php\ext"
; cgi.force_redirect = 1改cgi.force_redirect = 0
;extension=php_gd2.dll改extension=php_gd2.dll
;extension=php_mysql.dlle改xtension=php_mysql.dll
;extension=mbstring.dll改extension=mbstring.dll
;session.save_path = "/tmp"改session.save_path = "c:\windows\temp"
;include_path = ".;c:\php\includes"改include_path = "c:\php\pear" 重新啟動系統
mysql>show grants for base@localhost;
mysql>show grants for snort@localhost;
8.設Mysql root 密碼
mysql>set password for root@localhost = password ("******"); #(內為密碼)為密碼
mysql>quit
9.開始->執行>cmd
cd \mysql\bin
c:\mysql \bin>mysql -u root -p密碼snort_log < c:\snort\schemas\create_mysql
c:\mysql \bin>mysql -u root -p密碼 snort_archive < c:\snort\schemas\create_mysql
再次登入看看資料欄位有無成功建立
c:\mysql\bin>mysql -u root -p
輸入密碼
mysql>use snort_log;
mysql>show tables; 查看一下
mysql>use snort_archive; mysql>show tables; 查看一下
10.設定MySQL安全性
mysql>drop database test;
mysql>use mysql;
mysql>delete from user where user='';
mysql>delete from user where user='%';
mysql>flush privileges;
11.安裝Apache Server
將安裝目錄設為c: 定選擇全部安裝 過程中出現防火牆請按解除封鎖
12.設定httpd.conf c:\Apache\conf\httpd.conf
增加這三行
LoadModule php5_module c:\php\php5apache2_2.dll
AddType application/x-httpd-php .php
PHPIniDir c:\php 存檔離開
13.安裝設定PHP
下載 http://www.php.net/downloads.php zip檔解壓縮至c:\php
設定php.ini 將C:\php\php.ini-dist 變更成php.ini
max_execution_time = 30改max_execution_time = 900
display_errors = On改display_errors = Off
extension_dir = "./"改extension_dir = "c:\php\ext"
; cgi.force_redirect = 1改cgi.force_redirect = 0
;extension=php_gd2.dll改extension=php_gd2.dll
;extension=php_mysql.dlle改xtension=php_mysql.dll
;extension=mbstring.dll改extension=mbstring.dll
;session.save_path = "/tmp"改session.save_path = "c:\windows\temp"
;include_path = ".;c:\php\includes"改include_path = "c:\php\pear" 重新啟動系統
2010年5月30日 星期日
Windows Snort (自由軟體IDS)系統建立程序-1
1.http://www.snort.org/downloads 下載Snort 與 rule 需註冊可下載Free rule
2.安裝 Snort 並將rele解壓縮到c:\snort
3.到snort目錄下etc下編輯snort.conf
logfile { portscan.log }
G.# output database: alert, 這行改成output database: alert, mysql, user=snort password=winsnort dbname=snort_log host=127.0.0.1 port=3306 sensor_name=HOSTNAME
H.安裝WinPcap
I.測試安裝是否正常 CMD 下打 snort -vp -iX "(X)為第幾張網卡"
2.安裝 Snort 並將rele解壓縮到c:\snort
3.到snort目錄下etc下編輯snort.conf
A.把 var HOME_NET any 找出修改成
1.本機IP(主機型IDS)
2.192.168.104.0/24(單一區網 網路型IDS )
3.[172.18.11.0/24 ,172.19.11.0/24,172.18.19.12.0/24...]多網段
4.var RULE_PATH ../rules 更換var RULE_PATH c:\snort\rules
4.var RULE_PATH ../rules 更換var RULE_PATH c:\snort\rules
B# config detection: search-method lowmem del#
C.dynamicpreprocessor directory /usr/local/lib/snort_dynamicpreprocessor/改成 dynamicpreprocessor directory c:\snort\lib\snort_dynamicpreprocessor
D.dynamicengine /usr/local/lib/snort_dynamicengine/libsf_engine.so 之後改成 dynamicengine c:\snort\lib\snort_dynamicengine\sf_engine.dll
E.# output log_tcpdump: tcpdump.log 改成 output alert_fast: alert.ids
F.# preprocessor sfportscan: proto { all } memcap { 10000000 } sense_level { low }
改成preprocessor sfportscan: proto { all } memcap { 10000000 }sense_level { low } logfile { portscan.log }
G.# output database: alert, 這行改成output database: alert, mysql, user=snort password=winsnort dbname=snort_log host=127.0.0.1 port=3306 sensor_name=HOSTNAME
H.安裝WinPcap
I.測試安裝是否正常 CMD 下打 snort -vp -iX "(X)為第幾張網卡"
A -->開始-->執行-->
C snort /SERVICE /INSTALL -c c:\snort\etc\snort.conf -l c:\snort\log -K ascii -iX(X=第幾張網卡1 2 3 4以此類推)
D 控制台->;系統管理工具->;服務 選擇snort 啟動類型改成自動 "若無法啟動 可能之前的步驟錯誤 請到 系統管理工具->的事件檢視器->應用程式 查看"
5.安裝MySQL 用進階設定將目錄裝在c:\MySQL 並選擇 standard configuration 選擇跟圖片所是一樣設定,取消Modify Security Settings,最後按Execute-->Finish 完成安裝
接著修改c:\mysql\my.ini 將原設定
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 改成
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
6.進入MySQL command Line Client 還未設密碼直接Enter
mysql>;create database snort_log;
mysql>;create database snort_archive;
mysql>;show databases;
mysql>;grant USAGE on *.* to base@localhost identified by "WinSnort";
mysql>;grant SELECT,INSERT,UPDATE,DELETE,CREATE,ALTER on snort_log.* to base@localhost;
mysql>grant SELECT,INSERT,UPDATE,DELETE,CREATE on snort_archive.* to base@localhost;
mysql>INSERT,SELECT,UPDATE on snort_log.* to snort@localhost;2010年5月16日 星期日
EyeWriter System Requirements
1.There are also commercial products available -- costing in the range of ~$20,000 US or more-- that are
specifically designed to enable people with ALS to communicate using their eyes.(專用開發使用EyeWriter,非常昂貴)
Our functional design specifications are as follows:
1. The EyeWriter should be as inexpensive as possible (降低價錢盡量便宜)
2. The fabrication and assembly of the system should require only common hand tools(手工製作過程手工具具共通性)
3. Whenever possible components and parts should be available for purchase locally versus online
4. The camera should produce 640 x 480 NTSC video(能產生640 x 480 NTSC video)
5. The camera should be sensitive to near-field IR light ( 能感應紅外線)
6. The camera should not auto-iris (or auto-iris should be disabled in the camera's driver).(不要有自動偵測
自動偵測亮度功能或可以關閉)
7. IR LEDs should be used to illuminate the pupil (需要 IR LED)
IR LED是甚麼東西?http://coopermaa2nd.blogspot.com/2010/01/nec-ir-protocol.html 這有解釋
紅外線遙控原理
外線是目前最常見的一種無線通訊,普遍使用在家電以及玩具產品,如電視、音響、錄放影機、冷氣機、DVD、MP3 Player、遙控車等。紅外線遙控之所以被大量採使用,主要是因為紅外線裝置體積小、成本低、耗電少及硬體設計容易。下圖是紅外線發射器 (Transmitter 或稱 IR LED)和接收器(Receiver)常見外觀,一般來說,紅外線遙控系統由發射器和接收器這兩部份組成。
製作過程可以參考這裡,PDF檔上描述的製作過程算清楚(
但是沒有相當技巧與勇氣可能會做壞掉 Ps3 Eye,價格台幣1500左右,但好像沒單獨PS3 eys 都被需搭配PS3遊戲
不過應該在視訊監控系統的監控CCD 類似http://www.videoaccess.com/ir_camera_ch.html
可否產生上述功能要求,並支援Linux,更簡易的達成EyeWriter 使用的專屬眼鏡
作者選用因為
1.PS3 eye 比較便宜;
2.整合影像擷取卡 電腦不必多安裝
3.比較輕巧 外殼機構去掉容易改裝
specifically designed to enable people with ALS to communicate using their eyes.(專用開發使用EyeWriter,非常昂貴)
Our functional design specifications are as follows:
1. The EyeWriter should be as inexpensive as possible (降低價錢盡量便宜)
2. The fabrication and assembly of the system should require only common hand tools(手工製作過程手工具具共通性)
3. Whenever possible components and parts should be available for purchase locally versus online
4. The camera should produce 640 x 480 NTSC video(能產生640 x 480 NTSC video)
5. The camera should be sensitive to near-field IR light ( 能感應紅外線)
6. The camera should not auto-iris (or auto-iris should be disabled in the camera's driver).(不要有自動偵測
自動偵測亮度功能或可以關閉)
7. IR LEDs should be used to illuminate the pupil (需要 IR LED)
IR LED是甚麼東西?http://coopermaa2nd.blogspot.com/2010/01/nec-ir-protocol.html 這有解釋
紅外線遙控原理
外線是目前最常見的一種無線通訊,普遍使用在家電以及玩具產品,如電視、音響、錄放影機、冷氣機、DVD、MP3 Player、遙控車等。紅外線遙控之所以被大量採使用,主要是因為紅外線裝置體積小、成本低、耗電少及硬體設計容易。下圖是紅外線發射器 (Transmitter 或稱 IR LED)和接收器(Receiver)常見外觀,一般來說,紅外線遙控系統由發射器和接收器這兩部份組成。
製作過程可以參考這裡,PDF檔上描述的製作過程算清楚(
但是沒有相當技巧與勇氣可能會做壞掉 Ps3 Eye,價格台幣1500左右,但好像沒單獨PS3 eys 都被需搭配PS3遊戲
不過應該在視訊監控系統的監控CCD 類似http://www.videoaccess.com/ir_camera_ch.html
可否產生上述功能要求,並支援Linux,更簡易的達成EyeWriter 使用的專屬眼鏡
作者選用因為
1.PS3 eye 比較便宜;
2.整合影像擷取卡 電腦不必多安裝
3.比較輕巧 外殼機構去掉容易改裝
訂閱:
文章 (Atom)


