I have an RGBA image where I have to find if any pixel has red value < 150 and to replace such pixels to black. I am using following code for this:
import nu
For one channel image, we can do as follow
out_val = 0 gray = cv2.imread("colour.png",0) gray[gray