Introduction: Pano 360 Virtual Reality Photo Shot With PcDuino8 Uno
Insert these three USB cameras to pcDuino8 Uno using a USB hub.
Now we can install the necessary software tools.
First, lets install USB camera image capture software.
$sudo apt-get update
$sudo apt-get install fswebcam
We can the following command to check the video device that these USB cameras correspond to:
$ls /dev/video*
We can find that our cameras are /dev/video0, /dev/video1, and /dev/video2.
To test the camera, issue the following command:
$ fswebcam --skip 2 -p YUYV -r 2592x1994 --jpeg 100 --rotate 90 -d /dev/video0 a.jpg
To display the captured image, we can install imagemagick:
$sudo apt-get install imagemagick
$display a.jpg
The stitch engine will be HUGIN. So the next step is to install hugin:
$sudo apt-get install hugin
After its done, we can use the following script to capture images and stitch:
fswebcam --skip 3 -p YUYV -r 2592x1994 --jpeg 100 --rotate 90 -d /dev/video0 video0.jpg
fswebcam --skip 3 -p YUYV -r 2592x1994 --jpeg 100 --rotate 90 -d /dev/video2 video2.jpg fswebcam --skip 3 -p YUYV -r 2592x1994 --jpeg 100 --rotate 90 -d /dev/video1 video1.jpg
nona -o out -m TIFF_m template.pto video0.bmp video1.bmp video2.bmp
enblend --compression=100 -w -f6000x3000 -o template.jpg -- out0000.tif out0001.tif out0002.tif
We need to manually stitch the three images beforehand using PTGUI and save the pto file.
the original post:
http://learn.linksprite.com/jpeg-camera/pano-360-virtual-reality-photo-shot-with-pcduino8-uno/