LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pgmedge

detects edges in a PGM grayscale image using the Sobel edge detection algorithm

TLDR

Detect edges in image
$ pgmedge [input.pgm] > [output.pgm]
copy
From another format
$ jpegtopnm [image.jpg] | ppmtopgm | pgmedge > [edges.pgm]
copy
Chain with conversion
$ pgmedge [input.pgm] | pnmtopng > [edges.png]
copy

SYNOPSIS

pgmedge [pgmfile]

DESCRIPTION

pgmedge detects edges in a PGM grayscale image using the Sobel edge detection algorithm. Output is a PGM where bright pixels indicate strong edges.The algorithm computes the horizontal and vertical image gradients using Sobel kernels and combines them, producing a single intensity per pixel proportional to the local gradient magnitude.

PARAMETERS

pgmfile

Input PGM file. Uses stdin if not specified.

INSTALL

sudo apt install netpbm
copy
sudo dnf install netpbm
copy
sudo pacman -S netpbm
copy
sudo apk add netpbm
copy
sudo zypper install netpbm
copy
brew install netpbm
copy
nix profile install nixpkgs#netpbm
copy

CAVEATS

Input must be a grayscale PGM. Convert color images with ppmtopgm first. pgmedge is the legacy tool — pamedge offers more options including thresholding and direction output.

HISTORY

pgmedge is part of Netpbm by Jef Poskanzer and contributors, implementing classic image processing algorithms.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid