Convert occupancy grid to matrix
mat = occupancyMatrix(map)
mat = occupancyMatrix(map) returns occupancy values stored in the occupancy grid object as a matrix.
mat
map
collapse all
binaryOccupancyMap
Map representation, specified as a binaryOccupancyMap object. This object represents the environment of the robot. The object contains a matrix grid with binary values indicating obstacles as true (1) and free locations as false (0).
true
1
false
0
Occupancy values, returned as an h-by-w matrix, where h and w are defined by the two elements of the GridSize property of the occupancy grid object.
GridSize
Data Types: double
double
binaryOccupancyMap | occupancyMap
occupancyMap