Left and Right Cameras Reversed

StereoPi hardware discussion
Post Reply
User avatar
rlhelinski
Posts: 9
Joined: Sat May 25, 2019 9:46 pm

Left and Right Cameras Reversed

Post by rlhelinski » Tue Jun 04, 2019 12:42 am

Hello. The StereoPi is working well, but I think my left and right images are reversed (backwards). See attached screenshot.

I do not have my cables crossed. The cameras are basically directly over the connectors. Did I do something wrong? I do not see an option for reversing the order of the two images in the stereopi.conf file or in the admin area on the web app.

Some help would be awesome! Thanks
Attachments
Screenshot_2019-06-03 StereoPi 10 0 0 84.jpg
Screenshot_2019-06-03 StereoPi 10 0 0 84.jpg (424.23 KiB) Viewed 209 times

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

Re: Left and Right Cameras Reversed

Post by Realizator » Tue Jun 04, 2019 8:33 am

Hi Rlhelsinki,
We'll add this option in our next SLP update. Now you can use the solution I mentioned here.
1. "Camera" icon actually runs this script:
/var/www/make_photo.php
2. Find row containing raspistill -3d sbs -o
3. Add "-cs 1" right after "raspistill", so you have:
raspistill -cs 1 ...

My final capture row looks like this:
shell_exec('raspistill -n -t 500 -vf -hf -3d sbs -o ' . $path.$filename);

You may notice I'm not using "-cs 1" here, as hf and vf (horizontal and vertical flips) do right job.
Eugene a.k.a. Realizator

User avatar
rlhelinski
Posts: 9
Joined: Sat May 25, 2019 9:46 pm

Re: Left and Right Cameras Reversed

Post by rlhelinski » Wed Jun 05, 2019 5:11 am

Apparently, I have an old version of the StereoPi software (version 0.1.8) in the SLP image (slp-raspbian-190301.img.zip) that I downloaded. I don't have a camera icon or a file at '/var/www/make_photo.php'. However, I did find the file '/opt/StereoPi/scripts/video-source.sh' and I added '-cs 1' after './bin/raspivid' on the 2 lines near the end of the file. That fixed my reversedness. I searched the forums and wiki for this issue, but I did not try the keyword "swap".

I will try the 'stereopi-0.2.2.tar.gz' mentioned in those instructions soon. I look forward to the next version of the SLP image.

Thanks again!

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

Re: Left and Right Cameras Reversed

Post by Realizator » Fri Jun 14, 2019 7:11 am

Rhelsinki, new S.L.P. release is ready. You can either install 0.2.3 update, or download full image. All links in the Wiki are updated now.
Eugene a.k.a. Realizator

Post Reply