How to extract obstacles from an occupancy grid map

Hello,
So I have an occupancy grid map similar to the one in the below picture. I want to know how to extract the obstacles positions in meters?
Couldn't find a usful method in binaryOccupancyMap or occupancyMap. Any guidance or suggested approach would be really helpful.
Thank you.

Answers (1)

Apply imdilate() fcn to your image map:
Distance calcs:
https://www.mathworks.com/help/robotics/ug/path-planning-in-environments-of-difference-complexity.html

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!