Skip to main content
← All projects

Insomnia

Turning sleep-app screenshots into data.

  • Image processing
  • Research
  • 2024

The problem

Sleep-tracking apps lock useful data inside images; analyzing it at scale means getting it out first.

What it does

Processes screenshots from sleep apps — detects the sleep-period graph, crops and grayscales it, extracts the values and writes structured CSVs ready for analysis and visualization.

Stack

  • Python
  • OpenCV
  • Pandas
  • Matplotlib

My role

  • Image processing
  • Graph extraction
  • CSV generation
  • Visualization

Image → table

Automated crop, grayscale and extraction converts a graph image into numeric rows.

Built for analysis

Outputs clean CSVs ready for insomnia-focused trend analysis.

How Insomnia works: screenshot → OpenCV crop / grayscale / extract → CSV → pandas analysis → matplotlib charts
How it works
Cropped sleep-stage graph extracted from a sleep-app screenshot
Cropped sleep-stage graph
Grayscaled graph prepared for value extraction
Grayscaled for extraction
Structured per-minute sleep-status CSV output
Structured per-minute output