Fix reflected pixel coordinates in the remap tutorial

This commit is contained in:
Amanpal9
2026-11-29 12:14:21 +05:30
parent 08da8bc27a
commit e8bf8babb7
4 changed files with 16 additions and 16 deletions

View File

@@ -18,17 +18,17 @@ def update_map(ind, map_x, map_y):
for i in range(map_x.shape[0]):
map_x[i,:] = [x for x in range(map_x.shape[1])]
for j in range(map_y.shape[1]):
map_y[:,j] = [map_y.shape[0]-y for y in range(map_y.shape[0])]
map_y[:,j] = [map_y.shape[0]-1-y for y in range(map_y.shape[0])]
elif ind == 2:
for i in range(map_x.shape[0]):
map_x[i,:] = [map_x.shape[1]-x for x in range(map_x.shape[1])]
map_x[i,:] = [map_x.shape[1]-1-x for x in range(map_x.shape[1])]
for j in range(map_y.shape[1]):
map_y[:,j] = [y for y in range(map_y.shape[0])]
elif ind == 3:
for i in range(map_x.shape[0]):
map_x[i,:] = [map_x.shape[1]-x for x in range(map_x.shape[1])]
map_x[i,:] = [map_x.shape[1]-1-x for x in range(map_x.shape[1])]
for j in range(map_y.shape[1]):
map_y[:,j] = [map_y.shape[0]-y for y in range(map_y.shape[0])]
map_y[:,j] = [map_y.shape[0]-1-y for y in range(map_y.shape[0])]
## [Update]
parser = argparse.ArgumentParser(description='Code for Remapping tutorial.')