title: Applying the Sobel filter using scipy
body: <p>I'm trying to apply the Sobel filter on an image to detect edges using scipy. I'm using Python 3.2 (64 bit) and scipy 0.9.0 on Windows 7 Ultimate (64 bit). Currently my code is as follows:</p>
  
  <pre><code>import scipy
  from scipy import ndimage
  
  im = scipy.misc.imread('bike.jpg')
  processed = ndimage.sobel(im, 0)
  scipy.misc.imsave('sobel.jpg', processed)
  </code></pre>
  
  <p>I don't know what I'm doing wrong, but the processed image does not look anything like what it should. The image, 'bike.jpg' is a greyscale (mode 'L' not 'RGB') image so each pixel has only one value associated with it.</p>
  
  <p>Unfortunately I can't post the images here yet (don't have enough reputation) but I've provided links below:</p>
  
  <p>Original Image (bike.jpg):
  <a href="http://s2.postimage.org/64q8w613j/bike.jpg">http://s2.postimage.org/64q8w613j/bike.jpg</a></p>
  
  <p>Scipy Filtered (sobel.jpg):
  <a href="http://s2.postimage.org/64qajpdlb/sobel.jpg">http://s2.postimage.org/64qajpdlb/sobel.jpg</a></p>
  
  <p>Expected Output:
  <a href="http://s1.postimage.org/5vexz7kdr/normal_sobel.jpg">http://s1.postimage.org/5vexz7kdr/normal_sobel.jpg</a></p>
  
  <p>I'm obviously going wrong somewhere! Can someone please tell me where. Thanks.</p>