Virtual reality is pretty big recently. In this post, we show how to do pano 360 degree virtual reality photo shot with pcDuino8 Uno.

Before we do that, we first need to make a camera rig from the fish eye cameras, and fix it to a tripod.

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.

About This Instructable




More by wenhui:ESP3212 Wifi Bluetooth Combo Module PcDuino4 Nano I2C 16×2 LCD on PcDuino  
Add instructable to: