Close
0%
0%

StereoPi - DIY stereoscopic camera with Raspberry

For computer vision learners, drone and robot builders, AR/VR and 360 panorama experimenters. Open source hardware.

Similar projects worth following
Starting from
$29.00
Realizator has 37 orders / 0reviews
Ships from Russia, United States of America, Canada
StereoPi has been successfully crowdfunded!https://www.crowdsupply.com/virt2real/stereopi
Key features:
- Supports Raspberry Pi Compute Module 1 and 3 / 3 Lite
- Raspbian support out of the box
- Support two cameras
- Small size
- Open source
StereoPi is designed to be friendly tool for experiments and quick prototyping with all kind of video-related projects.
It will definitely helps you to enjoy with:
- Making 3D photos or record stereoscopic video
- Experiment with 3D video livestream to 3D helmets like Oculus Go or Internet
- Build computer vision systems and work with OpenCV
- Make a robots with ROS onboard
- Prototyping 360 degree photo and video solutions
- Creating AR/VR project
- Livestream from your drone or robot in stereo mode or from two independent cameras

Some our experiments:

Front view:

Top view:
LegendInfo
ABoot mode jumper
B1st Camera CSI connector
CMicroUSB (for firmware upload)
DPower connector (5V DC)
EPower switch
FMicroSD
GEthernet RJ45
H2 x USB connectors
IHDMI out
J3rd USB connector pins
K2nd Camera CSI connector
LGPIO head
MSO-DIMM connector for Pi Compute

Specifications:

ParameterInfo
Dimensions:90x40 mm
Supported Pi:CM3, CM3 Lite, CM1
Camera:2 x CSI 15 lanes cable
GPIO:40 classic raspberry PI GPIO
USB:2 x USB type A, 1 USB on a pins
Ethernet:RJ45
Storage:Micro SD (for CM3 Lite)
Monitor:HDMI out
Power:5V DC

  • Well, we have v2 now...

    Eugene11/09/2020 at 11:33 0 comments

    Thanks to your support our previous board, the StereoPi v1, was brought to life. Today we are thrilled to introduce an updated version!

    Thanks to the newest Compute Module 4, we have a bunch of new features to introduce.

    Here is our StereoPi v2 project page on Hackaday.

  • How to Synchronize Multiple StereoPi?

    Eugene10/12/2020 at 20:11 0 comments

    👉 WHY?
    You may ask, "Why do I need to use multiple StereoPi at once?"
    Well, we got a set of requests from some customers who needed to take a lot of images at once. One of the most popular use cases is the creation of animated "3D" GIFs. These images are created using a set of images (usually 4). In our article we are describing all processes, starting from capturing files and up to creating MP4 video files. So you can post it as a video, or use a video->gif converter to get an animated image.

    The second popular use case is a 3D reconstruction, using a set of cameras. For example, through the use of Multi-View 3D Digital Image Correlation (Multi-DIC), a technique recently published by Dr Dana Solav and Dr Kevin Moerman.


    👉 HOW?
    If you are interested in this synchronization approach, you can find our detailed how-to guide here on our blog.

  • StereoPi used as a USB device

    Eugene03/24/2020 at 10:58 0 comments

    The Raspberry Pi Compute Module powering the StereoPi has the ability to operate as an USB device thanks to an USB-OTG hardware within the processor. This means that we can connect it to the PC and make it appear as an USB stick, a serial interface, or – as exposed in this article – as an external network interface. It is very powerful but it comes with a few limitations due to the architecture of the Raspberry ecosystem followed by the StereoPi. Let’s see how it works.

    You can read full guide here:

    https://stereopi.com/blog/stereopi-used-usb-device

  • OpenCV: comparing the speed of C++ and Python code

    Eugene02/15/2020 at 12:13 0 comments

    You often hear that Python is too slow for computer vision, especially when it comes to single-board computers like Raspberry Pi. In this article, we decided to measure the actual speed difference between C++ and Python code, and find the performance 'bottleneck'.

    You can find full article here in our blog: https://stereopi.com/blog/opencv-comparing-speed-c-and-python-code-raspberry-pi-stereo-vision

  • AnyCase Kit

    Eugene12/19/2019 at 16:03 0 comments

    We've developed this accessories kit for the very quick case prototyping. You can assemble your setup in 10 minutes! 

    5 mounting plates for your cameras and your StereoPi

    You can do a stereoscopic setup with 25 mm, 65 mm, 120 mm or 200 mm stereobase. Also 360 degree photo/video setup is available!

    M2 nylon spacers kit

    With this M2 kit and a screwdriver you can assemble your setup for just 10 minutes! JFYI, both StereoPi and Raspberry Pi cameras have M2 mounting holes!

    3 types of Raspberry Pi camera ribbons included

    Sometimes you need to bend a camera ribbons for your custom setup. Don't limit yourself with a fear to damage your ribbon. We've added 12 camera ribbons:

    • 4 pcs of 5 cm camera ribbons
    • 4 pcs of 10 cm camera ribbons
    • 4 pcs of 15 cm camera ribbons

    With the AnyCase kit your StereoPi quick start will be really quick!

    You can find more details on Tindie or on our site.

  • DIY VR headset as a StereoPi Companion

    Eugene11/12/2019 at 16:55 0 comments

    One of our friends does psychological research in the field of human perception. He was impressed by our experiment with Oculus Go, and wanted to use this solution in his research. But he had one very strict requirement: the video latency should not exceed 10 ms.

    Here is our TL;DR step-by-step guide for creating this solution.

  • A robot on StereoPi, part 1: fisheye cameras

    Eugene08/04/2019 at 20:03 0 comments

    The goal of this series of articles is to create a compact indoor robot that can navigate using stereo vision. As a platform for it, we’ll use a small Dagu RP5 platform on tracks that we have. Here’s how it looks like next to the StereoPi.

    Detailed TL;DR for fisheye cameras calibration can be found here in our blog.

  • 1.44 TFT Raspberry Pi HAT screen test

    Eugene06/21/2019 at 13:07 0 comments

    I've got one of these tiny funny screens.
    So following this manual with this fix I got this result:

    It just works! :-)

  • 3 more DIY guides for the StereoPi

    Eugene06/20/2019 at 13:58 0 comments

    We have 3 more guides now:

    1. The Art Of Stereoscopic Photo, part 1 (basics)

    2. The Art Of Stereoscopic Photo, part 2 (assembling a camera)

    3. Hacking Skybox on Oculus Go for StereoPi live streaming (just a hack)

  • OpenCV and Depth Map on StereoPi tutorial

    Eugene04/09/2019 at 08:33 0 comments

    Today we’re pleased to share with you a series of Python examples for OpenCV development. This code works with either the StereoPi or the Raspberry Pi Development Board, as both support using two cameras simultaneously. Our ready-to-use code (and also Raspbian image) will help you every step of the way, from the first image capture to the Depth Map created via real-time video capture.

    Introduction

    We would like to emphasize that all of these examples are for those new to OpenCV and are not intended for production use. If you are an advanced OpenCV user and have worked with the Raspberry Pi before, you’ll know it’s better to use C/C++ (instead of Python) and to utilize the GPU for better performance. At the end of this article we’ll provide some notes regarding the various bottlenecks we experienced using Python.

    Hardware setup

    Here is our hardware setup:

    We used the StereoPi board with Raspberry Pi Compute Module 3+. Also two Raspberry Pi cameras V1 connected (based on ov5647 sensor).

    Software used:

    The software installation process is beyond the scope of this article but we have prepared a Raspbian image with all software installed. Here is a link to our GitHub stereopi-tutorial repository.

    Notice

    All scripts support key stroke processing, and you can press ‘Q’ key to stop them. If you use Ctrl+C to stop the script, it may break the Python interaction with the cameras. In this case, you will need to reboot StereoPi.

    Step 1: Image Capture


    We use 1_test.py script for this purpose. Open the console and go to our examples folder:

    cd stereopi-tutorial

    Console Command: 

    python 1_test.py

    After starting the script you can see a preview window with the stereoscopic video. Pressing ‘Q’ will stop the process and save the last captured image. This image will be used in the next scripts for Depth Map parameters tuning.

    This script allows you to check if your hardware is operational and helps you obtain your first stereoscopic picture.

    The following video shows how the first script works:

    Step 2: Collecting Images For calibration


    In an ideal world, a perfect depth map needs to use two identical cameras with their optical, vertical and horizontal axis all in parallel. In the real world, however, cameras are different and it’s impossible to align them perfectly. Thus, a software calibration method is used. Using two cameras you take multiple photos of an object. In our case, we used a printed chessboard. A special algorithm will then analyze these photos and find parameters for correction. This script begins this process by capturing a series of chessboard photos for calibration. Before each photo, the script starts a five (5) second countdown. Five seconds is generally enough time to reposition the chessboard. Make sure it can be seen by both cameras and ensure it’s stable to avoid “blurred” photos. The default number of photos captured per series is 30.


    Console Command:

    python 2_chess_cycle.py

    The process:

    At the end, we have 30 stereoscopic photos, saved in /scenes folder.

    Step 3: Image Separation


    The third script 3_pairs_cut.py separates the captured photos into “left” and “right” images and saves them in /pairs folder. These separations could be done on-the-fly, without saving, but this step is helpful for your next experiments. You can save image-pairs from different capture series. Use your own code to work with this images, or use another stereoscopic camera’s images by putting them in this folder.

    This script will show you every stereo pair before it’s separated (and waiting for key press). This lets you find bad photos and remove them before the next...

    Read more »

View all 17 project logs

Enjoy this project?

Share

Discussions

Al Testani wrote 07/06/2020 at 04:16 point

I posted this on the StereoPi forum but haven't received any replies. Sorry for posting here as well but I am kind of stuck right now and need some advice to make progress.

I have a 3D printer based on a Raspberry Pi and am trying to stream StereoPi video to Octoprint which is the server from my 3D printer. I can connect other webcams (e.g, Logitech) directly to an RPi USB port in the 3D printer and it just works in Octoprint.  Octoprint is the RPi software allowing me to communicate with the 3D printer using a browser.  

I am having trouble understanding how to set up a streaming server in StereoPi and select it in Octoprint. The Octoprint server as well as StereoPi are WiFi connected to the the access point on my network. I can connect to each of them separately thru a browser. I need to figure out which streaming option to use in StereoPi and what URL to set it to so I can set the same URL in Octoprint so it can receive the video stream.  IOW, I am trying to make the StereoPi appears as a webcam to the 3D printer's RPi.

Has anyone done this and/or can provide some advice?

  Are you sure? yes | no

karla wrote 07/25/2019 at 18:33 point

Hello again,

I was reading the DIY ninjas page, and I read the section about usb client mode. I read that the feature allows to turn on RNDIS LAN, and I was wondering if you know if this has been done. I am trying to succesfully connect the stereopi to my computer (like ssh) without needing an ethernet cable or a wifi dongle

  Are you sure? yes | no

Eugene wrote 07/26/2019 at 16:55 point

Hi karla! We tested this mode. But your question leads me to idea, that we need to do a step-by-step guide for this. I put it in my to-do list, and hope to do it in a couple of weeks.

Have you tried simple methods like this one http://www.circuitbasics.com/raspberry-pi-zero-ethernet-gadget/ ?

  Are you sure? yes | no

karla wrote 07/28/2019 at 17:41 point

Thanks Eugene!

I will try this soon! And thanks for the upcoming step by step guide, I am sure that will be helpful for other folks in the future.

  Are you sure? yes | no

jamie-torres wrote 08/21/2019 at 19:07 point

Hello Eugene,

Any progress on this? I have been unable to get it working. I would appreciate a link once you write a guide!

  Are you sure? yes | no

Eugene wrote 03/24/2020 at 10:59 point

Here is our guide for USB gadget mode:

https://stereopi.com/blog/stereopi-used-usb-device

  Are you sure? yes | no

[deleted]

[this comment has been deleted]

Eugene wrote 06/30/2019 at 21:40 point

Hello Karla,

You can find both pinouts in our Wiki here: https://wiki.stereopi.com/index.php?title=StereoPi_Specifications#USB_pins.2C_power_pins

  Are you sure? yes | no

karla wrote 06/30/2019 at 23:17 point

Hello Eugene, Thanks for the quick reply,I can see the pinout for the USB pinout and the power connector, but I was actually referring to the power switch (part E).

  Are you sure? yes | no

Eugene wrote 07/01/2019 at 13:35 point

Karla, may be this image will clarify power switch pinout: https://wiki.stereopi.com/images/1/1c/R15-stereopi-bottom.jpg
In the top-left corner you can see power switch pins and PCB lines. There are 5 of pins, and if we number them from 1 to 5 (left to right) we have:

1 and 5 (very left and very right) are switch shield 

2 and 3 - two ends of a power line, power is On when they are connected

4 - not connected

  Are you sure? yes | no

roger wrote 05/12/2019 at 16:03 point

Is there any support for POE on Ethernet ?

  Are you sure? yes | no

Eugene wrote 05/13/2019 at 10:27 point

We did not added PoE support in this revision, as it increases price, and not required by most of StereoPi users. If this feature will be requested by a lot of users, we can add it in some special StereoPi edition.

  Are you sure? yes | no

roger wrote 05/12/2019 at 15:59 point

