Introduction


Figure 1

Bacteria colony

Figure 2

Colonies counted

Figure 3

Bacteria colony

Image Basics


Figure 1

Original size image

Figure 2

Enlarged image area

Figure 3

Image of 8

Figure 4

Image of 0

Figure 5

Cartesian coordinate system

Figure 6

Image coordinate system

Figure 7

Left-hand coordinate system

Figure 8

Image of 5

Figure 9

Image of three colours

Figure 10

Image in greyscale

Figure 11

Image of checkerboard

Figure 12

Image of red channel

Figure 13

Image of green channel

Figure 14

Image of blue channel

Figure 15

Original image

Figure 16

Enlarged, uncompressed

Figure 17

Enlarged, compressed

Figure 18

Uncompressed histogram

Working with scikit-image


Figure 1

A grid showing each RGB color of the immunohistochemistry image

Figure 2

A grid showing each channel of the hela cells image

Figure 3

HeLa cells image

Figure 4

Sub picture coordinates for one cell

Figure 5

"Erased" one cell from hela cells image

Drawing and Bitwise Operations


Figure 1

Here is what our constructed mask looks like: Cells rectangle mask


Figure 2

Sample shapes

Figure 3

Applied masks


Creating Histograms


Figure 1

We will start with grayscale images, and then move on to colour images. We will use this hematoxylin and DAB stained immunohistochemistry image as an example: HED IHC scikit example image


Figure 2

grayscale verson of IHC image

Figure 3

Grayscale immunohistochemistry histogram

Figure 4

Colour histogram

Figure 5

Masked cell

Figure 6

Single cell histogram

Blurring Images


Figure 1

Cat image

Figure 2

Cat eye pixels

Figure 3

A Gaussian function maps random variables into a normal distribution or “Bell Curve”. Gaussian function


Figure 4

2D Gaussian function

Figure 5

2D Gaussian function

Figure 6

Image corner pixels

Figure 7

Image multiplication

Figure 8

Blur demo animation

Figure 9

Original image

Figure 10

Blurred image

Figure 11

Bacteria colony
Graysacle version of the Petri dish image

Figure 12

Bacteria colony image with selected pixels marker
Grayscale Petri dish image marking selected pixels for profiling

Figure 13

Pixel intensities profile in original image
Intensities profile line plot of pixels along Y=150 in original image

Figure 14

Blurred bacteria colony image with selected pixels marker
Grayscale Petri dish image marking selected pixels for profiling

Figure 15

Pixel intensities profile in blurred image
Intensities profile of pixels along Y=150 in blurred image

Figure 16

3D surface plot showing pixel intensities across the whole example Petri dish image before blurring
A 3D plot of pixel intensities across the whole Petri dish image before blurring. Explore how this plot was created with matplotlib. Image credit: Carlos H Brandt.

Figure 17

3D surface plot illustrating the smoothing effect on pixel intensities across the whole example Petri dish image after blurring
A 3D plot of pixel intensities after Gaussian blurring of the Petri dish image. Note the ‘smoothing’ effect on the pixel intensities of the colonies in the image, and the ‘flattening’ of the background noise at relatively low pixel intensities throughout the image. Explore how this plot was created with matplotlib. Image credit: Carlos H Brandt.

Figure 18

Rectangular kernel blurred image

Thresholding


Figure 1

HED IHC scikit example image

Figure 2

Grayscale and blurred ihc image

Figure 3

Grayscale histogram of the blurred ihc image

Figure 4

Binary mask of the stained tissue created by thresholding

Figure 5

Selected foreground after applying binary mask

Figure 6

HeLa cells color image

Figure 7

HeLa cells gray nuclei

Figure 8

Histogram of the blue channel from the HeLa cells image

Figure 9

Binary mask created by thresholding the HeLa cells image

Figure 10

Selected nuclei after applying binary mask to the HeLa cells image

Figure 11

Histogram of the blue channel on the HeLa cells image

Figure 12

Binary mask of nuclei using otsu thresholding

Figure 13

Overview test of all automated thresholders in scikit image

Connected Component Analysis


Figure 1

Nuclei channel of HeLa cells

Figure 2

Mask created by thresholding

Figure 3

Labeled objects

Figure 4

Highlighting small labeled objects in cell image

Figure 5

Histogram of object areas

Figure 6

Objects filtered by area