New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stereo mode #41
Comments
+1, the same question. Raspberry Pi Compute module supports 2 cameras, and using a Pi devboard or ready-to-use boards like StereoPi you have native stereoscopic image. |
We use the same firmware and kernel as raspbian, so that side of stereoscopic processing should work. Can you use our image (https://downloads.ubiquityrobotics.com/pi.html) , and see if you can get PiCamera to output stereo? |
@rohbotics, it just works! :-) The only thing I did is put dt-blob.bin (device tree for StereoPi) in a boot partition to enable two cameras support. |
@rohbotics, concerning @wezzoid question - how do you think, what is the simplest way to publish nodes for stereo processing? |
I'll have to look into the mmal format for stereo, but the way to do it is basically publish 2 separate images and use A couple concerns:
Also PRs are welcome :) |
As an idea - you can use two cameras separately. In raspivid I use -cs 0 and -cs 1 to use cameras independently and simultaneously (in my case it is front view and rear view on a drone, not stereoscopic mode). The only disadvantage is not so good image synchronization in comparison with -3d single image capture mode. But as first step for tests it may be Ok. |
Being able to do select a camera for each instance of the node would be a really good first step in supporting stereo. I'll look into it. |
Stereo is currently supported on the compute module. Can it be made to work
on the RPi 3B+? CSI is able to support up to 4 cameras on the same bus so
I'd expect to enable stereo cam we'd just need a different design of camera
cable - is that correct or am I way off?
David
…On Wed, Oct 17, 2018 at 10:08 AM Rohan Agrawal ***@***.***> wrote:
Being able to do select a camera for each instance of the node would be a
really good first step in supporting stereo.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALDeVjOSubOE0se7CH2BohwWoi41zTkEks5ul2QogaJpZM4S8tkT>
.
|
I used the picamera Python lib to get stereo working for my project (https://hackaday.io/project/159212-augmented-mekamon-robot) I put the camera in stereo mode, loaded the data in as an array, chopped it in half and published the left & right frames to ROS, basically. Doing it in Python is slow. To get around this I put the camera in top-bottom stereo mode, which means chopping the image data in half is just one 'cut' instead of one cut per row. Here's my (amateurish) code: https://pastebin.com/RQ4DMBJj @davecrawley the normal Pi 3 doesn't have the right pins exposed. Only the compute module allows this. Why Raspberry don't want to add a second CSI connector to their revised boards I don't know. |
@wezzoid thank you for your sample code! It is right this example that we were looking for! I will try to combine it with @rohbotics camera selection support from his last pull request after tests. |
@wezzoid thank you for your code sharing. After minor changes it works fine: BTW I had tried to contact you on hackaday.io but did not received any answer. Are you still there? |
@realizator That is very cool! Looks like I am going to have to pick up a StereoPi 😄 |
@rohbotics StereoPi will be available after our coming-soon crowdfunding (here is pre-launch page), but I can send you one of my current revision board for experiments right now. I just need your address for parcel. |
@realizator - awesome stuff! |
@wezzoid, @rohbotics - I put all my files used for tests here: https://github.com/realizator/StereoPi-ROS-depth-map-test |
I'm very sorry guys, i'm actually developing a visual for monocular visual impaired patients on which i am developing a depth map, i'd like to experiment with your code but i am not sure how to enable the stereoscopic camera setup on the compute module. would really appreciate that |
@nirvenesh20 If you are talking about Raspberry Pi Development board with Compute Module and two cameras - here is the manual from RPi Foundation: https://www.raspberrypi.org/documentation/hardware/computemodule/cmio-camera.md I'd like to notice that by default the Devboard have 1 adapter for camera and another for connecting display. So you need to buy second adapter to connect two cameras (https://uk.farnell.com/raspberry-pi/rpi-cmdk-adapter/adaptor-compute-module-camera/dp/2433318?st=raspberry%20adapter). Looks like it is out of stock now, so you need to google it. |
Thank You very much for the swift reply |
@nirvenesh20 Ok, now I understand your problem.
UPD> Just noticed you use Waveshare IO board. I have no any experience with it, but hope it is pin-to-pin compatible with original Raspberry's devboard, and you can use Raspberry's guide. |
@realizator Thank you very much, will try it and keep you informed |
@realizator unfortunately, using your image from |
@nirvenesh20 try to do several steps back. There are lot of possible reasons of fail (wires commutation at devboard, bad cameras, bad or wrong ribbon connections etc.)
|
@nirvenesh20 By the way I see another wallpaper on your photo. I can suggest you did not use our full linux image, but just our files on Github. That is camera support on your image can be disabled. Try to start |
@realizator Thank you for your detailed instructions, everything works absolutely well. I am able to run the publisher as well with no errors. But how do i excute step 3 onwards from https://github.com/realizator/StereoPi-ROS-depth-map-test . If everything works well, I will purchase the Stereopi , when it starts shipping in April . Also i really appreciate your time and effort, its really nice of you to guide a person like me Also the image i was previously using was the latest image provided on your page published on the 19/2 /2019. However I'm now using an older image from the same page. |
@nirvenesh20 Could you please clarify your question. UPD> I added terminal instances notice in my Github repository |
@realizator I did run the command on a different console/separate console window . But i get an error |
@nirvenesh20 I think you should install it something like this: |
@realizator thank you very much. Everything worked perfectly. Also is there anyway i could enlarge the disparity map so that it could display in full screen. UPD >also i think it should be |
|
@realizator I've been very much intrested with the stereopi, but was just curious, if the stereo camera requires any GPIO jumpers to be connected. Its a concern as i plan to attach a 3.5 inch touch display (something like this https://www.cytron.io/p-3.5-inches-tft-touch-screen-for-rpi-3?currency=MYR&gclid=Cj0KCQjwpsLkBRDpARIsAKoYI8w13Jbbnhs0VCPdAhWUcp9P_4unY-9HX9MaTlGX6zm5806LN0B7ey8aAu0iEALw_wcB to the stereopi, and it wouldn't be possible if there's need for GPIO connectors for the cameras |
@nirvenesh20 Your question is a bit offtop here (as it is not about raspicam_node). Could you please ask it here on a Raspberry Pi forum? Thank you! |
I managed to adapt the new mmal api with support for stereo mode. You should try my fork https://github.com/Lashhev/raspicam_node.git (stereo branch) |
@Lashhev That is awesome! Could you please make a PR so that we can get the necessary changes merged in to this node? |
@rohbotics, Oh. Ok. |
Make the PR to the kinetic branch.
Rohan
…On Sat, Nov 16, 2019 at 9:01 AM Lashchev Andrew ***@***.***> wrote:
@rohbotics <https://github.com/rohbotics>, Oh. Ok.
In which branch should I make PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41?email_source=notifications&email_token=AAVRY33U3P3TSJF7VBETMDLQUADLDA5CNFSM4EXS3EJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEHTLQQ#issuecomment-554644930>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVRY36V5P6NW7P6OWAZUHTQUADLDANCNFSM4EXS3EJQ>
.
|
hi @rohbotics Thank you in advance! |
Yes definitely! |
Hi, how do I use this with the Compute Module to publish nodes for 2 cameras?
The text was updated successfully, but these errors were encountered: