Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Images and Vision in Python

1,913 views

Published on

Creating and analysing images in python using PIL, scipy.ndimage and mahotas

Published in: Technology, Art & Photos
  • Be the first to comment

Images and Vision in Python

  1. 1. Images and vision in python Jonathan Street
  2. 2. Creation Analysis PIL pypng Scipy.ndimage Mahotas pymorph Common? Specialist?
  3. 3. PIL <ul><li>Reading/writing/converting image files </li></ul><ul><li>Filters/Enhancements </li></ul><ul><li>Likely uses creating thumbnails, drawing graphs etc. </li></ul>
  4. 4. Growing neural gas visualisation
  5. 6. Demo <ul><li>Image creation </li></ul><ul><li>Drawing </li></ul><ul><li>Text </li></ul><ul><li>Viewing/saving the image </li></ul>
  6. 7. Windows Gotchas <ul><li>Image preview </li></ul><ul><li>Truetype font support </li></ul><ul><ul><li>http://www.lfd.uci.edu/~gohlke/pythonlibs/ </li></ul></ul>
  7. 8. Vision Extracting information from images
  8. 9. Ndimage <ul><li>Part of scipy </li></ul><ul><li>~80 different functions </li></ul><ul><li>Convenience functions </li></ul><ul><li>Filters </li></ul><ul><li>Interpolation </li></ul><ul><li>Measurements </li></ul><ul><li>Morphology </li></ul>
  9. 10. Mahotas <ul><li>Partly implemented in C++ for speed </li></ul><ul><li>~40 functions </li></ul><ul><li>Feature detection </li></ul><ul><li>Thresholding </li></ul><ul><li>Transforms </li></ul>
  10. 11. Mahotas <ul><li>bbox </li></ul><ul><li>bwperim </li></ul><ul><li>center_of_mass </li></ul><ul><li>close_holes </li></ul><ul><li>convolve </li></ul><ul><li>croptobbox </li></ul><ul><li>cwatershed </li></ul><ul><li>dilate </li></ul><ul><li>distance </li></ul><ul><li>edge </li></ul><ul><li>erode </li></ul><ul><li>euler </li></ul><ul><li>features </li></ul><ul><li>freeimage </li></ul><ul><li>fullhistogram </li></ul><ul><li>get_structuring_elem </li></ul><ul><li>histogram </li></ul><ul><li>imread </li></ul><ul><li>imresize </li></ul><ul><li>imsave </li></ul><ul><li>lbp </li></ul><ul><li>majority_filter </li></ul><ul><li>moments </li></ul><ul><li>morph </li></ul><ul><li>otsu </li></ul><ul><li>rc </li></ul><ul><li>resize </li></ul><ul><li>segmentation </li></ul><ul><li>sobel </li></ul><ul><li>stretch </li></ul><ul><li>tas </li></ul><ul><li>texture </li></ul><ul><li>thin </li></ul><ul><li>thresholding </li></ul><ul><li>zernike </li></ul>
  11. 12. PIL <-> Numpy array <ul><li>PIL[a,b] </li></ul><ul><li>Numpy array[a,b] </li></ul>a b b a
  12. 13. Open Plaques Transcription <ul><li>“ 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.” </li></ul>
  13. 18. Links <ul><li>http://packages.python.org/mahotas </li></ul><ul><li>http://packages.python.org/pymorph </li></ul><ul><li>http://docs.scipy.org/doc/scipy/reference/ndimage.html </li></ul><ul><li>http://www.pythonware.com/products/pil/ </li></ul><ul><li>http://pythonvision.org/ </li></ul>

×