KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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: import scipy from scipy import ndimage im = scipy.misc.imread('bike.jpg') processed = ndimage.sobel(im, 0) scipy.misc.imsave('sobel.jpg', processed) 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. Unfortunately I can't post the images here yet (don't have enough reputation) but I've provided links below: Original Image (bike.jpg): http://s2.postimage.org/64q8w613j/bike.jpg Scipy Filtered (sobel.jpg): http://s2.postimage.org/64qajpdlb/sobel.jpg Expected Output: http://s1.postimage.org/5vexz7kdr/normal_sobel.jpg I'm obviously going wrong somewhere! Can someone please tell me where. Thanks.
Tags (comma-separated)
Save Edits
Cancel