How to work with Stereo Pi

Share your projects and ideas with the community!
Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

How to work with Stereo Pi

Post by Bhavya »

Helloo everyone

I'm new to use the Stereo pi board,just i got my stereo pi board set with 2 camera sensors and a sd card,I have found the
IP address of the board,after that i do not how to proceed with this can any one help me?I can play the real streaming with the help of IP address.
and suggest me which all the soft wares need to use?

Thanks and Regards
Bhavana

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

Re: How to work with Stereo Pi

Post by Realizator »

Hello Bhavya,
If you get your micro SD card with our kit, it means you have SLP Raspbian image on it. SLP means "Stereopi Livestream Playground". You can find details on this Raspbian here in our Wiki.

In this video I describe all steps, starting from the assembly and up to livestream to the browser.

If you have any questions about this video - please ask here, we are glad to help you!
Eugene a.k.a. Realizator

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Thanks for your reply

Now I'm able to stream the video up to the browser window. in the next step what I should do is I need to get only the raw data(raw image) ?can u please help to do this with your suggestion.
Thanks and regards
Bhavana

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

Re: How to work with Stereo Pi

Post by Realizator »

If you want to get it manually - you may press “photo” icon, and download captured image.
If you wish to process it onboard - it is better to use another Raspbian image, like OpenCV image we have. Look at the “Downloads” section at the right bottom side of this page:

https://wiki.stereopi.com

SLP Raspbian image is intended for the livestream and stereoscopic photo experiments, but not for image processing.
Eugene a.k.a. Realizator

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Helloo..

If you want to get it manually - you may press “photo” icon, and download captured image.
-> i dont want for image,I need it for video

If you wish to process it onboard - it is better to use another Raspbian image, like OpenCV image we have. Look at the “Downloads” section at the right bottom side of this page:
->Installing stereopi-opencv-20190912

https://wiki.stereopi.com

SLP Raspbian image is intended for the livestream and stereoscopic photo experiments, but not for image processing.
->is there any other method to get the uncompressed data?

Thanks & regards
Bhavana

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

Re: How to work with Stereo Pi

Post by Realizator »

To say briefly, there are several steps before you can see the video.
In SLP:
1. Camera captures the frame
2. Frames sequence are encoded by H264
3. Encoded video is sent to your device
4. Video is decoded
5. frames are sown to the user
So you can process frames from the video stream

Another approach (Python, OpenCV)
1. Camera captures the frame
2. You get this image as a Numpy array in your Python code, and you can process it

In Python you can see the simplest way to capture a frame, for example, in the script 1_test.py in this repository: https://github.com/realizator/stereopi-fisheye-robot

The most comfort way ti play with it is to write OpenCV Raspbian image on another micro SD and work with it.
This image includes all code for the experiments: https://drive.google.com/file/d/1xlkvZM ... sp=sharing
Eugene a.k.a. Realizator

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Thank you for your response

Now I'm going to work with OpenCV.

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

helloo..

can you please tell where can I find the source code and .exe file?

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

Re: How to work with Stereo Pi

Post by Realizator »

Hi Bhavana,
There are no any exe files here, as it is not Windows but Linux.
If you with to run Python code, you need to type "python", space, and a name of your script, like "python 1_test.py"
Before this please enter the program folder using command "cd /stereopi-fisheye-robot"
TIP: folder names and script names are long. But you can type just a few symbols, and then press "TAB" button. Your folder name will be auto fulfilled. For example, when you type "python 1" and then "TAB", you get "python 1_test.py"

On our YouTube channel you can look at this playlist:
https://www.youtube.com/playlist?list=P ... m3ilynHt3A

For each script (Python or C++ code) we've recorded a detailed step-by-step guides, including the very first step (like entering the working folder and running the code).
Eugene a.k.a. Realizator

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Thanks..

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Helloo..

Please correct if I'm doing in the wrong way
1) I have downloded the Source code in github.
2)Opening the code in Visual studio 2017(if I run this nothing showing here) I do not know the reason, no errors.
3)In PuTTY giving the IP address and then login with standard user Id and password.then giving su pi command(Switching between user and root). after that Im giving this command for compiling in puTTY it self,
g++ C:\Users\Bhavya\Desktop\stereopi-cpp\src\script1.cpp -o C:\Users\Bhavya\Desktop\stereopi-cpp\bin\script1.bin - C:\opencv\build\include\opencv2 -L/usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_calib3d

