ammar.sheikh
All case studies
ShippedEducation · Computer Vision2025Project-Based Learning — First Place

DIP Learning Simulator

Interactive Digital Image Processing simulator that turns theory-heavy labs into a live, chainable pipeline.

Role · Sole engineer

Overview

A pedagogical simulator that lets students apply, compose, and visualize classical Digital Image Processing operations against live inputs. Built to replace static slides with something students can actually touch.

Problem

Image processing courses lean on theory and disconnected lab scripts. Students rarely build intuition for how filters compose, where they break, and what the parameters actually do — because the feedback loop is too slow.

Solution

A single interactive surface where every operation — spatial filtering, frequency-domain transforms, morphology, histogram operations — is one click away, runs in real time, and can be chained into pipelines whose intermediate outputs stay visible.

Architecture

Streamlit front-end over a thin operation registry. Each operation is a pure function from ndarray → ndarray with declared parameters; the UI is generated from that schema, which kept new operations a ~20-line contribution.

Tech stack

  • Python
  • NumPy
  • OpenCV
  • Streamlit
  • Matplotlib

Engineering decisions

  • Operations modeled as pure functions, not classes, to keep the surface area trivial to extend.
  • Schema-driven UI so adding a new operation never requires touching the front-end.
  • Intermediate results cached per pipeline step to keep parameter tweaks responsive.

Challenges

  • Frequency-domain visualizations were unintuitive for first-time users; addressed by always pairing magnitude/phase output with the inverse-transformed result.
  • Streamlit's rerun model fights interactive pipelines; addressed with explicit session-state caching keyed on pipeline hash.

Performance

  • Sub-second interactive feedback on 1024×1024 images for the full operation catalog on commodity hardware.

Lessons learned

  • Pedagogical tools succeed or fail on latency, not feature count.
  • A small, well-typed plugin contract beats a clever framework.

Future improvements

  • Notebook export for any assembled pipeline.
  • Shareable pipeline URLs for instructors.

Links

Links coming soon.