Answer the question
In order to leave comments, you need to log in
How to change the color of image pixels whose x-coordinate is divisible by 2 and y-coordinate is divisible by 3 without a remainder in python-3?
I need to change the color of pixels whose x coordinate is divisible by 2 and the y coordinate is divisible by 3 without a remainder. In this case, these pixels must be painted white. I am using Anaconda/Jupyter environment.
Answer the question
In order to leave comments, you need to log in
import numpy as np
image = np.zeros((480, 640, 3), dtype=np.uint8)
image[::3, ::2] = (255, 255, 255)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question