I want to load the image using img=cv2.imread('....jpg')
and change the colors of the pixels whose:
x coordinate divide by 2 without remainder.
y coordinate divide by 3 without remainder
I'm using Python 3 in Anaconda/Jupyter.
Any suggestions?
I want to load the image using img=cv2.imread('....jpg')
and change the colors of the pixels whose:
x coordinate divide by 2 without remainder.
y coordinate divide by 3 without remainder
I'm using Python 3 in Anaconda/Jupyter.
Any suggestions?
I strongly suggestion to have a look to these Stack Overflow answers:
@fmw42 Gives a working source code.
Your are asking how change color of image with:
x Coordinate is a divisor of 2 (hence no reminder)
Y Coordinate is a divisor of 3 (hence no reminder)
I suggest you to look at @Mark Setchell answer here.
The most straight forward way is to go through x,y pixels in nested for loops and modify the Mat image container whenever there is match with the conditions.