Created
October 26, 2021 14:44
-
-
Save Yuktha-Majella/144cd6f533ada7e27efd95d7978d6a45 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
#Acessing Red value in coordinates (50, 50) | |
print("Pixel value of Red in (50,50) coordinate: ", img_mod1.item(50,50,2)) | |
# modifying Red value in coordinates (50, 50) | |
img_mod1.itemset((50,50,2), 225) | |
print("Pixel value of Red in (50,50) coordinate after modification: ", img_mod1.item(50,50,2)) | |
cv2.imshow('Billiards Modified', img_mod1) | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment