title: Capture image for processing
body: <p>I'm using Python with PIL and SciPy.
  i want to capture an image from a webcam then process it further using numpy and Scipy. Can somebody please help me out with the code.</p>
  
  <p>Here is the code there is a predefined image "lena" but I wish to use my own captured image instead of the "lena" image. What changes do I make to the code?</p>
  
  <pre><code>from scipy import misc
  lena = misc.lena()
  lx, ly = lena.shape
  import matplotlib.pyplot as plt
  crop_lena = lena[lx / 4: - lx / 4, ly / 4: - ly / 4]
  plt.imshow(crop_lena)
  </code></pre>
  
  <p>Another example</p>
  
  <pre><code>import scipy
  from scipy import ndimage
  import matplotlib.pyplot as plt
  import numpy as np
  l = scipy.misc.lena()
  plt.figure(figsize=(10, 3.6))
  plt.subplot(131)
  plt.imshow(l, cmap=plt.cm.gray)
  plt.show()
  </code></pre>