Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vmarkovtsev
Last active November 27, 2019 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vmarkovtsev/0218dee58eaacfa389f5f31490abafa5 to your computer and use it in GitHub Desktop.
Save vmarkovtsev/0218dee58eaacfa389f5f31490abafa5 to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
plt.rcParams["image.cmap"] = "hot"
# 25x25 kernel pointing straight to the east
dim = 25
kernel = np.squeeze(create_motion_blur_kernel(dim, (90/180) * np.pi).numpy()[:, :, 0, 0])
plt.contourf(np.linspace(-dim//2, dim//2, dim), np.linspace(-dim//2, dim//2, dim), kernel)
plt.colorbar()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment