carpentries-incubator / carpentries-incubator/bioimage-analysis-python

Episode 4, Exercise 1 Histogram and QC

Open
#17 0 comments 1 reaction 0 assignees View on GitHub
exercise-proposal
Dominant language
HTML
Stars
12
Forks
6
Avg merge
1m
Merged PRs (30d)
1

Description

### Brief description

1. Introduce the concept of histograms as measuring empirical distributions, i.e. how often does a varible have a certain value. Use repeated dice rolling as an example:
- start with 10 manually set dice roll results and use matplotlib to compute and plot the histogram.
- use generated dice rolls (from np.random) to show that histograms visualize the quality of the dice

2. Extend the concept of from dice rolls to pixel intensity values.
- Plot histogram of one 2D uint8 image with 256 bins (as before with the dice rolls)
- Introduce the concept of _binning_ in histograms.
- What are good bin sizes? I. e. histogram is neither too sparse nor too congested

3. Explore image histograms
- Display various example images with their histogram next to it.
- Observe and discuss different properties and how they relate to the image (quality), e.g. modes, dim-signal, saturation, sparcity, etc

### Learning objective(s)
* In 1. to 2. the Learners use and explore arguments of the `plt.hist` function. [Learning Objective](https://github.com/carpentries-incubator/bioimage-analysis-python/wiki/Learning-Objectives#histogram-and-quality-control) (perhps also `np.histogram`)
* In 3. the second learning objective (what does a histogram tell us about an image and its quality) is adressed

### Volunteer(s)
@sommerc

Contributor guide

Open the contributing guide

Research direction

No source file or test is named; start by locating the Episode 4 lesson and matching its existing exercise structure. Done means covering manual and generated dice rolls, pixel-intensity histograms with binning, and image examples that connect histogram properties to image quality using matplotlib and NumPy.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, numpy, python
Domain
computer-vision, data-visualization, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.