Project Overview

I’ve been working on a Raspberry Pi based 360 time-lapse camera system. This project is now complete, and I’m thrilled with how it turned out. The system is comprised of a Raspberry Pi 3 and 4 wide angle cameras. The cameras each take a photo, and then the Pi autonomously stitches them into a panorama. This repeats at regular intervals and then the panoramas become the frames of a time-lapse video.

I’ve taken two full day time-lapses, which you can view here:

If you’re interested in reading about this project’s development, you can jump back to the beginning and read forward, or start at the end and read backwards. This project has been a work in progress for almost a full year, and its technical history is quite lengthy and thorough.

I’ve created the following tutorial with the aim of making this project as accessible as possible to anyone else who would like to replicate it. Whether you’re a pro or a novice looking to learn, I hope you find this tutorial clear and helpful. Access to a 3D printer is necessary for this project.

Getting Started with your Pi

Order a Raspberry Pi 3 from your favorite supplier. You’re going to need an extra keyboard, mouse, and monitor for the first few steps. You’ll also need a microSD card. 32GB should be more than sufficient, and shouldn’t set you back more than $15.

Short Version (for Experienced Users)

  1. 1. Install Raspbian
  2. 2. Expand filesystem
  3. 3. Enable camera, SSH, VNC
  4. 4. Lock resolution (optional)
  5. 5. Change the user password
  6. 6. Connect to Wifi; make note of IP address
  7. 7. Install VNC Viewer on your computer; connect via the Pi’s IP address
  8. 8. Download and install the stitching software on your Pi from https://github.com/BrianBock/360-camera


Installing Raspbian

Download Raspbian on your computer. I used Jessie (not Jessie Lite) for this project. I can’t tell you if the Lite version will also work. Raspberry Pi has a few tutorials on how to install Raspbian with different operating systems. I’m going to briefly present an alternative solution for Mac. I know this works on macOS Sierra and OSX El Capitan.

Use Unarchiver to unzip the Raspbian zip file. You’ll end up with a .img file.

Download SDFormatter for Mac.

Connect your microSD card to your computer. Use SDFormatter to format the card. Quick Format is fine. You can give it a name but it doesn’t matter.

SDFormatter can take a few minutes to run.

Open Disk Utility. Look for your SD card and click the eject button. Make note of the disk# listed in the bottom corner.

Open terminal.

sudo dd bs=1m if=/path_to_the_raspbian_img_file_you_just_downladed/raspbian-jessie.img of=/dev/disk#

Change the path to match the path of the Raspbian file you downloaded, and change disk# to match the number of your SD card. Copy that line into Terminal and hit enter. Go get lunch. This takes a really long time (~30-45 min). It won’t look like it’s doing much until it finishes. If you quit Terminal or disconnect the microSD card or reboot your computer before it finishes, you’ll probably want to start back again at SDFormatter.

Flip your Pi upside down to access the microSD card slot. The card will only fit in one way.

Connect your mouse, keyboard, and HDMI display to the Pi, and then connect power. The Pi doesn’t have an On/Off button, so it will turn on automatically when connected to power.

Recent versions of Raspbian boot straight to the Desktop, which is familiar and easy for most people to use. In the upper right corner, you’ll see a few icons. Click on Terminal.

Type ‘sudo raspi-config’ and hit enter. If at any point the Pi asks you for a username and password, the default is:

user: pi

password: raspberry



Use the arrow keys to navigate to #7-Advanced Options. Note that future versions of Raspbian may have slightly different menu choices.

Go to Expand Filesystem and hit enter.

This gives you access to the entirety of your microSD card’s space. The prompt should return you to the first config page. Navigate to #5 – Interfacing Options.

You’ll want to enable P1 Camera, P2 SSH, and P3 VNC. SSH allows you to remotely access the command prompt for the Pi. VNC allows you to remotely access the graphical interface to the Pi.

By default, the Pi will take on the native resolution of whatever screen it is connected to. If you want to lock it to a particular resolution, return to the main config page, return to Advance Options->Resolution, and set it to whatever you want.

If you’re going to be using your Pi on a public/unsecured network, you should change the password. Otherwise, anyone will be able to access it. Before you do that, a quick word of caution – the Pi defaults to a UK Keyboard layout, which means some of the special characters are not where you think they are. You might set a different password than you think, which will cause problems later. Click the Raspberry icon in the top left, and then navigate to Preferences->Mouse and Keyboard Settings.

Go to Keyboard->Keyboard layout.

