Occupancy Map from Hough Lines

asked 2019-09-24 08:02:24 -0500

cuhsailus gravatar image

I have written a script that detects boundary lines in a camera frame using Hough Lines in OpenCV. I want to turn these detection into an occupancy grid where the detected lines are boundaries and any space between the lines is free space in which the robot may traverse. Any help or ideas?

edit retag flag offensive close merge delete


Are you creating a full map to be used for global path planning purposes or want to convert a single reading to an occupancy grid for local planning reasons?

Jari gravatar image Jari  ( 2019-09-25 09:18:14 -0500 )edit

Good question. I think the second is fine for my purpose.

cuhsailus gravatar image cuhsailus  ( 2019-09-25 09:26:25 -0500 )edit

Ok. Is this an academic/hobby project? What language are you using?

Jari gravatar image Jari  ( 2019-09-25 09:44:25 -0500 )edit

This is a hobby project. I have written the detection code in python, but am willing to work with C++ as well.

cuhsailus gravatar image cuhsailus  ( 2019-09-25 09:45:59 -0500 )edit

Are you working with a single image? If it's forward-facing camera you don't have distance for any of the lines, so how will you fill in the occupancy map? If you have two stereo images, you'll have to match lines detected in the two images somehow in order to determine the depth. That may be just as hard as using a more standard approach using feature detection, for which there are existing ROS packages.

Mark Rose gravatar image Mark Rose  ( 2019-10-03 12:00:18 -0500 )edit