6.6 Summary
In this chapter we focused on cImage
—a module that contains a number of objects that can be used to manipulate digital images. In particular, cImage
includes the following objects:
▶
ImageWin
▶
EmptyImage
▶
FileImage
▶
Pixel
To process the pixels of an image, we used a pattern called nested iteration—that is, iteration inside iteration. Nested iteration allowed us to process all the pixels in a given row, column by column, before moving on to the next row. Using this iteration pattern, we implemented the following image processing algorithms:
▶ Negative images
▶ Grayscale images
▶ Resized images
▶ Flipped images
▶ Edge detection
In edge detection, we introduced lists of lists—that is, lists that are elements ...
Get Python Programming in Context, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.