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

from osc.osc import *

# Initializing the class starts a session
camera = OpenSphericalCamera()
camera.state()
camera.info()

# Only need to call this if there was a problem
# when 'camera' was created
camera.startSession()

# Capture image
response = camera.takePicture()

# Wait for the stitching to finish
camera.waitForProcessing(response['id'])

# Copy image to computer
camera.getLatestImage()

# Close the session
camera.closeSession()

Usage of the Ricoh Theta S extended API

from osc.theta import RicohThetaS

thetas = RicohThetaS()
thetas.state()
thetas.info()

# Capture image
thetas.setCaptureMode( 'image' )
response = thetas.takePicture()

# Wait for the stitching to finish
thetas.waitForProcessing(response['id'])

# Copy image to computer
thetas.getLatestImage()

# Stream the livePreview video to disk
# for 3 seconds
thetas.getLivePreview(timeLimitSeconds=3)

# Capture video
thetas.setCaptureMode( '_video' )
thetas.startCapture()
thetas.stopCapture()

# Copy video to computer
thetas.getLatestVideo()

# Close the session
thetas.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

Languages