Commit 92553830 authored by Taddeüs Kroes's avatar Taddeüs Kroes

improc ass4: various stuff

parent 87c7ff7c
#!/usr/bin/env python
from matplotlib.pyplot import imread, imshow, show
from scipy.ndimage import quiver
from numpy import arctan
from gauss import gD
def canny(F, s):
pass
# Noise reduction by a Gauss filter
G = gD(F, s, 2, 2)
# Find intensity gradient
return G
# Non-maximum suppression
# Tracing edges
if __name__ == '__main__':
from sys import argv, exit
if len(argv) < 3:
print 'Usage: python %s' % argv[0]
if len(argv) < 2:
print 'Usage: python %s SCALE' % argv[0]
exit(1)
s = float(argv[2])
s = float(argv[1])
F = imread('cameraman.png')
E = canny(F, s)
imshow(E)
imshow(E, cmap='gray')
show()
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment