How to create a 360° QTVR panorama easy and free
If you want to create a 360° panoramic image or a QTVR movie (like this one), this post exaplains how to do it easy and for free. This is very simple tutorial for beginners. There are three steps: make photos, stitch a panoramic image then transform it to QTVR movie. Step two is done with a free open-source program called Hugin that runs on all platforms. Step three in this example is done with a free Mac software MakeCubic, for others OS you have to find another software.
Step One: Make photos
Very easy: stay somewhere, like on a top of a mountain, and make photos all around you. Photos must overlap, about 25-30% is sufficient. Last photo must overlap the first one. Photos must be well aligned, otherwise your panorama will be wavy. Use manual mode if your camera has one, so you will have the same exposure and white balance for all photos.
Step Two: Stitch photos with Hugin
In the past one had to manually define common points in pictures. This was boring and time consuming. Latest versions of Hugin includes a tool called Autopano-SIFT that do this dirty work automatically. After you have installed Hugin, go to “Preferences > Autopano” menu and make sure that the “Use alternative autopano” checkbox is unchecked.
Then, in the “Assistant” tab (the one that is opened by default) click on “Load Images…”, select all your photos and click “Open”. The automatic panorama creation process starts. First, the autopano tool searches for matching points in your pictures; then Hugin try to find the best way to stitch them together. All this takes few minutes, or more. When the process is finished you are presented with a preview of the result. At this point it may be interesting to save the project file.
If you are happy with the preview, click on the “Stitcher” tab and set some parameters. Actually, only one parameter is really important: “Panorama Canvas Size”. It’s the size of the resulting image. Choose your width, the height is updated automatically. For my example I choose the width of 5000. Then, click on “Stitch now!” button, choose a file name and wait again. After few minutes your panoramic picture is ready.
Step Three: Make QTVR with MakeCubic
This last step is not so automatic, you may have to do many tries before you reach the correct result. Launch MakeCubic program, then press Apple-O to open its working window. First, choose your panoramic file. Then, choose the width and height in pixels of the movie. Click the OK button and wait that your .mov file is ready. Open it. The result is not perfect: there is a lot of black space below and above the panorama. So, go back to MakeCubic, press Apple-O, and modify the “Tilt” parameter. Min tilt value controls the lower part of the picture and the max tilt controls the upper part. Default is -90 and 90. Set something like -30 and 30, then build a new QTVR with those parameters. The black space is now gone, probably a part of your panorama is gone too. You may have to make many tries before you reach an acceptable result.
Other parameters are also interesting. The “Pan” controls the initial horizontal rotation of the panorama, so you can choose the most nice part of the picture to present first. The “FOV” controls the zoom, I used the maximal value (= the minimal zoom). As I had the requirement to fit my .mov in 2MB I had to modify the compression. Finally, I found that setting the “Tilling” parameter to 1×1 produces smaller files without visible quality loss.
That’s it.
How to backup from webserver to home computer (Mac)
Short version: wake-up, rsync, kill, sleep. We have to do a nightly backup of our website. We have ssh access to the server, good ADSL connection and a big external drive connected to a Mac laptop, so we decide to do a nightly backup from the server to the external drive. The backup runs when there is no much load and traffic on the server. It starts at 2:00 and should end at last at 5:00, otherwise we kill it. The laptop wake-up at 1:59, starts the backup then go sleep when the backup is finished or interrupted.
Backup script
The backup script uses rsync to mirror the website directory from the server to the home computer. We need to have the rsync installed on both server and the home computer. We also need to configure ssh to connect without password. The log of transferred files is written into the log-file The script uses the pmset sleepnow to put the computer back in sleep mode when the rsync command is ended (finished or interrupted). In order to end the backup at 5:00 the script wait 10800 seconds (3 hours) using sleep, then kill all rsync processes, if any, with killall rsync.
#!/bin/sh
(rsync -v --rsync-path="nice rsync" --times --recursive --stats --rsh=/usr/bin/ssh me@server:/dir/to/backup /local/backup/dir > /path/to/log-file.log; pmset sleepnow)&
sleep 10800
killall rsync
Crontab
Next, we have to put this script into crontab: type crontab -e and schedule the execution of the script at 2:00 every night:
0 2 * * * /path/to/backup-script.sh >& /dev/null
Schedule the wake-up
Finally, we should be sure that the computer will wake-up at 2:00 to allow the script to run. We schedule a wakup using the same pmset command:
sudo pmset repeat wake MTWRFSU 01:59:00
That’s all! You can now put your mac (and you) in sleep mode in the evening – your backup will run automatically during the night.