Created
April 13, 2024 08:15
-
-
Save Coderx7/feba72d7ab48d2854ceb1cd8412a668f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
# create a simple image | |
image = np.kron([[1, 0] * 4, [0, 1] * 4] * 4, np.ones((50, 50))).astype(np.uint8) * 255 | |
# test opencv | |
cv2.imshow('checkboard',image) | |
cv2.waitKey(0) | |
# test matplotlib | |
plt.imshow(image) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment