KAIST Mobile Software Project - Drone Heliport Platform

본 토픽은 현재 준비중입니다. 공동공부에 참여하시면 완성 되었을 때 알려드립니다.

5. From raspberrypi2 to USB webcam - 1) Video streaming

 

 

  1. The condition of Streamer selection
    - Availability of control resolution, fps, display quality for adapting to raspberrypi2 specification
    - Delay of maximum 5 second
    - Whether the option to save the image file to be used for OPENCV is possible.
  2. The result of Streamer
    Gstreamer
     
  3. Install Streamer

    Set up Raspberry Pi

    Install gstreamer

    Update your Raspbian before install gstreamer packages.
    sudo apt-get upgrade
    sudo apt-get update

    Install gstreamer packages.
    sudo apt-get install gstreamer-tools gstreamer0.10-plugins-bad gstreamer0.10-plugins-good v4l-utils

     

    Create gstreamer start script

    I like tcsh shell.
    sudo apt-get install tcsh

     
    Create the script gst-server.sh to start gstreamer streaming server. 
    #!/bin/tcsh
    
    set myip=192.168.XXX.XXX
    set port=5000
    set width=320
    set height=240
    
    gst-launch\
      v4l2src !\
      ffmpegcolorspace !\
      video/x-raw-yuv,width=${width},height=${height},framerate=\(fraction\)30/1 !\
      jpegenc !\
      tcpserversink host=${myip} port=${port} sync=false

     

     Add an executable permission to the script.
    chmod u+x gst-server.sh

    Connect a webcam

    I used PS3 Eye as a webcam. You can use other webcams.

    Start gstreamer

    Run the script.
    ./gst-server.sh

    Set up Android phone

    I created an Android application simplemjpegview_gst based on SimpleMjpegStreamer. You can download the source codes.

    You can download apk file here.
    https://docs.google.com/file/d/0B1V8jj4Adbrpdzl4VGVjcW1GT28/edit?usp=sharing

     
  4. Test Streaming
    4.1 Test Environment
    Hardware : Raspberrypi2, USB 2.1A Power, Legitec C310 720p Webcam, Sharing gateway to make internal network
    Software :  gstreamer Server/Client 
     


    4.2 Test Result

    Execution of Raspberrypi gstreamer server --> Excution of Android gstreamer client

     
  5. The result
    - Checked tolerable delay in the internal network
    - External power for USB webcam is necessary for supporting power safely. 
  6. To do 
    - Intall OpenCV written by executable python on Raspberrypi
    - gstreamer & OPENCV cooperation (Testing OPENCV example supported by gstreamer using capture functionality, Testing considered turbulence)
    - Analysis of Android gstreamer client source code for porting
    - Simple and right camera which doesn't need external power supply is necessary(PICAM) 

댓글

댓글 본문
작성자
비밀번호
버전 관리
우충기
현재 버전
선택 버전
graphittie 자세히 보기