360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def...

50
360° Camera using Odroid und Raspberry Pi

Transcript of 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def...

Page 1: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

360° Camera

using Odroid und Raspberry Pi

Page 2: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Agenda

The idea

Hardware

Realization

Conclusion

Page 3: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

A panorama picture ...

Schalzbackvorsäß, by Friedrich Böhringer

Page 4: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

... in all directions

http://occipital.com/static/newproduct/img/ex-stereo1.jpg

Page 5: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

The Panono camera

Page 6: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

The Panono camera

http://www.panono.com/ballcamera

Page 7: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

GoPro panorama camera

by Jonas Ginter

Page 8: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

GoPro panorama camera

http://www.jonasginter.de

Page 9: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Virtual Surfers

Page 10: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

TNG Pano Cube

Page 11: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

TNG Pano Cube

Page 12: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Why the heck are you doingit??

http://m.cdn.blog.hu/na/nanoretro/image/portal_weighted_companion_cube.jpg

Page 13: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Concept

Page 14: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Agenda

The idea

Hardware

Realization

Conclusion

Page 15: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Raspberry Pi camera module

Page 16: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Raspberry Pi

Page 17: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Raspberry Pi

Page 18: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Odroid U3

Page 19: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Odroid U3

Page 20: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Performance Comparison

Source: Hardkernel, http://linuxgizmos.com/open-sbc-runs-linux-on-quad-core-exynos-4412/

Page 21: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Agenda

The idea

Hardware

Realization

Conclusion

Page 22: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Concept - revisited

Page 23: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

The Cube

Page 24: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Let's Focus on it

Page 25: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

The Content

Page 26: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

The Assembly

Page 27: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Provisioning

Page 28: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Inventory definition[cam]cam1cam2cam3...

[odroid]odroid

Page 29: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Playbooks

Page 30: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Playbook example- hosts: cam sudo: True tasks: - lineinfile: dest=/etc/hosts line='192.168.1.99 odroid' - copy: src={{ inventory_dir }}/reconnect.sh dest=/usr/bin/reconnect.sh mode=0700 - apt: pkg={{ item }} state=present with_items: - htop - nmap - cron: name='reconnect wifi' job='/usr/bin/reconnect.sh'

Page 31: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Ansible command line

Execute remote commands:

# execute ping command as user bruce, sudoing to root$ ansible all -m ping -u bruce --sudo

Provision using a playbook:

# provision all cam hosts in inventory using playbook deploy.yml$ ansible-playbook -i inventory --limit cam deploy.yml

Page 32: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Data transfer

Page 33: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Twisted - Socket factoryclass PanoFactory(protocol.Factory): def __init__(self): logging.info('Server started')

def buildProtocol(self, addr): logging.info('New client at {}:{}'.format(addr.host, addr.port)) return PanoProtocol(self)

if __name__ == "__main__": reactor.listenTCP(8100, PanoFactory()) reactor.run()

Page 34: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Twisted - Socket clientclass PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line))

def sendCommand(self, command): self.transport.write('{}\n'.format(command))

def connectionMade(self): logging.info('Client connection made')

def connectionLost(self, reason): logging.info('Client connection lost')

Page 35: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Trigger - Android

Page 36: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Stitching

Page 37: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Stage 1 - Registration

Page 38: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Stage 2 - Calibration

Page 39: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Stage 3 - Blending

Page 40: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Tools

Page 41: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Agenda

The idea

Hardware

Realization

Conclusion

Page 42: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Results

Page 43: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Results

Page 44: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Results

Page 45: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Results

Page 46: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Improvements

Page 47: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Improvements

Page 48: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Improvements

Page 49: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Improvements

Page 50: 360° Camera - TNG · Twisted - Socket client class PanoProtocol(basic.LineReceiver): def lineReceived(self, line): logging.debug('Got "{}" from client'.format(line)) def sendCommand(self

Andriy Samsonyuk

Daniele Fognini

Julian Exner

Manuel Meilinger

Martin Förtsch

Thomas Endres

Thomas Reifenberger

Woyten Tielesch