Page 1 of 1

Raw distance calculation

Posted: Sat Dec 11, 2021 7:31 am
by muri
Hello,

(Realizator, if you are reading this, I messaged you in telegrams a few weeks back but couldn't receive a reply)

I'm trying to create software that can find raw distance data in specific points of the video feed. Specifically, I would like to know the distance from the camera to the object at specific coordinates (X: ... Y: ...) I'm having a few problems right now, and I was wondering if anyone can help.

1) I used the premade pairs for the calibration step, and it works fine. I'm at the 5_dm_tune.py step, and I keep getting error messages that say "the examples.directory rcpram was deprecated". Here's a link to the error im having: https://drive.google.com/file/d/1PYHdAA ... sp=sharing

2) Given that I do end up fixing this calibration and depth map tuning issue, is there any way I can acquire the distance at specific coordinates? I saw another post and the realizator wrote that there's a separate function for this in opencv, but I'm not sure how to use it. Does anyone have code for it that I can use? Thank you so much.

Re: Raw distance calculation

Posted: Thu Dec 16, 2021 12:28 pm
by Realizator
Hello muri,

Wow, looks like I missed your Telegram message in my tsunami of messages. Please ping me again there!

As for the error - according to your screenshot, you are using the old repository and code. It was polished for the older version of Python and OpenCV. Please take a look at newer code: https://github.com/realizator/stereopi-fisheye-robot

It is tested with the latest Python version and the latest OpenCV. If you are not planning to fight with the manual OpenCV setup, you can use the pre-configured RaspiOS OpenCV image available here: https://www.mediafire.com/folder/nzr90vj8wp1l3/SLP

Re: Raw distance calculation

Posted: Wed Dec 22, 2021 12:28 pm
by muri
Hi Realizator!

I think the dm_tune step now works fine. Are there any code samples for distance calculation? btw, I just g-chatted you, so please check when you're available! Thanks.

Re: Raw distance calculation

Posted: Mon Dec 27, 2021 2:09 pm
by Realizator
Hello muri,

Did you try this point cloud code?