I have an RGB image, sized (128,128,3). I need to write a for loop and change the pixel values whose red band is larger than their green or blue channels, with white pixels. But I am new to programming and couldn't figure out how to write the for loop. i just have a basic structure;
if image(:,:,1) > image(:,:,2:3);
then image(:,:,1) = image2(:,:,1);
can you help me please?