after this it showing permission denied.I don't know whats going wrong here.
L/usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_calib3d(Im not getting why we are using it)

Thanks and Regards
Bhavana

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

Re: How to work with Stereo Pi

Post by stereomaton »

I did not follow the whole context, but the command you report mixes Linux and Windows notations. To build an opencv program for stereopi, the simplest way is probably to build it on the stereopi itself (man could cross-compile but it requires bigger setup and competences)
When you connect with putty, you are on the board itself. The command line is run on the stereopi and the results are sent via the network to putty which displays them. Thus your g++ command cannot have path on your Windows system because the stereopi do not have access to it. As is, your command does not mean anything (it probably lacks a letter behind the lonely hyphen and Windows paths are not accepted) so I wonder how it will understand it.

The -L flag says where to search for the libraries in the stereopi (if they are not in the standard path) and the different -l flags precise which libraries to link with.

I didn't answer to all the points, but I hope that those bits could help nonetheless.
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

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Thanks for the Information.

Now I'm freshly loaded the Raspbian SLP image, Trying to install the open cv but, I'm getting an error. I have tried the possibilities still I didn't solve it.

Errors were encountered while processing:
/tmp/apt-dpkg-install-qgn6jx/027-raspberrypi-kernel_1.20190819~stretch-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

This is the error im facing, can you plz help me

Thanks and regard
Bhavana

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

Re: How to work with Stereo Pi

Post by Realizator »

Hi Bhavana,
As I mentioned, SLP is a bad idea for OpenCV. It is a very special image, and you will have a lot of difficulties, if you are not a Linux specialist.
Just use the OpenCV image. It is the easiest way, everything already installed and ready to work. It was designed specially for the flawless start with OpenCV from scratch.
I'd recommend you to start with just repeating all steps for Script 1 described in a video. If you can repeat them - you are in a right direction.
Eugene a.k.a. Realizator

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Thanks a lot..

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

Helloo

I have booted the opencv raspbian image to sd card,put the video is not playing in web brower why? and in puTTy as it giving networ error.
if possible can u tell me the steps after booting the image to the sd card(softwares need to use),further I'll refer the videos what you suggetsed.

Thank you...

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

u can go through the attached files
Attachments
web.png
web.png (68.25 KiB) Viewed 33043 times
putty.png
putty.png (16.69 KiB) Viewed 33043 times

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

Re: How to work with Stereo Pi

Post by Realizator »

OpenCv image is not intended for the video livestream to the browser. It's absolutely another task, which requires a lot of code. All that code is included in SLP image.
I asked you to repeat all the steps from the first video with the C++ code. There are no any livestream to the browser here. If you can repeat it, a lot of things will be much clear for you. To do all these stepes you need to connect a keyboard, mouse and a monitor to your StereoPi, but not access it over Putty.
Also please notice, that by Putty you can access the terminal only. You are unable to see desktop, graphics, image preview etc.
Eugene a.k.a. Realizator

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

Re: How to work with Stereo Pi

Post by stereomaton »

You did not expose what you wanted to do exactly: except if I miss something, we only know that you want access raw video data.

If it means capturing videos to process them on PC afterwards, you can do it with SLP. It has an interface to record the videos. You can also use the raspivid program from the command line via ssh (putty) or script something to record when you want.

If it means capturing videos to process them live on PC, you can do it with SLP. This special image can stream the video to your PC which can process it the way you want.

If it means capturing videos to process them live on the stereopi which has limited processing power, you can use the OpenCv image which has everything setup for this task. With this solution you have access to almost uncompressed frames (YUV420) AFAIK.

The SLP system is primary targeted to streaming and remote access; the OpenCV image is targeted to video/photo processing with desktop interface on HDMI and no ssh (putty) by default. The two are systems with different default configurations.
They can be modified to do what the other does but it is not that easy, so it is better to choose the one that suits more closely your needs to start with.
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

Bhavya
Posts: 23
Joined: Fri Feb 21, 2020 7:25 am

Re: How to work with Stereo Pi

Post by Bhavya »

If I cant access putty..then how should i can proceed? I'm very new to this environment.

Post Reply