Step 1: Install Panotools
You can download the Panotools source from here:
http://search.cpan.org/~bpostle/Panotools-Script-0.25/
You can do a source installation. But, it is a real pain because Panotools requires other Perl modules and libraries and trying to install the required dependencies leads to further required dependencies...in short, a big mess.
So, the best way to install Panotools is through CPAN (Comprehensive Perl Archive Network). Here are the steps:
$ sudo cpan cpan[1]> install Panotools::Script
Great! We are half way through.
Step 2: Install Hugin
The installation steps are given here in details:
http://wiki.panotools.org/Hugin_Compiling_ubuntu
If you want, you can read the above document for full details. But in short, the 3 commands below should get the job done.
$ sudo add-apt-repository ppa:hugin/hugin-builds $ sudo apt-get update $ sudo apt-get install hugin enblend autopano-sift panini
Done with all installations.
Example Usage:
The 2 commands that we will be using are: "erect2cubic" (which is a part of Panotools) and "nona" (which is a part of Hugin). You can read more about these commands in their man pages. Here is how you use these:
Here is the input image called "input.png":
Run the commands like this:
$ erect2cubic --erect=input.png --ptofile=cube.pto $ nona -o cube_prefix cube.pto
The "erect2cubic" command will generate a .pto file, which is a Hugin project. The "nona" command takes the Hugin project file as input and generates the cubic face images.
Here are the generated 6 cubic faces:
Thats it folks :)
thanks man! all the searching paid off. I owe you one.
ReplyDeleteYou are welcome :)
ReplyDeleteok, is there cubic2erect or some other way to convert it from cubic to equirectangular?
ReplyDeleteYou can do it in PTGUI. Manually or there is a droplet that does a 6 inline cube to Equirect
Deleteyes, cubic2erect does also exist, see
ReplyDeletehttp://wiki.panotools.org/Panorama_scripting_in_a_nutshell
great just the kind of info i needed.
ReplyDeletei am trying to make a hi res photographic map of the night sky, have done about 60% percent.
Will put text/gfx for Hindu Nakshtra(Moon Mansions).
will ask u some stuff. techie.
btw. I am a video editor n a photog
fyi ,
ReplyDeleteif anyone is looking for a script to automate a batch conversion
#!/bin/bash
#compensate spaces in name
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
#file list
FILES=/path/to/*.jpg
i=0
for f in $FILES
do
echo "------------------------------------------------"
echo "Processing $f file.."starting ... $((i++))"
rect2cubic --erect=$f --ptofile=cube$i.pto
nona -o cube00$i cube$i.pto
done
IFS=$SAVEIFS
for f in *.tif; do echo "Converting $f"; convert "$f" "$(basename "$f" .tif).jpg"; done
ReplyDeletewill convert the generated files to jpg
राकेश गौतम
ReplyDeleteGrreat reading your blog
ReplyDelete