This project demonstrates low-level image processing using MIPS assembly.
It performs thresholding, matrix transformations, and basic cryptographic blurring on grayscale images stored in the .pgm (Portable GrayMap) format.
By working directly with pixel data, it shows how image transformations can be achieved through manual memory management, matrix arithmetic, and file I/O syscalls in MIPS.
- Thresholding — Converts grayscale images to binary (black and white) using a set intensity threshold.
- Matrix Transformations — Performs scaling, rotation, and shearing via affine transformation matrices.
- Cryptography / Blur Simulation — Manipulates pixel data for encryption-like visual distortion.
- File I/O in MIPS — Reads and writes
.pgmimage files using syscalls 13–16. - Automated Testing — Built-in test data for each function (threshold, transform, cryptography).
- Language: MIPS Assembly
- Simulator: MARS MIPS Simulator
- Image Format: PGM (P5, binary)
- Files Used:
lenna.pgm— sample input imagetextfile.pgm— text-based input image for blur/encryption tests
Image-Processing-MIPS ImageProcessing.s # MIPS assembly source code lenna.pgm # Test input image (512x512 grayscale) textfile.pgm # Text-based PGM file used for blur/encryption tests README.md # Project documentation
- Open
ImageProcessing.sin MARS. - Make sure
lenna.pgmandtextfile.pgmare in the same directory. - Assemble (
F3) and run (F5).
lenna_thresh.pgm– result of thresholdinglenna_rotation.pgm– rotated imagelenna_scale.pgm– scaled imagelenna_shear.pgm– sheared imagetext_crypt.pgm– blurred or encrypted text file
Open the output .pgm files in an image viewer such as GIMP, IrfanView, or Visual Studio Code with an image preview extension.
- Image buffer manipulation in memory
- Affine matrix transformations in assembly
- Loop and branch optimization
- File handling syscalls (13–16: open, read, write, close)
- Threshold-based pixel classification
- Input:
textfile.pgm(renders readable English text) - Operation: Apply
cryptographyfunction (custom blur) - Output:
text_crypt.pgm(blurred or distorted text)
The visual output should show blurred or altered text depending on the implemented algorithm.
Calvin Poruthur Raju
Email: [calvinpraju@gmail.com]
LinkedIn / GitHub: [https://www.linkedin.com/in/calvin-raju/]
MIPS Assembly, Image Processing, PGM, Affine Transform, Thresholding, Cryptography, Low-Level Programming