Here you can find a tutorial that introduces basic, but necessary, concepts of digital images and their manipulation with Python. It also has a short tutorial on the Python library NumPy and another on Python functions.
This course assumes a basic knowledge of the Python Programming Language.
- Python 2.7 (we recommend the Anaconda distribution, which includes most of the required modules)
- Modules: NumPy, SciPy, scikit-image, tifffile
- A text/code editor
- The Python NumPy library to manipulate images
- Making functions in Python
- Manipulating images with Python
- The numerical and array nature of digital images
- Bit-depth, variable types and data types of images in Python
- Grayness resolution, RGB format and look up tables
- Image arithmetic and unexpected errors due to data type
- Files you should have: ipython notebooks titled
pre-tutorial.ipynb,arrays-and-numpy.ipynbandtutorial-on-functions.ipyn. - To start the ipython notebooks, start a new terminal window and type “jupyter notebook”, then press enter. When a new browser window opens, navigate to the folder where you have saved the tutorials. Click on the tutorial that you want to follow.
- Using Jupyter notebook: When you want to type code into a cell, simply click on it to activate it. When you want to run the code, press shift+enter. You can learn how to use Jupyter notebooks from, e.g., https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/
- If you are following this tutorial in class, if you have any questions, raise your hand and someone will come to help you. Otherwise, feel free to send your query to one of these two email addresses:
jonas.hartmann@embl.de
karin.sasaki@embl.de