Add nearest mode for positions outside image

This commit is contained in:
Johannes Schönberger
2012-08-30 12:08:21 +02:00
parent 4dfdc7f74f
commit 4cd1f8798b
4 changed files with 25 additions and 23 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ def test_fast_homography():
coords = warp_coords(tform.inverse, (img.shape[0], img.shape[1]))
for order in range(4):
for mode in ('constant', 'reflect', 'wrap'):
for mode in ('constant', 'reflect', 'wrap', 'nearest'):
p0 = map_coordinates(img, coords, mode=mode, order=order)
p1 = warp(img, tform, mode=mode, order=order)