Download - Images and Vision in Python
![Page 1: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/1.jpg)
Images and vision in python
Jonathan Street
![Page 2: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/2.jpg)
Creation AnalysisPILpypng
Scipy.ndimageMahotaspymorph
Common? Specialist?
![Page 3: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/3.jpg)
PIL
• Reading/writing/converting image files
• Filters/Enhancements
• Likely uses creating thumbnails, drawing graphs etc.
![Page 4: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/4.jpg)
Growing neural gas visualisation
![Page 5: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/5.jpg)
![Page 6: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/6.jpg)
Demo
• Image creation
• Drawing
• Text
• Viewing/saving the image
![Page 7: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/7.jpg)
Windows Gotchas
• Image preview
• Truetype font support– http://www.lfd.uci.edu/~gohlke/pythonlibs/
![Page 8: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/8.jpg)
Vision
Extracting information from images
![Page 9: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/9.jpg)
Ndimage
• Part of scipy
• ~80 different functions
• Convenience functions
• Filters
• Interpolation
• Measurements
• Morphology
![Page 10: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/10.jpg)
Mahotas
• Partly implemented in C++ for speed
• ~40 functions
• Feature detection
• Thresholding
• Transforms
![Page 11: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/11.jpg)
Mahotas
• bbox
• bwperim
• center_of_mass
• close_holes
• convolve
• croptobbox
• cwatershed
• dilate
• distance
• edge
• erode
• euler
• features
• freeimage
• fullhistogram
• get_structuring_elem
• histogram
• imread
• imresize
• imsave
• lbp
• majority_filter
• moments
• morph
• otsu
• rc
• resize
•segmentation•sobel•stretch•tas•texture•thin•thresholding•zernike
![Page 12: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/12.jpg)
PIL <-> Numpy array
PIL[a,b] Numpy array[a,b]
a b
ba
![Page 13: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/13.jpg)
Open Plaques Transcription
“Open Plaques is a service that aims to find and provide data about all the commemorative 'plaques' (often blue and round) that can be found across the UK and worldwide.”
![Page 14: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/14.jpg)
![Page 15: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/15.jpg)
![Page 16: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/16.jpg)
![Page 17: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/17.jpg)
![Page 18: Images and Vision in Python](https://reader035.vdocuments.site/reader035/viewer/2022062514/5583bfe0d8b42a7c758b45ef/html5/thumbnails/18.jpg)
Links
• http://packages.python.org/mahotas
• http://packages.python.org/pymorph
• http://docs.scipy.org/doc/scipy/reference/ndimage.html
• http://www.pythonware.com/products/pil/
• http://pythonvision.org/