Pick whichever layout matches your keyboard.

If you live in the US and you’re not sure, pick English (US). Now return to the Terminal window with the config page. The first option is Change User Password.

When you finish, the Pi should ask you if you want to reboot. When it comes back on, you’ll want to join it with your wifi.

If the Wifi is off (or if your Pi doesn’t support wifi), the Wifi icon will be two grey bars with red X’s.

Go back to Terminal and type ‘hostname –I’

This will tell you the Pi’s IP address, which you’ll need to connect to it remotely. You don’t ever really need to connect to the Pi remotely for setup, but I found it easier to use my computer than the old keyboard, mouse, and screen I had lying around.

Download and install VNC Viewer on your computer. When it finishes, enter the Pi’s IP address to connect to it. You should now be able to control the Pi from the comfort of your computer. You probably won’t need the second mouse, keyboard, or screen again (but keep them around, just in case). You can also use VNC to transfer filesbetween your computer and the Pi.

While not necessary, its usually good practice to run ‘sudo apt-get update’ and ‘sudo apt-get upgrade’ in Terminal when you install Raspbian. This ensures all your software is the most current version.

Open the web browser on your Pi (the blue globe icon in the top left) and go to https://github.com/BrianBock/360-camera. Click ‘Clone or Download’ and then ‘Download Zip’. You’ll find these files in the Pi’s Downloads folder. Follow the information listed on that page or in the ReadMe file to setup the program.

That’s it for software for now. Now on to hardware!

Hardware

You’ll need the following:

ItemQtySource
Wide Angle Camera4www.sainsmart.com/sainsmart-wide-angle-fish-eye-camera-lenses-for-raspberry-pi-arduino.html/
Camera Splitter*1www.arducam.com/multi-camera-adapter-module-raspberry-pi/
300mm Flex Cable4https://www.adafruit.com/products/1648
Pi Heat Sink (6mm)1https://shop.pimoroni.com/products/heatsink
20Ah Battery1http://a.co/41aheoL
 
Brass Screw Inserts (92395A109)1https://www.mcmaster.com/#catalog/123/3328/=16605w6
3/64″ Hex Screw (91251A054)1https://www.mcmaster.com/#catalog/123/3101/=16606sm
3/64″ Hex Driver (7400A11)1https://www.mcmaster.com/#standard-hex-drivers/=166074f
4″ Threaded Rod (98750A025)1https://www.mcmaster.com/#catalog/123/3183/=16aqfhj
Steel Hex Nut (90490A029)1https://www.mcmaster.com/mv1486502887/#catalog/90490A029
Pi Screws (92196A505)1https://www.mcmaster.com/#92196a505/=16vp2ha
Tiny Hex Nuts (90480A041)1https://www.mcmaster.com/#90480a041/=16vp6wb
 
Tripod1http://a.co/aobroTu
 
Zip Ties2 

*Note that I use the words splitter and multiplexer interchangeably. They mean the same thing for the purposes of this project.

If you do not own a 5/64” hex screw driver, you’ll need to order one as well.

The first 5 items on this list are related to the Pi, the rest relate to camera and Pi mounts. All the parts may take a little while to ship. I don’t know if the heatsink is necessary, but I’d rather play it safe. The heat sink comes with an adhesive pad on the back. Carefully peel off the protective layer and then stick the heat sink on top of your Pi’s CPU (the larger black square between the HDMI port and the pins).

3D Printed Parts

I spent a lot of time prototyping and refining my designs for this project. If you want to simply recreate what I did, you can download the files here: https://github.com/BrianBock/360-Camera-Parts

If you aspire to make your own way, I encourage you to open your favorite CAD program (I’m partial to SolidWorks), and start designing! Digital calipers are incredibly useful.

There are 4 files included here: the tripod plate, the camera plate, the camera mount, and the Pi mount. I’ve included both the Solidworks files and 3D print ready STL files, so that you can easily make modifications, as desired. The camera mount is rectangular instead of square, and has holes on the top. I intended to incorporate a 5th camera, but never had the time to get it working. I encourage you to play around with the top camera (you’ll also need a second multiplexer and a decent soldering iron).

Most commercial 3D printers have a tolerance of +/- 0.2mm. It may take you some trial and error to make the screw holes the right size. The brass screw inserts provide the threading for the black screws. The side with knurling goes in first. I found the easiest way to insert them is with fine tipped tweezers, and then pressing the insert (and print) against a hard surface (like a table) to get the insert all the way in. If you need a hammer and excessive force, your holes are too small. If the inserts are loose, your holes are probably a tiny bit too big.

You may notice that the wide-angle cameras have 2 screws on the back. These screws hold the lens in place. I VERY strongly recommend you do not unscrew them. To prevent the camera from rocking on these screws, I designed the camera plate. It’s a very quick print and matches the shape of the back of the camera and the height of the screws. Secure it to the camera with some double-sided tape.



Setting up the Tripod Plate and Camera Mount

The tripod mount has a hexagonal cutout in the bottom designed to fit one 90490A029 hex nut. Slide the threaded rod through the hole and tighten the nut in place.

I added a second nut on the other side to keep the system rigid.

Remove the tripod plate that came with your tripod, and set it aside (you’ll want it later for regular shooting, I imagine). Ensure that the tripod plate fits snugly.

The underside of the camera mount has a hexagonal cutout deep enough for 2 of the same hex nuts.

Thread them on the rod and make them tight against each other. I had some difficulty getting them to fit snugly enough to be secure, so I fastened them with to the camera mount with some E6000 epoxy. I did not glue the nuts to the threaded rod, in order to keep the system flexible (should further prototypes be needed). To prevent the camera mount from wiggling and slowly unscrewing, I later added a 3rd hex nut on the underside, tightened against the other two

Mount the Pi

The Pi plate has ridges designed to match the contours of the tripod leg, and 8 holes. The 4 inner holes are to secure the Pi using the tiny hex nuts and 92196A505 screws. The 4 outer holes were intended for a more encapsulating Pi case that I never had the chance to perfect.

Use the screws and tiny hex nuts to affix the Pi to the Pi plate, and then the zip ties to secure the Pi plate to the tripod.

I recommend attaching the plate as high on the tripod leg as you can get it, so that all the cables reach with ease. You may need a drop or two of hot glue to keep it from sliding.

Attach the Cameras

You should now be ready to attach the cameras to the camera mount. It’s easier to attach the cameras with their cables than to connect the cables later, so we’ll start with the camera cables. To connect the cable to the camera, gingerly pry the black tab forward. This is a semi-delicate part, so don’t yank it, but recognize that it may be a little stiff.

Each camera should come with a short cable, but they won’t reach when everything is built, so we’ll use the longer cables. Look carefully at the cable. Each end has metal exposed on one side and blue plastic on the other. For these cameras and cables, the blue plastic will be facing up. When you have the cable straight in the socket, carefully push the black tab back in to lock it into place.

The multiplexer has 5 camera ports. 4 of them are labeled A, B, C, D. The 5th connects from the multiplexer to the Pi’s camera port. For the template included on my GitHub page to work, the cameras must be in a specific configuration – The diagram below shows which camera needs to connect to which multiplexer port.

Grab some painters tape and a sharpie and label each cable – it’ll save you a lot of guess work and frustration later.

Carefully screw each camera in place. You don’t need to over tighten – the screws will hold. The screws expand the screw inserts, further securing them in place. If you have an issue with one of the screw inserts, you can get by with 3 screws/camera. I recommend screwing in all the cameras (with cables attached) before connecting the cables to the multiplexer.

The blue plastic on the cables will face out of the multiplexer on both sides for ports A-D. It will face into the multiplexer on the Pi port.

On the Pi, the blue plastic faces the Ethernet port. Take the time to make sure all your cables are connected securely. If they are loose, you’ll probably get an error later. The multiplexer ships with a free 10 pin header (shown to the left of the lower cable in the above photo). You do not need to solder it in to use the 4 cameras, but you do need it if you want to utilize a second multiplexer.

Never connect or disconnect the splitter or any of the cameras while the Pi is on. The change in power will force the Pi to reboot.

Carefully connect the multiplexer to the Pi. It slides onto the ‘top’ GPIO pins. It’s not hard to bend the pins, so be careful – you want it to go straight on all the pins at once.

Mount the Battery

You don’t need it for early testing, but you’ll need the battery later for outdoor use. You can attach the battery to the tripod using some Velcro or some long zip ties.



Let’s test it!

Power on the Pi. Connect to it via VNC as we did earlier (or your second keyboard, mouse, and screen). The package you downloaded before from GitHub contains a file called ‘take4pics.py’. This is based on the Arducam’s sample code. Open Terminal. Use the cd command to change the working directory to where that file is. It will probably be in your Downloads folder, and Terminal usually starts in the pi folder, so you’ll probably type something like: ‘cd Downloads’. As a helpful trick, you can use the tab button to autofill the rest of the file name once you type the first few letters. When you get there, type ‘sudo python take4pics.py’. This will launch the program and take 4 photos.

The raspistill function displays a preview of the image as it takes it. These will not appear in VNC, so if you want to see the previews, you need to connect your monitor. Each picture takes a few seconds (usually 3-5). Terminal will give you updates with its progress.

When it finishes, the command prompt will become available again, and you should see all 4 photos in the same folder as the take4pics file, labeled capture_1.jpg, capture_2…4.jpg.

There is a small red LED on each camera. All of them will light up when any camera is taking a picture. If you look closely, you can see it blink as the photo is taken.

In this picture, each camera is wearing its lens cap. You’ll get much better pictures if you take them off.

If you get a mmal error, there is likely a camera not properly connected.

You may also get a similar error if you didn’t enable the camera earlier. Return to the Pi config page and make sure its enabled. Double check all of your camera connections. Again, do NOT connect or disconnect any of the cameras or the splitter while the Pi is on. Power it off and disconnect the power before messing with any of its connections.

Time-Lapses

At this point, you should be ready to take some awesome 360 time-lapses! I hope you’re excited!

We’re going to use the time-lapse script included in the folder you downloaded from GitHub. The installer moved the files into ‘/home/pi/Documents/Time-Lapse Software’. The script, run-timelapse.sh, takes 4 photos (one at a time), saves them in ‘/home/pi/Time-Lapses/todays_date/round_#/’, stitches them into one cohesive panorama, and saves that panorama in ‘/home/pi/Time-Lapses/todays_date/tifs/’. It repeats this process every two minutes (start to finish) for as long as you leave it running. The ReadMe in that GitHub project has more detailed information about the program’s inner workings. Additional information can also be found later on this page.

Ready to give it a try?

Open Terminal and use the cd command to change the directory to ‘/Documents/Time-Lapse Software’. This is where the time-lapse software was put by the installer you ran earlier. Type ‘bash run-timelapse.sh’ and hit enter. (Tip: Once again you can hit tab to auto complete the file name once you’ve typed enough of it). Just like when you tested the cameras with the take4pics.py file before, Terminal will give you updates on its progress. You won’t see the photo previews through VNC.

Within 90-100 seconds (usually), the first round will finish, and you’ll see the photos it took in /home/pi/Time-Lapses/todays_date/round_1. The script will notify you in Terminal that it finished that round, and tell you how long until the next round begins. If you want to stop the script, return to Terminal and press Ctrl C. You may need to press this combo repetitively for it to take, but that will exit out of the program.


Editing/Creating Time-Lapses

Now you’ve let the system run for a few hours, and you have a nice collection of pretty panoramas in the tifs folder. Use a USB drive to transfer the tifs folder to your computer. You can use VNC’s file transfer protocol for this, but a USB is probably faster, especially if the folder is large. Make note of the dimensions of any one of the tifs (they should all be the same). The 360 viewing format requires that everything be in a 2:1 width to height ratio.

I like using Adobe Premiere for the next few steps. There may be free alternatives available, but I’m not familiar enough with them to include them in this tutorial. Adobe Premiere automatically sets the video dimensions to match the size of the first clip you give it. (You can change them manually later, but it’s a bit of a hassle). Therefore, to make this work, we need to give Premiere something with the right dimensions before we throw in all the panoramas. Open Photoshop and create a new file with same width as the panorama and the height=1/2 the width. Make the entire image black and save it as a JPG. Open Premiere and start a new project. If you’re unfamiliar with Premiere, leave all the options in their default configurations. Drag your black image to the timeline.

Go to File->Import.

Navigate to your tifs folder and select the first image. Make sure the ‘Image Sequence’ button is checked. If you don’t see the checkbox, click the options button to reveal it.

Click Import. All of your panoramas should now be the frames of your video. You’ll see the clip in the Project window. Drag it to your timeline.

Premiere defaults to 29.9 frames/second, which may make for a very fast time-lapse. Right click on the clip and click “Speed/Duration” to adjust the clip speed.

When you have finished editing, go to File->Export->Media. Tell Premiere where to save the file by clicking on the blue ‘Output name’ link. If it isn’t default, you’ll probably want to set the format to H.264. If you’re new to Premiere, leave everything else in its default configuration. Click Export. Depending on your computer’s specs and the length of your video, exporting may take a while. When exporting finishes, you should have an MP4 file. As far as any video player (like Youtube) is concerned, however, this is just a flat video. We need to add the 360 metadata to the file so that it is correctly interpreted as a 360 video. Download and install Spatial Media Injector on your computer.

Click Open, and navigate to your video. Check ‘My video is spherical (360)’, and then hit Inject metadata. It will ask you where you want to save the new file. When it finishes, upload your masterpiece to Youtube!

Viewing Your Time-Lapses

Now that your awesome video is up on the web for all to see, you should experience it in the most immersive way possible. Google Cardboard is a cheap and easy way to experience your time-lapse through VR.

If you don’t have it already, download the Youtube app on your phone. Pull up your video and tap the Cardboard icon.

I recommend tapping the 3 dots in the corner and setting the quality to the highest that your wifi can reliably support.

Insert your phone into your Cardboard (be careful that it doesn’t slide out the sides). You can now look through the cardboard and see the amazing time-lapse that you’ve created! Show it to all your friends. If you’ve made it this far, congratulations! Write a comment below and let me know how it turned out!

If you have a Samsung Gear VR, you can use it to watch your videos with some similar setup. Within the Occulus app, download the Samsung VR app on your phone. Upload your video from your computer, and then watch it with the headset. Alternatively, you can use Android File Transfer to copy the video to your phone. Put it in the Movies folder, and then view it within Samsung VR app. It will appear under Device (the folder icon). With the video saved to your phone, you don’t need to worry about lousy Wi-Fi interrupting your viewing experience.


Viewing Panoramas

If you’ve taken panoramas that you want to view with the Google Cardboard, follow these steps:

Download Google Streetview for iPhone or Android. StreetView requires that photos are at least 5300×2650 and in a 2:1 ratio. If your panorama isn’t (and it probably won’t be), open your favorite image editor (I’m a fan of Photoshop) and add black bars at the top and bottom until you have the right size. Save the photo as a .jpg (you may have success with other file types, I didn’t try). Transfer it to your phone.

Open StreetView. Tap the orange camera icon in the corner. Tap “Import 360 Photos”. Navigate to where you saved your photo and choose it. Click Import. Back on the main page, in the Private tab you’ll now see your panorama (you may need to scroll down). Tap to select the panorama. You can use your thumb to navigate around the photo, or tap to reveal the cardboard icon in the corner. Pop your phone into your cardboard and enjoy your view!

System Limitations

Video

As the splitter can only send and receive data from one camera at a time, this system cannot be used to take 360 video.

Battery

measured the peak draw of the system to be around .65A, so the 20Ah battery will power the system for at least 30 hours. Average power draw is closer to .35A, providing a theoretical battery life of ~45-55 hours. I have yet to run the system until the battery dies.

Memory

Fully configured on a 32GB microSD card, the Pi has about 18.6GB of free space. A round of 4 photos + the stitched panorama takes up about 22-25MB, allowing you to take up to ~745 rounds within your space constraints. At a round every 2 minutes, you can shoot rounds contiguously for over 24 hours. If you want the Pi to handle all the stitching, the program can’t really take photos much faster than once every 2 minutes. I considered modifying the program to take photos and stitch as two independent processes, but never had the time to bring this change into fruition. If you want to shoot faster than every 2 minutes (for a smoother time-lapse), you’ll have to utilize external stitching.

External Stitching

You have the option to outsource the panorama stitching to another computer, freeing your Pi to take photos at a shorter interval (~45 seconds). The processing is a bit more of a hassle, but it’s very doable. If you want to do this, run the “run-timelapse-no-stitch-45s.sh” instead of the regular run script. This is the same code, just without the calls to stitch. When you finish taking your time-lapse, copy all the round folders to your computer. The rest of these instructions will be for Mac computers. I’m not sure how transferrable these steps will be to Windows. Copy your template into the folder that contains all the rounds. In Terminal, navigate to that folder.

Run the following command:

for d in */; do cp template_name.pto “$d”; done;

This will copy the template into every round folder. Select all the round folders. Use Finder’s rename tool (right click, Rename # Items) to give the rounds a more robust sequence name. If you don’t do this, Hugin may tackle higher numbered rounds out of order.

Open PTBatcherGUI. It comes as part of the Hugin software package, and can be found in the Hugin folder in your Applications folder.

Click the search directory button. Navigate to the folder containing all of the rounds, and click open. Hugin should automatically find all the templates you just copied, and they will appear (in order) in the Batch Processor. Press the green play button to begin. My Mac Pro takes about 30-35 seconds to process each round. Your computer may be faster or slower, depending on its specs. All of the resulting panoramas will all have the same name, and be within their round folder. When everything has finished, return to Finder, and search for ‘.tif’. Sort the results by Date Created. Use Finder’s rename tool again to give them all a sequence name, and then copy them all into a single folder. You can now proceed with Premiere the same way you did for automated stitching.

Making Your Own Templates

If you are modifying this project, it’s probable that my template won’t work for your needs.

When you get your camera configuration finalized, use the take4pics.py script to take 4 photos, and transfer the photos to your computer. Download and install Hugin. You have three options for Hugin’s interface – Simple, Advanced, and Expert. Advanced and Expert are visually very similar, but expert gives you more options in a few windows. I like the Advanced view, so I’ll be using it for the rest of this tutorial. Drag and drop your photos into the Hugin window.

The cameras used in this project are circular fisheye with a viewing angle of 160 degrees. Double click on the first photo, and go to the Lens tab in the popup. Change the viewing angle to 160 degrees, and then click OK. Verify that the change propagated to the rest of the images. Click the “Create control points” button.

If Hugin adds 0 control points, something is wrong and the result will be a huge mess. Double check your lens parameters and try again.

You can check out the control points Hugin made in the Control Points tab. If you want to add additional CPs, aim carefully and click on either picture.

If the pictures match well, Hugin will try its best to jump to the nearest matching pixels on both photos. You can click and drag to refine either point. When you’re ready, click add. Repeat this as necessary. If Hugin doesn’t think the photos match well, it will fight you the whole way. You do not want to be adding 60 CPs by hand. If Hugin doesn’t do a decent job on the first time, quit it and try again. Sometimes the process can be very hit or miss.

When you’re satisfied with the CPs, go to the Stitcher tab.

Have Hugin calculate the field of view and optimal size, and then click stitch. It will ask you to save the project (.pto) and resulting panorama (tif). The project is your template. Name it template.pto and use it to replace my template on the Pi. This process may require some trial and error. If there are issues with the panorama, you can go back and add more CPs to try and clean it up.

The template also includes information about lighting in the photos. You obviously can’t control lighting conditions when taking an outdoor time-lapse, but the brightness of your sample images will be a factor. I recommend taking your sample images in a uniformly illuminated environment, when possible. Large disparities in light levels between the sample photos (such as when one camera is pointed at a sunny window and another is facing a shadowy wall) will stick with the template, and you’ll end up with strange panoramas that are partially over bright and partially over darkened.

Technical Overview of the Time-Lapse Program

run-timelapse.sh creates a new folder inside /home/pi/Time-Lapses/ with the current date and time, and then kicks off ‘take-pictures.py’ and ‘stitch-pictures.py’.

‘take-pictures.py’ iterates through each camera and takes a photo. It takes about 3 seconds per camera to take a picture. The command prompt window will update you with it’s progress. Each photo is saved as capture_1.jpg, capture_2.jpg…capture_4.jpg in a round_# folder. Round refers to how many photosets have been taken. The first round is round 1.

This starts stitch-pictures.py, which uses Hugin’s command line tools and the template you created to create a panorama. This produces panoramas very consistently. Any defects or tears present in the template will be propagated to any future panoramas, which is why it’s so important to make the template as perfect as possible. With this setup, Hugin does NOT calculate control points to find the overlap in the images, which saves time and processing power, and means you don’t need to worry about people moving between cameras’ views or other issues that might cause stitching problems. On the other hand, Hugin is basically running blind. If your photos don’t line up nicely, it won’t care and you’ll get a funky panorama.

The stitching program creates a series of temporary tifs in the Software folder with the proper distortions. It uses these to create the final panorama tif for this photoset, titled round#.tif. This large image is then copied to the folder labeled “tifs” within /home/pi/Time-Lapses/TodaysDateTime/. The temporary tifs are then auto-deleted. When the round is finished, the window will notify you of its completion and how long it took. On a Raspberry Pi 3, my preliminary tests averaged about 90 seconds/round. If you’d like to change the photo frequency, open ‘run-timelapse.sh’ in your favorite editor and change the INTERVAL at the top. It subtracts the run time from the desired interval to get a delay, so that photos are taken at consistent intervals (2 min). If you set the interval to be shorter than the time it takes to run a round, the next round will start immediately after the previous one finishes. Sometimes this causes errors, so I’d avoid doing it.

I hope you’ve enjoyed this project as much as I did, and I hope it inspires you to make something cool. If you’ve successfully built this system, comment below and let me know how it turned out!