PGMMINKOWSKI(1)

πŸ‘‘ Pgmminkowski User Manual πŸ‘‘

okay bestie, welcome to Pgmminkowski User Manual(1) β€” it lives in the General Commands Manual section of your man pages, so you already know it's giving classic Unix energy πŸ’…. Let's get into it fr fr.


✨ NAME ✨

pgmminkowski β€” compute Minkowski integral 🌈


πŸŽ€ SYNOPSIS πŸŽ€

pgmminkowski pgmfile

that's it. one argument. she's low maintenance πŸ’–


πŸ’œ DESCRIPTION πŸ’œ

okay so first thing's first: this program is part of Netpbm(1). you know the family 🫢

pgmminkowski computes the 3 Minkowski integrals of a PGM image.

and like... what are those?? the Minkowski integrals mathematically characterize the shapes in the image, which is why they're the whole basis of "morphological image analysis." periodt. πŸ”₯

so Hadwiger's theorem says these integrals are the only motion-invariant, additive and conditionally continuous functions of a two-dimensional image β€” which basically means they stay preserved under certain kinds of deformations of the image. and on top of that?? they're super easy and quick to calculate. so obviously people are obsessed with them for certain kinds of pattern recognition. it's giving main character energy honestly πŸ‘‘

basically, the Minkowski integrals are:

  • the area
  • the total perimeter length
  • and the Euler characteristic

of the image β€” but bestie, listen, these metrics apply to the foreground image, NOT the rectangular PGM image itself, okay?? don't get it twisted 😀

so the foreground image is all the pixels in the image that are white. now if it's a grayscale image, there's some threshold of intensity applied to categorize pixels into black and white, and the Minkowski integrals get calculated as a function of that threshold value. the total surface area refers to the number of white pixels in the PGM, and the perimeter is the sum of perimeters of each closed white region in the PGM. πŸ’–


for a grayscale image, these numbers are a function of the threshold of what you want to call black or white. pgmminkowski reports these numbers as a function of the threshold for all possible threshold values. and since the total surface area can only increase as a function of the threshold, it's literally a reparameterization of the threshold. wild, right?? 😭

so it turns out that if you consider the other two functions β€” the boundary length and the Euler characteristic β€” as a function of the first one, the surface, you get two functions that are a fingerprint of the picture. πŸ¦‹ and this fingerprint is, like, e.g. sufficient to recognize the difference between pictures of different crystal lattices under a scanning tunnelling electron microscope. iykyk πŸ”¬βœ¨


for more info about Minkowski integrals, see e.g. these absolute icons of the literature:

  • J.S. Kole, K. Michielsen, and H. De Raedt, "Morphological Image Analysis of Quantum Motion in Billiards", Phys. Rev. E 63, 016201-1 - 016201-7 (2001)
  • K. Michielsen and H. De Raedt, "Integral-Geometry Morphological Image Analysis", Phys. Rep. 347, 461-538 (2001).

also!! the output is suitable for direct use as a datafile in gnuplot. no conversion, no middleman, just vibes πŸ“ŠπŸ’…

and in addition to the three Minkowski integrals, pgmminkowski also lists the horizontal and vertical edge counts. bonus content, we love to see it 🎁


🌈 OPTIONS 🌈

bestie. there are no command line options defined specifically for pgmminkowski. she's a minimalist 😌

but!! it does recognize the options common to all programs based on libnetpbm (See Common Options.) so you're not totally option-less, you've just got the shared family options, not her own. 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

go read those next, bestie, they're all part of the same ✨ cinematic universe ✨


πŸ’… AUTHORS πŸ’…

Luuk van Dijk, 2001. πŸ‘‘

based on work which is Copyright (C) 1989, 1991 by Jef Poskanzer.


🧚 DOCUMENT SOURCE 🧚

this manual page was generated by the Netpbm tool 'makeman' from HTML source. the master documentation is at:

http://netpbm.sourceforge.net/doc/pgmminkowski.html

and that's the whole page, no cap πŸ’–βœ¨

okay so final sign-off bestie: this was the Pgmminkowski User Manual(1), brought to you by netpbm documentation, dated 29 October 2002 πŸŽ€ slay, you read the whole thing, we're so proud of you 🫢🌟

πŸ“¦ where this page comes from