Is there a way to breakout and use the wifi present on the cm3+ module ?

  Are you sure? yes | no

Eugene wrote 05/13/2019 at 10:26 point

Unfortunately CM3+ has no WiFi onboard...

  Are you sure? yes | no

Swan wrote 04/24/2019 at 07:05 point

First of all, great project. The depth results look promising.

On to questions: Is there any reason why one would use a V1 vs a V2 raspberry pi camera for depth mapping with stereo pi? Have you looked at using a global shutter on each camera instead of rolling shutter?

  Are you sure? yes | no

Eugene wrote 04/29/2019 at 13:26 point

Swan, Raspbian and Raspbery Pi supports only 2 kind of sensors (OV5647 as V1 and Sony IMX219 as V2) out of the box. There are some experiments with other sensors support at Pi forum (including global shutter), but this is a game for hardware ninjas only. :-)

  Are you sure? yes | no

Swan wrote 04/29/2019 at 14:16 point

I see, for sure. Have you noticed better depth results using one of the two sensors over the other or are they largely the same?

  Are you sure? yes | no

Eugene wrote 04/30/2019 at 08:54 point

@Swan Hackaday comments logic does not allow me to post direct reply to your next question, so I edited my previous answer.

========

I see, for sure. Have you noticed better depth results using one of the two sensors over the other or are they largely the same?

========

No, there are no difference if used pinhole optics. The main idea of using V1 cameras is that there are modules with wide-angle optics available on market.

  Are you sure? yes | no

wahib mir wrote 03/24/2019 at 19:13 point

Hey Eugene,

I love the product and see great future in it. I’m a student of Electrical Engineering and I’m working on a Project in which i have to do Image processing. I’d like to know the processing speed of Stereo pi. As regular RPI B+ is 1.4GHz, i need something faster so that while image recognition and image processing the RPI doesn’t lag. I need your help. Thanks.

  Are you sure? yes | no

Eugene wrote 03/25/2019 at 13:47 point

Hello Wahib,

StereoPi use Raspberry Pi Compute Module inside. If you use the latest Compute Module 3+, you have the same CPU as on RPi 3B+. So you will have right the same speed as on 3B+, may be a bit lower as peak frequencies are not the same. The only way to obtain more performance is to optimize your code, and also try to use GPU acceleration (at MMAL level) while image processing.

  Are you sure? yes | no

MORE PCB wrote 02/07/2019 at 08:34 point

Good boards 

  Are you sure? yes | no

EngineerAllen wrote 01/30/2019 at 02:35 point

i swear this projects been on my to do list for half my life

  Are you sure? yes | no

Eugene wrote 01/30/2019 at 05:19 point

So now you can use another half to do a projects with it! :-)

  Are you sure? yes | no

Travis Collins wrote 01/20/2019 at 01:56 point

Love this project!

Can you describe the picture resolutions and frame rates you're using in the "3rd person view of yourself" demo? The Sony IMX 219 is an ~8M pixel camera - but I assume this raspberry Pi platform has a resolution capture limit much lower than 2x that. 

Can you share the Occulus Go real-time streaming source code?

  Are you sure? yes | no

Eugene wrote 01/23/2019 at 18:34 point

On 3rd person view we used 1280x720 at 42 frames per second.

Yes, IMX219 supports higher resolution, but we found a good balance between resolution and framerate for good result.

As for code share. We are preparing ready-to-use Raspbian image we used for all our livestream-based projects. I think next week we will open it to public and will invite all enthusiasts for tests. So you will be able to se all code and play with it. By the way, this image can be used on a classic Raspberry Pi with single camera (and disabled stereoscopic mode).

Next week will be busy for us, as we do our last steps for crowdfunding campaign start.

  Are you sure? yes | no

michaelturner681 wrote 01/08/2019 at 11:39 point

Can you give us a clue as to when these boards would be available to buy? im currently doing a computer vision project for my final year at University in the UK and this board is exactly the kind of thing i could use as i wish to use stereo vision. My biggest issue is getting capable cameras to connect via usb as i haven't found any adaptor boards to go from the ribbon cable to usb ports of my single board computer.

  Are you sure? yes | no

Eugene wrote 01/11/2019 at 14:28 point

At this moment we do final preparations for crowdfunding campaign start. In better case it will start next week, in worst case a bit later. I can estimate StereoPi availability time as February-March. Right now we have some prototypes from the first test batch (20 pcs), but they are several times more expensive because of a small batch quantity.

  Are you sure? yes | no

MatYay wrote 01/07/2019 at 19:23 point

Hi, Can you tell did you use a Gigabit ethernet chip or just 100Mbit one ?

  Are you sure? yes | no

Eugene wrote 01/11/2019 at 14:24 point

We use 100 Mbit. 

USB/LAN chip on our board is connected to CM3's USB (of Broadcom SoC), which is USB 2.0 and have theoretical bandwidth limit 480 Mbit/s. This bandwidth is shared between LAN and all connected USB devices. So installing Gigabit looks strange, as we are able to use only 50% of his speed (and in the real world it is ~25%, not 50%). Installing USB 3.0 and Gigabit chip here is a good marketing, bud bad engineering. And we are engineers, not marketers, and prefer balanced  solutions :-)

  Are you sure? yes | no

benoitperron wrote 01/07/2019 at 12:36 point

Is it possible to use the StereoPi as a hub to access the two cameras individually(ie: streaming each camera on a deparate port?) and bypass all the stereo stuff you have worked so had to create? :-)

  Are you sure? yes | no

Eugene wrote 01/07/2019 at 13:00 point

Yes, you can. We use this mode for streaming front view and rear view videos from a drone. Two individual cameras, two independent livestreams. Just take into account that it is the single h264 encoder onboard, so you will not be able to encode 2 FullHD h264 streams (but able to do 2 x HD 1280x720 h264 streams with this encoder). Also you have independent MJPEG encoder and other goodies :-)

UPD> Let me answer on a question from DIYdrones here: you can use one Pi camera and one HDMI->CSI adapter to connect, for example, GoPro camera. So you have two independent streams from two optical devices.

  Are you sure? yes | no

David Sykes wrote 01/04/2019 at 20:15 point

How are the cameras synchronised ?

What is average mis-synch in msec ?

Thanks.

  Are you sure? yes | no

Eugene wrote 01/07/2019 at 12:55 point

StereoPi use sync implemented in Raspbian kernel. It is software sync, not genlock. While our experiments we were unable to capture any unsync issues in 3D video perception or depth map building. 

Here are some answers on synchronisation questions from user 6by9 (it was he who imlemented stereoscopic mode in Raspbian kernel): https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=85012#p612743

  Are you sure? yes | no

David Sykes wrote 01/07/2019 at 18:40 point

Thanks.

So,in effect does the software 'press' the start on one camera and then on the second camera ?

Unlike most cameras, you would think simple board cameras have virtually no further preparatory work to do and start capturing frames immediately

Do you have a link to that part of the code ?

The only way to really measure sync is by using a crt :-

https://www.3dtv.at/Knowhow/Synctest_en.aspx


With Canon point-and-shoot/bridge cameras (including EOS M3 and M10) I have been able to achieve a sync error of a fraction of a msec.

If a crt test is not possible, it would be useful to see short video clips of fountains,waterfalls or flowing water with lots of water droplets flying around.

It would be very useful if the VSYNC signal was accessible on a test point so that they could be compared on a 'scope.

Is a diagram of the 15-way CSI connector avai;able ?

I have previously powered-up two board cameras at the same time and added a small capacitor across the power-up capacitor of the 'faster' camera to initially bring the VSYNC signals into sync.

The 65mm camera separation is sensible but strictly only applies when  the effective focal length is about 40 to 50mm.

I would be very interested in a configuration where the cameras are as close as possible for macro photography.

Is that possible ?

  Are you sure? yes | no

Bruno Verachten wrote 01/01/2019 at 18:01 point

Any idea of the price tag? Do you think this would work with the HDMI2CSI converter?
https://auvidea.com/b102-hdmi-to-csi-2-bridge-22-pin-fpc/

  Are you sure? yes | no

Eugene wrote 01/01/2019 at 22:01 point

Crowdfunding price is about $70 for board itself and about $120 for set with Compute Module and two v1 cameras.

Yes, board supports Auvidea hdmi2csi converter, but not in dual mode. That is you can not use two such converters. It is not StereoPi fault, but absence of support in Pi kernel. I've asked user 6by9 at Pi forum, here's his answer:https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=120702&p=1108531#p1108448

  Are you sure? yes | no

Bruno Verachten wrote 01/02/2019 at 07:07 point

Thanks a lot. I am not interested in having two hdmi2csi, but only one and a V2 camera on the other csi port. It looks like it would work.

http://www.arducam.com/raspberry-pi-camera-rev-c-improves-optical-performance/

  Are you sure? yes | no

Guido wrote 01/04/2019 at 08:57 point

when is the crowdfunding going to launch ?

Awesome project!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates