■
https://pypi.python.org/pypi/webcam-streamer/1.0.5
参考
wget https://pypi.python.org/packages/e3/15/a8d672659efd50beb8efee371cf493688c1c096a1900b0d33c3c176a051d/webcam-streamer-1.0.5.tar.gz#md5=8a8913493a29a9f3a61e50171f0df9ce
解凍
tar -zxvf xxxx.tar.gz
より
tar -zxvf webcam-streamer-1.0.5.tar.gz
pip install webcam-streamer
OpenCV 3.3.0インストール
wget https://github.com/opencv/opencv/archive/3.3.0.tar.gz
解凍
tar -zxvf xxxx.tar.gz
より
tar -zxvf 3.3.0.tar.gz
pip install webcam-streamer
http://dex.local:5000/
で見れるか?(ダメだった、、エラー)
■python-v4l2captureをインストール
https://github.com/gebart/python-v4l2capture
参考
git clone https://github.com/gebart/python-v4l2capture.git
python-v4l2captureで
To build and install:
./setup.py install
やったけど、、
Example
=======
See capture_picture.py, capture_picture_delayed.py and list_devices.py.
(ダメだった、、エラー)
■Ubuntuのページでやってみる
https://codezine.jp/article/detail/10068
参考
ワークスペースは、一応
/home/pi/GoPiGo3/Projects/RemoteCameraRobot
にする!!
パッケージのインストール
$ sudo apt-get update
$ sudo apt-get install ros-indigo-rosbridge-suite ros-indigo-roswww ros-indigo-libuvc-camera ros-indigo-web-video-server
$ rospack profile
(これは、roscoreと一緒に動かすやつなのでダメだわ・・)
■
wget http://videocapture.sourceforge.net/VideoCapture-0.9-5.zip
unzip VideoCapture-0.9-5.zip
https://stackoverflow.com/questions/44372490/installing-opencv-3-2-0-on-raspberrypi-3
参考
sudo apt-get install python-opencv
https://pypi.python.org/pypi/webcam-streamer/1.0.5
も引き続き参考
手順
Obtain a USB webcam
Find an internet-connected device with a USB port
Plug the webcam into the USB port
Install OpenCV
pip install webcam-streamer
webcam-streamer
(はい、エラー・・・・ OpenCVが無い???とな?)
■10/23
OpenCVのインストール、10/23
参考
Step #1: Install dependencies
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo rpi-update
$ sudo reboot
$ sudo apt-get install build-essential git cmake pkg-config
$ sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
$ sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
$ sudo apt-get install libxvidcore-dev libx264-dev
$ sudo apt-get install libgtk2.0-dev
$ sudo apt-get install libatlas-base-dev gfortran
$ sudo apt-get install python2.7-dev python3-dev
Step #2: Grab the OpenCV source code
$ cd ~
$ wget -O opencv.zip https://github.com/Itseez/opencv/archive/3.0.0.zip
$ unzip opencv.zip
$ wget -O opencv_contrib.zip https://github.com/Itseez/opencv_contrib/archive/3.0.0.zip
$ unzip opencv_contrib.zip
Step #3: Setup Python
$ wget https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install virtualenv virtualenvwrapper
$ sudo rm -rf ~/.cache/pip
vi ~/.profile
# virtualenv and virtualenvwrapper
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
$ source ~/.profile
$ mkvirtualenv cv
$ mkvirtualenv cv -p python3
$ source ~/.profile
$ workon cv
$ pip install numpy
Step #4: Compile and install OpenCV
$ workon cv
$ cd ~/opencv-3.0.0/
$ mkdir build
$ cd build
$ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_C_EXAMPLES=ON \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.0.0/modules \
-D BUILD_EXAMPLES=ON ..
==============
—
— Python 2:
— Interpreter: /home/pi/.virtualenvs/cv/bin/python2.7 (ver 3.4.2)
— Libraries: /usr/lib/arm-linux-gnueabihf/libpython3.4m.so (ver 3.4.2)
— numpy: /home/pi/.virtualenvs/cv/local/lib/python3.4/site-packages/numpy/core/include (ver 1.13.3)
— packages path: lib/python3.4/site-packages
—
— Python 3:
— Interpreter: /home/pi/.virtualenvs/cv/bin/python3.4 (ver 3.4.2)
— Libraries: /usr/lib/arm-linux-gnueabihf/libpython3.4m.so (ver 3.4.2)
— numpy: /home/pi/.virtualenvs/cv/local/lib/python3.4/site-packages/numpy/core/include (ver 1.13.3)
— packages path: lib/python3.4/site-packages
—
==============
$ make -j4
[100%] Building CXX object samples/cpp/CMakeFiles/tutorial_copyMakeBorder_demo.dir/tutorial_code/ImgTrans/copyMakeBorder_demo.cpp.o
[100%] Linking CXX executable ../../bin/cpp-tutorial-Sobel_Demo
[100%] Linking CXX executable ../../bin/cpp-tutorial-copyMakeBorder_demo
[100%] Linking CXX executable ../../bin/cpp-tutorial-calcBackProject_Demo1
[100%] Built target tutorial_Sobel_Demo
[100%] Built target tutorial_copyMakeBorder_demo
[100%] Built target tutorial_calcBackProject_Demo1
<<<<<<<<<<<<ここmでOK!!!!>>>>>>>>>>>>
$ make clean
$ make
$ sudo make install
$ sudo ldconfig
Step #5: Finishing the install
For Python 2.7:
$ ls -l /usr/local/lib/python2.7/site-packages/
total 1636
-rw-r–r– 1 root staff 1675144 Oct 17 15:25 cv2.so
$ cd ~/.virtualenvs/cv/lib/python2.7/site-packages/
$ ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so
For Python 3:
$ ls /usr/local/lib/python3.4/site-packages/
cv2.cpython-34m.so
$ cd /usr/local/lib/python3.4/site-packages/
$ sudo mv cv2.cpython-34m.so cv2.so
$ cd ~/.virtualenvs/cv/lib/python3.4/site-packages/
$ ln -s /usr/local/lib/python3.4/site-packages/cv2.so cv2.so
Step #6: Verifying your OpenCV 3 install
$ workon cv
$ python
>>> import cv2
>>> cv2.__version__
‘3.0.0’
■10/24再度トライ!!××××××
/home/pi/GoPiGo3/Projects/MouseControl
sudo chmod +x mouse_control_robot.py
sudo ./mouse_control_robot.py
(ダメ!マウスの言う事きかない・・・・)
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
■10/24再度トライ!!◎◎◎△△△★
/home/pi/GoPiGo3/Projects/RemoteCameraRobot
python3 flask_server.py
`http://dex.local:5000`
・・・動いたけど、映像出ないなあ・・・・・
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
sudo bash install.sh
してみる・・・
(ダメ!映像出ない・・・・)
sudo pip install webcam-streamer
(これ、時間かかる・・・風呂はいろ・・・・)
workon cv
webcam-streamer
(ダメ!映像出ない・・・・)
■Webカメラ、インストール
参考
sudo apt install fswebcam
(ダメ!映像出ない・・・・)
参考
$ sudo apt-get install guvcview
(ダメ!映像出ない・・・・)
$ guvcview &
■
http://blog.goo.ne.jp/roboz80/e/16ea5be9a9eaf370046035be841b4bfd
参考
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install guvcview
(ダメ!映像出ない・・・・)
■
http://blogs.itmedia.co.jp/narisako/2014/09/post.html
参考
sudo apt-get install motion
MOTION の設定をする。
/etc/motion にある motion.conf をエディタで直接変更
on を off に変更する
webcam_localhost off
control_localhost off
カメラのリアルタイム映像を見ることができた?????
http:// (IPアドレス) :8081/
http:// 192.168.0.9:8081/
■
参考
sudo vi /etc/motion/motion.conf
「stream_auth_method」 を 「1」にして
(8081ポートはBasic認証がかかっているので、
という風に書きます。)
なので、
sudo motion
http://pi:robots1234@192.168.0.9:8081
(ダメ!映像出ない・・・・)
■
参考
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install subversion libjpeg-dev imagemagick
svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer mjpg-streamer
cd mjpg-streamer
make
sudo make install
MJPG-streamer の起動
sudo service motion stop
cd mjpg-streamer
./mjpg_streamer -i “./input_uvc.so” -o “./output_http.so -w ./www”
./mjpg_streamer -i “./input_uvc.so -y” -o “./output_http.so -w ./www”
./mjpg_streamer -i “./input_uvc.so -y -r 640×480 -f 15” -o “./output_http.so -p 8081 -w ./www -c ID:PASSWORD” -b
より
./mjpg_streamer -i “./input_uvc.so -y -r 640×480 -f 15” -o “./output_http.so -p 8081 -w ./www -c pi:robots1234” -b
./mjpg_streamer -i “./input_uvc.so -y -r 640×480 -f 15” -o “./output_http.so -p 8081 -w ./www -c root:Aa123456” -b
/dev/video0 is owned by root video (check with ls -l /dev/video0),
なので、
■
https://stackoverflow.com/questions/35450089/error-opening-v4l-interface-operation-not-permitted
参考
sudo usermod -aG video pi
/etc/modules-load.d/raspberrypi.conf
snd-bcm2835
i2c-dev
bcm2835-v42l2
(ダメ!映像出ない・・・・)
■
https://github.com/RetroMelon/Raspberry-Pi-Car/issues/1
参考
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev
(ダメ!映像出ない・・・・)
■
https://miguelmota.com/blog/raspberry-pi-camera-board-video-streaming/
参考
sudo apt-get install libv4l-dev
sudo ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h
sudo mkdir /opt/mjpg-streamer
cd /opt/mjpg-streamer/
sudo apt-get install libjpeg8-dev
sudo apt-get install imagemagick
sudo apt-get install subversion
sudo svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer/ .
sudo make
http://
http://192.168.09.9:9000
(ダメ!映像出ない・・・・)
■(10/25)
参考
<<MJPG-streamer のインストール>>
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install subversion libjpeg-dev imagemagick
sudo svn co https://svn.code.sf.net/p/mjpg-streamer/code/mjpg-streamer mjpg-streamer
cd mjpg-streamer
make
sudo make install
<<MJPG-streamer の起動>>
sudo service motion stop
★★★★★★★★★★★★★★★★★★★★★
cd /home/pi/mjpg-streamer
./mjpg_streamer -i “./input_uvc.so -y” -o “./output_http.so -w ./www”
★★★★★★★★★★★★★★★★★★★★★
(ダメ!映像出ない・・・・)
■(10/25)
参考
# apt-get install fswebcam
$ fswebcam -r 640×480 -S 15 –flip h –jpeg 95 –shadow –title “SLB Labs” –subtitle “Home” –info “Monitor: Active @ 1 fpm” –save home.jpg -q -l 60
(ダメ!映像出ない・・・・)
■(10/25)
https://bbs.nextthing.co/t/mjpeg-streamer-with-compatible-usb-webcam/6505
参考
sudo apt-get update
sudo apt-get install uvcdynctrl
sudo apt-get install build-essential subversion libjpeg62-turbo-dev
sudo apt-get install imagemagick libv4l-0 libv4l-dev
sudo svn co https://svn.code.sf.net/p/mjpg-streamer/code mjpg-streamer
cd mjpg-streamer
make USE_LIBV4L2=true clean all
sudo make install
(ダメ!映像出ない・・・・)
■(10/25)
https://github.com/RetroMelon/Raspberry-Pi-Car/issues/1
参考
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev
(ダメ!映像出ない・・・・)
■252_RaspberryPi_監視カメラstreamerのraspberrypi間移行★
■226_RaspberryPi監視カメラ1?OK・・・
(ダメ!映像出ない・・・・)
■(10/26)
cd /home/pi/mjpg-streamer
./mjpg_streamer -i “./input_uvc.so -y” -o “./output_http.so -w ./www”
(ダメ!映像出ない・・・・)
■(10/27)
cd /home/pi/mjpg-streamer
sudo ./mjpg_streamer
./mjpg_streamer -i “./input_uvc.so -y -r 640×480 -f 15” -o “./output_http.so -p 8081 -w ./www -c pi:robots1234” -b
./mjpg_streamer -i “./input_uvc.so -y -r 640×480 -f 15” -o “./output_http.so -p 8081 -w ./www -c root:Aa123456” -b
./mjpg_streamer -i “-c pi:robots1234” -b
■<Webで簡単操作のやつ>OKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOK
cd /home/pi/GoPiGo3/Projects/RemoteCameraRobot
python3 flask_server.py
で
Webで
http://192.168.0.12:5000
にアクセス
■
cd /opt/mjpg-streamer/
sudo make
http://
http://192.168.09.9:9000
(ダメ!映像出ない・・・・)
■(10/28)RaspberryPi Subversion install やり直してみる
http://d.hatena.ne.jp/mirans/20121209/1355022718
参考
(subvernsionを入れなおしたけどダメ・・・)