Skip to content

Commit b6ce821

Browse files
committed
remove titration challenge
1 parent 458f281 commit b6ce821

File tree

7 files changed

+21
-89
lines changed

7 files changed

+21
-89
lines changed

data/titration.tiff

-337 KB
Binary file not shown.

data/titration.wmv

-20.3 MB
Binary file not shown.

episodes/01-introduction.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,30 @@ questions:
66
- "What sort of scientific questions can we answer with image processing /
77
computer vision?"
88
- "What are morphometric problems?"
9-
- "What are colorimetric problems?"
109
objectives:
1110
- "Recognize scientific questions that could be solved with image processing
1211
/ computer vision."
1312
- "Recognize morphometric problems (those dealing with the number, size, or
1413
shape of the objects in an image)."
15-
- "Recognize colorimetric problems (those dealing with the analysis of the
16-
color or the objects in an image)."
1714
keypoints:
18-
- "Simple Python and skimage (scikit-image) techniques can be used to solve genuine
19-
morphometric and colorimetric problems."
15+
- "Simple Python and skimage (scikit-image) techniques can be used to solve genuine
16+
image analysis problems."
2017
- "Morphometric problems involve the number, shape, and / or size of the
2118
objects in an image."
22-
- "Colorimetric problems involve analyzing the color of the objects in an
23-
image."
2419
---
2520

2621
We can use relatively simple image processing and computer vision techniques in
2722
Python, using the [skimage](https://scikit-image.org/) library. With careful
2823
experimental design, a digital camera or a flatbed scanner, in conjunction with
2924
some Python code, can be a powerful instrument in answering many different
30-
kinds of problems. Consider the following two types of problems that might be
25+
kinds of problems. Consider the following problem that might be
3126
of interest to a scientist.
3227

3328
## Morphometrics
3429

3530
Morphometrics involves counting the number of objects in an
3631
image, analyzing the size of the objects, or analyzing the shape of the
37-
objects. For example, we might be interested automatically counting the
32+
objects. For example, we might be interested in automatically counting the
3833
number of bacterial colonies growing in a Petri dish, as shown in this
3934
image:
4035

@@ -46,21 +41,6 @@ image like this:
4641

4742
![Colonies counted](../fig/colony-mask.png)
4843

49-
## Colorimetrics
50-
51-
Colorimetrics involves analyzing the color of objects in an
52-
image. For example, consider this video of a titrant being added to an
53-
analyte (click on the image to see the video):
54-
55-
[![Titration video](../fig/titration.jpg)](https://youtu.be/NLSY5S8CABk?t=554)
56-
57-
We could use image processing to look at the color of the solution, and
58-
determine when the titration is complete. This graph shows how the three
59-
component colors (red, green, and blue) of the solution change over time;
60-
the change in the solution's color is obvious.
61-
62-
![Titration colors](../fig/colorimetric.png)
63-
6444
> ## Why write a program to do that?
6545
>
6646
> Note that you can easily manually count the number of bacteria colonies shown
@@ -89,9 +69,10 @@ the change in the solution's color is obvious.
8969
> research.
9070
{: .callout}
9171

92-
As we move through this workshop, we will return to these sample problems
93-
several times, and you will solve each of these problems during the
94-
end-of-workshop [challenges]({{page.root}}/09-challenges/).
72+
As we move through this workshop, we will learn image analysis methods
73+
useful for many different scientific problems. These will be linked together
74+
and applied to a real problem in the final end-of-workshop
75+
[capstone challenge]({{page.root}}/09-challenges/).
9576

9677
Let's get started, by learning some basics about how images are represented and
9778
stored digitally.

episodes/03-skimage-images.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -530,34 +530,3 @@ the program:
530530
> > {: .language-python}
531531
> {: .solution}
532532
{: .challenge}
533-
534-
535-
> ## Slicing and the colorimetric challenge (20 min)
536-
>
537-
> In [the introductory episode]({{page.root}}/01-introduction/), we were
538-
> introduced to a colorimetric challenge, namely, graphing the color values of
539-
> a solution in a titration, to see when the color change takes place. Let's
540-
> start thinking about how to solve that problem.
541-
>
542-
> One part of our ultimate solution will be sampling the color channel values
543-
> from an image of the solution. To make our graph more reliable, we will want
544-
> to calculate a mean channel value over several pixels, rather than simply
545-
> focusing on one pixel from the image.
546-
>
547-
> Open the `data/titration.tiff` image and display it.
548-
>
549-
> ![Titration image](../fig/titration.jpg)
550-
>
551-
> Find the *(x, y)* coordinates of an area of the image you think would be good
552-
> to sample in order to find the average channel values. Then, write a small
553-
> Python script that computes the mean channel values for a 10 × 10 pixel
554-
> region centered around the coordinates you chose. Print the results to the
555-
> screen, in a format like this:
556-
>
557-
> ~~~
558-
> Avg. red value: 193.7778
559-
> Avg. green value: 189.1481
560-
> Avg. blue value: 178.6049
561-
> ~~~
562-
> {: .output}
563-
{: .challenge}

episodes/09-challenges.md

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
---
2-
title: "Challenges"
2+
title: "Capstone Challenge"
33
teaching: 10
44
exercises: 40
55
questions:
6-
- "What are the questions?"
6+
- "How can we automatically count bacterial colonies with image analysis?"
77
objectives:
8-
- "What are the objectives?"
8+
- "Bring together everything you've learnt so far to count bacterial colonies
9+
in 3 images."
910
keypoints:
10-
- "What are the key points?"
11+
- "Using thresholding, connected component analysis and other tools we can automatically segment
12+
images of bacterial colonies."
13+
- "These methods are useful for many scientific problems, especially those involving
14+
morphometrics."
1115
---
1216

13-
In this episode, we will provide two different challenges for you to attempt,
14-
based on the skills you have acquired so far. One of the challenges will be
15-
related to the shape of objects in images (*morphometrics*), while the other
16-
will be related to colors of objects in images (*colorimetrics*).
17+
In this episode, we will provide a final challenge for you to attempt,
18+
based on all the skills you have acquired so far. This challenge will be
19+
related to the shape of objects in images (*morphometrics*).
1720

1821
## Morphometrics: Bacteria Colony Counting
1922

@@ -43,6 +46,8 @@ The image files can be found at `data/colonies-01.tif`,
4346
> Use what you learnt in the [histograms]({{ page.root }}/05-creating-histograms),
4447
> [thresholding]({{ page.root }}/07-thresholding) and
4548
> [Connected Component]({{ page.root }}/08-connected-components) episodes.
49+
> Try to put your code into a re-usable function, so that it can be applied easily
50+
> to any image file.
4651
>
4752
> > ## Solution
4853
> >
@@ -164,26 +169,3 @@ The image files can be found at `data/colonies-01.tif`,
164169
> > like [watershed](https://scikit-image.org/docs/dev/auto_examples/segmentation/plot_watershed.html).
165170
> {: .solution}
166171
{: .challenge}
167-
168-
169-
## Colorimetrics: titration color analysis
170-
171-
The video showing the titration process first mentioned in the workshop
172-
[introduction]({{ page.root }}/01-introduction/) episode can be found at
173-
`data/titration.wmv`.
174-
Write a Python program that uses skimage to analyze the video on a
175-
frame-by-frame basis. Your program should do the following:
176-
177-
1. Sample a region from the same location on each frame, and determine the
178-
average red, green, and blue channel value.
179-
180-
2. Display a graph plotting the average color channel values as a function of
181-
the frame number, similar to this image:
182-
183-
![Titration colors](../fig/colorimetric.png)
184-
185-
3. Save the graph as an image named `titration.png`.
186-
187-
4. Output a CSV file named `titration.csv`, with each line containing
188-
the frame number, average red value, average green value, and average
189-
blue value.

fig/colorimetric.png

-41.4 KB
Binary file not shown.

fig/titration.jpg

-40.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)