Page 1 of 1

Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 10:05 am
by noob
I am sorry, but I am new to RaspberryPi. Hope someone can help me with this.
Just bought a Stereopi that came with an SD card pre-imaged with Raspbian, and I have successfully tested the cameras and ran the Stereopi tutorial codes. Everything works just fine.
I connected the Stereopi to a laptop using an Ethernet cable to share the internet and runs stereopi on laptop using VNC viewer, which works just fine, however, after doing so, I was unable to run the tutorial codes anymore, which is what got me confused. No error message is shown when running the code, it just freezes there, also -raspistill cs-0 is not working as well. Is it because I updated and upgraded or is it because of something else?

Thank you very much.

Re: Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 10:13 am
by Realizator
Hi Noob,
As for upgrade and update - it is a bad idea for the SLP image. It is better to use original edition. If you're advanced Linux user, you can do it after unlocking filesystem (as it is read-only by default), but you need to check all parts like PHP version, Nginx and a bunch of other elements of SLP is updated correctly.

As for your test code. By default, our scripts are running, and accessing the cameras. So you need to stop them before running your code. The best way is to run this script:
/opt/StereoPi/stop.sh

Please notice, that if you decide to kill raspivid or gstreamer manually, they will autostart automatically :-) So please use stop.sh for this.

Re: Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 10:22 am
by noob
Thank you. But I still do not understand why am I unable to run the tutorial codes to test the camera such as the 1_test.py after I have connected stereopi to a laptop. The problem still persists even after unplugging the ethernet cable and rebooted the stereopi. Also, is there a solution to this?

PS: I am using a Raspbian Opencv image, not SLP image. I have talked to Eugene P on youtube, he told me to post a thread over here.

Re: Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 10:28 am
by Realizator
A-ha, this changes the game!
Which OpenCV image you're using? The latest Buster (including C++ and Python code), or previous one (with the fisheye-robot code only)?
If you're using not the latest image, and do upgrade/update, you can face this problem with the broken stereoscopic support:
https://forum.stereopi.com/viewtopic.ph ... ster#p1293
Try to run suggested command once right after reboot, before accessing your camera. This should work.
In our latest Buster image we've added this command in autostart, so stereoscopic mode works right after reboot.

Link to the latest image I mention: https://drive.google.com/file/d/1xlkvZM ... sp=sharing
Related article: https://stereopi.com/blog/opencv-compar ... reo-vision

Re: Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 10:48 am
by noob
I am using Raspbian Stretch and Open cv 3.4.4 from https://github.com/realizator/stereopi-tutorial. After running the suggested command right after booting,
sudo vcdbg set awb_mode 0

It worked! Thank you so much. So I suppose I should use a new sd card for the latest Buster Image from
https://drive.google.com/file/d/1xlkvZM ... sp=sharing for smooth operation am I right?

I have 2 more questions,
1. Do you have a tutorial on how to convert the depth map obtain into a point cloud where I can get the real distance? (has anyone tried using 'open3d' or 'stereoVision' package on StereoPi)

2. Is it recommend to use tensorflow and YOLO object detection on StereoPi, has anyone done a performance test on this?

Should I open another separate thread for the other 2 questions?

Thank you very much.

Re: Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 11:00 am
by Realizator
Ok, I'm glad it works for you now! :-)
As for your two questions - please open new topics in a Processing subtheme here: https://forum.stereopi.com/viewforum.php?f=9

Re: Connecting the StereoPi to Laptop using Ethernet cable

Posted: Wed Feb 19, 2020 11:55 am
by Realizator
upd> While you're opening new topics, I'd like to mention we already touched point clouds feature while building 2D map. I mean this experiment, script 7: https://www.youtube.com/watch?v=AFM4p63SuQ8