Drone Software Development
  • Introduction
  • Introduction
    • Drone Software Development
  • Software Development Environment
    • Software Development Environment
      • Docker
      • Manual
        • OpenCV
        • PX4
        • JMAVSim
        • MAVLink
        • Ardupilot
        • SITL Simulator
        • DroneKit
        • DroneCore
        • QGroundControl
        • APM Planner
        • GStreamer
  • Drone Solution Architect
    • Drone Solution Architect
    • Unmanned Aerial Vehicle
    • History
    • Flight Controller Hardware
    • Flight Code
    • Communication
    • Ground Control Station
    • Simulation
    • Developer API
    • Drone Software Developer
    • Unmanned Aerial Systems
    • Market Ecosystem
  • Dronecode Project
    • Dronecode Project
  • Virtual Drone Solution
    • Virtual Drone Solution
    • Flight Controller Operating System
      • NuttX
    • Flight Code
      • PX4
        • Architecture
        • DriverFramework
        • Shell
      • Ardupilot
      • Software In The Loop
        • DroneKit SITL
          • API
        • jMAVSim
        • Ardupilot SITL
          • X-Plane
      • Hardware In The Loop
    • Communication
      • MAVLink
        • PyMAVLink
    • Ground Control Station
      • QGroundControl
      • APM Planner 2
      • MAVProxy
    • Developer API
      • DroneKit
      • DroneCore
    • Features
      • Video Streaming
      • Joystick
      • Global Positioning System
    • Uses Cases
      • Xunán Kab
      • Maax
      • Tasks
      • Services
        • Telemetry
        • Image
      • Applications
  • Computer Vision
    • Computer Vision
    • OpenCV
      • Object Detection
      • Face Detection
  • Hybrid Drone Solution
    • Hybrid Drone Solution
    • Flight Controller Hardware
      • Pixhawk
    • Flight Code
      • Ardupilot
      • PX4
    • Companion Computer
      • Raspberry Pi
      • Intel Aero Platform
    • Ground Control Station
      • QGroundControl
    • Developer API
      • DroneKit
    • Computer Vision
  • Autonomous Drone Solution
    • Autonomous Drone Solution
    • FlyTbase
    • Paparazzi UAV
Powered by GitBook
On this page
  1. Hybrid Drone Solution

Computer Vision

PreviousDroneKitNextAutonomous Drone Solution

Last updated 7 years ago

Computer Vision is an interdisciplinary field that deals with how computers can be made for gaining high-level understanding from digital images or videos. From the perspective of engineering, it seeks to automate tasks that the human visual system can do.

user@workstation:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/Tasks$ gst-launch-1.0 -v v4l2src ! video/x-raw,format=YUY2,width=640,height=480 ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000
user@workstation:~/Bitol/VirtualDroneSolution/UseCases/XunanKab/Tasks$ gst-launch-1.0 -v udpsrc port=5000 ! application/x-rtp, media=video, clock-rate=90000, encoding-name=JPEG, payload=26 ! rtpjpegdepay ! jpegdec ! xvimagesink sync=0
import cv2

cap = cv2.VideoCapture(0)

framerate = 25.0

#out = cv2.VideoWriter('appsrc ! videoconvert ! '
#                      'x264enc noise-reduction=10000 speed-preset=ultrafast tune=zerolatency ! '
#                      'rtph264pay config-interval=1 pt=96 !'
#                      'tcpserversink host=192.168.1.27 port=5000 sync=false',
#                      0, framerate, (640, 480))

out = cv2.VideoWriter('appsrc ! videoconvert ! video/x-raw,format=YUY2,width=640,height=480 ! jpegenc ! rtpjpegpay ! '
                      'udpsink host=172.17.0.1 port=5000',
                      0, framerate, (640, 480))

while cap.isOpened():
    ret, frame = cap.read()
    if ret:

        out.write(frame)

        if cv2.waitKey(1) & 0xFF == ord('q'):
            break
    else:
        break

# Release everything if job is finished
cap.release()
out.release()
root@c12f27a31092:/Xiaomin# 
[2] 0:docker*Z                                                                 
Wikipedia
1
https://github.com/shantnu/FaceDetect
https://media.readthedocs.org/pdf/opencv-python-tutroals/latest/opencv-python-tutroals.pdf
http://pythonexample.com/code/opencv-videocapture-gstreamer/
http://wiki.oz9aec.net/index.php/Gstreamer_cheat_sheet
https://github.com/MDHSRobotics/TeamWiki/wiki/Gstreamer--Install-and-UDP-stream-instructions