New to Raspberry Pi

S.L.P. image questions, stereoscopic video livestream and recording, stereoscopic photo capture etc.
Post Reply
mango
Posts: 5
Joined: Tue Feb 23, 2021 5:12 am

New to Raspberry Pi

Post by mango »

Hi, I am new to Raspberry Pi, so this is a very basic question.

I was able to set up set up the StereoPi hardware and access the device via stereo.local using a wifi module (https://wiki.stereopi.com/index.php?title=The_Basics). My next project is to (1) stitch photos together and (2) create a hardware button for this system that will allow me to take photos and video.

What do I need to do to use the StereoPi as a computer instead of an image capture system with a web interface? I would like to code on this device, but I'm having a tough time making the leap from "I can access the device via my browser" to "I can code on this device and access the media folder". What do I need to do to write my first "hello world" program in Python on the StereoPi? Do I need a different Raspberry Pi OS image? Do I need to set the device up as a USB device? something else?

Thank you!

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: New to Raspberry Pi

Post by Realizator »

Hi Mango,
Short answers:
1. You can use a desktop-like environment. Use stock RaspiOS, and just add dt-blob.bin (as described in Wiki) to enable 2 cameras. In this case, you can work like with the desktop computer.
2. Take a look at this post about the physical button to take photos

You also say "stitch photos together". Usually, you get already stitched photos. Maybe I didn't get your idea, please clarify.

Raspberry Pi is an embedded system, so it is better to save CPU/RAM resources if possible. That's why a lot of specific OS exists, focused on remote access. For example our SLP or MotionEye. We also have another image, OpenCV. It is intended right for the case you are describing: desktop environment, monitor, keyboard, and mouse.
As a small tip, I'd recommend you to have a few micro SD with different OS images. It really helps with the troubleshooting.
Eugene a.k.a. Realizator

mango
Posts: 5
Joined: Tue Feb 23, 2021 5:12 am

Re: New to Raspberry Pi

Post by mango »

Thank you for your reply regarding development environments and setting up a camera -- I will look into these.

With respect to "stitch photos together", you are correct, the videos are already stitched. However, I copied one of the videos I took with the V1 cameras over to Oculus Quest, and I'm not experiencing a stereoscopic effect. I have been able to experience a stereoscopic effect with videos I've taken from an off-the-shelf 180 camera. The video from the off-the-shelf camera also appears to have an equirectangular projection.

(1) What do I need to do to the video recordings from stereopi to view a movie is stereo on the Oculus headset?
(2) Is it possible to get a stereo video from both the V1 cameras and the Waveshare “G” wide-angle (160°) cameras?

Thank you!

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: New to Raspberry Pi

Post by Realizator »

Hi Mango,
The video from the StereoPi is (usually) side-by-side. You can view it on the mobile phone using the cardboard-like solution. But Oculus is a more advanced thing. Ideally, it needs an equirectangular video. You can do this by post-processing, and it needs a lot of tricks. This is too big topic to describe in a few words :-) As for our upcoming Oculus software, we used a trick. We did a custom shader, so our side-by-side video is split into two images, and each of them is used as a texture for the hemisphere. Thus you can use a live stream with no need to do this power-hungry equirectangular transformation. Our new SLP will have the feature of adding a special tag to the video, so YouTube can recognize it as a stereoscopic video.

As for your question (2): if both cameras have the same sensor model, you can do this. But if not (like one camera is v1 with ov5647, and another is v2 with IMX219) - you'll face some troubles. Waveshare G is using ov5647 sensor, the same as the V1 camera, so this should work.
By the way, we already did this experiment :-) We posted the result in one of our updates for the previous crowdfunding campaign. You can find details at the end of this post.
Eugene a.k.a. Realizator

stereomaton
Posts: 215
Joined: Tue May 21, 2019 12:33 pm
Location: France

Re: New to Raspberry Pi

Post by stereomaton »

What do I need to do to the video recordings from stereopi to view a movie is stereo on the Oculus headset?
I have no experience with it, but I heard of people looking at side-by-side videos/movies in their oculus headset.
So there should be applications to load such videos. With a quick search, I found http://www.vrplayer.com/ (probably not the only one) which seems to have options for side-by-side, and options to display on a plane, as you can see on this screenshot:
Image
Stereophotographer and hacker
Despite my quite active participation in the forum, I am not in the StereoPi team
StereoPi (v1) Standard Edition + CM3Lite module + a few cameras

mango
Posts: 5
Joined: Tue Feb 23, 2021 5:12 am

Re: New to Raspberry Pi

Post by mango »

Here is what I current understand from this thread. The stereopi produces a side by side video (I was able to create a recording).

(1) To watch this side-by-side recording, you can play it on a phone and use a Google cardboard like device.

(2) You cannot watch this side-by-side recording on Oculus Quest. In order to watch a stereoscopic video in Oculus Quest, you need to render the video into an equirectangular format. There is no video on Oculus Quest which would play the side-by-side video and transform it into equirectangular.

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: New to Raspberry Pi

Post by Realizator »

Mango, actually there are some players, which have an option "force side-by-side" for VR helmets.
Properly tagged video (this feature is in SLP v2) can be uploaded to YouTube in 3D format and can be seen on Quest too.
Our Quest application is working with sbs video and renders a scene for each eye. And for the wide-angle videos (like 180 for each camera) it does reprojection to hemisphere with the head tracking support. Thus we don't need equirectangular projection.

By the way, our Quest app originally designed for the video live stream only. Looks like we need to add an option of viewing video files. Good idea, and it's strange it does not come to our minds earlier. Mango, thank you for this insight!
Eugene a.k.a. Realizator

mango
Posts: 5
Joined: Tue Feb 23, 2021 5:12 am

Re: New to Raspberry Pi

Post by mango »

Thanks for that explanation. What video players can play the video in Oculus Quest? I haven't gotten a great result, so I'm wondering whether I'm just using the wrong player?

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: New to Raspberry Pi

Post by Realizator »

Mango, you can consider Skybox as a reference. And look for other alternatives (google "Skybox alternatives").
We played with Skybox a couple of years ago, hacked its protocol, and try to force it to work for the live stream. (We published all code and were in contact with the Skybox team after that, so it was a "white" hack :D ). You can read the full story here: https://stereopi.com/blog/hacking-skybo ... -streaming
Eugene a.k.a. Realizator

Post Reply