test_cut.py 404 B

12345678910111213141516
  1. from PIL import Image
  2. import numpy as np
  3. image_path_noisy = 'cuisine01_00400.png'
  4. image_path_ref = 'cuisine01_01200.png'
  5. image_noisy = np.asarray(Image.open(image_path_noisy))
  6. image_ref = np.asarray(Image.open(image_path_ref))
  7. first_part = image_noisy[:, 0:400]
  8. second_part = image_ref[:, 400:800]
  9. final_image = Image.fromarray(np.concatenate((first_part, second_part), axis=1))
  10. final_image.show()