I am trying to change all the red and blue pixels in an image to black to have only green pixels (based on certain conditions). To do this right now I am using multiple for loops and the process, although it works, is extremely slow. The code I have so far – Is there any way I can vectorize this