...
 
Commits (2)
......@@ -296,6 +296,7 @@ Fill in the blanks, using these words: less, more, 8, 255, 4, more.
"label image" -> shape_analysis -> table;
table -> object_rows;
table -> feature_columns;
table -> visualisation;
}
'/>
......@@ -304,11 +305,11 @@ Fill in the blanks, using these words: less, more, 8, 255, 4, more.
* Open image: xy_8bit_labels__four_objects.tif
* Perform shape measurements and discuss their meanings.
* Color objects by their measurement values.
* Explore results visualisation
* Color objects by their measurement values.
* Add a calibration to the image and check which shape measurements are affected.
* Draw a test image to understand the shape measurements even better.
### Formative assessment
True or false? Discuss with your neighbour!
......@@ -475,17 +476,5 @@ Fill in the blanks, using these words: integrated, mean, number_of_pixels, decre
 
## Recap
(Work in pairs of two)
* Take one A4 paper
* Draw a typical workflow: From intensity image to objects shape table.
* Write down what you remember (max. 3 facts) about:
* Intensity measurements
* Object shape measurements
* Label image
* Pixel data types
# Course preamble
<img src='https://g.gravizo.com/svg?
digraph G {
shift [fontcolor=white,color=white];
"learn" -> "concepts";
"concepts" -> "software independent" [label=" are"];
}
'/>
The focus of this course it **not** to learn a specific image analysis software.
In fact, one could probably teach most concepts without a computer.
# Distance transform
<img src='https://g.gravizo.com/svg?
digraph G {
shift [fontcolor=white,color=white];
"binary image" -> "distance transform" -> "distance map";
"distance map" -> "values are distances";
}
'/>
## Activity: Explore distance transform
- Open image: xy_8bit_binary__two_objects.tif
- Learn:
- It matters what is foreground and what is background.
- The image data type limits the possible distance values.
- There is a difference between calibrated vs. pixel-based distance transforms.
## Actvity: Use distance map for automated distance measurements
- Open reference object image: xy_8bit_binary__single_object.tif
- Compute distance map
- Open label image: xy_8bit_labels__two_spots.tif
- Measure "intensity" of label image objects in distance map
- intensity is distance
## Activity: Use distance map for automated region selection
- Open reference object image: xy_8bit_binary__single_object.tif
- Compute distance map
- Threshold distance map to select regions
### Formative Assessment
TODO
### Learn more
TODO
# Image feature enhancement
<img src='https://g.gravizo.com/svg?
digraph G {
shift [fontcolor=white,color=white];
......@@ -12,7 +13,6 @@ digraph G {
'/>
## Difference of Gaussian (DoG) for spot enhancement
<img src='https://g.gravizo.com/svg?
......@@ -20,8 +20,8 @@ digraph G {
shift [fontcolor=white,color=white];
image -> "small blur";
image -> "large blur";
"small blur" -> "remove noise";
"large blur" -> "estimate local background";
"small blur" -> "noise filtered";
"large blur" -> "local background";
"small blur" -> "DoG = small blur - large blur";
"large blur" -> "DoG = small blur - large blur";
}
......@@ -31,9 +31,10 @@ digraph G {
- Open image: xy_8bit__two_spots_noisy_uneven_background.tif
- Appreciate that you cannot simply threshold them
- Copy the image and blur with a Gaussian of small radius -> gs
- Copy the image and blur with a Gaussian of bigger radius -> gb
- Create `DoG = gs - gb`
- Copy image and blur with a Gaussian of small sigma -> Gs
- Copy image and blur with a Gaussian of bigger sigma -> Gb
- For the official DoG: `rb = sqrt(2) * rs`
- Create `DoG = Gs - Gb`
- Appreciate that you can simply threshold the DoG image
### Formative Assessment
......
# Teaching recommendations
- Try to use white-board whenever possible.
- Make sure there is (at least) one whiteboard with sufficient paper.
# Object splitting
## "Intensity based" watershed
<img src='https://g.gravizo.com/svg?
digraph G {
shift [fontcolor=white,color=white];
"intensity image" -> "watershed" -> "label image";
"label image" -> "pond regions";
}
'/>
### Activity: Explore intensity based watershed
- Open image: xy_8bit__touching_objects.tif
- Invert image for watershed
- Apply watershed
### Activity: Use intensity based watershed for object segmentation
- Open intensity image: xy_8bit__touching_objects.tif
- Threshold intensity image => binary image (aka "mask")
- Invert intensity image for watershed
- Apply watershed, using the mask
## "Shape based" watershed
<img src='https://g.gravizo.com/svg?
digraph G {
shift [fontcolor=white,color=white];
"binary image" -> "distance map" -> "watershed" -> "label image";
"label image" -> "thickness ponds";
}
'/>
### Activity: Explore shape based watershed
- Open image: xy_8bit__touching_objects_same_intensity.tif
- Threshold -> Binary image
- Copy binary image (we'll need it as mask later...)
- Binary image -> Distance map
- Distance map -> Watershed
### Learn more
TODO
### Formative Assessment
TODO
......@@ -6,19 +6,18 @@
digraph G {
shift [fontcolor=white,color=white];
"rank filters" -> awesome [label=" are"];
"rank filters" -> minimum [label=" e.g."] -> erosion [label=" aka"];
"rank filters" -> maximum [label=" e.g."] -> dilation [label=" aka"];
"rank filters" -> median [label=" e.g."];
"rank filters" -> minimum -> erosion [label=" aka"];
"rank filters" -> maximum -> dilation [label=" aka"];
"rank filters" -> median;
"rank filters" -> "size" [label=" have"];
}
'/>
### Activity: Explore rank filters on binary images
- Open image: xy_8bit_binary__two_spots_different_size.tif
- Explore how the structures grow and shrink when using erosion and dilation
### Activity: Explore rank filters on grayscale images
- Open image: xy_8bit__two_noisy_squares_different_size.tif
......@@ -26,12 +25,22 @@
- removes noise
- removes small structures
- preserves egdes
- Compare median filter to a mean filter of same radius
- Compare median filter to mean filter of same radius
### Formative assessment
TODO
True or false? Discuss with your neighbour!
1. Median filter is just another name for mean filter.
2. Small structures can completely disappear from an image when applying a median filter.
Fill in the blanks, using those words: shrinks, increases, decreases, enlarges.
1. An erosion _____ objects in a binary image.
2. An erosion in a binary image _____ the number of foreground pixels.
3. A dilation in a grayscale image _____ the average intensity in the image.
4. A dilation _____ objects in a binary image.
## Morphological opening and closing
......@@ -84,6 +93,9 @@ TODO
topHat( image ) = image - dilation( erosion( image, r), r )
```
TODO: Add image from pdf
### Activity: Explore tophat filter
- Open image: xy_8bit__spots_local_background.tif
......@@ -125,6 +137,9 @@ TODO
median_based_background_correction = image - median( image, r)
```
TODO: Add image from pdf
### Activity: Implement median based background subtraction
- Write code to implement a median based background subtraction
......
## Recap
Take few sheets of empty (A4) paper.
Work in pairs of two.
* Draw a typical image analysis workflow: From intensity image to objects shape table.
* Write down few (e.g., two) noteworthy facts about:
* Pixel data types
* Label images
* Intensity measurements
* Object shape measurements
* Answer below questions:
* How can you split touching objects?
* What can you use a distance map for?
* What can you do to segment spots in prescence of uneven background signal?