LogoLogo
  • TJUAV Documentation
  • Documentation
    • What is TJUAV?
      • Subsystems
      • Competition Details (2021)
    • How to Use Gitbook
    • Table of Contents
  • RC Guide
    • Introduction
    • Aerodynamics & Flight
      • Forces of Flight
    • RC Electronics
      • Comms
      • Power / Propulsion System
        • Batteries / Battery Chargers
        • ESCs
        • Motors
    • Control Surfaces
    • Propellers
      • Function
      • CW and CCW Propellers
      • Thrust Table
    • Flight Simulations
    • Tools
      • Laser Cutter
      • 3D Printer
    • Getting Certified
  • Software
    • Programming
      • Git
      • Python
      • JS
      • VSCode
      • Mission Planner
    • Mechanical
      • Fusion360
        • Installation
        • Fusion Teams
        • Sketches
        • Sketch Tools
        • Parameters
        • Timeline
        • Solid Tools
        • Components
        • Joints & Assemblies
        • Add-Ins
        • Good Practice
      • AutoCAD
      • Cura
        • Initial Setup
        • Profiles
        • Quality
        • Shell
        • Infill
        • Material
        • Speed
        • Travel
        • Cooling
        • Supports
        • Adhesion
        • Experimental
    • Website
      • Code Documentation
      • Heroku Usage
      • AWS Usage
      • GitHub Pages
  • Hardware
    • Computers
    • Radios
      • RFD900x
      • Ubiquiti Bullet and Powerbeam M2
    • Cameras
      • Gphoto2
      • Sony α5000/α5100
      • See3Cam_CU135
      • Arducam 4
    • Power
  • Mechanical Progress
    • Airframes
      • Razgriz
      • Hyperion
      • Testing Plane
      • Avalon
        • Avalon Mk.1
        • Avalon Mk.2
    • UGVs
      • Electrical System
      • Drop Mechanism
      • Speed Car Super Speed
      • SPARTA
  • Programming Progress
    • Computer Vision
      • Preprocessing Techniques
      • Map Stitching
        • SIFT
      • Detection / Classification
        • Canny / Contours
        • Blob Detection
        • KMeans
        • Mean Shift Filter
        • RotNet
    • Autopilot
      • A*
      • RRT*
      • Genetic Algs
      • Spline Navigation
  • Master Code
    • GroundStation
      • Frontend
      • Backend
    • Computer Vision
      • Image Capturing
      • Map Stitching
      • Detection
      • Classification
    • Autopilot
    • Comms
      • Image Compression
      • Packet Format
Powered by GitBook
On this page
Edit on GitHub
Export as PDF
  1. Hardware
  2. Cameras

Gphoto2

PreviousCamerasNextSony α5000/α5100

Last updated 2 years ago

Gphoto Usage

Gphoto2 has several options for capturing and downloading images from these cameras. There is a command line interface, and a python library as a wrapper.

From the , the user can call --capture-image to trigger an image capture not not download it, and --capture-image-and-download to capture an image and download it from the camera onto the computer, however the download process takes around two seconds before the next image can be taken, as the camera stores the image on the SD card first. The a5100 has the option of liveview image download through --capture-preview, which instantly captures and downloads a 720p image.

The python library, called , wraps most of the functions of the command line interface and allows better control of the camera in code. The best way to capture images using the python wrapper is to trigger capture using trigger_capture, and download it directly from the camera, bypassing the SD card, using the wait_for_event function, which waits for an event (such as a new image file appearing in the camera). See example, and add a trigger_capture call before the wait_for_event call. A more refined version is implemented in flightsoftware, which waits until 0.5 seconds after the previous image capture to trigger the next capture, to keep the image capture interval more consistent.

command line interface
python-gphoto2
this