PGM Image Processing Library

To run the executables properly, run them from command prompt (Windows). For Linux, compile the c file first (in the terminal window).

Here are a set of useful images to use for testing:

lenna.pgm 512x512 classic and most popular test image
pepper.pgm 512x512 non-sharp edges
sandiego.pgm 1024x1024 aerial view of San Diego
tank.pgm512x512 tank in the desert
baboon.pgm 512x512, a lot of thin details
barbara.pgm 512x512 sharp edges, and lots of thin strips
brainCT.pgm 512x512 Computer tomogram of brain
fprint3.pgm 768x768 fingerprint image

Lets you read and write PGM files
pgm.h

PGM file creation
pgmcreate.c                pgmcreate.exe

PGM file with uniform noise creation
pgmnoise.c                pgmnoise.exe

Print brightnesses in a 8x8 block
pgmblock8.c                pgmblock8.exe

Create PGM file with raw brightness profile
pgmprof.c                pgmprof.exe

Calculate standard statistics for image in PGM file
pgmstat.c                pgmstat.exe

Create a histogram for the PGM file (image)
pgmhist.c                pgmhist.exe

Copy rectangle from PGM image to a new PGM file
pgmselect.c                pgmselect.exe

Put PGM image to another big image
pgmtopgm.c                pgmtopgm.exe

Mirror of PGM image
pgmmirror.c                pgmmirror.exe

Rotate PGM image by 90 degress
pgmrot90m.c                pgmrot90m.exe

Stretch PGM image brightness to [0,255]
pgmstretch.c                pgmstretch.exe

X2 Zoom in of a PGM file
pgmups2.c                pgmups2.exe

X2 Zoom out of a PGM file
pgmdown2.c                pgmdown2.exe

Absolute difference between two pgm files with saturation
pgmdiffs.c                pgmdiffs.exe

Saturated addition of two PGM images
pgmimgadds.c                pgmimgadds.exe

Multiplication of PGM image onto floating point constant
pgmmultcs.c                pgmmultcs.exe

1-Dim convolution filter with convolution vector 1x3
pgmconv13abs.c                pgmconv13abs.exe

1-Dim convolution filter with convolution vector 1x5
pgmconv15abs.c                pgmconv15abs.exe

2-Dim convolution filter with convolution vector 3x3
pgmconv33abs.c                pgmconv33abs.exe

2-Dim convolution filter with convolution vector 5x5
pgmconv55abs.c                pgmconv55abs.exe