IMAGE2GRIDMAP(1)
π 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--cxor--px) the pixel vertical coordinate of the origin of coordinates in the image. π--px <0.0>β (use either--cxor--px) the pixel horizontal coordinate of the origin of coordinates in the image. π--cy <0.0>β (use either--cyor--py) the Y coordinate of the image's central pixel. default:0. β¨--cx <0.0>β (use either--cxor--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>. π
π§ COPYRIGHT π§
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
- debian trixie: mrpt-apps 1:2.14.7+ds-1+b3 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms