2011年5月11日 星期三

Mjpeg Webcam

裝置:uvc webcam
軟體:v4l2
Download : mjpeg.tar.bz2
make

xxx@xxx-desktop:~/mjpeg/mjpg-streamer-r63$ ./mjpg_streamer
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
Unable to set format: Invalid argument
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
xxx@xxx-desktop:~/mjpeg/mjpg-streamer-r63$ ./mjpg_streamer -i "input_uvc.so -d /dev/video0 -y" -o "output_http.so"
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: YUV
i: JPEG Quality......: 80
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled


*******************************web browser
The command for mplayer i am using is mplayer -nocache -demuxer lavf "http://localhost:8080/?action=stream&ignored.mjpg"

2011年5月9日 星期一

eclipse for qt java install


A Download
i、 下載JRE(Java Runtime Environment) 。(http://java.sun.com/javase/downloads/index.jsp)
安裝JRE


... /usr/local ]#chmod +x jxx-linux-i586-rpm.bin

... /usr/local ]#./jxxx-linux-i586-rpm.bin
產生/usr/local/jdk1.6.0_25
修改路徑
$gedit /etc/profile
...
export JAVA_HOME=/usr/local/jdk1.6.0_25
export JRE_HOME=/usr/local/jdk1.6.0_25/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME;lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
...
umask 022
測試是否成功
source /ect/profile
沒任何提示表示成功

ii. (測試Java是否安装成功)
[root@localhost ~]#java –version
http://www.cnblogs.com/images/cnblogs_com/oomusou/JRE3.jpg

iii. download g++
sudo apt-get install build-essential
輸入 gcc,出現“gcc: no input files”,安裝成功!

iv. 下載qt framework
步驟如下連結

v. 下載 qt and eclipse
tar vxfz qt-eclipse-integration-linux.x86-1.6.1.tar.gz 後先保留後面步驟使用

linux下eclipse的安装
for c/c++
(下載eclipse-linuxtools-helios-SR2-incubation-linux-gtk)
(解壓後eclipse-SDK-3.2.1-linux-gtk.tar.gz)執行



我是安裝c/c++ eclipse 為了整合qt 之用
安裝步驟如上連結且測試了Hello World 發覺eclipse 真是酷也 接下來qt 整在一起吧
install CDT
或者打開eclipse install new software :
選擇或鍵入 http://download.eclipse.org/tools/cdt/releases/helios 此相關pending 後勾選全部下載

接下來qt framework 我解壓縮放在如 上 A 第iv 點make 路徑:/usr/local/Trolltech

A v步驟後: 裡面會和 eclipse的資料夾裡features和plugins兩個資料夾,分別將這兩資料夾內的內容放置你Eclipse(以我為 例我的Eclipse放置/opt/Eclipse)相對應的資料夾內(Eclipse中也有features和plugins兩個資料夾),然後啟動 Eclipse,即可。這樣QT就整合完成了。

重起eclipse 後請設好路徑
version name: 4.7.3
Bin path: /usr/local/Trolltech/Qt-4.7.3/bin
Include: /usr/local/Trolltech/Qt-4.7.3/include

**********************************
最後注意 開發專案
c\c++ 要include Trollech lib compiler:Gnu\g++
qmake -project
qmake
make
Run
QT console compiler: Gun\ g++
qmake -project
qmake
make
Run
參考資料:

2011年4月12日 星期二