Raspberry Pi Panorama Camera
Hugin
To install Hugin on Raspberry Pi:
$ sudo apt-get install hugin-tools
$ brew cask install hugin
$ nano ~/.bash_profile
#Export hugin stuff: http://hugin.sourceforge.net/
export PATH=$PATH:/opt/homebrew-cask/Caskroom/hugin/2014.0.0/HuginTools
export PATH=$PATH:/opt/homebrew-cask/Caskroom/hugin/2014.0.0/HuginTools/Hugin.app/Contents/MacOS
camera settings should be the same Each picture must overlap the adjacent pictures by at least 25% Try to avoid objects moving
It ships without pto_gen
, so you will need to install:
http://wiki.panotools.org/Hugin_Compiling_Debian_Raspberry
Also, you could use After going through all the trouble to get hugin working on the rpi it turn out that the whole process to generate the panoramic image took too long: 04:40. Panorama stitching alone:
Mac Pi The sequence of commands: Model Name: MacBook Pro
Model Identifier: MacBookPro11,3
Processor Name: Intel Core i7
Processor Speed: 2.8 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB Raspberry Pi 2 B
A 900MHz quad-core ARM Cortex-A7 CPU
1GB RAM Node.js library:
https://www.npmjs.com/package/panoramitmatch-and-stich
, real 0m10.329s
user 0m23.867s
sys 0m2.085s
real 4m7.343s
user 8m3.510s
sys 0m13.740s
running match-n-shift -o /tmp/project.pto ~/NODEJS/pinorama/images/*.jpg
running cpfind -o /tmp/project.pto --multirow /tmp/project.pto
running cpclean -o /tmp/project.pto /tmp/project.pto
running linefind -o /tmp/project.pto /tmp/project.pto
running autooptimiser -v HFOV -a -o /tmp/project.pto /tmp/project.pto
running pano_modify --canvas=AUTO --crop=AUTO -o /tmp/project.pto /tmp/project.pto
running pto2mk -o /tmp/project.mk -p prefix /tmp/project.pto
running make -f /tmp/project.mk all
running convert /tmp/prefix.tif ~/NODEJS/pinorama/out/1429197428103_out.jpg
{ '0': '~/NODEJS/pinorama/out/1429197428103_out.jpg' }
execPlan.add('pto_gen -o project.pto *.jpg');
execPlan.add('cpfind -o project.pto --multirow --celeste project.pto');
execPlan.add('cpclean -o project.pto project.pto');
execPlan.add('linefind -o project.pto project.pto');
execPlan.add('autooptimiser -a -m -l -s -o project.pto project.pto');
execPlan.add('pano_modify --canvas=2600x450 -s -o project.pto project.pto');
execPlan.add('pto2mk -o project.mk -p output project.pto');
execPlan.add('make -f project.mk all');
commands = [
'pto_gen -o ' + paths.PTO_FILE + ' ' + inputPaths.join(' '),
'cpfind -o ' + paths.PTO_FILE + ' --multirow --celeste ' + paths.PTO_FILE ,
'cpclean -o ' + paths.PTO_FILE + ' ' + paths.PTO_FILE ,
'linefind -o ' + paths.PTO_FILE + ' ' + paths.PTO_FILE ,
'autooptimiser -a -m -l -s -o ' + paths.PTO_FILE + ' ' + paths.PTO_FILE ,
'pano_modify --canvas=AUTO --crop=AUTO -o ' + paths.PTO_FILE + ' ' + paths.PTO_FILE ,
'pto2mk -o ' + paths.MK_FILE + ' -p prefix ' + paths.PTO_FILE ,
'make -f ' + paths.MK_FILE + ' all'
];