Skip to content

Instantly share code, notes, and snippets.

@anhnguyen1618
Created September 23, 2020 10:37
Show Gist options
  • Save anhnguyen1618/0a9609e43462ae6d9d1e54434f39ae84 to your computer and use it in GitHub Desktop.
Save anhnguyen1618/0a9609e43462ae6d9d1e54434f39ae84 to your computer and use it in GitHub Desktop.
new_img = np.zeros(img.shape)
new_img[:, :, 0] = conv1(img[:, :, 0], kernel, mode='reflect')
new_img[:, :, 1] = conv1(img[:, :, 1], kernel, mode='reflect')
new_img[:, :, 2] = conv1(img[:, :, 2], kernel, mode='reflect')
new_img[:, :, 0] = conv1(new_img[:, :, 0], kernel, mode='reflect', axis=0)
new_img[:, :, 1] = conv1(new_img[:, :, 1], kernel, mode='reflect', axis=0)
new_img[:, :, 2] = conv1(new_img[:, :, 2], kernel, mode='reflect', axis=0)
return new_img
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment