PGM Image Processing Library



Free Image Processing books:


Aarabi "_Digital Image Processing 2nd Ed"


Acarya,Ray "Image Processing. Principles and Applications"


Castleman "Digital Image Processing"


Nixon, Aguado "Feature Extraction and Image Processing"


Ritter, Wilson "CV Algorithms In Image Algebra"


Jahne "Digital Image Processing. Concepts, Algorithms, and Scientific Applications"


Zhou, Wu, Zhang "Digital Image Processing Part One"


Zhou, Wu, Zhang "Digital Image Processing Part Two"


Easton "Fundamentals of Digital Image Processing"


Garcia, Suarez "Learning-Image-Processing-with-OpenCV"


Gonzales, Woods "Digital Image Processing 2nd ed."


Gonzales, Woods "Digital Image Processing 3rd ed."


Gonzales, Woods "Digital Image Processing 4th ed."


Gonzales, Woods, Eddins "Digital Image Processing Using MATLAB. Chapter 2"


Gonzales, Woods, Eddins "Digital Image Processing Using MATLAB. Chapter 3"


Al Bovik "Handbook of Image and Video Processing"


Jain "Fundamentals of Digital Image Processing"


Phillips "Image Processing In C"


Sonka, Hlavac, Boyle "image Processing, Analysis, and Machine Vision"


Szeliski "Computer Vision: Algorithms and Applications"



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



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


This header file 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