IMAGE2GRIDMAP(1)

πŸ“¦
version 2.14.7 Β· 3 versions
, in debian trixie

πŸ’– image2gridmap β€” like, the MRPT manual page bestie πŸ’–

okay so welcome to image2gridmap(1), a page from the Mobile Robot Programming Toolkit - MRPT manual. it's giving "tiny CLI that does one thing and does it flawlessly" and honestly? we're obsessed. πŸ¦‹


✨ NAME ✨

image2gridmap β€” turn literally any image into an MRPT .gridmap file. that's it. that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

image2gridmap  [-w] [--py <0.0>] [--px <0.0>] [--cy <0.0>] [--cx <0.0>]
               -r <0.1> [-o <map.gridmap.gz>] -i <map_image.png> [--]
               [--version] [-h]

πŸŽ€ USAGE EXAMPLES πŸŽ€

bestie these are the three moods of calling this thing. no cap.

the minimal call β€” converts an image into a gridmap, with (0,0) chillin' right at the image center:

image2gridmap -i map.png --res 0.10

custom (0,0) location, specified with pixel coords of (0,0):

image2gridmap -i map.png --res 0.10 --px 120 --py 100

custom (0,0) location, but with coordinates relative to the image center:

image2gridmap -i map.png --res 0.10 --cx -25.10 --cy 14.50

πŸ’œ DESCRIPTION πŸ’œ

image2gridmap is a command-line application (iconic behavior honestly) that converts arbitrary grayscale images into MRPT .gridmap.gz files. and what even is a .gridmap.gz file, you ask? it's literally just a gz-compressed file holding the serialization of an object of type mrpt::maps::COccupancyGridMap2D. periodt. 🫢

USAGE:

image2gridmap  [-w] [--py <0.0>] [--px <0.0>] [--cy <0.0>] [--cx <0.0>]
               -r <0.1> [-o <map.gridmap.gz>] -i <map_image.png> [--]
               [--version] [-h]

Where:

  • -w, --overwrite β€” force overwrite the target file, no prompting. it just goes. πŸ’€
  • --py <0.0> β€” (use either --cx or --px) the pixel vertical coordinate of the origin of coordinates in the image. πŸ“
  • --px <0.0> β€” (use either --cx or --px) the pixel horizontal coordinate of the origin of coordinates in the image. πŸ“
  • --cy <0.0> β€” (use either --cy or --py) the Y coordinate of the image's central pixel. default: 0. ✨
  • --cx <0.0> β€” (use either --cx or --px) the X coordinate of the image's central pixel. default: 0. ✨
  • -r <0.1>, --res <0.1> β€” required, bestie, don't forget it!! resolution: the size (in meters) of one pixel in the image. yeah, required. 🚨
  • -o <map.gridmap.gz>, --output <map.gridmap.gz> β€” name of the output file (*.gridmap, *.gridmap.gz). πŸ—‚οΈ
  • -i <map_image.png>, --input <map_image.png> β€” required input image file, and yeah it's required (*.png, *.jpg, ...). πŸ–ΌοΈ
  • --, --ignore_rest β€” ignores the rest of the labeled arguments that follow this flag. bye to everything after it. πŸ™ˆ
  • --version β€” displays version information and exits. πŸ‘‘
  • -h, --help β€” displays usage information and exits. the classic. πŸ’–

😭 BUGS 😭

found a bug? please report it at https://github.com/MRPT/mrpt/issues. they will fix it, we believe. πŸ›


🌈 SEE ALSO 🌈

the application list and their documentation, right here:

https://docs.mrpt.org/reference/latest/applications.html


πŸ‘‘ AUTHORS πŸ‘‘

image2gridmap is part of the Mobile Robot Programming Toolkit (MRPT), and was originally written by Jose Luis Blanco. main character energy fr fr.

this manual page was written by Jose Luis Blanco <joseluisblancoc@gmail.com>. πŸ’Œ


this program is free software; you can redistribute it and/or modify it under the terms of the BSD License.

on Debian GNU/Linux systems, the complete text of the BSD License can be found in /usr/share/common-licenses/BSD. πŸ“œ

that's the whole page bestie, go forth and convert some images πŸ’–βœ¨πŸŒΈπŸ¦‹ β€” this page ships as part of perl v5.40.1, dated 2025-03-21, for IMAGE2GRIDMAP(1). mwah. πŸ’…πŸŽ€

πŸ“¦ where this page comes from