|
17 | 17 | "\n", |
18 | 18 | "This notebook introduces the basics of image handling and manipulation in Python, using <a href=\"https://scikit-image.org/\">Scikit-image</a>, <a href=\"https://matplotlib.org/stable/\">Matplotlib</a>, and <a href=\"https://numpy.org/\">Numpy</a>.\n", |
19 | 19 | "\n", |
20 | | - "➡️ <a href=\"https://github.com/EPFL-Center-for-Imaging/ImagingLunch_ImagesInPython\">Git repository</a>." |
21 | | - ] |
22 | | - }, |
23 | | - { |
24 | | - "cell_type": "markdown", |
25 | | - "id": "01e44911", |
26 | | - "metadata": { |
27 | | - "editable": true, |
28 | | - "slideshow": { |
29 | | - "slide_type": "subslide" |
30 | | - }, |
31 | | - "tags": [] |
32 | | - }, |
33 | | - "source": [ |
34 | | - "```{admonition} How to use this notebook?\n", |
35 | | - "This document is an interactive <a href=\"https://jupyter.org/\">Jupyter notebook</a>. Use `Shift`+`Enter` to run individual code cells.\n", |
36 | | - "```" |
37 | | - ] |
38 | | - }, |
39 | | - { |
40 | | - "cell_type": "markdown", |
41 | | - "id": "6507408c", |
42 | | - "metadata": { |
43 | | - "editable": true, |
44 | | - "slideshow": { |
45 | | - "slide_type": "fragment" |
46 | | - }, |
47 | | - "tags": [] |
48 | | - }, |
49 | | - "source": [ |
50 | | - "## Why use Python for image analysis?\n", |
51 | | - "\n", |
52 | | - "- ✅ Easy to learn and use\n", |
53 | | - "- ✅ Free & open-source\n", |
54 | | - "- ✅ Wide range of libraries\n", |
55 | | - "- ✅ Implement custom functions & tools\n", |
56 | | - "- ✅ Automate image analysis via scripts\n", |
57 | | - "- ✅ Deep learning & data science\n", |
58 | | - "- ✅ Explore data in Juptyer notebooks" |
59 | | - ] |
60 | | - }, |
61 | | - { |
62 | | - "cell_type": "markdown", |
63 | | - "id": "4a377b85", |
64 | | - "metadata": { |
65 | | - "editable": true, |
66 | | - "slideshow": { |
67 | | - "slide_type": "subslide" |
68 | | - }, |
69 | | - "tags": [] |
70 | | - }, |
71 | | - "source": [ |
72 | | - "## Contents\n", |
73 | | - "\n", |
74 | | - "We'll cover the following topics:\n", |
75 | | - "\n", |
76 | | - "- <a href=\"#opening-our-first-image\">Opening our first image</a>\n", |
77 | | - "- <a href=\"#how-are-digital-images-represented-in-python\">How are digital images represented in Python?</a>\n", |
78 | | - "- <a href=\"#selecting-and-modifying-pixel-values\">Selecting and modifying pixel values</a>\n", |
79 | | - "- <a href=\"#opening-images-from-files\">Opening images from files</a>\n", |
80 | | - "- <a href=\"#applying-image-processing-filters\">Applying image processing filters</a>\n", |
81 | | - "- <a href=\"#thresholding\">Thresholding</a>\n", |
82 | | - "- <a href=\"#analyzing-individual-objects\">Analyzing individual objects</a>" |
83 | | - ] |
84 | | - }, |
85 | | - { |
86 | | - "cell_type": "markdown", |
87 | | - "id": "048880e7", |
88 | | - "metadata": {}, |
89 | | - "source": [ |
90 | | - "## Packages\n", |
91 | | - "\n", |
92 | | - "We'll use the packages listed in the requirements file (<a href=\"./requirements.txt\">requirements.txt</a>). To make sure you have installed these packages, you can run the Jupyter \"magic\" command below:" |
93 | | - ] |
94 | | - }, |
95 | | - { |
96 | | - "cell_type": "code", |
97 | | - "execution_count": null, |
98 | | - "id": "2c396e26", |
99 | | - "metadata": {}, |
100 | | - "outputs": [], |
101 | | - "source": [ |
102 | | - "%pip install -qr requirements.txt" |
103 | | - ] |
104 | | - }, |
105 | | - { |
106 | | - "cell_type": "markdown", |
107 | | - "id": "fea92a32", |
108 | | - "metadata": {}, |
109 | | - "source": [ |
110 | | - "## Imports\n", |
111 | | - "\n", |
112 | 20 | "We start by importing the `data` module from <a href=\"https://scikit-image.org/\">Scikit-image</a>, which provides example images, and Matplotlib's `pyplot` module which we'll use to display images." |
113 | 21 | ] |
114 | 22 | }, |
|
435 | 343 | "source": [ |
436 | 344 | "import skimage.io\n", |
437 | 345 | "\n", |
438 | | - "# Image source: VIATICALPES (https://catima.unil.ch/viatimages/en)\n", |
439 | | - "image = skimage.io.imread(\"limmat_fish.tif\")\n", |
| 346 | + "# Image source https://catima.unil.ch/viatimages\n", |
| 347 | + "image = skimage.io.imread(\"fish.png\")\n", |
440 | 348 | "\n", |
441 | 349 | "plt.imshow(image);\n", |
442 | 350 | "\n", |
|
0 commit comments