← All projectsCOSC 83 / Computer vision

Image filtering and super-resolution

NumPy image filters and a neural network for upscaling images.

Grid showing classical filter outputs on a personal photograph
Mean, Gaussian, Laplacian, and Sobel outputs generated by the assignment implementation. View full size (new tab): Grid showing classical filter outputs on a personal photograph

One convolution primitive

I wrote a general 2D convolution routine in NumPy and built mean, Gaussian, Laplacian, and Sobel filters on it. The implementation supports constant, reflect, and edge padding, then compares the resulting smoothing and edge maps against OpenCV references. The opening figure collects outputs from those filters.

Boundary behavior

The checkerboard experiment makes padding choices visible at the border. With a 21 × 21 kernel, constant padding fades the edge into a gray band, while reflect and edge padding retain the pattern to the boundary.

Comparison of constant, reflect, and edge padding on a checkerboard image
Padding comparison for mean and Gaussian filtering with a 21 × 21 kernel. View full size (new tab): Comparison of constant, reflect, and edge padding on a checkerboard image

Four-times super-resolution

For the second part, I trained a residual CNN with 16 residual blocks, a global skip connection, and two PixelShuffle stages. It was trained on DIV2K with L1 loss and evaluated at 4× enlargement on 12 test images. The average was 25.68 dB PSNR and 0.6951 SSIM.

Super-resolution training loss, validation PSNR, and validation SSIM across 100 epochs
Training loss and validation metrics over 100 epochs. View full size (new tab): Super-resolution training loss, validation PSNR, and validation SSIM across 100 epochs
Low-resolution input, super-resolution output, and high-resolution reference for a landscape image
4× super-resolution comparison on a natural landscape image. View full size (new tab): Low-resolution input, super-resolution output, and high-resolution reference for a landscape image

Observed limit

The natural-image examples are sharper than the low-resolution inputs, but the checkerboard result shows ringing near abrupt synthetic edges. That limitation is part of the recorded evaluation, alongside the model's sensitivity to noisy inputs.

Low-resolution input, super-resolution output, and high-resolution checkerboard reference showing ringing artifacts
The checkerboard comparison shows ringing around sharp transitions. View full size (new tab): Low-resolution input, super-resolution output, and high-resolution checkerboard reference showing ringing artifacts
Mithun RameshkumarDartmouth College