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

ImProc ass2: Merged conflict.

parents b7e9b760 aecfcd35
from interpolation import pv from interpolation import pv
from pylab import array, matrix, zeros, show, dot, lstsq, inv, svd from pylab import array, matrix, zeros, show, dot, lstsq, inv, svd, subplot, \
plot, figure
# url: http://www.leptonica.com/affine.html # url: http://www.leptonica.com/affine.html
...@@ -88,5 +89,12 @@ if __name__ == '__main__': ...@@ -88,5 +89,12 @@ if __name__ == '__main__':
result = perspective_transform(image, (149, 590), (101, 376), (301, 209), result = perspective_transform(image, (149, 590), (101, 376), (301, 209),
(393, 392), 64, 64) (393, 392), 64, 64)
figure(1)
subplot(121)
x = [0, half_width, image.shape[0], half_width, 0]
y = [half_height, 0, half_height, image.shape[1], half_height]
plot(x, y, '-')
imshow(image, cmap='gray')
subplot(122)
imshow(result, cmap='gray') imshow(result, cmap='gray')
show() show()
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