360 Degree Camera

My main project is a 360 degree camera that can record 360 degree videos using a Raspberry Pi. It works by using a Raspberry Pi camera, mirror, and some code to capture all angles around it. The idea to do this base project came from here, made by gigafide, but I have also modified the project as I saw fit. Here is my Build Plan for this project and my Bill of Materials to acquire all the necessary parts.

Engineer

Aidan Y

Area of Interest

Games

School

The King’s Academy

Grade

Incoming Sophomore

Reflection

Over the course of creating this project, I have learned quite a lot. I learned how a Raspberry Pi worked, effective ways to use the Raspberry Camera module, using a dremel, and many more technical things. The most striking and surprising thing that I learned was how there will almost always be unexpected problems that were not originally expected in your plan. For example, here is my build plan as an overview for my main project. At first glance it seems very straightforward with no problems involved. However, some commands just simply don’t work and I’ve learned that as an engineer, one will have to work around or solve these unexpected problems. Through this program, I have experienced what being an engineer is like first-hand. This experience has shown me that engineering is something that I truly love and I will most likely pursue engineering in the future.

During my demo presentation, I took a video of the audience live. This video, with audio included, can be found right here on the right.

Demo Night!

Video Taken in Demo Night

Modification 2

NoIR Photo In The Dark

NoIR RPI Photo In Dark

Camera Refocus Tool and Cameras

RPI Camera Refocus Tool
RPI Camera Refocus Tool
NoIR Camera and Normal Camera

Normal Photo In The Dark

Normal Camera Photo In Dark
The second modification I tried on my 360 degree camera was using a NoIR camera. A NoIR camera is basically a normal Raspberry Pi camera but it does not have an infrared filter. This allows it to detect heat. Since heat is still present when there is no light, this camera can effectively see in the dark. However, I was not sure if this would work in a 360 degree camera as a 360 degree camera uses a mirror to see its surroundings and not all mirrors reflect heat. I could not find exact specifications as to whether the Kogeto Dot would reflect heat effectively. Luckily, using a ‘raspistill’ command, I took a picture with both cameras equipped with the Kogeto Dot mirror in a dark environment. The NoIR camera could see my hand but the normal camera could not, which was a success. Other than the NoIR camera addition, I also tried refocusing both Raspberry Pi cameras with a refocusing tool. This was done carefully to not break the cameras. Afterwards, the quality that they recorded was slightly improved.

Modification 1

360 Degree Sample Video With Sound

RPI under Monitor
360 Degree Camera With Wireless Keyboard

USB Microphone

USB Microphone
The first modification I applied on the 360 degree camera is adding audio. Previously, all videos recorded would be completely silent and the Raspberry Pi would not be able to detect sounds. However, with a very cheap USB microphone, it can create audio. One issue I had with implementing audio was figuring out how to record video and audio at the exact same time. Initially, I thought that I may have to set up a stream to stream both video and audio at the same time. However, another solution came up that was much simpler. Basically by using an & symbol in between two commands, the Raspberry Pi will execute both commands at the same time with a few milliseconds of delay. So using the ‘raspvid’ command for video and the ‘arecord’ command for audio, the Raspberry Pi created two output files, one for video and one for audio. After transferring these files to my laptop via a USB stick, I combined the audio and video using VSDC video editor. The audio also did have to be sped up slightly to match with the video so I used an online audio tempo editor.
Besides audio, I also made some slight tweaks to make recording more convenient. First, I combined the Raspberry Pi and LCD monitor display into one object by placing the monitor right on top of the Raspberry Pi to connect them via the GPIO ports on the Raspberry Pi. After that, I got a wireless keyboard that was pretty small with a built-in touch-pad. Finally, I got a portable rechargeable USB battery pack. Plugging the Raspberry Pi and the monitor into this would be a more suitable power supply than wall power. All of these minor tweaks allow the 360 degree camera to be far more portable and compact than before.

Final Milestone!

360 Degree Sample Video

For my final milestone, I am transferring the dewarped video over to YouTube. This is a fairly straightforward process. Firstly, I can put the dewarped video on a program called GoPro VR to preview it as a 360 degree video before uploading it to YouTube. Then, I had to download something called MetaData Injector from the YouTube website. This is a simple program that slightly modifies a video file and makes a new copy of it. This slight modification allows YouTube to know that the video is a 360 degree video and uploads it as such. If there was no MetaData Injection on the video file, YouTube would just show a really wide video that would look weird. So after injecting the video file with MetaData Injector, I could upload it to YouTube and look around within the video.

Milestone 3

Warped Image

Picture Of Me From RPI Camera Under Kogeto Dot Mirror

Dewarped Image

Dewarped Photo From RPI Camera

The third milestone in my project is acquiring the fully dewarped video. Although I previously stated in my video that I was going to create web controls next, I eventually decided to skip that step because it was taking too much time without success. This was fine because the web controls are not necessary and are just an extra luxury. So instead, I manually took a warped 360 degree video using a ‘raspivid’ command. Then I inserted code into a file using a ‘nano’ command. This code can be found here. This code was supposed to dewarp my recorded video. However, this dewarping code did not fully work. After a while, I eventually figured out that I needed to change the permission settings of a file, using the ‘chmod’ command, in order to allow the code to perform all of its functions. So after overcoming this challenge, I transferred the video via USB onto my laptop. However, I discovered that I could not play the dewarped video on my laptop and that the video created was dysfunctional. Luckily, I found a great work around for this problem. Instead of transferring a video to my laptop, I transferred all 200+ dewarped frames to my laptop. Then I used a video editor called VSDC to create a really fast slideshow out of the frames to recreate my video. This finished video looks like a really long strip and is not quite a 360 degree video yet, but is very close to being one. For my next and final milestone to finish my base project, I plan on turning the dewarped video into a full 360 degree video accessible through YouTube.

Milestone 2

RPI Picture Under Kogeto Dot Mirror
Kogeto Dot Mirror
RPI camera w/ Kogeto Dot Mirror
RPI camera w/ Kogeto Dot Mirror

The second milestone for completing my main project is trimming an I-Phone case called the Kogeto Dot and placing it on the Raspberry Pi camera. This Kogeto Dot case is basically a mirror that will allow the camera to see in all directions. After learning how to use a dremel for the first time, I used it to cut the excess casing off of the Kogeto Dot mirror. Then, I tested out the camera to see if it works by taking a picture with it using a ‘raspistill’ command. The camera functioned perfectly. Later, however, the camera was no longer being detected for some reason. After looking up potential problems, I came to the conclusion that this camera was dysfunctional. This was most likely due to how Raspberry Pi cameras are extremely sensitive to static electricity and I was not taking many precautions to protect it. I got a new camera and am now taking precautions to not break it. As expected, the new camera worked perfectly just like how the previous used to. Also, for the Kogeto Dot to be situated right above the camera in place, I got a 3D schematic of a case to fit them almost perfectly.

Milestone 1

RPI with monitor, keyboard, and mouse
RPI with monitor, keyboard, and mouse

The first milestone in my main project is setting up the Raspberry Pi. So after acquiring all the materials, I started by putting the Raspbian operating system on an SD card, which was then inserted into the Raspberry Pi. Then I learned how a Raspberry Pi must be plugged into a power source and appropriately did so. After plugging in the keyboard and mouse into the USB ports, I also had to figure out how to plug in the Raspberry Pi camera and monitor. The Raspberry Pi camera was pretty straightforward as you lift the connector on the computer board to insert the camera into. The monitor, however, was slightly more challenging to plug into the Raspberry Pi. After plugging in an HDMI cable between the computer board and monitor, the monitor was not turning on. Thankfully, all that it needed was another power cable attached to the monitor as the HDMI cable did not transfer power.

After setting up the hardware, some commands had to be run on the command prompt in the Raspberry Pi. After connecting the Pi to my local wireless network, I set up its clock/time using a ‘date’ command. Afterwards, I tried running the three commands to finish setting up the Raspberry Pi. The first command got an update for the Pi using an ‘apt-get’ command. This worked perfectly. The second command installed libav tools, also using an ‘apt-get’ command. This worked perfectly as well and was for more easily viewing and converting the video later. The third command was supposed to use apt-get to locate three codecs and install them. However, this command could not locate the three packages that it was told to install. Some of these packages did not even exist, according to online sources. It seems that the instructions for this project were slightly outdated. Because of this, and how much time it was taking without success, this last command was eventually skipped.

Starter Project

Simon Says Game
Simon Says Game
Simon Says Game
My Starter Project is the Simon Says game. The purpose of this project is to entertain its user in a fun game of memorization. The way this device works all starts with the ATMega, programmed with the whole game already. The ATMega is a microcontroller that processes the whole game. Then, there are switches to turn the game and sound on and off. The LED’s light up through the complete circuit, containing a resistor, two capacitors, and two batteries. The LED’s are simple diodes that emit lights for the game. The resistor is what keeps the current flow at a low enough level to not burn out the LED’s. The capacitors are important because they filter out noise that can harmful to the circuit. Finally, the buzzer is located on the bottom, creating all the sounds in the game while the four rubber buttons on top are for playing the actual game.
In the process of creating this starter project, I learned how to solder. I also learned much more about circuit parts. This project has inspired me to maybe explore soldering more in depth later in my life.
Comments
  • Francisco
    Reply

    Greetings from Mexico, this is interesting

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering