#!/usr/bin/env bash# This simple script takes a project name, the left, and the right image, and creates a variety of formats for your 3D pleasure## Global Dependencies:# - hugin: supplies the align_image_stack script# - image-magik: has a composite command for creating the anaglyph and the convert command for creating .jps## If you want to create a .mpo for this to view on a 3DS or other, it is recommended at this time to use # Stereo Photo Maker which can be found at http://stereo.jpn.org/eng/stphmkr/PROJ=$1LEFT=$2RIGHT=$3echo$PROJ$LEFT$RIGHT# create project folderif[[ ! -d $PROJ]];then mkdir -p $PROJ;fi# align iamges using hugin align_image_stackalign_image_stack -p $PROJ/$PROJ.pto -a ${PROJ}_ -m -i -P -C $LEFT$RIGHT# copy extra files project folder and cd to foldermv ${PROJ}_* $PROJ/
cd$PROJ# create our stereo image typesALIGN1=${PROJ}_0000.tif
ALIGN2=${PROJ}_0001.tif
composite -stereo 0$ALIGN1$ALIGN2${PROJ}_anaglyph.jpg
convert $ALIGN1$ALIGN2 +append ${PROJ}.jps
convert $ALIGN2$ALIGN1 +append ${PROJ}_xeye.jps
Comments (0)
HTTPSSSH
You can clone a snippet to your computer for local editing.
Learn more.