Class 35 — November 13
Image visualization
Caterpillars say – Life is a transformation – I agree with them
Look both ways
Agenda
- Image transformations
PyCharm gotchas
- When you paste a URL in reaction to a prompt, you must also type a space at the end of the line. Do not add a space at the beginning of the line.
- If your pasting URL has https://... rather than http://..., remove the s before hitting the enter key.
Example
- Module manip.py
- Supports several common image transformations – duplicating, mirroring, flipping, rotating, scaling, and pixelation. Except for the pixelation transformation, all of the transformations copy values from the original image into the transformation.
- See documentation for transform specifications.
- Note:
manip.py
supports limited self-testing
- Questions to ask yourself before attempting the transformations:
- How do the dimensions of the transformation compare with the original?
- What is the correspondence between the pixels from the transformation with pixels from the original?
Problem solving pattern
To do
- Review imaging epistle
Transformations
Clockwise rotation | |
scale with xfactor = 2.0 and yfactor = 2.0 | |
scale with xfactor = 0.5 and yfactor = 0.5 | |
scale with xfactor = 0.5 and yfactor = 2.0 | |
scale with xfactor = 2.0 and yfactor = 0.5 | |
pixelation |