TE · SEM V · PICT

Digital Image
Processing Lab

9 experiments covering fundamental DIP concepts — theory, math, and Python code in one place.

EXP 01

Basic Image Operations

Read, display, resize, rotate images. Arithmetic operations, histogram computation, colour conversion, thresholding, and noise generation.

cv2.imreadhistogramthreshold
EXP 02

Intensity Transformations

Negation, logarithmic transform, power-law (gamma) correction, and image flipping — the core point-processing operations.

negationloggammaflip
EXP 03

Spatial Transformations

Gray-level slicing (with & without background), bit-plane slicing to expose image structure, and piecewise linear contrast stretching.

gray slicingbit-planecontrast
EXP 04

Histogram Analysis & Equalisation

Manual histogram computation for dark, light, low & high contrast images. Histogram equalisation via CDF mapping.

histogramCDFequalisation
EXP 05

Spatial Filtering

Box, weighted-average, and median filters. Salt-and-pepper & Gaussian noise. Custom min/max filters and impulse noise removal.

box filtermediannoise
EXP 06

Point, Line Detection & Thresholding

Laplacian-based point detection, 4-directional line detection masks, and iterative global thresholding algorithm.

laplacianline detectglobal thresh
EXP 07

Edge Detection Operators

First-order derivative edge detectors — Roberts (2×2), Prewitt (3×3), and Sobel (3×3 with central weighting).

robertsprewittsobel
EXP 08

DCT Image Compression

Discrete Cosine Transform on 8×8 blocks — level shifting, forward DCT, JPEG Q50 quantisation, dequantisation, and IDCT.

DCTquantisationJPEG
EXP 09

Huffman Coding

Lossless entropy encoding using min-heap tree construction. Compute entropy, average code length, efficiency, redundancy, and compression ratio.

huffmanentropylossless