ImageImpaint_Python_II/ex4.py

16 lines
527 B
Python
Raw Normal View History

2022-05-18 05:57:00 +00:00
import numpy as np
def ex4(image_array: np.array, offset: (int, int), spacing: (int, int)):
mask = np.zeros(shape=image_array.shape, dtype=image_array.dtype)
test = list(range(offset[0], mask.shape[1] - 1, spacing[0]))
print(test)
pass
if __name__ == '__main__':
ex4(np.array([[(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
[(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)],
[(0, 0, 0), (0, 0, 0), (0, 0, 0), (0, 0, 0)]
]), offset=(1, 1), spacing=(2, 2))