The Raspberry Pi is the most common way for people to use 360 cameras in drones, surveillance projects, autonomous robots, VR timelapse and many other uses. The video above shows how to set up a Raspberry Pi with open source software to allow the Pi to talk to cameras that support PTP (Picture Transport Protocol) or MTP (Media Transport Protocol) over a USB cable.
Setup is a bit involved as you will need to compile the open source libptp from source, which requires the dev packages for libusb, which can be installed with apt. The USB port of the Raspberry Pi can supply power to the camera indefinitely using a powered hub with BC1.2 compliant charging. The same cable that powers the camera is used to send the camera commands.
This same setup can be used to live stream 360 video to the Raspberry Pi and then have the Raspberry Pi relay the live video stream to a VR headset or web browser.
The system below uses a 360 camera and a Raspberry Pi 4 at depths up to 300m.
The system below is used to inspect the interior of sewer pipes.
For hobbyists, the robotic kit below can be built for less than $150. I'm using a RPi 4 for both the robot and camera controller in my build.
Needed if you use the Raspberry Pi for additional processing. You may not need the fan for some uses. Test the system without the fan and see if it overheats.
Red wire of the fan goes to pin 4 and black wire goes to pin 6.
Plug one end of a USB cable and plug the other in into the camera. The camera needs to be powered on to receive commands.
Install libusb-compat-0.1.5 from SourceForge.
Install libptp2-1.2.0 from SourceForge.
ptpcam --capture will take the pictures
You can use ptpcam --get-file=file_handle to download the picture from the camera to the Raspberry Pi.
From the Raspberry Pi, you can download it to a Windows computer to view it, put the image on a web server on the Raspberry Pi, or upload it to the cloud.
To clear the USB-C port on the camera, you must use a 1/4" by 20 tpi bolt or a cheap light stand.
You can either mount the Raspberry Pi directly to the camera mount or use a smaller stand for the Raspberry Pi camera controller.
In this application, the Raspberry Pi is powered from a wall outlet with an extension cord. The Raspberry Pi can supply power to the camera.
Accessing The ImagesThe simplest way to get the images is to use sftp or scp from a Windows or Mac computer and download the images from the Raspberry Pi. In the example below, I use scp to push the images from the Raspberry Pi to a Linux server in the cloud automatically. Using this technique, you can share the images with anyone on the Internet.
You can quickly build a camera controller from a Raspberry Pi and use it to manage a camera that supports PTP or MTP. In this example, I use the RICOH THETA 360 camera to provide virtual experiences at distant sites. The Raspberry Pi and camera can be mounted on a robot to share your virtual experiences with the world.
Comments
Please log in or sign up to comment.