Case study – Histogram calculation