Skip to content

hpd/OpenSphericalCamera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

11 Commits

Repository files navigation

OpenSphericalCamera Client

A Python library for interfacing with cameras that implement the OpenSphericalCamera API

Supported Cameras

Usage

Usage of the pure OSC API

fromosc.oscimport*# Initializing the class starts a sessioncamera=OpenSphericalCamera() camera.state() camera.info() # Only need to call this if there was a problem# when 'camera' was createdcamera.startSession() # Capture imageresponse=camera.takePicture() # Wait for the stitching to finishcamera.waitForProcessing(response['id']) # Copy image to computercamera.getLatestImage() # Close the sessioncamera.closeSession()

Usage of the Ricoh Theta S extended API

fromosc.thetaimportRicohThetaSthetas=RicohThetaS() thetas.state() thetas.info() # Capture imagethetas.setCaptureMode( 'image' ) response=thetas.takePicture() # Wait for the stitching to finishthetas.waitForProcessing(response['id']) # Copy image to computerthetas.getLatestImage() # Stream the livePreview video to disk# for 3 secondsthetas.getLivePreview(timeLimitSeconds=3) # Capture videothetas.setCaptureMode( '_video' ) thetas.startCapture() thetas.stopCapture() # Copy video to computerthetas.getLatestVideo() # Close the sessionthetas.closeSession()

Notes

The BublOscClient.js client is the only documentation I can find for the Bublcam custom commands. The client was not tested with actual hardware.

Requirements

The Python Requests library is used to manage all calls to the OSC API.

Install requests with pip:

pip install requests 

References

Thanks

Many thanks to Craig Oda, the author and maintainer of Theta S API Tests repo.

Author

The original author of this library is:

  • Haarm-Pieter Duiker

Testing

This library was tested with a Ricoh Theta S using Python 2.7 on OSX Yosemite, and a Samsung Gear 360 (2017) on macOS High Sierra.

License

Copyright (c) 2016 Haarm-Pieter Duiker

See the LICENSE file in this repo

About

A Python library for interfacing with cameras that implement the OpenSphericalCamera API - https://developers.google.com/streetview/open-spherical-camera/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages