Zero360: Part 1 Building the Zero360

Posted In: Blogroll

In Part 1 I will cover why I wanted to build the Zero360 and notes on making a panorama

I love taking panoramas and I love taking Time-Lapse videos. So I got to thinking how I could merge the worlds together!

For the past few years since the Raspberry Pi camera was released, I have been busy making photos, videos and time-lapses trying to push what you can do with the camera beyond taking a selfie. At first glance taking a panorama using the Raspberry Pi is really simple and actually something I have already done to create panning time-lapses. Get a servo/stepper motor with a PiCamera on top and let it turn and snap pictures.

There is a caveat to this solution. Taking a set of pictures is slow. (making a panorama with moving objects could cause issues if the objects move into multiple frames)

But I am still only talking about creating one still image. What about a time-lapse… Well I need to get an image for each frame of that time-lapse. This means servos are out the window because the camera has to move for each part of the panorama for each frame and that takes time.

8 is better than 1!

That’s why we need 8 cameras! The Picamera v2.1 has a horizontal field of view (hfov) of 62.2 degrees and vertical field of view (vfov) of 48.8 degrees. (for reference the v1.3 has – 54 x 41 degrees)

This means if the lens is looking dead straight it will see 31.1 degrees to the left and 31.1 degrees to the right… and vertically it would 24.4 degrees up from the center point and 24.4 degrees down…

2000px-Angle_of_view.svg(image source: Wikipedia)

In order to make a panorama I would need to overlap the hfov of each camera so there is enough information from both images that would allow the software to stitch the images together. Now I want 360 degree view all the way round… So I would assume I want the cameras as close together as possible (I want the camera boards to touch). I calculated that I would need 8 cameras. That is giving me enough overlap but still the minimum number of cameras.

One small note with this. There is about a 30cm dead space between the cameras before they start to overlap

deadzone

This means if you put your finger close to the Zero360 and between 2 of the cameras, the cameras won’t see your finger.

Good Ship Pimoroni

I mentioned this in the introduction but I would like to mention it again! They have done such a great job on the housing for the prototype!

img_20160607_115705-e1467098761169

Big thanks especially to Connor who did a phenomenal job on the design!

The unit came pre-built and glued so I don’t have a video of building the unit. I did although ask for some changes for tripod mounting so I am expecting a new version soon. This version wont be built so I can paint it. Then I will make a video 😉

I love it when a plan comes together… Almost…

After some time and getting some friends to also order Pi Zeros on my behalf I managed to finish the prototype! Seriously, it looks like a Dalek!

unnamed copy

I did suffer one hiccup. I broke a Pi Zero’s camera connector but then still used it thinking it would be ok… It toasted the camera too. So I am currently down to 7 cameras. PSA: Don’t use a broken camera port! You have been warned!

20160607_155625

The parallax compromise

Sounds like an episode of The Big Bang Theory …

Parallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight, and is measured by the angle or semi-angle of inclination between those two lines” (Wikipedia)

This is a tricky concept to explain so I would recommend you just go and read this Wikipedia page before we continue.

In my case when I have 2 cameras seeing the same object, but that object is close (between 1.5 to 2 meters) the cameras won’t be seeing the object at the same angle in relation to the background.

parallax

Image source: http://www.kerschhofer.net/ptguide/01.htm (this article is also worth a read)

So when it comes to stitching the panorama, it might either look warped or blurry and some stitching software won’t automatically stitch it at all.

In large open spaces this ‘should’ be ok. I still need to run tests.

Just a quick note… if you want to not have Parallax issues…. Either get a 360 degree fisheye lens or one of these gizmos for DSLR’s

adjsute_mk2_main__07672.1393082835.1280.1280

Overview of the setup: Cabling

I have all the Raspberry Pi Zeros connected via OTG to 2 Raspberry Pi3 Model B’s. That’s 4 Zeros per Pi 3. They are both connected via wifi to an access point (for now that’s my cell phone) and powered by the 2.5A official power supply.

I can’t state this enough! Get the best USB cables (thick and short) and the official power supply. Otherwise you won’t get the most stable connection to all 4 Pi Zeros over the one Pi3.

Certainly, I could use a powered USB Hub and maybe get all 8 Pi Zeros connected to one Pi3, but the way I have done it gives me the possibility to use batteries (within a reasonable cost).

Potability for this setup is key! I really have found it hard to find large open spaces with plug sockets.

Whats coming next?

This is a big topic so I will split it into parts: